Migrate etherscan configs to our new production RPC.

feature/default_network_editable
Dan Finlay 9 years ago
parent eddaf71e31
commit be4818564a
  1. 1
      app/scripts/background.js
  2. 8
      app/scripts/lib/config-manager.js
  3. 8
      app/scripts/lib/migrations.js

@ -48,7 +48,6 @@ var providerOpts = {
},
approveTransaction: addUnconfirmedTx,
signTransaction: idStore.signTransaction.bind(idStore),
etherscan: providerConfig.type === 'etherscan',
}
var provider = MetaMaskProvider(providerOpts)

@ -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({
meta: {
version: 0,
},
data: {
config: {
rpcTarget: DEFAULT_RPC,

@ -0,0 +1,8 @@
var path = require('path')
var fs = require('fs')
var migration2 = require('../migrations/002')
module.exports = [
migration2,
]
Loading…
Cancel
Save