ui stepper

This commit is contained in:
sneurlax 2023-10-13 12:42:16 -05:00
parent f4c450f6ce
commit 75a84c740f
2 changed files with 26 additions and 0 deletions

View file

@ -648,6 +648,7 @@ class _DesktopCashFusion extends ConsumerState<DesktopCashFusionView> {
} }
unawaited(fusionWallet.fuse()); unawaited(fusionWallet.fuse());
unawaited(fusionWallet.stepThruUiStates());
await showDialog<void>( await showDialog<void>(
context: context, context: context,

View file

@ -374,4 +374,29 @@ mixin FusionWalletInterface {
throw UnimplementedError( throw UnimplementedError(
"TODO refreshFusion eg look up number of fusion participants connected/coordinating"); "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));
}
}
} }