mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-03-25 16:48:48 +00:00
firo anonymize navigation fix
This commit is contained in:
parent
9956a497df
commit
e665926b1b
1 changed files with 44 additions and 3 deletions
|
@ -193,6 +193,7 @@ class _DesktopWalletViewState extends ConsumerState<DesktopWalletView> {
|
||||||
if (publicBalance <= Decimal.zero) {
|
if (publicBalance <= Decimal.zero) {
|
||||||
shouldPop = true;
|
shouldPop = true;
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
|
Navigator.of(context, rootNavigator: true).pop();
|
||||||
Navigator.of(context).popUntil(
|
Navigator.of(context).popUntil(
|
||||||
ModalRoute.withName(DesktopWalletView.routeName),
|
ModalRoute.withName(DesktopWalletView.routeName),
|
||||||
);
|
);
|
||||||
|
@ -211,6 +212,7 @@ class _DesktopWalletViewState extends ConsumerState<DesktopWalletView> {
|
||||||
await firoWallet.anonymizeAllPublicFunds();
|
await firoWallet.anonymizeAllPublicFunds();
|
||||||
shouldPop = true;
|
shouldPop = true;
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
|
Navigator.of(context, rootNavigator: true).pop();
|
||||||
Navigator.of(context).popUntil(
|
Navigator.of(context).popUntil(
|
||||||
ModalRoute.withName(DesktopWalletView.routeName),
|
ModalRoute.withName(DesktopWalletView.routeName),
|
||||||
);
|
);
|
||||||
|
@ -225,14 +227,53 @@ class _DesktopWalletViewState extends ConsumerState<DesktopWalletView> {
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
shouldPop = true;
|
shouldPop = true;
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
|
Navigator.of(context, rootNavigator: true).pop();
|
||||||
Navigator.of(context).popUntil(
|
Navigator.of(context).popUntil(
|
||||||
ModalRoute.withName(DesktopWalletView.routeName),
|
ModalRoute.withName(DesktopWalletView.routeName),
|
||||||
);
|
);
|
||||||
await showDialog<dynamic>(
|
await showDialog<dynamic>(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (_) => StackOkDialog(
|
builder: (_) => DesktopDialog(
|
||||||
title: "Anonymize all failed",
|
maxWidth: 400,
|
||||||
message: "Reason: $e",
|
maxHeight: 300,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(24),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
"Anonymize all failed",
|
||||||
|
style: STextStyles.desktopH3(context),
|
||||||
|
),
|
||||||
|
const Spacer(
|
||||||
|
flex: 1,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
"Reason: $e",
|
||||||
|
style: STextStyles.desktopTextSmall(context),
|
||||||
|
),
|
||||||
|
const Spacer(
|
||||||
|
flex: 2,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
const Spacer(),
|
||||||
|
const SizedBox(
|
||||||
|
width: 16,
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: PrimaryButton(
|
||||||
|
label: "Ok",
|
||||||
|
buttonHeight: ButtonHeight.l,
|
||||||
|
onPressed:
|
||||||
|
Navigator.of(context, rootNavigator: true).pop,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue