mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 17:57:40 +00:00
ensure failed state is reset so that the retry button is not shown when fusing again or after tapping retry
This commit is contained in:
parent
a2b20316ce
commit
4d71d3dec6
2 changed files with 12 additions and 0 deletions
|
@ -232,6 +232,17 @@ class _FusionProgressViewState extends ConsumerState<FusionProgressView> {
|
||||||
|
|
||||||
final fusionInfo = ref.read(prefsChangeNotifierProvider).fusionServerInfo;
|
final fusionInfo = ref.read(prefsChangeNotifierProvider).fusionServerInfo;
|
||||||
|
|
||||||
|
try {
|
||||||
|
fusionWallet.uiState = ref.read(
|
||||||
|
fusionProgressUIStateProvider(widget.walletId),
|
||||||
|
);
|
||||||
|
} catch (e) {
|
||||||
|
if (!e.toString().contains(
|
||||||
|
"FusionProgressUIState was already set for ${widget.walletId}")) {
|
||||||
|
rethrow;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
unawaited(fusionWallet.fuse(fusionInfo: fusionInfo));
|
unawaited(fusionWallet.fuse(fusionInfo: fusionInfo));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -228,6 +228,7 @@ mixin FusionWalletInterface {
|
||||||
CashFusionState(status: CashFusionStatus.waiting, info: info);
|
CashFusionState(status: CashFusionStatus.waiting, info: info);
|
||||||
_uiState?.fusionState =
|
_uiState?.fusionState =
|
||||||
CashFusionState(status: CashFusionStatus.waiting, info: info);
|
CashFusionState(status: CashFusionStatus.waiting, info: info);
|
||||||
|
_uiState?.failed = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue