From c8f843c38c64e1bea6d7b86591a64ce9c5ecdb47 Mon Sep 17 00:00:00 2001 From: sneurlax Date: Fri, 20 Jan 2023 10:36:46 -0600 Subject: [PATCH] redirect to order and close dialog except the dialog doesn't close. --- lib/pages/buy_view/sub_widgets/buy_warning_popup.dart | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/pages/buy_view/sub_widgets/buy_warning_popup.dart b/lib/pages/buy_view/sub_widgets/buy_warning_popup.dart index 51cfe20dc..c07fce8b2 100644 --- a/lib/pages/buy_view/sub_widgets/buy_warning_popup.dart +++ b/lib/pages/buy_view/sub_widgets/buy_warning_popup.dart @@ -45,9 +45,16 @@ class BuyWarningPopup extends StatelessWidget { label: "Continue", onPressed: () async { BuyResponse order = await newOrder(quote); + // BuyResponse response = + // await redirect(order.value as SimplexOrder); + // // TODO save order + // Navigator.of(context, rootNavigator: isDesktop).pop; BuyResponse response = - await redirect(order.value as SimplexOrder); - // TODO save order and redirect + await redirect(order.value as SimplexOrder).then((order) { + // TODO save order + Navigator.of(context, rootNavigator: isDesktop).pop; + return order; + }); }, ), icon: SizedBox(