mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-18 16:55:58 +00:00
[skip ci] minor
This commit is contained in:
parent
967e33329e
commit
5cb8c4f406
1 changed files with 7 additions and 6 deletions
|
@ -243,7 +243,6 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store {
|
|||
@action
|
||||
@override
|
||||
Future<void> startSync() async {
|
||||
print("STARTING SYNC @@@@@@@@@@@@@@@@@@@@@@@@@@@@@");
|
||||
if (syncStatus is SyncronizingSyncStatus) {
|
||||
return;
|
||||
}
|
||||
|
@ -251,8 +250,7 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store {
|
|||
try {
|
||||
syncStatus = SyncronizingSyncStatus();
|
||||
await subscribeForUpdates();
|
||||
|
||||
await updateFeeRates();
|
||||
updateFeeRates();
|
||||
_feeRatesTimer?.cancel();
|
||||
_feeRatesTimer =
|
||||
Timer.periodic(const Duration(minutes: 1), (timer) async => await updateFeeRates());
|
||||
|
@ -317,6 +315,9 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store {
|
|||
|
||||
// prevent unnecessary reaction triggers:
|
||||
if (syncStatus is! SyncedSyncStatus) {
|
||||
// mwebd is synced, but we could still be processing incoming utxos (should only take a few seconds)
|
||||
// so we wait a few seconds before marking the wallet as synced
|
||||
await Future.delayed(const Duration(seconds: 3));
|
||||
syncStatus = SyncedSyncStatus();
|
||||
}
|
||||
return;
|
||||
|
@ -489,9 +490,9 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store {
|
|||
}
|
||||
_utxoStream = responseStream.listen((Utxo sUtxo) async {
|
||||
// we're processing utxos, so our balance could still be innacurate:
|
||||
if (syncStatus is! SyncronizingSyncStatus && syncStatus is! SyncingSyncStatus) {
|
||||
syncStatus = SyncronizingSyncStatus();
|
||||
}
|
||||
// if (syncStatus is! SyncronizingSyncStatus && syncStatus is! SyncingSyncStatus) {
|
||||
// syncStatus = SyncronizingSyncStatus();
|
||||
// }
|
||||
|
||||
final utxo = MwebUtxo(
|
||||
address: sUtxo.address,
|
||||
|
|
Loading…
Reference in a new issue