1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 09:57:02 +01:00

Corrected migration order

This commit is contained in:
Dan Finlay 2016-04-22 13:36:04 -07:00
parent 875a0731dd
commit 4a1dd26fc9
2 changed files with 10 additions and 10 deletions

View File

@ -1,13 +1,11 @@
var oldTestRpc = 'https://rawtestrpc.metamask.io/'
var newTestRpc = 'https://testrpc.metamask.io/'
module.exports = {
version: 3,
version: 2,
migrate: function(data) {
try {
if (data.config.provider.rpcTarget === oldTestRpc) {
data.config.provider.rpcTarget = newTestRpc
if (data.config.provider.type === 'etherscan') {
data.config.provider.type = 'rpc'
data.config.provider.rpcTarget = 'https://rpc.metamask.io/'
}
} catch (e) {}
return data

View File

@ -1,11 +1,13 @@
var oldTestRpc = 'https://rawtestrpc.metamask.io/'
var newTestRpc = 'https://testrpc.metamask.io/'
module.exports = {
version: 2,
version: 3,
migrate: function(data) {
try {
if (data.config.provider.type === 'etherscan') {
data.config.provider.type = 'rpc'
data.config.provider.rpcTarget = 'https://rpc.metamask.io/'
if (data.config.provider.rpcTarget === oldTestRpc) {
data.config.provider.rpcTarget = newTestRpc
}
} catch (e) {}
return data