diff options
migration #9 - break out CurrencyController substate
Diffstat (limited to 'ui/app/actions.js')
-rw-r--r-- | ui/app/actions.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js index 228adcf18..c153a55a6 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -325,12 +325,16 @@ function showInfoPage () { } } -function setCurrentFiat (fiat) { +function setCurrentFiat (currencyCode) { return (dispatch) => { dispatch(this.showLoadingIndication()) if (global.METAMASK_DEBUG) console.log(`background.setCurrentFiat`) - background.setCurrentFiat(fiat, (data, err) => { + background.setCurrentCurrency(currencyCode, (err, data) => { dispatch(this.hideLoadingIndication()) + if (err) { + console.error(err.stack) + return dispatch(actions.displayWarning(err.message)) + } dispatch({ type: this.SET_CURRENT_FIAT, value: { |