diff options
author | Dan Finlay <dan@danfinlay.com> | 2016-04-13 05:41:58 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2016-04-13 05:41:58 +0800 |
commit | be4818564a065f166124c05b037ceb22eb5f242b (patch) | |
tree | 625fd23f81a83382b744da19dbe829e9d014a061 /app | |
parent | eddaf71e31a2267616c2665c76113bfb6c589bcb (diff) | |
download | tangerine-wallet-browser-be4818564a065f166124c05b037ceb22eb5f242b.tar tangerine-wallet-browser-be4818564a065f166124c05b037ceb22eb5f242b.tar.gz tangerine-wallet-browser-be4818564a065f166124c05b037ceb22eb5f242b.tar.bz2 tangerine-wallet-browser-be4818564a065f166124c05b037ceb22eb5f242b.tar.lz tangerine-wallet-browser-be4818564a065f166124c05b037ceb22eb5f242b.tar.xz tangerine-wallet-browser-be4818564a065f166124c05b037ceb22eb5f242b.tar.zst tangerine-wallet-browser-be4818564a065f166124c05b037ceb22eb5f242b.zip |
Migrate etherscan configs to our new production RPC.
Diffstat (limited to 'app')
-rw-r--r-- | app/scripts/background.js | 1 | ||||
-rw-r--r-- | app/scripts/lib/config-manager.js | 10 | ||||
-rw-r--r-- | app/scripts/lib/migrations.js | 8 |
3 files changed, 15 insertions, 4 deletions
diff --git a/app/scripts/background.js b/app/scripts/background.js index dfcdcc06c..a4f80d7f6 100644 --- a/app/scripts/background.js +++ b/app/scripts/background.js @@ -48,7 +48,6 @@ var providerOpts = { }, approveTransaction: addUnconfirmedTx, signTransaction: idStore.signTransaction.bind(idStore), - etherscan: providerConfig.type === 'etherscan', } var provider = MetaMaskProvider(providerOpts) diff --git a/app/scripts/lib/config-manager.js b/app/scripts/lib/config-manager.js index 121ede838..425dee3ac 100644 --- a/app/scripts/lib/config-manager.js +++ b/app/scripts/lib/config-manager.js @@ -2,7 +2,9 @@ const Migrator = require('pojo-migrator') const extend = require('xtend') const STORAGE_KEY = 'metamask-config' -var DEFAULT_RPC = 'https://rawtestrpc.metamask.io/' +const DEFAULT_RPC = 'https://rawtestrpc.metamask.io/' + +const migrations = require('./migrations') /* The config-manager is a convenience object * wrapping a pojo-migrator. @@ -28,7 +30,7 @@ function ConfigManager() { // // The `migrate` function receives the previous // config data format, and returns the new one. - migrations: [], + migrations: migrations, // How to load initial config. // Includes step on migrating pre-pojo-migrator data. @@ -134,7 +136,9 @@ function loadData() { } catch (e) {} var data = extend({ - version: 0, + meta: { + version: 0, + }, data: { config: { rpcTarget: DEFAULT_RPC, diff --git a/app/scripts/lib/migrations.js b/app/scripts/lib/migrations.js new file mode 100644 index 000000000..cab5bec66 --- /dev/null +++ b/app/scripts/lib/migrations.js @@ -0,0 +1,8 @@ +var path = require('path') +var fs = require('fs') + +var migration2 = require('../migrations/002') + +module.exports = [ + migration2, +] |