From 9d486505b3353247d8e9db9053304a13b74cbb94 Mon Sep 17 00:00:00 2001 From: hackyminer Date: Wed, 2 May 2018 07:22:19 +0900 Subject: [PATCH] EthTools.ticker.start() with configurable currencies --- app/client/lib/ethereum/walletConnector.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/app/client/lib/ethereum/walletConnector.js b/app/client/lib/ethereum/walletConnector.js index 7d73b105d..5ba173b7e 100644 --- a/app/client/lib/ethereum/walletConnector.js +++ b/app/client/lib/ethereum/walletConnector.js @@ -56,10 +56,16 @@ connectToNode = function() { EthAccounts.init(); EthBlocks.init(); - EthTools.ticker.start({ - extraParams: typeof mist !== 'undefined' ? 'Mist-' + mist.version : '', - currencies: ['BTC', 'USD', 'EUR', 'BRL', 'GBP'] - }); + + var options = {extraParams: (typeof mist !== 'undefined') ? 'Mist-'+ mist.version : ''}; + if (!walletConfig.noUsePrice) { + var currencies = ['BTC', 'USD', 'EUR', 'BRL', 'GBP']; + if (walletConfig.supportedCurrencies) { + currencies = walletConfig.supportedCurrencies; + } + options.currencies = currencies; + } + EthTools.ticker.start(options); if (EthAccounts.find().count() > 0) { checkForOriginalWallet();