diff --git a/lib/core/wallet_loading_service.dart b/lib/core/wallet_loading_service.dart index f16bf7e14..4284671c3 100644 --- a/lib/core/wallet_loading_service.dart +++ b/lib/core/wallet_loading_service.dart @@ -74,7 +74,7 @@ class WalletLoadingService { } catch (error, stack) { await ExceptionHandler.resetLastPopupDate(); final isLedgerError = await ExceptionHandler.isLedgerError(error); - if (isLedgerError) rethrow; + if (isLedgerError || requireHardwareWalletConnection(type, name)) rethrow; await ExceptionHandler.onError(FlutterErrorDetails(exception: error, stack: stack)); diff --git a/lib/view_model/hardware_wallet/ledger_view_model.dart b/lib/view_model/hardware_wallet/ledger_view_model.dart index 6012e1873..be3982d81 100644 --- a/lib/view_model/hardware_wallet/ledger_view_model.dart +++ b/lib/view_model/hardware_wallet/ledger_view_model.dart @@ -178,7 +178,7 @@ abstract class LedgerViewModelBase with Store { return error; } - var errorRegex = RegExp(r'0x\S*?(?= )').firstMatch(error.toString()); + var errorRegex = RegExp(r'(?:0x\S*?|[0-9a-f]{4})(?= )').firstMatch(error.toString()); String errorCode = errorRegex?.group(0).toString().replaceAll("0x", "") ?? ""; if (errorCode.contains("6985")) {