diff --git a/package.json b/package.json index 1de9158d..59eee192 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "@ledgerhq/hw-transport": "^4.12.0", "@ledgerhq/hw-transport-node-hid": "^4.12.0", "@ledgerhq/ledger-core": "1.4.5", - "@ledgerhq/live-common": "2.27.1", + "@ledgerhq/live-common": "2.29.0", "axios": "^0.18.0", "babel-runtime": "^6.26.0", "bcryptjs": "^2.4.3", diff --git a/src/helpers/countervalues.js b/src/helpers/countervalues.js index 72a6a0c5..4859ad79 100644 --- a/src/helpers/countervalues.js +++ b/src/helpers/countervalues.js @@ -20,7 +20,7 @@ const pairsSelector = createSelector( [ { from: intermediaryCurrency, to: counterValueCurrency, exchange: counterValueExchange }, ].concat( - currencies.filter(c => c !== intermediaryCurrency).map(currency => ({ + currencies.filter(c => c.ticker !== intermediaryCurrency.ticker).map(currency => ({ from: currency, to: intermediaryCurrency, exchange: currencySettingsSelector(state, { currency }).exchange, diff --git a/src/reducers/settings.js b/src/reducers/settings.js index 2a42f861..0136b644 100644 --- a/src/reducers/settings.js +++ b/src/reducers/settings.js @@ -98,12 +98,15 @@ const handlers: Object = { copy.currenciesSettings = { ...copy.currenciesSettings } for (const { to, from, exchange } of pairs) { const fromCrypto = asCryptoCurrency(from) - if (fromCrypto && to === intermediaryCurrency) { + if (fromCrypto && to.ticker === intermediaryCurrency.ticker) { copy.currenciesSettings[fromCrypto.id] = { ...copy.currenciesSettings[fromCrypto.id], exchange, } - } else if (from === intermediaryCurrency && to === counterValueCurrency) { + } else if ( + from.ticker === intermediaryCurrency.ticker && + to.ticker === counterValueCurrency.ticker + ) { copy.counterValueExchange = exchange } } diff --git a/yarn.lock b/yarn.lock index a9c72b15..861267da 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1495,9 +1495,9 @@ npm "^5.7.1" prebuild-install "^2.2.2" -"@ledgerhq/live-common@2.27.1": - version "2.27.1" - resolved "https://registry.yarnpkg.com/@ledgerhq/live-common/-/live-common-2.27.1.tgz#3ea96eb80b3e2676529c805c76e6b20ce14b95f0" +"@ledgerhq/live-common@2.29.0": + version "2.29.0" + resolved "https://registry.yarnpkg.com/@ledgerhq/live-common/-/live-common-2.29.0.tgz#a8f8a023f12973a60b2f89882534597f0723929f" dependencies: axios "^0.18.0" invariant "^2.2.2"