Browse Source

UpdateYourApp error in a 6b00 during sign transaction

gre-patch-1
Gaëtan Renaudeau 6 years ago
parent
commit
e6cca0d82e
No known key found for this signature in database GPG Key ID: 7B66B85F042E5451
  1. 9
      src/commands/libcoreSignAndBroadcast.js
  2. 4
      static/i18n/en/app.json

9
src/commands/libcoreSignAndBroadcast.js

@ -2,6 +2,7 @@
import logger from 'logger' import logger from 'logger'
import { BigNumber } from 'bignumber.js' import { BigNumber } from 'bignumber.js'
import { StatusCodes } from '@ledgerhq/hw-transport'
import Btc from '@ledgerhq/hw-app-btc' import Btc from '@ledgerhq/hw-app-btc'
import { Observable } from 'rxjs' import { Observable } from 'rxjs'
import { isSegwitDerivationMode } from '@ledgerhq/live-common/lib/derivation' import { isSegwitDerivationMode } from '@ledgerhq/live-common/lib/derivation'
@ -13,6 +14,7 @@ import {
bigNumberToLibcoreAmount, bigNumberToLibcoreAmount,
getOrCreateWallet, getOrCreateWallet,
} from 'helpers/libcore' } from 'helpers/libcore'
import { UpdateYourApp } from 'config/errors'
import withLibcore from 'helpers/withLibcore' import withLibcore from 'helpers/withLibcore'
import { createCommand, Command } from 'helpers/ipc' import { createCommand, Command } from 'helpers/ipc'
@ -227,7 +229,12 @@ export async function doSignAndBroadcast({
hasTimestamp, hasTimestamp,
derivationMode, derivationMode,
}), }),
) ).catch(e => {
if (e && e.statusCode === StatusCodes.INCORRECT_P1_P2) {
throw new UpdateYourApp(`UpdateYourApp ${currency.id}`, currency)
}
throw e
})
if (!signedTransaction || isCancelled() || !njsAccount) return if (!signedTransaction || isCancelled() || !njsAccount) return
onSigned() onSigned()

4
static/i18n/en/app.json

@ -826,8 +826,8 @@
"description": "Please try again or contact Ledger Support" "description": "Please try again or contact Ledger Support"
}, },
"UpdateYourApp": { "UpdateYourApp": {
"title": "App update required. Uninstall and reinstall the {{managerAppName}} app in the Manager", "title": "App update required",
"description": null "description": "Uninstall and reinstall the {{managerAppName}} app in the Manager"
}, },
"WebsocketConnectionError": { "WebsocketConnectionError": {
"title": "Sorry, try again (websocket error).", "title": "Sorry, try again (websocket error).",

Loading…
Cancel
Save