Files
hash-wallet/lib/entities/transaction_description.dart
T
d09391bf99 Upgrade Flutter version to 3.41.9 (#3213)
* commit generated files and remove codegen metadata

* remove hive_generator dependency

* update dependencies

* update intl

* update ios project files

* update native code

* update android deps

* update image name in ci

* revert impeller

* re-ignore min version error

* fix cw_decred dependency

* update hive in cw_core

* fix docker build cache for decred

* fix conflict

* prevent frozen coins being reset on coin info refresh

* fix for makeSecure

---------

Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
2026-06-26 16:03:31 +03:00

44 lines
1.2 KiB
Dart

import 'package:cw_core/hive_type_ids.dart';
import 'package:hive/hive.dart';
part 'transaction_description.part.dart';
// @HiveType(typeId: TransactionDescription.typeId)
class TransactionDescription extends HiveObject {
TransactionDescription({required this.id, this.recipientAddress, this.transactionNote, this.transactionKey});
static const typeId = TRANSACTION_TYPE_ID;
static const boxName = 'TransactionDescriptions';
static const boxKey = 'transactionDescriptionsBoxKey';
// @HiveField(0, defaultValue: '')
String id;
// @HiveField(1)
String? recipientAddress;
// @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) {
return TransactionDescription(
id: json['id'] as String,
recipientAddress: json['recipientAddress'] as String?,
transactionNote: json['transactionNote'] as String?,
transactionKey: json['transactionKey'] as String?,
);
}
}