mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-17 05:41:29 +02:00
fix: Show correct title when reconnecting to your ledger device (#2152)
This commit is contained in:
+31
-24
@@ -277,33 +277,40 @@ Route<dynamic> createRoute(RouteSettings settings) {
|
||||
case Routes.restoreWalletFromHardwareWallet:
|
||||
if (isSingleCoin) {
|
||||
return MaterialPageRoute<void>(
|
||||
builder: (_) => ConnectDevicePage(
|
||||
ConnectDevicePageParams(
|
||||
walletType: availableWalletTypes.first,
|
||||
onConnectDevice: (BuildContext context, _) => Navigator.of(context).pushNamed(
|
||||
Routes.chooseHardwareWalletAccount,
|
||||
arguments: [availableWalletTypes.first]),
|
||||
),
|
||||
getIt.get<LedgerViewModel>(),
|
||||
));
|
||||
}
|
||||
return CupertinoPageRoute<void>(
|
||||
builder: (_) => getIt.get<NewWalletTypePage>(
|
||||
param1: NewWalletTypeArguments(
|
||||
onTypeSelected: (BuildContext context, WalletType type) {
|
||||
final arguments = ConnectDevicePageParams(
|
||||
walletType: type,
|
||||
onConnectDevice: (BuildContext context, _) => Navigator.of(context)
|
||||
.pushNamed(Routes.chooseHardwareWalletAccount, arguments: [type]),
|
||||
);
|
||||
|
||||
Navigator.of(context).pushNamed(Routes.connectDevices, arguments: arguments);
|
||||
},
|
||||
isCreate: false,
|
||||
isHardwareWallet: true,
|
||||
builder: (_) => ConnectDevicePage(
|
||||
ConnectDevicePageParams(
|
||||
walletType: availableWalletTypes.first,
|
||||
onConnectDevice: (BuildContext context, _) =>
|
||||
Navigator.of(context).pushNamed(
|
||||
Routes.chooseHardwareWalletAccount,
|
||||
arguments: [availableWalletTypes.first]),
|
||||
isReconnect: false,
|
||||
),
|
||||
getIt.get<LedgerViewModel>(),
|
||||
),
|
||||
);
|
||||
}
|
||||
return CupertinoPageRoute<void>(
|
||||
builder: (_) => getIt.get<NewWalletTypePage>(
|
||||
param1: NewWalletTypeArguments(
|
||||
onTypeSelected: (BuildContext context, WalletType type) {
|
||||
final arguments = ConnectDevicePageParams(
|
||||
walletType: type,
|
||||
onConnectDevice: (BuildContext context, _) =>
|
||||
Navigator.of(context).pushNamed(
|
||||
Routes.chooseHardwareWalletAccount,
|
||||
arguments: [type]),
|
||||
isReconnect: false,
|
||||
);
|
||||
|
||||
Navigator.of(context)
|
||||
.pushNamed(Routes.connectDevices, arguments: arguments);
|
||||
},
|
||||
isCreate: false,
|
||||
isHardwareWallet: true,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
case Routes.restoreWalletTypeFromQR:
|
||||
return CupertinoPageRoute<void>(
|
||||
|
||||
@@ -28,7 +28,7 @@ class ConnectDevicePageParams {
|
||||
required this.walletType,
|
||||
required this.onConnectDevice,
|
||||
this.allowChangeWallet = false,
|
||||
this.isReconnect = false,
|
||||
this.isReconnect = true,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -525,6 +525,7 @@ class WalletListBodyState extends State<WalletListBody> {
|
||||
didConnect = true;
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
isReconnect: true,
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user