aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/reducers
diff options
context:
space:
mode:
authorDan Finlay <somniac@me.com>2016-08-17 06:32:06 +0800
committerGitHub <noreply@github.com>2016-08-17 06:32:06 +0800
commit90d6bec3ed51ba4b2d4696132642a4d97712dec9 (patch)
treeae8f2a3a805e0ac24ed3d1058138cf1b3c25b763 /ui/app/reducers
parentf1986d7a3757aea50fba798b295397e69739b891 (diff)
parent666f3cd66ce56013e5688d514e3c1fc3ec8a6ac4 (diff)
downloadtangerine-wallet-browser-90d6bec3ed51ba4b2d4696132642a4d97712dec9.tar
tangerine-wallet-browser-90d6bec3ed51ba4b2d4696132642a4d97712dec9.tar.gz
tangerine-wallet-browser-90d6bec3ed51ba4b2d4696132642a4d97712dec9.tar.bz2
tangerine-wallet-browser-90d6bec3ed51ba4b2d4696132642a4d97712dec9.tar.lz
tangerine-wallet-browser-90d6bec3ed51ba4b2d4696132642a4d97712dec9.tar.xz
tangerine-wallet-browser-90d6bec3ed51ba4b2d4696132642a4d97712dec9.tar.zst
tangerine-wallet-browser-90d6bec3ed51ba4b2d4696132642a4d97712dec9.zip
Merge pull request #520 from MetaMask/usd-conversion
Conversion implementation
Diffstat (limited to 'ui/app/reducers')
-rw-r--r--ui/app/reducers/metamask.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/ui/app/reducers/metamask.js b/ui/app/reducers/metamask.js
index 4eef20f56..7f18480cb 100644
--- a/ui/app/reducers/metamask.js
+++ b/ui/app/reducers/metamask.js
@@ -15,6 +15,9 @@ function reduceMetamask (state, action) {
rpcTarget: 'https://rawtestrpc.metamask.io/',
identities: {},
unconfTxs: {},
+ currentFiat: 'USD',
+ conversionRate: 0,
+ conversionDate: 'N/A',
}, state.metamask)
switch (action.type) {
@@ -115,6 +118,13 @@ function reduceMetamask (state, action) {
var identities = extend(metamaskState.identities, id)
return extend(metamaskState, { identities })
+ case actions.SET_CURRENT_FIAT:
+ return extend(metamaskState, {
+ currentFiat: action.value.currentFiat,
+ conversionRate: action.value.conversionRate,
+ conversionDate: action.value.conversionDate,
+ })
+
default:
return metamaskState