Skip to content

Commit

Permalink
detect and show firmware version error
Browse files Browse the repository at this point in the history
  • Loading branch information
yushih committed Jul 29, 2021
1 parent c167ef0 commit 02fe904
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/yoroi-extension/app/domain/TrezorLocalizedError.js
Expand Up @@ -13,6 +13,10 @@ const messages = defineMessages({
id: 'wallet.send.trezor.error.101',
defaultMessage: '!!!Signing cancelled on Trezor device. Please retry.',
},
firmwareCatalystSupportError: {
id: 'wallet.send.tezor.error.firmwareCatalystSupport',
defaultMessage: '!!!Registering for Catalyst voting requires Trezor firmware 2.4.1',
},
});

/** Converts error(from API or Trezor API) to LocalizableError */
Expand All @@ -38,6 +42,9 @@ export function convertToLocalizableError(error: Error): LocalizableError {
case 'Signing cancelled':
localizableError = new LocalizableError(messages.signTxError101);
break;
case 'Feature AuxiliaryData not supported by device firmware':
localizableError = new LocalizableError(messages.firmwareCatalystSupportError);
break;
default:
/** we are not able to figure out why Error is thrown
* make it, Something unexpected happened */
Expand Down
1 change: 1 addition & 0 deletions packages/yoroi-extension/app/i18n/locales/en-US.json
Expand Up @@ -660,6 +660,7 @@
"wallet.send.ledger.confirmationDialog.info.line.1": "After connecting your Ledger device to your computer's USB port, press the Send using Ledger button.",
"wallet.send.ledger.confirmationDialog.info.line.2": "Make sure the Cardano ADA app remains open on the Ledger device throughout the process.",
"wallet.send.ledger.confirmationDialog.submit": "Send using Ledger",
"wallet.send.tezor.error.firmwareCatalystSupport": "Registering for Catalyst voting requires Trezor firmware 2.4.1",
"wallet.send.trezor.confirmationDialog.info.line.1": "After connecting your Trezor device to your computer, press the Send using Trezor button.",
"wallet.send.trezor.confirmationDialog.info.line.2": "A new tab will appear. Please follow the instructions in the new tab.",
"wallet.send.trezor.confirmationDialog.submit": "Send using Trezor",
Expand Down

0 comments on commit 02fe904

Please sign in to comment.