diff --git a/cw_core/lib/node.dart b/cw_core/lib/node.dart index 1f2cfe7d2..886add3cd 100644 --- a/cw_core/lib/node.dart +++ b/cw_core/lib/node.dart @@ -36,7 +36,7 @@ class Node extends HiveObject with Keyable { static const typeId = 1; static const boxName = 'Nodes'; - @HiveField(0) + @HiveField(0, defaultValue: '') late String uriRaw; @HiveField(1) @@ -45,7 +45,7 @@ class Node extends HiveObject with Keyable { @HiveField(2) String? password; - @HiveField(3) + @HiveField(3, defaultValue: 0) late int typeRaw; @HiveField(4) diff --git a/cw_core/lib/unspent_coins_info.dart b/cw_core/lib/unspent_coins_info.dart index 420517939..d825db279 100644 --- a/cw_core/lib/unspent_coins_info.dart +++ b/cw_core/lib/unspent_coins_info.dart @@ -15,16 +15,16 @@ class UnspentCoinsInfo extends HiveObject { static const boxName = 'Unspent'; static const boxKey = 'unspentBoxKey'; - @HiveField(0) + @HiveField(0, defaultValue: '') String walletId; - @HiveField(1) + @HiveField(1, defaultValue: '') String hash; - @HiveField(2) + @HiveField(2, defaultValue: false) bool isFrozen; - @HiveField(3) + @HiveField(3, defaultValue: false) bool isSending; @HiveField(4) diff --git a/cw_core/lib/wallet_info.dart b/cw_core/lib/wallet_info.dart index 66ed1e932..a25702cf7 100644 --- a/cw_core/lib/wallet_info.dart +++ b/cw_core/lib/wallet_info.dart @@ -33,31 +33,31 @@ class WalletInfo extends HiveObject { static const typeId = 4; static const boxName = 'WalletInfo'; - @HiveField(0) + @HiveField(0, defaultValue: '') String id; - @HiveField(1) + @HiveField(1, defaultValue: '') String name; @HiveField(2) WalletType type; - @HiveField(3) + @HiveField(3, defaultValue: false) bool isRecovery; - @HiveField(4) + @HiveField(4, defaultValue: 0) int restoreHeight; - @HiveField(5) + @HiveField(5, defaultValue: 0) int timestamp; - @HiveField(6) + @HiveField(6, defaultValue: '') String dirPath; - @HiveField(7) + @HiveField(7, defaultValue: '') String path; - @HiveField(8) + @HiveField(8, defaultValue: '') String address; @HiveField(10) diff --git a/lib/buy/order.dart b/lib/buy/order.dart index 16dfbb4e0..387fbcd34 100644 --- a/lib/buy/order.dart +++ b/lib/buy/order.dart @@ -30,10 +30,10 @@ class Order extends HiveObject { static const boxName = 'Orders'; static const boxKey = 'ordersBoxKey'; - @HiveField(0) + @HiveField(0, defaultValue: '') String id; - @HiveField(1) + @HiveField(1, defaultValue: '') String transferId; @HiveField(2) @@ -42,7 +42,7 @@ class Order extends HiveObject { @HiveField(3) String? to; - @HiveField(4) + @HiveField(4, defaultValue: '') late String stateRaw; TradeState get state => TradeState.deserialize(raw: stateRaw); @@ -50,16 +50,16 @@ class Order extends HiveObject { @HiveField(5) DateTime createdAt; - @HiveField(6) + @HiveField(6, defaultValue: '') String amount; - @HiveField(7) + @HiveField(7, defaultValue: '') String receiveAddress; - @HiveField(8) + @HiveField(8, defaultValue: '') String walletId; - @HiveField(9) + @HiveField(9, defaultValue: 0) late int providerRaw; BuyProviderDescription get provider => diff --git a/lib/entities/contact.dart b/lib/entities/contact.dart index b76e4de43..e111429ca 100644 --- a/lib/entities/contact.dart +++ b/lib/entities/contact.dart @@ -17,13 +17,13 @@ class Contact extends HiveObject with Keyable { static const typeId = 0; static const boxName = 'Contacts'; - @HiveField(0) + @HiveField(0, defaultValue: '') String name; - @HiveField(1) + @HiveField(1, defaultValue: '') String address; - @HiveField(2) + @HiveField(2, defaultValue: 0) late int raw; CryptoCurrency get type => CryptoCurrency.deserialize(raw: raw); diff --git a/lib/entities/transaction_description.dart b/lib/entities/transaction_description.dart index 868077733..86d6b043a 100644 --- a/lib/entities/transaction_description.dart +++ b/lib/entities/transaction_description.dart @@ -10,7 +10,7 @@ class TransactionDescription extends HiveObject { static const boxName = 'TransactionDescriptions'; static const boxKey = 'transactionDescriptionsBoxKey'; - @HiveField(0) + @HiveField(0, defaultValue: '') String id; @HiveField(1) diff --git a/lib/exchange/trade.dart b/lib/exchange/trade.dart index 0f6425ecc..99b73e789 100644 --- a/lib/exchange/trade.dart +++ b/lib/exchange/trade.dart @@ -40,26 +40,26 @@ class Trade extends HiveObject { static const boxName = 'Trades'; static const boxKey = 'tradesBoxKey'; - @HiveField(0) + @HiveField(0, defaultValue: '') String id; - @HiveField(1) + @HiveField(1, defaultValue: 0) late int providerRaw; ExchangeProviderDescription get provider => ExchangeProviderDescription.deserialize(raw: providerRaw); - @HiveField(2) + @HiveField(2, defaultValue: 0) late int fromRaw; CryptoCurrency get from => CryptoCurrency.deserialize(raw: fromRaw); - @HiveField(3) + @HiveField(3, defaultValue: 0) late int toRaw; CryptoCurrency get to => CryptoCurrency.deserialize(raw: toRaw); - @HiveField(4) + @HiveField(4, defaultValue: '') late String stateRaw; TradeState get state => TradeState.deserialize(raw: stateRaw); @@ -70,7 +70,7 @@ class Trade extends HiveObject { @HiveField(6) DateTime? expiredAt; - @HiveField(7) + @HiveField(7, defaultValue: '') String amount; @HiveField(8)