diff options
author | Frankie <frankie.pangilinan@consensys.net> | 2016-08-19 02:06:32 +0800 |
---|---|---|
committer | Frankie <frankie.pangilinan@consensys.net> | 2016-08-19 02:06:32 +0800 |
commit | efa61f2cf892eb1383fcfacd60d906e76dbaa757 (patch) | |
tree | 4e19f1abbadc02f861f0b54027954bf9cb6b5fac /ui/app/actions.js | |
parent | 752d16f6c072b0dd54eb245209881a25ff06cb8e (diff) | |
parent | 90d6bec3ed51ba4b2d4696132642a4d97712dec9 (diff) | |
download | tangerine-wallet-browser-efa61f2cf892eb1383fcfacd60d906e76dbaa757.tar tangerine-wallet-browser-efa61f2cf892eb1383fcfacd60d906e76dbaa757.tar.gz tangerine-wallet-browser-efa61f2cf892eb1383fcfacd60d906e76dbaa757.tar.bz2 tangerine-wallet-browser-efa61f2cf892eb1383fcfacd60d906e76dbaa757.tar.lz tangerine-wallet-browser-efa61f2cf892eb1383fcfacd60d906e76dbaa757.tar.xz tangerine-wallet-browser-efa61f2cf892eb1383fcfacd60d906e76dbaa757.tar.zst tangerine-wallet-browser-efa61f2cf892eb1383fcfacd60d906e76dbaa757.zip |
Merge branch 'master' into shapeshiftTx
Diffstat (limited to 'ui/app/actions.js')
-rw-r--r-- | ui/app/actions.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js index 48a425d50..9b99a05c1 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -55,6 +55,8 @@ var actions = { SHOW_CONF_MSG_PAGE: 'SHOW_CONF_MSG_PAGE', REVEAL_ACCOUNT: 'REVEAL_ACCOUNT', revealAccount: revealAccount, + SET_CURRENT_FIAT: 'SET_CURRENT_FIAT', + setCurrentFiat: setCurrentFiat, // account detail screen SHOW_SEND_PAGE: 'SHOW_SEND_PAGE', showSendPage: showSendPage, @@ -236,6 +238,23 @@ function revealAccount () { } } +function setCurrentFiat (fiat) { + return (dispatch) => { + dispatch(this.showLoadingIndication()) + _accountManager.setCurrentFiat(fiat, (data, err) => { + dispatch(this.hideLoadingIndication()) + dispatch({ + type: this.SET_CURRENT_FIAT, + value: { + currentFiat: data.currentFiat, + conversionRate: data.conversionRate, + conversionDate: data.conversionDate, + }, + }) + }) + } +} + function signMsg (msgData) { return (dispatch) => { dispatch(actions.showLoadingIndication()) |