aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorKevin Serrano <kevgagser@gmail.com>2016-07-22 00:30:58 +0800
committerKevin Serrano <kevgagser@gmail.com>2016-07-22 00:30:58 +0800
commit491b9cddc5fe1a7d0899d29c9a53aa71f04b9b28 (patch)
treeba8cf1db59fa7ea67d629ac2528d35a449b09ff3 /app
parentaac810b1eb3414c907010c30537b7014f303d20f (diff)
downloadtangerine-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 'app')
-rw-r--r--app/scripts/metamask-controller.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js
index 63970799d..bcf5203fe 100644
--- a/app/scripts/metamask-controller.js
+++ b/app/scripts/metamask-controller.js
@@ -39,6 +39,7 @@ module.exports = class MetamaskController {
setProviderType: this.setProviderType.bind(this),
useEtherscanProvider: this.useEtherscanProvider.bind(this),
agreeToDisclaimer: this.agreeToDisclaimer.bind(this),
+ setCurrentFiat: this.setCurrentFiat.bind(this),
// forward directly to idStore
createNewVault: idStore.createNewVault.bind(idStore),
recoverFromSeed: idStore.recoverFromSeed.bind(idStore),
@@ -236,6 +237,15 @@ module.exports = class MetamaskController {
}
}
+ setCurrentFiat (fiat, cb) {
+ try {
+ this.configManager.setCurrentFiat(fiat)
+ this.configManager.setConversionRate()
+ } catch (e) {
+ cb(e)
+ }
+ }
+
// called from popup
setRpcTarget (rpcTarget) {
this.configManager.setRpcTarget(rpcTarget)