Browse Source

No countervalues to load if there is no accounts

master
Gaëtan Renaudeau 7 years ago
parent
commit
62678af9f7
  1. 20
      src/helpers/countervalues.js

20
src/helpers/countervalues.js

@ -18,15 +18,17 @@ const pairsSelector = createSelector(
counterValueExchangeSelector, counterValueExchangeSelector,
state => state, state => state,
(currencies, counterValueCurrency, counterValueExchange, state) => (currencies, counterValueCurrency, counterValueExchange, state) =>
[ currencies.length === 0
{ from: intermediaryCurrency, to: counterValueCurrency, exchange: counterValueExchange }, ? []
].concat( : [
currencies.filter(c => c.ticker !== intermediaryCurrency.ticker).map(currency => ({ { from: intermediaryCurrency, to: counterValueCurrency, exchange: counterValueExchange },
from: currency, ].concat(
to: intermediaryCurrency, currencies.filter(c => c.ticker !== intermediaryCurrency.ticker).map(currency => ({
exchange: currencySettingsSelector(state, { currency }).exchange, from: currency,
})), to: intermediaryCurrency,
), exchange: currencySettingsSelector(state, { currency }).exchange,
})),
),
) )
const addExtraPollingHooks = (schedulePoll, cancelPoll) => { const addExtraPollingHooks = (schedulePoll, cancelPoll) => {

Loading…
Cancel
Save