diff --git a/src/contexts/Hardware/Ledger/LedgerHardware.tsx b/src/contexts/Hardware/Ledger/LedgerHardware.tsx index 5c45e02410..bf2bf58eb4 100644 --- a/src/contexts/Hardware/Ledger/LedgerHardware.tsx +++ b/src/contexts/Hardware/Ledger/LedgerHardware.tsx @@ -174,6 +174,13 @@ export const LedgerHardwareProvider = ({ code: 'DeviceTimeout', }); break; + // Occurs when a method in a all is not supported by the device. + case 'methodNotSupported': + setStatusFeedback({ + message: t('methodNotSupported'), + code: 'MethodNotSupported', + }); + break; // Occurs when one or more of nested calls being signed does not support nesting. case 'nestingNotSupported': setStatusFeedback({ diff --git a/src/contexts/Hardware/Ledger/types.ts b/src/contexts/Hardware/Ledger/types.ts index 820ea77e0e..c5c9bbcf6c 100644 --- a/src/contexts/Hardware/Ledger/types.ts +++ b/src/contexts/Hardware/Ledger/types.ts @@ -52,6 +52,7 @@ export type LedgerStatusCode = | 'SignedPayload' | 'DeviceBusy' | 'DeviceTimeout' + | 'MethodNotSupported' | 'NestingNotSupported' | 'WrongTransaction' | 'DeviceNotConnected' diff --git a/src/contexts/Hardware/Utils.tsx b/src/contexts/Hardware/Utils.tsx index 506afd6658..93e4071e82 100644 --- a/src/contexts/Hardware/Utils.tsx +++ b/src/contexts/Hardware/Utils.tsx @@ -10,6 +10,7 @@ import type { LedgerAddress } from './Ledger/types'; // Ledger error keyed by type of error. const LedgerErrorsByType = { timeout: ['Error: Timeout'], + methodNotSupported: ['Error: Method not supported'], nestingNotSupported: ['Error: Call nesting not supported'], outsideActiveChannel: ['Error: TransportError: Invalid channel'], deviceNotConnected: ['TransportOpenUserCancelled'], diff --git a/src/locale/cn/modals.json b/src/locale/cn/modals.json index 402f952e30..9ccf2e9dac 100644 --- a/src/locale/cn/modals.json +++ b/src/locale/cn/modals.json @@ -136,6 +136,7 @@ "managePool": "管理池", "maxCommission": "最高佣金值", "maximumCommissionUpdated": "最高佣金值最新值", + "methodNotSupported": "调用方法不受支持,无法签署交易", "minDelayBetweenUpdates": "更新之间的最小延迟", "minutes": "分钟", "missingNesting": "该调用缺少内置支持,无法签署交易", diff --git a/src/locale/en/modals.json b/src/locale/en/modals.json index f4df32b9d0..64be479534 100644 --- a/src/locale/en/modals.json +++ b/src/locale/en/modals.json @@ -146,6 +146,7 @@ "managePool": "Manage Pool", "maxCommission": "Max Commission", "maximumCommissionUpdated": "Maximum Commission Updated", + "methodNotSupported": "Call method not supported, cannot sign.", "minDelayBetweenUpdates": "Min Delay Between Updates", "minutes": "Minutes", "missingNesting": "Call missing nesting support, cannot sign.",