mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 12:29:51 +00:00
fix: possible context null check issue in exchange trade (#2253)
This commit is contained in:
parent
b7473594cb
commit
cab4792388
1 changed files with 2 additions and 4 deletions
|
@ -307,9 +307,7 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
|
||||||
|
|
||||||
if (state is TransactionCommitted) {
|
if (state is TransactionCommitted) {
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) async {
|
WidgetsBinding.instance.addPostFrameCallback((_) async {
|
||||||
if (!context.mounted) {
|
if (!mounted) return;
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
await showModalBottomSheet<void>(
|
await showModalBottomSheet<void>(
|
||||||
context: context,
|
context: context,
|
||||||
|
@ -323,7 +321,7 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
|
||||||
actionButtonKey: ValueKey('send_page_sent_dialog_ok_button_key'),
|
actionButtonKey: ValueKey('send_page_sent_dialog_ok_button_key'),
|
||||||
actionButton: () {
|
actionButton: () {
|
||||||
Navigator.of(bottomSheetContext).pop();
|
Navigator.of(bottomSheetContext).pop();
|
||||||
if (context.mounted) {
|
if (mounted) {
|
||||||
Navigator.of(context).pushNamedAndRemoveUntil(
|
Navigator.of(context).pushNamedAndRemoveUntil(
|
||||||
Routes.dashboard,
|
Routes.dashboard,
|
||||||
(route) => false,
|
(route) => false,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue