mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-17 05:41:29 +02:00
fix: Tentative fix for transaction history items overlap across wallet types (#1864)
This commit is contained in:
@@ -31,7 +31,10 @@ abstract class ElectrumTransactionHistoryBase
|
||||
String _password;
|
||||
int _height;
|
||||
|
||||
Future<void> init() async => await _load();
|
||||
Future<void> init() async {
|
||||
clear();
|
||||
await _load();
|
||||
}
|
||||
|
||||
@override
|
||||
void addOne(ElectrumTransactionInfo transaction) => transactions[transaction.id] = transaction;
|
||||
|
||||
@@ -34,7 +34,10 @@ abstract class EVMChainTransactionHistoryBase
|
||||
|
||||
//! Common methods across all child classes
|
||||
|
||||
Future<void> init() async => await _load();
|
||||
Future<void> init() async {
|
||||
clear();
|
||||
await _load();
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> save() async {
|
||||
@@ -81,6 +84,7 @@ abstract class EVMChainTransactionHistoryBase
|
||||
_update(tx);
|
||||
}
|
||||
}
|
||||
print('doneee');
|
||||
} catch (e) {
|
||||
log(e.toString());
|
||||
}
|
||||
|
||||
@@ -28,7 +28,10 @@ abstract class NanoTransactionHistoryBase extends TransactionHistoryBase<NanoTra
|
||||
final EncryptionFileUtils encryptionFileUtils;
|
||||
String _password;
|
||||
|
||||
Future<void> init() async => await _load();
|
||||
Future<void> init() async {
|
||||
clear();
|
||||
await _load();
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> save() async {
|
||||
|
||||
@@ -26,7 +26,10 @@ abstract class SolanaTransactionHistoryBase extends TransactionHistoryBase<Solan
|
||||
final EncryptionFileUtils encryptionFileUtils;
|
||||
String _password;
|
||||
|
||||
Future<void> init() async => await _load();
|
||||
Future<void> init() async {
|
||||
clear();
|
||||
await _load();
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> save() async {
|
||||
|
||||
@@ -25,7 +25,10 @@ abstract class TronTransactionHistoryBase extends TransactionHistoryBase<TronTra
|
||||
final WalletInfo walletInfo;
|
||||
final EncryptionFileUtils encryptionFileUtils;
|
||||
|
||||
Future<void> init() async => await _load();
|
||||
Future<void> init() async {
|
||||
clear();
|
||||
await _load();
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> save() async {
|
||||
|
||||
Reference in New Issue
Block a user