mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
commit
2d5a672971
@ -33,11 +33,6 @@ self.addEventListener('install', function(event) {
|
|||||||
})
|
})
|
||||||
self.addEventListener('activate', function(event) {
|
self.addEventListener('activate', function(event) {
|
||||||
event.waitUntil(self.clients.claim())
|
event.waitUntil(self.clients.claim())
|
||||||
self.clients.matchAll()
|
|
||||||
.then((clients) => {
|
|
||||||
if (connectedClientCount < clients.length) sendMessageToAllClients('reconnect')
|
|
||||||
})
|
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
console.log('inside:open')
|
console.log('inside:open')
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
const Web3 = require('web3')
|
const Web3 = require('web3')
|
||||||
const setupProvider = require('./lib/setup-provider.js')
|
const setupProvider = require('./lib/setup-provider.js')
|
||||||
|
const setupDappAutoReload = require('../../app/scripts/lib/auto-reload.js')
|
||||||
const MASCARA_ORIGIN = process.env.MASCARA_ORIGIN || 'http://localhost:9001'
|
const MASCARA_ORIGIN = process.env.MASCARA_ORIGIN || 'http://localhost:9001'
|
||||||
console.log('MASCARA_ORIGIN:', MASCARA_ORIGIN)
|
console.log('MASCARA_ORIGIN:', MASCARA_ORIGIN)
|
||||||
|
|
||||||
@ -14,8 +14,7 @@ const provider = setupProvider({
|
|||||||
instrumentForUserInteractionTriggers(provider)
|
instrumentForUserInteractionTriggers(provider)
|
||||||
|
|
||||||
const web3 = new Web3(provider)
|
const web3 = new Web3(provider)
|
||||||
global.web3 = web3
|
setupDappAutoReload(web3, provider.publicConfigStore)
|
||||||
|
|
||||||
//
|
//
|
||||||
// ui stuff
|
// ui stuff
|
||||||
//
|
//
|
||||||
|
@ -40,7 +40,6 @@ const connectApp = function (readSw) {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
background.on('ready', (sw) => {
|
background.on('ready', (sw) => {
|
||||||
background.removeListener('updatefound', connectApp)
|
background.removeListener('updatefound', connectApp)
|
||||||
connectApp(sw)
|
connectApp(sw)
|
||||||
@ -48,5 +47,10 @@ background.on('ready', (sw) => {
|
|||||||
background.on('updatefound', () => window.location.reload())
|
background.on('updatefound', () => window.location.reload())
|
||||||
|
|
||||||
background.startWorker()
|
background.startWorker()
|
||||||
// background.startWorker()
|
.then(() => {
|
||||||
|
setTimeout(() => {
|
||||||
|
const appContent = document.getElementById(`app-content`)
|
||||||
|
if (!appContent.children.length) window.location.reload()
|
||||||
|
}, 2000)
|
||||||
|
})
|
||||||
console.log('hello from MetaMascara ui!')
|
console.log('hello from MetaMascara ui!')
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
"bluebird": "^3.5.0",
|
"bluebird": "^3.5.0",
|
||||||
"browser-passworder": "^2.0.3",
|
"browser-passworder": "^2.0.3",
|
||||||
"browserify-derequire": "^0.9.4",
|
"browserify-derequire": "^0.9.4",
|
||||||
"client-sw-ready-event": "^3.0.3",
|
"client-sw-ready-event": "^3.3.0",
|
||||||
"clone": "^1.0.2",
|
"clone": "^1.0.2",
|
||||||
"copy-to-clipboard": "^2.0.0",
|
"copy-to-clipboard": "^2.0.0",
|
||||||
"debounce": "^1.0.0",
|
"debounce": "^1.0.0",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user