mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-11 13:14:32 +00:00
desktop exchange navigation flow fix
This commit is contained in:
parent
0b6545645b
commit
a8b0901ec6
3 changed files with 19 additions and 0 deletions
|
@ -37,6 +37,7 @@ class ConfirmChangeNowSendView extends ConsumerStatefulWidget {
|
||||||
this.routeOnSuccessName = WalletView.routeName,
|
this.routeOnSuccessName = WalletView.routeName,
|
||||||
required this.trade,
|
required this.trade,
|
||||||
this.shouldSendPublicFiroFunds,
|
this.shouldSendPublicFiroFunds,
|
||||||
|
this.fromDesktopStep4 = false,
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
||||||
static const String routeName = "/confirmChangeNowSend";
|
static const String routeName = "/confirmChangeNowSend";
|
||||||
|
@ -46,6 +47,7 @@ class ConfirmChangeNowSendView extends ConsumerStatefulWidget {
|
||||||
final String routeOnSuccessName;
|
final String routeOnSuccessName;
|
||||||
final Trade trade;
|
final Trade trade;
|
||||||
final bool? shouldSendPublicFiroFunds;
|
final bool? shouldSendPublicFiroFunds;
|
||||||
|
final bool fromDesktopStep4;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
ConsumerState<ConfirmChangeNowSendView> createState() =>
|
ConsumerState<ConfirmChangeNowSendView> createState() =>
|
||||||
|
@ -105,7 +107,17 @@ class _ConfirmChangeNowSendViewState
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
if (Util.isDesktop) {
|
if (Util.isDesktop) {
|
||||||
Navigator.of(context, rootNavigator: true).pop();
|
Navigator.of(context, rootNavigator: true).pop();
|
||||||
|
|
||||||
|
// stupid hack
|
||||||
|
if (widget.fromDesktopStep4) {
|
||||||
|
Navigator.of(context, rootNavigator: true).pop();
|
||||||
|
Navigator.of(context, rootNavigator: true).pop();
|
||||||
|
Navigator.of(context, rootNavigator: true).pop();
|
||||||
|
Navigator.of(context, rootNavigator: true).pop();
|
||||||
|
Navigator.of(context, rootNavigator: true).pop();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Navigator.of(context).popUntil(ModalRoute.withName(routeOnSuccessName));
|
Navigator.of(context).popUntil(ModalRoute.withName(routeOnSuccessName));
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
|
@ -38,6 +38,7 @@ class SendFromView extends ConsumerStatefulWidget {
|
||||||
required this.amount,
|
required this.amount,
|
||||||
required this.address,
|
required this.address,
|
||||||
this.shouldPopRoot = false,
|
this.shouldPopRoot = false,
|
||||||
|
this.fromDesktopStep4 = false,
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
||||||
static const String routeName = "/sendFrom";
|
static const String routeName = "/sendFrom";
|
||||||
|
@ -47,6 +48,7 @@ class SendFromView extends ConsumerStatefulWidget {
|
||||||
final String address;
|
final String address;
|
||||||
final Trade trade;
|
final Trade trade;
|
||||||
final bool shouldPopRoot;
|
final bool shouldPopRoot;
|
||||||
|
final bool fromDesktopStep4;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
ConsumerState<SendFromView> createState() => _SendFromViewState();
|
ConsumerState<SendFromView> createState() => _SendFromViewState();
|
||||||
|
@ -191,6 +193,7 @@ class _SendFromViewState extends ConsumerState<SendFromView> {
|
||||||
amount: amount,
|
amount: amount,
|
||||||
address: address,
|
address: address,
|
||||||
trade: trade,
|
trade: trade,
|
||||||
|
fromDesktopStep4: widget.fromDesktopStep4,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
@ -210,12 +213,14 @@ class SendFromCard extends ConsumerStatefulWidget {
|
||||||
required this.amount,
|
required this.amount,
|
||||||
required this.address,
|
required this.address,
|
||||||
required this.trade,
|
required this.trade,
|
||||||
|
this.fromDesktopStep4 = false,
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
||||||
final String walletId;
|
final String walletId;
|
||||||
final Decimal amount;
|
final Decimal amount;
|
||||||
final String address;
|
final String address;
|
||||||
final Trade trade;
|
final Trade trade;
|
||||||
|
final bool fromDesktopStep4;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
ConsumerState<SendFromCard> createState() => _SendFromCardState();
|
ConsumerState<SendFromCard> createState() => _SendFromCardState();
|
||||||
|
@ -323,6 +328,7 @@ class _SendFromCardState extends ConsumerState<SendFromCard> {
|
||||||
: HomeView.routeName,
|
: HomeView.routeName,
|
||||||
trade: trade,
|
trade: trade,
|
||||||
shouldSendPublicFiroFunds: shouldSendPublicFiroFunds,
|
shouldSendPublicFiroFunds: shouldSendPublicFiroFunds,
|
||||||
|
fromDesktopStep4: widget.fromDesktopStep4,
|
||||||
),
|
),
|
||||||
settings: const RouteSettings(
|
settings: const RouteSettings(
|
||||||
name: ConfirmChangeNowSendView.routeName,
|
name: ConfirmChangeNowSendView.routeName,
|
||||||
|
|
|
@ -224,6 +224,7 @@ class _DesktopStep4State extends ConsumerState<DesktopStep4> {
|
||||||
amount: amount,
|
amount: amount,
|
||||||
address: address,
|
address: address,
|
||||||
shouldPopRoot: true,
|
shouldPopRoot: true,
|
||||||
|
fromDesktopStep4: true,
|
||||||
),
|
),
|
||||||
const RouteSettings(
|
const RouteSettings(
|
||||||
name: SendFromView.routeName,
|
name: SendFromView.routeName,
|
||||||
|
|
Loading…
Reference in a new issue