From 9d4cdb31bd9384bdb30901e0e785969f99dfaec4 Mon Sep 17 00:00:00 2001 From: sneurlax Date: Tue, 17 Oct 2023 22:23:27 -0500 Subject: [PATCH] stop fusion on cashfusion view disposal WIP --- fusiondart | 2 +- lib/pages/cashfusion/cashfusion_view.dart | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/fusiondart b/fusiondart index 1f98575c5..0b6c2f931 160000 --- a/fusiondart +++ b/fusiondart @@ -1 +1 @@ -Subproject commit 1f98575c58d5b3144ac6e5e613311307c22e53b2 +Subproject commit 0b6c2f931932dbd07e6aacc2826b0ceb5332ba99 diff --git a/lib/pages/cashfusion/cashfusion_view.dart b/lib/pages/cashfusion/cashfusion_view.dart index 60c6ad09e..2439890b9 100644 --- a/lib/pages/cashfusion/cashfusion_view.dart +++ b/lib/pages/cashfusion/cashfusion_view.dart @@ -85,6 +85,17 @@ class _CashFusionViewState extends ConsumerState { @override void dispose() { + // Stop the fusion process on dispose. + // + // Hack to stop fusion when a mobile user clicks back. + final fusionWallet = ref + .read(walletsChangeNotifierProvider) + .getManager(widget.walletId) + .wallet as FusionWalletInterface; + + // We probably want to await this and showLoading while it stops. + unawaited(fusionWallet.stop()); + serverController.dispose(); portController.dispose(); fusionRoundController.dispose();