mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Add support for .test Ropsten ENS domains
This commit is contained in:
parent
6d04c80302
commit
8df433ca84
@ -62,7 +62,8 @@
|
|||||||
"https://*.infura.io/",
|
"https://*.infura.io/",
|
||||||
"activeTab",
|
"activeTab",
|
||||||
"webRequest",
|
"webRequest",
|
||||||
"*://*.eth/"
|
"*://*.eth/",
|
||||||
|
"*://*.test/"
|
||||||
],
|
],
|
||||||
"web_accessible_resources": [
|
"web_accessible_resources": [
|
||||||
"inpage.js"
|
"inpage.js"
|
||||||
|
@ -53,6 +53,7 @@ const isIE = !!document.documentMode
|
|||||||
// Edge 20+
|
// Edge 20+
|
||||||
const isEdge = !isIE && !!window.StyleMedia
|
const isEdge = !isIE && !!window.StyleMedia
|
||||||
|
|
||||||
|
let ipfsHandle
|
||||||
let popupIsOpen = false
|
let popupIsOpen = false
|
||||||
let notificationIsOpen = false
|
let notificationIsOpen = false
|
||||||
const openMetamaskTabsIDs = {}
|
const openMetamaskTabsIDs = {}
|
||||||
@ -158,7 +159,7 @@ async function initialize () {
|
|||||||
const initLangCode = await getFirstPreferredLangCode()
|
const initLangCode = await getFirstPreferredLangCode()
|
||||||
await setupController(initState, initLangCode)
|
await setupController(initState, initLangCode)
|
||||||
log.debug('MetaMask initialization complete.')
|
log.debug('MetaMask initialization complete.')
|
||||||
ipfsContent(initState.NetworkController.provider)
|
ipfsHandle = ipfsContent(initState.NetworkController.provider)
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -262,6 +263,10 @@ function setupController (initState, initLangCode) {
|
|||||||
})
|
})
|
||||||
global.metamaskController = controller
|
global.metamaskController = controller
|
||||||
|
|
||||||
|
controller.networkController.on('networkDidChange', () => {
|
||||||
|
ipfsHandle && ipfsHandle.remove()
|
||||||
|
ipfsHandle = ipfsContent(controller.networkController.providerStore.getState())
|
||||||
|
})
|
||||||
|
|
||||||
// report failed transactions to Sentry
|
// report failed transactions to Sentry
|
||||||
controller.txController.on(`tx:status-update`, (txId, status) => {
|
controller.txController.on(`tx:status-update`, (txId, status) => {
|
||||||
|
@ -61,7 +61,7 @@ function getRegistrar (type) {
|
|||||||
module.exports.resolve = function (name, provider) {
|
module.exports.resolve = function (name, provider) {
|
||||||
const path = name.split('.')
|
const path = name.split('.')
|
||||||
const tld = path[path.length - 1]
|
const tld = path[path.length - 1]
|
||||||
if (tld === 'eth') {
|
if (tld === 'eth' || tld === 'test') {
|
||||||
return ens(name, provider)
|
return ens(name, provider)
|
||||||
} else {
|
} else {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
15259
package-lock.json
generated
15259
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user