diff options
Diffstat (limited to 'ui')
-rw-r--r-- | ui/app/actions.js | 6 | ||||
-rw-r--r-- | ui/app/reducers/metamask.js | 6 |
2 files changed, 11 insertions, 1 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js index c9a5401d3..c5fd2df08 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -212,10 +212,14 @@ function revealAccount () { function setCurrentFiat (fiat) { return (dispatch) => { dispatch(this.showLoadingIndication()) - _accountManager.setCurrentFiat(fiat, (err) => { + _accountManager.setCurrentFiat(fiat, (data, err) => { dispatch(this.hideLoadingIndication()) dispatch({ type: this.SET_CURRENT_FIAT, + value: { + currentFiat: data.currentFiat, + conversionRate: data.conversionRate, + } }) }) } diff --git a/ui/app/reducers/metamask.js b/ui/app/reducers/metamask.js index f3ef8eb11..d5d17135f 100644 --- a/ui/app/reducers/metamask.js +++ b/ui/app/reducers/metamask.js @@ -109,6 +109,12 @@ 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, + }) + default: return metamaskState |