mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 09:47:37 +00:00
fix: old block errors
This commit is contained in:
parent
885310395e
commit
53be1f53db
2 changed files with 43 additions and 17 deletions
|
@ -733,17 +733,29 @@ class BananoWallet extends CoinServiceAPI
|
|||
|
||||
@override
|
||||
Future<void> refresh() async {
|
||||
if (refreshMutex) {
|
||||
Logging.instance.log(
|
||||
"$walletId $walletName refreshMutex denied",
|
||||
level: LogLevel.Info,
|
||||
);
|
||||
return;
|
||||
} else {
|
||||
refreshMutex = true;
|
||||
}
|
||||
|
||||
await _prefs.init();
|
||||
|
||||
GlobalEventBus.instance.fire(
|
||||
WalletSyncStatusChangedEvent(
|
||||
WalletSyncStatus.syncing,
|
||||
walletId,
|
||||
coin,
|
||||
),
|
||||
);
|
||||
|
||||
try {
|
||||
GlobalEventBus.instance.fire(
|
||||
WalletSyncStatusChangedEvent(
|
||||
WalletSyncStatus.syncing,
|
||||
walletId,
|
||||
coin,
|
||||
),
|
||||
);
|
||||
|
||||
await _prefs.init();
|
||||
|
||||
await updateChainHeight();
|
||||
await updateTransactions();
|
||||
await updateBalance();
|
||||
|
@ -768,6 +780,8 @@ class BananoWallet extends CoinServiceAPI
|
|||
),
|
||||
);
|
||||
}
|
||||
|
||||
refreshMutex = false;
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
@ -747,17 +747,27 @@ class NanoWallet extends CoinServiceAPI
|
|||
|
||||
@override
|
||||
Future<void> refresh() async {
|
||||
await _prefs.init();
|
||||
|
||||
GlobalEventBus.instance.fire(
|
||||
WalletSyncStatusChangedEvent(
|
||||
WalletSyncStatus.syncing,
|
||||
walletId,
|
||||
coin,
|
||||
),
|
||||
);
|
||||
if (refreshMutex) {
|
||||
Logging.instance.log(
|
||||
"$walletId $walletName refreshMutex denied",
|
||||
level: LogLevel.Info,
|
||||
);
|
||||
return;
|
||||
} else {
|
||||
refreshMutex = true;
|
||||
}
|
||||
|
||||
try {
|
||||
await _prefs.init();
|
||||
|
||||
GlobalEventBus.instance.fire(
|
||||
WalletSyncStatusChangedEvent(
|
||||
WalletSyncStatus.syncing,
|
||||
walletId,
|
||||
coin,
|
||||
),
|
||||
);
|
||||
|
||||
await updateChainHeight();
|
||||
await updateTransactions();
|
||||
await updateBalance();
|
||||
|
@ -782,6 +792,8 @@ class NanoWallet extends CoinServiceAPI
|
|||
),
|
||||
);
|
||||
}
|
||||
|
||||
refreshMutex = false;
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
Loading…
Reference in a new issue