aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/actions.js
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2017-02-03 15:32:24 +0800
committerkumavis <aaron@kumavis.me>2017-02-03 15:32:24 +0800
commit9e4ef45b6ac460e6539e0f79ad5c78959fa1c4cb (patch)
tree985284da2a2d002b2f591319d12bf980c3e4edee /ui/app/actions.js
parentb233e7e37c56852080bdc7b1843eb68ba96b5382 (diff)
downloadtangerine-wallet-browser-9e4ef45b6ac460e6539e0f79ad5c78959fa1c4cb.tar
tangerine-wallet-browser-9e4ef45b6ac460e6539e0f79ad5c78959fa1c4cb.tar.gz
tangerine-wallet-browser-9e4ef45b6ac460e6539e0f79ad5c78959fa1c4cb.tar.bz2
tangerine-wallet-browser-9e4ef45b6ac460e6539e0f79ad5c78959fa1c4cb.tar.lz
tangerine-wallet-browser-9e4ef45b6ac460e6539e0f79ad5c78959fa1c4cb.tar.xz
tangerine-wallet-browser-9e4ef45b6ac460e6539e0f79ad5c78959fa1c4cb.tar.zst
tangerine-wallet-browser-9e4ef45b6ac460e6539e0f79ad5c78959fa1c4cb.zip
migration #9 - break out CurrencyController substate
Diffstat (limited to 'ui/app/actions.js')
-rw-r--r--ui/app/actions.js8
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: {