aboutsummaryrefslogblamecommitdiffstats
path: root/app/scripts/migrations/002.js
blob: 476b0a43a7dc7ebf17c0d2c9a3dbcf08e7609cac (plain) (tree)
1
2
3
4
5
6
7
8

                 
                  
          
 

                                        
         


                                                                                 

                  
                                         
    
 
const version = 2

module.exports = {
  version,

  migrate: function (versionedData) {
    versionedData.meta.version = version
    try {
      if (versionedData.data.config.provider.type === 'etherscan') {
        versionedData.data.config.provider.type = 'rpc'
        versionedData.data.config.provider.rpcTarget = 'https://rpc.metamask.io/'
      }
    } catch (e) {}
    return Promise.resolve(versionedData)
  },
}