mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-02-28 05:50:25 +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
|
@action
|
||||||
@override
|
@override
|
||||||
Future<void> startSync() async {
|
Future<void> startSync() async {
|
||||||
print("STARTING SYNC @@@@@@@@@@@@@@@@@@@@@@@@@@@@@");
|
|
||||||
if (syncStatus is SyncronizingSyncStatus) {
|
if (syncStatus is SyncronizingSyncStatus) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -251,8 +250,7 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store {
|
||||||
try {
|
try {
|
||||||
syncStatus = SyncronizingSyncStatus();
|
syncStatus = SyncronizingSyncStatus();
|
||||||
await subscribeForUpdates();
|
await subscribeForUpdates();
|
||||||
|
updateFeeRates();
|
||||||
await updateFeeRates();
|
|
||||||
_feeRatesTimer?.cancel();
|
_feeRatesTimer?.cancel();
|
||||||
_feeRatesTimer =
|
_feeRatesTimer =
|
||||||
Timer.periodic(const Duration(minutes: 1), (timer) async => await updateFeeRates());
|
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:
|
// prevent unnecessary reaction triggers:
|
||||||
if (syncStatus is! SyncedSyncStatus) {
|
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();
|
syncStatus = SyncedSyncStatus();
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
@ -489,9 +490,9 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store {
|
||||||
}
|
}
|
||||||
_utxoStream = responseStream.listen((Utxo sUtxo) async {
|
_utxoStream = responseStream.listen((Utxo sUtxo) async {
|
||||||
// we're processing utxos, so our balance could still be innacurate:
|
// we're processing utxos, so our balance could still be innacurate:
|
||||||
if (syncStatus is! SyncronizingSyncStatus && syncStatus is! SyncingSyncStatus) {
|
// if (syncStatus is! SyncronizingSyncStatus && syncStatus is! SyncingSyncStatus) {
|
||||||
syncStatus = SyncronizingSyncStatus();
|
// syncStatus = SyncronizingSyncStatus();
|
||||||
}
|
// }
|
||||||
|
|
||||||
final utxo = MwebUtxo(
|
final utxo = MwebUtxo(
|
||||||
address: sUtxo.address,
|
address: sUtxo.address,
|
||||||
|
|
Loading…
Reference in a new issue