mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 09:47:37 +00:00
ui stepper
This commit is contained in:
parent
f4c450f6ce
commit
75a84c740f
2 changed files with 26 additions and 0 deletions
|
@ -648,6 +648,7 @@ class _DesktopCashFusion extends ConsumerState<DesktopCashFusionView> {
|
|||
}
|
||||
|
||||
unawaited(fusionWallet.fuse());
|
||||
unawaited(fusionWallet.stepThruUiStates());
|
||||
|
||||
await showDialog<void>(
|
||||
context: context,
|
||||
|
|
|
@ -374,4 +374,29 @@ mixin FusionWalletInterface {
|
|||
throw UnimplementedError(
|
||||
"TODO refreshFusion eg look up number of fusion participants connected/coordinating");
|
||||
}
|
||||
|
||||
/// Testing ground for iterating thru the UI state.
|
||||
///
|
||||
/// TODO remove this, just for development.
|
||||
Future<void> stepThruUiStates() async {
|
||||
// Define the list of states.
|
||||
final List<fusion.FusionStatus> states = [
|
||||
fusion.FusionStatus.setup,
|
||||
fusion.FusionStatus.waiting,
|
||||
fusion.FusionStatus.connecting,
|
||||
fusion.FusionStatus.running,
|
||||
fusion.FusionStatus.complete,
|
||||
fusion.FusionStatus.failed,
|
||||
fusion.FusionStatus.exception,
|
||||
];
|
||||
|
||||
// Iterate through the list of states, waiting one second between each.
|
||||
for (final state in states) {
|
||||
// Set the connecting status to the current state.
|
||||
_updateStatus(state);
|
||||
|
||||
// Wait one second.
|
||||
await Future.delayed(const Duration(seconds: 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue