Browse Source

Bumped @ledgerhq/errors and translated the error

gre-patch-1
Juan Cortes Ross 6 years ago
parent
commit
9e788cb2be
No known key found for this signature in database GPG Key ID: 34A99C03E9455EB8
  1. 1
      package.json
  2. 3
      src/bridge/RippleJSBridge.js
  3. 3
      static/i18n/en/app.json
  4. 8
      yarn.lock

1
package.json

@ -35,6 +35,7 @@
}
},
"dependencies": {
"@ledgerhq/errors": "^4.35.1",
"@ledgerhq/hw-app-btc": "^4.34.0",
"@ledgerhq/hw-app-eth": "^4.32.0",
"@ledgerhq/hw-app-xrp": "^4.32.0",

3
src/bridge/RippleJSBridge.js

@ -34,6 +34,7 @@ import {
NotEnoughBalance,
FeeNotLoaded,
NotEnoughBalanceBecauseDestinationNotCreated,
InvalidAddressBecauseDestinationIsAlsoSource,
} from '@ledgerhq/errors'
import type { WalletBridge, EditProps } from './types'
@ -151,7 +152,7 @@ function isRecipientValid(recipient, source) {
function getRecipientWarning(recipient, source) {
if (source === recipient) {
return new Error('InvalidAddressBecauseDestinationIsAlsoSource')
return new InvalidAddressBecauseDestinationIsAlsoSource()
}
return null
}

3
static/i18n/en/app.json

@ -900,6 +900,9 @@
"InvalidAddress": {
"title": "This is not a valid {{currencyName}} address"
},
"InvalidAddressBecauseDestinationIsAlsoSource": {
"title": "Destination and source accounts can't be the same"
},
"CantOpenDevice": {
"title": "Oops, couldn’t connect to device",
"description": "Device detected but connection failed. Please try again or contact us if the problem persists."

8
yarn.lock

@ -1677,10 +1677,10 @@
camelcase "^5.0.0"
prettier "^1.13.7"
"@ledgerhq/errors@^4.32.0":
version "4.33.7"
resolved "https://registry.yarnpkg.com/@ledgerhq/errors/-/errors-4.33.7.tgz#b78becd20e8a68f7115ad0986fa357a8adddf6b7"
integrity sha512-1vKWcttI5NHpT6rMKKuxWPAjfwDgfgUTf/AyNAT5KXHlhiLvqnA3NDCdNUVadajVNKSa/s1u1ZWKismtbfePzg==
"@ledgerhq/errors@^4.32.0", "@ledgerhq/errors@^4.35.1":
version "4.35.1"
resolved "https://registry.yarnpkg.com/@ledgerhq/errors/-/errors-4.35.1.tgz#3f162dc05480e444083b6381bd098df187751633"
integrity sha512-2Bo3/NRKyz3ddR07TvZ87VpDJc8fz4+ONLJnhzC0mwIwu+Pxal6SgCBiGtv503oGxkgDuG5PtODZBaehWkGRnQ==
"@ledgerhq/hw-app-btc@^4.32.0":
version "4.32.0"

Loading…
Cancel
Save