mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-11-24 10:54:13 +01:00
CW1612: AnyPay Service Layer (#3516)
* fix android CI * feat: add anypay core models, parser and routing engine * feat: add anypay resolver, anypay service and wallet switch service * refactor: route the send page payment flow through anypay service * fix: show message when there's no swap providers for a pair and reset the trade guard on dismissal * refactor: merge the swap from network and send to network decision pages together and clean up anypay widgets * feat: reapply deep links to a currently open send flow and register the solana scheme * feat: add support for zcash address detection to anypay and other minor fixes * refactor: remove trailing icon * feat: hide swap flow for sp and mweb addresses * feat: enhance zcash address detection and deeplink handling * fix: pin bitcoin_base * refactor: Move the anypay decision navigation out of the send page and address minor review comments * refactor: Move the anypay decision navigation out of the send page and address minor review comments * feat: handle exception in switch service and mvoe balance compute to call site * refactor: combine anypay entry points to one and extract selected mode widget --------- Co-authored-by: Czarek Nakamoto <cyjan@mrcyjanek.net>
This commit is contained in:
co-authored by
Czarek Nakamoto
parent
4cc1495686
commit
3b100eae33
+4
-5
@@ -149,7 +149,6 @@ import 'package:cake_wallet/view_model/hardware_wallet/hardware_wallet_view_mode
|
||||
import 'package:cake_wallet/view_model/hardware_wallet/trezor_connect_view_model.dart';
|
||||
import 'package:cake_wallet/view_model/monero_account_list/account_list_item.dart';
|
||||
import 'package:cake_wallet/view_model/node_list/node_create_or_edit_view_model.dart';
|
||||
import 'package:cake_wallet/view_model/restore/restore_wallet.dart';
|
||||
import 'package:cake_wallet/view_model/wallet_groups_display_view_model.dart';
|
||||
import 'package:cake_wallet/view_model/seed_settings_view_model.dart';
|
||||
import 'package:cake_wallet/view_model/wallet_hardware_restore_view_model.dart';
|
||||
@@ -445,6 +444,7 @@ Route<dynamic> createRoute(RouteSettings settings) {
|
||||
case Routes.send:
|
||||
final args = settings.arguments as Map<String, dynamic>?;
|
||||
final initialPaymentRequest = args?['paymentRequest'] as PaymentRequest?;
|
||||
final initialRawInput = args?["rawLink"] as String?;
|
||||
final coinTypeToSpendFrom = args?['coinTypeToSpendFrom'] as UnspentCoinType?;
|
||||
|
||||
return handleRouteWithPlatformAwareness(
|
||||
@@ -452,6 +452,7 @@ Route<dynamic> createRoute(RouteSettings settings) {
|
||||
child: getIt.get<NewSendPage>(
|
||||
param1: SendPageParams(
|
||||
initialPaymentRequest: initialPaymentRequest,
|
||||
initialRawInput: initialRawInput,
|
||||
unspentCoinType: coinTypeToSpendFrom ?? UnspentCoinType.any),
|
||||
),
|
||||
),
|
||||
@@ -473,7 +474,7 @@ Route<dynamic> createRoute(RouteSettings settings) {
|
||||
case Routes.newReceivePage:
|
||||
if (FeatureFlag.hasNewUi) {
|
||||
return handleRouteWithPlatformAwareness(
|
||||
(context) => Material(child: getIt.get<NewReceivePage>(param1: false, param2: null)),
|
||||
(context) => Material(child: getIt.get<NewReceivePage>(param1: false, param2: null)),
|
||||
settings: settings,
|
||||
);
|
||||
}
|
||||
@@ -835,9 +836,7 @@ Route<dynamic> createRoute(RouteSettings settings) {
|
||||
final useTestnet = args['useTestnet'] as bool;
|
||||
final toggleTestnet = args['toggleTestnet'] as Function(bool? val);
|
||||
final zcashNetwork = args['zcashNetwork'] as int? ?? ZcashNetworkType.mainnet;
|
||||
final setZcashNetwork =
|
||||
args['setZcashNetwork'] as void Function(int network)? ?? (_) {};
|
||||
final restoredWallet = args['restoredWallet'] as RestoredWallet?;
|
||||
final setZcashNetwork = args['setZcashNetwork'] as void Function(int network)? ?? (_) {};
|
||||
|
||||
final viewModelParam = {'type': type, 'isPow': false};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user