From 4938bb23c9833b391cb328313d593443f1c3d917 Mon Sep 17 00:00:00 2001 From: meriadec Date: Wed, 18 Jul 2018 17:37:08 +0200 Subject: [PATCH 01/13] Correct dynamic library path to be handled by macOS >= 10.9.0 Fixes #1032 --- package.json | 4 ++-- yarn.lock | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 0708592e..afcb1a3b 100644 --- a/package.json +++ b/package.json @@ -40,8 +40,8 @@ "@ledgerhq/hw-app-xrp": "^4.13.0", "@ledgerhq/hw-transport": "^4.13.0", "@ledgerhq/hw-transport-node-hid": "^4.13.0", - "@ledgerhq/ledger-core": "2.0.0-rc.4", - "@ledgerhq/live-common": "^2.32.0", + "@ledgerhq/ledger-core": "2.0.0-rc.5", + "@ledgerhq/live-common": "^2.35.0", "animated": "^0.2.2", "async": "^2.6.1", "axios": "^0.18.0", diff --git a/yarn.lock b/yarn.lock index 0ef4da30..aca105e5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1521,9 +1521,9 @@ dependencies: events "^2.0.0" -"@ledgerhq/ledger-core@2.0.0-rc.4": - version "2.0.0-rc.4" - resolved "https://registry.yarnpkg.com/@ledgerhq/ledger-core/-/ledger-core-2.0.0-rc.4.tgz#0ec80a763c666658bea94bd38b86aa90d5a24906" +"@ledgerhq/ledger-core@2.0.0-rc.5": + version "2.0.0-rc.5" + resolved "https://registry.yarnpkg.com/@ledgerhq/ledger-core/-/ledger-core-2.0.0-rc.5.tgz#ec42f6c3cc265fc5ca82e01d27df38357642d3ed" dependencies: "@ledgerhq/hw-app-btc" "^4.7.3" "@ledgerhq/hw-transport-node-hid" "^4.7.6" From 824bc0991dce8d4988d4b5ca57e7494b9ac72fc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Renaudeau?= Date: Thu, 19 Jul 2018 19:43:16 +0200 Subject: [PATCH 02/13] Fixes #1186 --- src/api/Ripple.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/api/Ripple.js b/src/api/Ripple.js index 8f0d5fd4..9adbf924 100644 --- a/src/api/Ripple.js +++ b/src/api/Ripple.js @@ -40,6 +40,7 @@ export const formatAPICurrencyXRP = (amount: number) => { const value = formatCurrencyUnit(rippleUnit, amount, { showAllDigits: true, disableRounding: true, + useGrouping: false, }) return { currency: 'XRP', value } } From 735d1c8ec4f04bebde96c2c21e31e1d32aabb002 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Renaudeau?= Date: Fri, 20 Jul 2018 17:31:28 +0200 Subject: [PATCH 03/13] Fixes 'Ledger Sequence too high' this error was related to when you don't sign on the device fast enough. this should increase the accepted time. --- src/bridge/RippleJSBridge.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bridge/RippleJSBridge.js b/src/bridge/RippleJSBridge.js index 53c5f181..969fb6cb 100644 --- a/src/bridge/RippleJSBridge.js +++ b/src/bridge/RippleJSBridge.js @@ -68,6 +68,7 @@ async function signAndBroadcast({ a, t, deviceId, isCancelled, onSigned, onOpera } const instruction = { fee: formatAPICurrencyXRP(t.fee).value, + maxLedgerVersionOffset: 12, } const prepared = await api.preparePayment(a.freshAddress, payment, instruction) From 5f355480bb47d3a03aee7b9f29b960b272a38b77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Renaudeau?= Date: Fri, 20 Jul 2018 12:42:47 +0200 Subject: [PATCH 04/13] Fix some errors to happen unexpected and make it more clear to user --- .../modals/Receive/steps/03-step-confirm-address.js | 8 +++----- .../modals/Receive/steps/04-step-receive-funds.js | 6 ++++-- src/components/modals/Send/index.js | 12 ++++++++---- src/config/errors.js | 8 ++++++++ src/helpers/deviceAccess.js | 4 +--- 5 files changed, 24 insertions(+), 14 deletions(-) create mode 100644 src/config/errors.js diff --git a/src/components/modals/Receive/steps/03-step-confirm-address.js b/src/components/modals/Receive/steps/03-step-confirm-address.js index 4e496999..6457c7d0 100644 --- a/src/components/modals/Receive/steps/03-step-confirm-address.js +++ b/src/components/modals/Receive/steps/03-step-confirm-address.js @@ -1,6 +1,5 @@ // @flow -import invariant from 'invariant' import styled from 'styled-components' import React, { Fragment, PureComponent } from 'react' @@ -13,9 +12,7 @@ import TranslatedError from '../../../TranslatedError' export default class StepConfirmAddress extends PureComponent { render() { - const { t, device, account, isAddressVerified, verifyAddressError, transitionTo } = this.props - invariant(account, 'No account given') - invariant(device, 'No device given') + const { t, account, isAddressVerified, verifyAddressError, transitionTo } = this.props return ( @@ -34,7 +31,8 @@ export default class StepConfirmAddress extends PureComponent { {t('app:receive.steps.confirmAddress.action')} - {t('app:receive.steps.confirmAddress.text', { currencyName: account.currency.name })} + {account && + t('app:receive.steps.confirmAddress.text', { currencyName: account.currency.name })}