mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-09 12:29:31 +00:00
feat: update wallet checks from isHardwareWallet to isLedger
This commit is contained in:
parent
c6e90741b7
commit
62d0d1a574
5 changed files with 6 additions and 6 deletions
|
@ -290,7 +290,7 @@ class DFXBuyProvider extends BuyProvider {
|
|||
required bool isBuyAction,
|
||||
required String cryptoCurrencyAddress,
|
||||
String? countryCode}) async {
|
||||
if (wallet.isHardwareWallet) {
|
||||
if (wallet.isLedger) {
|
||||
if (!ledgerVM!.isConnected) {
|
||||
await Navigator.of(context).pushNamed(Routes.connectDevices,
|
||||
arguments: ConnectDevicePageParams(
|
||||
|
|
|
@ -102,7 +102,7 @@ class RobinhoodBuyProvider extends BuyProvider {
|
|||
required bool isBuyAction,
|
||||
required String cryptoCurrencyAddress,
|
||||
String? countryCode}) async {
|
||||
if (wallet.isHardwareWallet) {
|
||||
if (wallet.isLedger) {
|
||||
if (!ledgerVM!.isConnected) {
|
||||
await Navigator.of(context).pushNamed(Routes.connectDevices,
|
||||
arguments: ConnectDevicePageParams(
|
||||
|
|
|
@ -997,12 +997,12 @@ Future<void> setup({
|
|||
getIt.registerFactory<RobinhoodBuyProvider>(() => RobinhoodBuyProvider(
|
||||
wallet: getIt.get<AppStore>().wallet!,
|
||||
ledgerVM:
|
||||
getIt.get<AppStore>().wallet!.isHardwareWallet ? getIt.get<LedgerViewModel>() : null));
|
||||
getIt.get<AppStore>().wallet!.isLedger ? getIt.get<LedgerViewModel>() : null));
|
||||
|
||||
getIt.registerFactory<DFXBuyProvider>(() => DFXBuyProvider(
|
||||
wallet: getIt.get<AppStore>().wallet!,
|
||||
ledgerVM:
|
||||
getIt.get<AppStore>().wallet!.isHardwareWallet ? getIt.get<LedgerViewModel>() : null));
|
||||
getIt.get<AppStore>().wallet!.isLedger ? getIt.get<LedgerViewModel>() : null));
|
||||
|
||||
getIt.registerFactory<MoonPayProvider>(() => MoonPayProvider(
|
||||
settingsStore: getIt.get<AppStore>().settingsStore,
|
||||
|
|
|
@ -393,7 +393,7 @@ class SendPage extends BasePage {
|
|||
return;
|
||||
}
|
||||
|
||||
if (sendViewModel.wallet.isHardwareWallet) {
|
||||
if (sendViewModel.wallet.isLedger) {
|
||||
if (!sendViewModel.ledgerViewModel!.isConnected) {
|
||||
await Navigator.of(context).pushNamed(
|
||||
Routes.connectDevices,
|
||||
|
|
|
@ -389,7 +389,7 @@ abstract class SendViewModelBase extends WalletChangeListenerViewModel with Stor
|
|||
try {
|
||||
state = IsExecutingState();
|
||||
|
||||
if (wallet.isHardwareWallet) state = IsAwaitingDeviceResponseState();
|
||||
if (wallet.isLedger) state = IsAwaitingDeviceResponseState();
|
||||
|
||||
pendingTransaction = await wallet.createTransaction(_credentials());
|
||||
|
||||
|
|
Loading…
Reference in a new issue