From 5712fab88fda88008dbeaedfe87885457639a81c Mon Sep 17 00:00:00 2001 From: julian Date: Tue, 10 Jan 2023 09:21:22 -0600 Subject: [PATCH] WIP Isar transaction sub type enum --- .../isar/models/blockchain_data/transaction.dart | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/models/isar/models/blockchain_data/transaction.dart b/lib/models/isar/models/blockchain_data/transaction.dart index e3ae9cedc..522b30730 100644 --- a/lib/models/isar/models/blockchain_data/transaction.dart +++ b/lib/models/isar/models/blockchain_data/transaction.dart @@ -17,7 +17,7 @@ class Transaction { late TransactionType txType; - late String subType; + late TransactionSubType subType; late int amount; @@ -57,3 +57,15 @@ enum TransactionType with IsarEnum { @override int get value => index; } + +// Used in Isar db and stored there as int indexes so adding/removing values +// in this definition should be done extremely carefully in production +enum TransactionSubType with IsarEnum { + // TODO: add more types before prod release? + none, + bip47Notification, // bip47 payment code notification transaction flag + mint; // firo specific + + @override + int get value => index; +}