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) {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) async {
|
||||
if (!context.mounted) {
|
||||
return;
|
||||
}
|
||||
if (!mounted) return;
|
||||
|
||||
await showModalBottomSheet<void>(
|
||||
context: context,
|
||||
|
@ -323,7 +321,7 @@ class ExchangeTradeState extends State<ExchangeTradeForm> {
|
|||
actionButtonKey: ValueKey('send_page_sent_dialog_ok_button_key'),
|
||||
actionButton: () {
|
||||
Navigator.of(bottomSheetContext).pop();
|
||||
if (context.mounted) {
|
||||
if (mounted) {
|
||||
Navigator.of(context).pushNamedAndRemoveUntil(
|
||||
Routes.dashboard,
|
||||
(route) => false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue