diff options
author | Kevin Serrano <kevgagser@gmail.com> | 2016-07-22 00:30:58 +0800 |
---|---|---|
committer | Kevin Serrano <kevgagser@gmail.com> | 2016-07-22 00:30:58 +0800 |
commit | 491b9cddc5fe1a7d0899d29c9a53aa71f04b9b28 (patch) | |
tree | ba8cf1db59fa7ea67d629ac2528d35a449b09ff3 /ui | |
parent | aac810b1eb3414c907010c30537b7014f303d20f (diff) | |
download | tangerine-wallet-browser-491b9cddc5fe1a7d0899d29c9a53aa71f04b9b28.tar tangerine-wallet-browser-491b9cddc5fe1a7d0899d29c9a53aa71f04b9b28.tar.gz tangerine-wallet-browser-491b9cddc5fe1a7d0899d29c9a53aa71f04b9b28.tar.bz2 tangerine-wallet-browser-491b9cddc5fe1a7d0899d29c9a53aa71f04b9b28.tar.lz tangerine-wallet-browser-491b9cddc5fe1a7d0899d29c9a53aa71f04b9b28.tar.xz tangerine-wallet-browser-491b9cddc5fe1a7d0899d29c9a53aa71f04b9b28.tar.zst tangerine-wallet-browser-491b9cddc5fe1a7d0899d29c9a53aa71f04b9b28.zip |
Add fiat actions to metamask controllere and actions.
Diffstat (limited to 'ui')
-rw-r--r-- | ui/app/actions.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js index 3e0fe55c0..c9a5401d3 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, @@ -207,6 +209,18 @@ function revealAccount () { } } +function setCurrentFiat (fiat) { + return (dispatch) => { + dispatch(this.showLoadingIndication()) + _accountManager.setCurrentFiat(fiat, (err) => { + dispatch(this.hideLoadingIndication()) + dispatch({ + type: this.SET_CURRENT_FIAT, + }) + }) + } +} + function signMsg (msgData) { return (dispatch) => { dispatch(actions.showLoadingIndication()) |