Skip to content

Commit

Permalink
Merge pull request #1112 from paritytech/rb-missing-nesting-support
Browse files Browse the repository at this point in the history
Add nesting error to ledger feedback
  • Loading branch information
Ross Bulat authored Jun 11, 2023
2 parents 3f85380 + 65128c3 commit cdbbe44
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/contexts/Hardware/Ledger.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ export const LedgerHardwareProvider = ({
// only set default message here - maintain previous status code.
setFeedback(t('ledgerRequestTimeout'), 'Ledger Request Timeout');
handleNewStatusCode('failure', 'DeviceTimeout');
} else if (err.startsWith('Error: Call nesting not supported')) {
setFeedback(t('missingNesting'));
handleNewStatusCode('failure', 'NestingNotSupported');
} else if (
err.startsWith('Error: TransportError: Invalid channel') ||
err.startsWith('Error: InvalidStateError')
Expand Down
1 change: 1 addition & 0 deletions src/contexts/Hardware/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export type LedgerStatusCode =
| 'SigningPayload'
| 'SignedPayload'
| 'DeviceTimeout'
| 'NestingNotSupported'
| 'WrongTransaction'
| 'DeviceNotConnected'
| 'DeviceLocked'
Expand Down
1 change: 1 addition & 0 deletions src/locale/cn/modals.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@
"maximumCommissionUpdated": "最高佣金值最新值",
"minDelayBetweenUpdates": "更新之间的最小延迟",
"minutes": "分钟",
"missingNesting": "该调用缺少内置支持,无法签署交易",
"months": "",
"networks": "网络",
"newTotalBond": "新质押总额:",
Expand Down
1 change: 1 addition & 0 deletions src/locale/en/modals.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@
"maximumCommissionUpdated": "Maximum Commission Updated",
"minDelayBetweenUpdates": "Min Delay Between Updates",
"minutes": "Minutes",
"missingNesting": "Call missing nesting support, cannot sign.",
"months": "Months",
"networks": "Networks",
"newTotalBond": "New total bond:",
Expand Down

0 comments on commit cdbbe44

Please sign in to comment.