diff options
author | Chi Kei Chan <chikeichan@gmail.com> | 2017-09-13 16:25:39 +0800 |
---|---|---|
committer | Chi Kei Chan <chikeichan@gmail.com> | 2017-09-13 16:25:39 +0800 |
commit | 8f31b05ac5b7d8383c720b8b0c9f7f3cecc937f5 (patch) | |
tree | 09d0ab5b98acc83034ff98f6b97e28b8753c7f42 /ui/app/reducers | |
parent | 8b5f2a95df45c24061c13c51ca874e933e743381 (diff) | |
download | tangerine-wallet-browser-8f31b05ac5b7d8383c720b8b0c9f7f3cecc937f5.tar tangerine-wallet-browser-8f31b05ac5b7d8383c720b8b0c9f7f3cecc937f5.tar.gz tangerine-wallet-browser-8f31b05ac5b7d8383c720b8b0c9f7f3cecc937f5.tar.bz2 tangerine-wallet-browser-8f31b05ac5b7d8383c720b8b0c9f7f3cecc937f5.tar.lz tangerine-wallet-browser-8f31b05ac5b7d8383c720b8b0c9f7f3cecc937f5.tar.xz tangerine-wallet-browser-8f31b05ac5b7d8383c720b8b0c9f7f3cecc937f5.tar.zst tangerine-wallet-browser-8f31b05ac5b7d8383c720b8b0c9f7f3cecc937f5.zip |
Add token exchange rates
Diffstat (limited to 'ui/app/reducers')
-rw-r--r-- | ui/app/reducers/metamask.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ui/app/reducers/metamask.js b/ui/app/reducers/metamask.js index 8d361195d..cdc98d05e 100644 --- a/ui/app/reducers/metamask.js +++ b/ui/app/reducers/metamask.js @@ -18,6 +18,7 @@ function reduceMetamask (state, action) { frequentRpcList: [], addressBook: [], selectedTokenAddress: null, + tokenExchangeRates: {}, }, state.metamask) switch (action.type) { @@ -136,6 +137,15 @@ function reduceMetamask (state, action) { conversionDate: action.value.conversionDate, }) + case actions.UPDATE_TOKEN_EXCHANGE_RATE: + const { payload: { pair, marketinfo } } = action + return extend(metamaskState, { + tokenExchangeRates: { + ...metamaskState.tokenExchangeRates, + [pair]: marketinfo, + }, + }) + default: return metamaskState |