From 9e4ef45b6ac460e6539e0f79ad5c78959fa1c4cb Mon Sep 17 00:00:00 2001 From: kumavis Date: Thu, 2 Feb 2017 23:32:24 -0800 Subject: migration #9 - break out CurrencyController substate --- ui/app/actions.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'ui/app/actions.js') 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: { -- cgit v1.2.3