aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/background.js
diff options
context:
space:
mode:
authorhackyminer <hackyminer@gmail.com>2018-10-26 19:37:35 +0800
committerhackyminer <hackyminer@gmail.com>2018-10-26 19:37:35 +0800
commitbc7f8d0a5bf42b73ee1d1102362fc0a94dc80c0d (patch)
tree96fc1c969b49c66081ff1a042a6e2e3e787723c7 /app/scripts/background.js
parentb62d07f3a5bdfde7e295f17b7f601c6f2d5314ef (diff)
parent54a8ade2669cb5f8f046509873bc2a9c25425847 (diff)
downloadtangerine-wallet-browser-bc7f8d0a5bf42b73ee1d1102362fc0a94dc80c0d.tar
tangerine-wallet-browser-bc7f8d0a5bf42b73ee1d1102362fc0a94dc80c0d.tar.gz
tangerine-wallet-browser-bc7f8d0a5bf42b73ee1d1102362fc0a94dc80c0d.tar.bz2
tangerine-wallet-browser-bc7f8d0a5bf42b73ee1d1102362fc0a94dc80c0d.tar.lz
tangerine-wallet-browser-bc7f8d0a5bf42b73ee1d1102362fc0a94dc80c0d.tar.xz
tangerine-wallet-browser-bc7f8d0a5bf42b73ee1d1102362fc0a94dc80c0d.tar.zst
tangerine-wallet-browser-bc7f8d0a5bf42b73ee1d1102362fc0a94dc80c0d.zip
Merge branch 'develop' into eth_chainid
Diffstat (limited to 'app/scripts/background.js')
-rw-r--r--app/scripts/background.js10
1 files changed, 3 insertions, 7 deletions
diff --git a/app/scripts/background.js b/app/scripts/background.js
index 509a0001d..6b3ac2664 100644
--- a/app/scripts/background.js
+++ b/app/scripts/background.js
@@ -29,7 +29,7 @@ const setupMetamaskMeshMetrics = require('./lib/setupMetamaskMeshMetrics')
const EdgeEncryptor = require('./edge-encryptor')
const getFirstPreferredLangCode = require('./lib/get-first-preferred-lang-code')
const getObjStructure = require('./lib/getObjStructure')
-const ipfsContent = require('./lib/ipfsContent.js')
+const setupEnsIpfsResolver = require('./lib/ens-ipfs/setup')
const {
ENVIRONMENT_TYPE_POPUP,
@@ -58,7 +58,6 @@ const isIE = !!document.documentMode
// Edge 20+
const isEdge = !isIE && !!window.StyleMedia
-let ipfsHandle
let popupIsOpen = false
let notificationIsOpen = false
const openMetamaskTabsIDs = {}
@@ -164,7 +163,6 @@ async function initialize () {
const initLangCode = await getFirstPreferredLangCode()
await setupController(initState, initLangCode)
log.debug('MetaMask initialization complete.')
- ipfsHandle = ipfsContent(initState.NetworkController.provider)
}
//
@@ -269,10 +267,8 @@ function setupController (initState, initLangCode) {
})
global.metamaskController = controller
- controller.networkController.on('networkDidChange', () => {
- ipfsHandle && ipfsHandle.remove()
- ipfsHandle = ipfsContent(controller.networkController.providerStore.getState())
- })
+ const provider = controller.provider
+ setupEnsIpfsResolver({ provider })
// report failed transactions to Sentry
controller.txController.on(`tx:status-update`, (txId, status) => {