mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-12-01 12:04:21 +01:00
CW 1080: fix(cw_monero): call store() directly after commiting tx (#2312)
* fix(cw_monero): call store() directly after commiting tx to make sure that tx key is written to cache also, store it in TransactionDescription hive box * Update lib/view_model/send/send_view_model.dart --------- Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
This commit is contained in:
@@ -5,7 +5,7 @@ part 'transaction_description.g.dart';
|
||||
|
||||
@HiveType(typeId: TransactionDescription.typeId)
|
||||
class TransactionDescription extends HiveObject {
|
||||
TransactionDescription({required this.id, this.recipientAddress, this.transactionNote});
|
||||
TransactionDescription({required this.id, this.recipientAddress, this.transactionNote, this.transactionKey});
|
||||
|
||||
static const typeId = TRANSACTION_TYPE_ID;
|
||||
static const boxName = 'TransactionDescriptions';
|
||||
@@ -20,12 +20,16 @@ class TransactionDescription extends HiveObject {
|
||||
@HiveField(2)
|
||||
String? transactionNote;
|
||||
|
||||
@HiveField(3)
|
||||
String? transactionKey;
|
||||
|
||||
String get note => transactionNote ?? '';
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'id': id,
|
||||
'recipientAddress': recipientAddress,
|
||||
'transactionNote': transactionNote,
|
||||
'transactionKey': transactionKey,
|
||||
};
|
||||
|
||||
factory TransactionDescription.fromJson(Map<String, dynamic> json) {
|
||||
@@ -33,6 +37,7 @@ class TransactionDescription extends HiveObject {
|
||||
id: json['id'] as String,
|
||||
recipientAddress: json['recipientAddress'] as String?,
|
||||
transactionNote: json['transactionNote'] as String?,
|
||||
transactionKey: json['transactionKey'] as String?,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user