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:
parent
eddaf71e31
commit
be4818564a
@ -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)
|
||||||
|
|
||||||
|
@ -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,
|
||||||
|
8
app/scripts/lib/migrations.js
Normal file
8
app/scripts/lib/migrations.js
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
var path = require('path')
|
||||||
|
var fs = require('fs')
|
||||||
|
|
||||||
|
var migration2 = require('../migrations/002')
|
||||||
|
|
||||||
|
module.exports = [
|
||||||
|
migration2,
|
||||||
|
]
|
Loading…
Reference in New Issue
Block a user