mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-04-07 23:07:41 +00:00
estimate/rateId fix and mounted check
This commit is contained in:
parent
05c4d01ee4
commit
31a29be929
1 changed files with 11 additions and 11 deletions
|
@ -98,24 +98,24 @@ class _StepScaffoldState extends ConsumerState<StepScaffold> {
|
|||
extraId: null,
|
||||
addressRefund: ref.read(desktopExchangeModelProvider)!.refundAddress!,
|
||||
refundExtraId: "",
|
||||
rateId: ref.read(desktopExchangeModelProvider)!.rateId,
|
||||
estimate: ref.read(desktopExchangeModelProvider)!.estimate,
|
||||
reversed: ref.read(desktopExchangeModelProvider)!.reversed,
|
||||
);
|
||||
|
||||
if (response.value == null) {
|
||||
if (mounted) {
|
||||
Navigator.of(context).pop();
|
||||
}
|
||||
|
||||
unawaited(
|
||||
showDialog<void>(
|
||||
context: context,
|
||||
barrierDismissible: true,
|
||||
builder: (_) => SimpleDesktopDialog(
|
||||
title: "Failed to create trade",
|
||||
message: response.exception?.toString() ?? ""),
|
||||
),
|
||||
);
|
||||
unawaited(
|
||||
showDialog<void>(
|
||||
context: context,
|
||||
barrierDismissible: true,
|
||||
builder: (_) => SimpleDesktopDialog(
|
||||
title: "Failed to create trade",
|
||||
message: response.exception?.toString() ?? ""),
|
||||
),
|
||||
);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue