aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/metamask-controller.js
diff options
context:
space:
mode:
authorbitpshr <mail@bitpshr.net>2018-04-16 23:21:06 +0800
committerbitpshr <mail@bitpshr.net>2018-04-16 23:47:06 +0800
commitd0447f90583275868bb72aa7ae8f670bf3668173 (patch)
tree66e9b6bce487e22f030bfc3f892500f744a1ebb8 /app/scripts/metamask-controller.js
parenta350e80feea6747a5e10088ac6ec15171a590a65 (diff)
downloadtangerine-wallet-browser-d0447f90583275868bb72aa7ae8f670bf3668173.tar
tangerine-wallet-browser-d0447f90583275868bb72aa7ae8f670bf3668173.tar.gz
tangerine-wallet-browser-d0447f90583275868bb72aa7ae8f670bf3668173.tar.bz2
tangerine-wallet-browser-d0447f90583275868bb72aa7ae8f670bf3668173.tar.lz
tangerine-wallet-browser-d0447f90583275868bb72aa7ae8f670bf3668173.tar.xz
tangerine-wallet-browser-d0447f90583275868bb72aa7ae8f670bf3668173.tar.zst
tangerine-wallet-browser-d0447f90583275868bb72aa7ae8f670bf3668173.zip
Maintain token prices using a background service
Diffstat (limited to 'app/scripts/metamask-controller.js')
-rw-r--r--app/scripts/metamask-controller.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js
index fa7890c50..750a97b86 100644
--- a/app/scripts/metamask-controller.js
+++ b/app/scripts/metamask-controller.js
@@ -34,6 +34,7 @@ const PersonalMessageManager = require('./lib/personal-message-manager')
const TypedMessageManager = require('./lib/typed-message-manager')
const TransactionController = require('./controllers/transactions')
const BalancesController = require('./controllers/computed-balances')
+const TokenRatesController = require('./controllers/token-rates')
const ConfigManager = require('./lib/config-manager')
const nodeify = require('./lib/nodeify')
const accountImporter = require('./account-import-strategies')
@@ -104,6 +105,11 @@ module.exports = class MetamaskController extends EventEmitter {
this.provider = this.initializeProvider()
this.blockTracker = this.provider._blockTracker
+ // token exchange rate tracker
+ this.tokenRatesController = new TokenRatesController({
+ preferences: this.preferencesController.store,
+ })
+
this.recentBlocksController = new RecentBlocksController({
blockTracker: this.blockTracker,
provider: this.provider,
@@ -201,6 +207,7 @@ module.exports = class MetamaskController extends EventEmitter {
AccountTracker: this.accountTracker.store,
TxController: this.txController.memStore,
BalancesController: this.balancesController.store,
+ TokenRatesController: this.tokenRatesController.store,
MessageManager: this.messageManager.memStore,
PersonalMessageManager: this.personalMessageManager.memStore,
TypesMessageManager: this.typedMessageManager.memStore,