aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/actions.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-08-17 06:41:11 +0800
committerDan Finlay <dan@danfinlay.com>2016-08-17 06:41:11 +0800
commit4ba90969ee8fa9b9e21e88f5c6f0d646874049a3 (patch)
tree8b6f9423b1895aa7973737315857066a56855621 /ui/app/actions.js
parent5479509618e601391586d0851acee4e408523c4f (diff)
parent90d6bec3ed51ba4b2d4696132642a4d97712dec9 (diff)
downloadtangerine-wallet-browser-4ba90969ee8fa9b9e21e88f5c6f0d646874049a3.tar
tangerine-wallet-browser-4ba90969ee8fa9b9e21e88f5c6f0d646874049a3.tar.gz
tangerine-wallet-browser-4ba90969ee8fa9b9e21e88f5c6f0d646874049a3.tar.bz2
tangerine-wallet-browser-4ba90969ee8fa9b9e21e88f5c6f0d646874049a3.tar.lz
tangerine-wallet-browser-4ba90969ee8fa9b9e21e88f5c6f0d646874049a3.tar.xz
tangerine-wallet-browser-4ba90969ee8fa9b9e21e88f5c6f0d646874049a3.tar.zst
tangerine-wallet-browser-4ba90969ee8fa9b9e21e88f5c6f0d646874049a3.zip
Merge branch 'master' into PopupNotifications
Diffstat (limited to 'ui/app/actions.js')
-rw-r--r--ui/app/actions.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/ui/app/actions.js b/ui/app/actions.js
index 326c811af..dadf124d8 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,
@@ -234,6 +236,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())