1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 01:39:44 +01:00

Migrate etherscan configs to our new production RPC.

This commit is contained in:
Dan Finlay 2016-04-12 14:41:58 -07:00
parent eddaf71e31
commit be4818564a
3 changed files with 15 additions and 4 deletions

View File

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

View File

@ -2,7 +2,9 @@ const Migrator = require('pojo-migrator')
const extend = require('xtend') const extend = require('xtend')
const STORAGE_KEY = 'metamask-config' 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 /* The config-manager is a convenience object
* wrapping a pojo-migrator. * wrapping a pojo-migrator.
@ -28,7 +30,7 @@ function ConfigManager() {
// //
// The `migrate` function receives the previous // The `migrate` function receives the previous
// config data format, and returns the new one. // config data format, and returns the new one.
migrations: [], migrations: migrations,
// How to load initial config. // How to load initial config.
// Includes step on migrating pre-pojo-migrator data. // Includes step on migrating pre-pojo-migrator data.
@ -134,7 +136,9 @@ function loadData() {
} catch (e) {} } catch (e) {}
var data = extend({ var data = extend({
version: 0, meta: {
version: 0,
},
data: { data: {
config: { config: {
rpcTarget: DEFAULT_RPC, rpcTarget: DEFAULT_RPC,

View File

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