mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 11:59:30 +00:00
update ui status updates
with example stepper
This commit is contained in:
parent
6877c00a49
commit
ac6952f5eb
2 changed files with 9 additions and 8 deletions
|
@ -648,7 +648,7 @@ class _DesktopCashFusion extends ConsumerState<DesktopCashFusionView> {
|
|||
}
|
||||
|
||||
unawaited(fusionWallet.fuse());
|
||||
unawaited(fusionWallet.stepThruUiStates());
|
||||
// unawaited(fusionWallet.stepThruUiStates());
|
||||
|
||||
await showDialog<void>(
|
||||
context: context,
|
||||
|
|
|
@ -88,18 +88,19 @@ mixin FusionWalletInterface {
|
|||
// callback to update the ui state object
|
||||
void _updateStatus(fusion.FusionStatus fusionStatus) {
|
||||
switch (fusionStatus) {
|
||||
case fusion.FusionStatus.setup:
|
||||
case fusion.FusionStatus.connecting:
|
||||
_uiState?.connecting = CashFusionStatus.running;
|
||||
break;
|
||||
case fusion.FusionStatus.waiting:
|
||||
case fusion.FusionStatus.setup:
|
||||
_uiState?.connecting = CashFusionStatus.success;
|
||||
_uiState?.outputs = CashFusionStatus.success;
|
||||
_uiState?.outputs = CashFusionStatus.running;
|
||||
break;
|
||||
case fusion.FusionStatus.connecting:
|
||||
_uiState?.connecting = CashFusionStatus.waiting;
|
||||
case fusion.FusionStatus.waiting:
|
||||
_uiState?.outputs = CashFusionStatus.success;
|
||||
_uiState?.peers = CashFusionStatus.running;
|
||||
break;
|
||||
case fusion.FusionStatus.running:
|
||||
_uiState?.connecting = CashFusionStatus.success;
|
||||
_uiState?.peers = CashFusionStatus.success;
|
||||
_uiState?.fusing = CashFusionStatus.running;
|
||||
break;
|
||||
case fusion.FusionStatus.complete:
|
||||
|
@ -391,9 +392,9 @@ mixin FusionWalletInterface {
|
|||
Future<void> stepThruUiStates() async {
|
||||
// Define the list of states.
|
||||
final List<fusion.FusionStatus> states = [
|
||||
fusion.FusionStatus.connecting,
|
||||
fusion.FusionStatus.setup,
|
||||
fusion.FusionStatus.waiting,
|
||||
fusion.FusionStatus.connecting,
|
||||
fusion.FusionStatus.running,
|
||||
fusion.FusionStatus.complete,
|
||||
fusion.FusionStatus.failed,
|
||||
|
|
Loading…
Reference in a new issue