diff --git a/cw_bitcoin/lib/electrum_transaction_history.dart b/cw_bitcoin/lib/electrum_transaction_history.dart index 658f83f8a..d096d0e7b 100644 --- a/cw_bitcoin/lib/electrum_transaction_history.dart +++ b/cw_bitcoin/lib/electrum_transaction_history.dart @@ -31,7 +31,10 @@ abstract class ElectrumTransactionHistoryBase String _password; int _height; - Future init() async => await _load(); + Future init() async { + clear(); + await _load(); + } @override void addOne(ElectrumTransactionInfo transaction) => transactions[transaction.id] = transaction; diff --git a/cw_evm/lib/evm_chain_transaction_history.dart b/cw_evm/lib/evm_chain_transaction_history.dart index c4d91783f..4a05746da 100644 --- a/cw_evm/lib/evm_chain_transaction_history.dart +++ b/cw_evm/lib/evm_chain_transaction_history.dart @@ -34,7 +34,10 @@ abstract class EVMChainTransactionHistoryBase //! Common methods across all child classes - Future init() async => await _load(); + Future init() async { + clear(); + await _load(); + } @override Future save() async { @@ -81,6 +84,7 @@ abstract class EVMChainTransactionHistoryBase _update(tx); } } + print('doneee'); } catch (e) { log(e.toString()); } diff --git a/cw_nano/lib/nano_transaction_history.dart b/cw_nano/lib/nano_transaction_history.dart index 7b4c5bc12..2b551ffa6 100644 --- a/cw_nano/lib/nano_transaction_history.dart +++ b/cw_nano/lib/nano_transaction_history.dart @@ -28,7 +28,10 @@ abstract class NanoTransactionHistoryBase extends TransactionHistoryBase init() async => await _load(); + Future init() async { + clear(); + await _load(); + } @override Future save() async { diff --git a/cw_solana/lib/solana_transaction_history.dart b/cw_solana/lib/solana_transaction_history.dart index 761753f06..62b9db8f7 100644 --- a/cw_solana/lib/solana_transaction_history.dart +++ b/cw_solana/lib/solana_transaction_history.dart @@ -26,7 +26,10 @@ abstract class SolanaTransactionHistoryBase extends TransactionHistoryBase init() async => await _load(); + Future init() async { + clear(); + await _load(); + } @override Future save() async { diff --git a/cw_tron/lib/tron_transaction_history.dart b/cw_tron/lib/tron_transaction_history.dart index 9d226c09c..c940c7708 100644 --- a/cw_tron/lib/tron_transaction_history.dart +++ b/cw_tron/lib/tron_transaction_history.dart @@ -25,7 +25,10 @@ abstract class TronTransactionHistoryBase extends TransactionHistoryBase init() async => await _load(); + Future init() async { + clear(); + await _load(); + } @override Future save() async {