mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-04-01 11:59:06 +00:00
couple tweaks
This commit is contained in:
parent
453316feb4
commit
3c4fc5e0cc
2 changed files with 3 additions and 22 deletions
lib/pages/cashfusion
|
@ -148,9 +148,7 @@ class _CashFusionViewState extends ConsumerState<CashFusionView> {
|
|||
Theme.of(context).extension<StackColors>()!.background,
|
||||
appBar: AppBar(
|
||||
automaticallyImplyLeading: false,
|
||||
leading: AppBarBackButton(onPressed: () {
|
||||
_stop();
|
||||
}),
|
||||
leading: const AppBarBackButton(),
|
||||
title: Text(
|
||||
"CashFusion",
|
||||
style: STextStyles.navBarTitle(context),
|
||||
|
@ -445,21 +443,4 @@ class _CashFusionViewState extends ConsumerState<CashFusionView> {
|
|||
),
|
||||
);
|
||||
}
|
||||
|
||||
/// Stops the fusion process.
|
||||
///
|
||||
/// This is called when the user presses the back button.
|
||||
void _stop() async {
|
||||
final fusionWallet = ref
|
||||
.read(walletsChangeNotifierProvider)
|
||||
.getManager(widget.walletId)
|
||||
.wallet as FusionWalletInterface;
|
||||
|
||||
await fusionWallet.stop();
|
||||
// TODO await successful cancellation and showLoading while it stops.
|
||||
|
||||
if (mounted) {
|
||||
Navigator.of(context).pop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -184,7 +184,7 @@ class _FusionProgressViewState extends ConsumerState<FusionProgressView> {
|
|||
if (_succeeded)
|
||||
PrimaryButton(
|
||||
label: "Fuse again",
|
||||
onPressed: () => _fuseAgain,
|
||||
onPressed: _fuseAgain,
|
||||
),
|
||||
if (_succeeded)
|
||||
const SizedBox(
|
||||
|
@ -193,7 +193,7 @@ class _FusionProgressViewState extends ConsumerState<FusionProgressView> {
|
|||
if (_failed)
|
||||
PrimaryButton(
|
||||
label: "Try again",
|
||||
onPressed: () => _fuseAgain,
|
||||
onPressed: _fuseAgain,
|
||||
),
|
||||
if (_failed)
|
||||
const SizedBox(
|
||||
|
|
Loading…
Reference in a new issue