diff options
migrations - introduce promise-based migrator
Diffstat (limited to 'app/scripts/migrations/003.js')
-rw-r--r-- | app/scripts/migrations/003.js | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/app/scripts/migrations/003.js b/app/scripts/migrations/003.js index 617c55c09..b25e26e01 100644 --- a/app/scripts/migrations/003.js +++ b/app/scripts/migrations/003.js @@ -1,15 +1,17 @@ -var oldTestRpc = 'https://rawtestrpc.metamask.io/' -var newTestRpc = 'https://testrpc.metamask.io/' +const version = 3 +const oldTestRpc = 'https://rawtestrpc.metamask.io/' +const newTestRpc = 'https://testrpc.metamask.io/' module.exports = { - version: 3, + version, - migrate: function (data) { + migrate: function (meta) { + meta.version = version try { - if (data.config.provider.rpcTarget === oldTestRpc) { - data.config.provider.rpcTarget = newTestRpc + if (meta.data.config.provider.rpcTarget === oldTestRpc) { + meta.data.config.provider.rpcTarget = newTestRpc } } catch (e) {} - return data + return Promise.resolve(meta) }, } |