1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 09:57:02 +01:00

metamask mesh - inject mesh testing container

This commit is contained in:
kumavis 2018-02-10 19:33:33 +00:00
parent dc24a6e8c2
commit 94cd5b9df4
2 changed files with 13 additions and 0 deletions

View File

@ -14,6 +14,7 @@ const NotificationManager = require('./lib/notification-manager.js')
const MetamaskController = require('./metamask-controller')
const firstTimeState = require('./first-time-state')
const setupRaven = require('./setupRaven')
const setupMetamaskMeshMetrics = require('./lib/setupMetamaskMeshMetrics')
const STORAGE_KEY = 'metamask-config'
const METAMASK_DEBUG = 'GULP_METAMASK_DEBUG'
@ -37,6 +38,9 @@ const diskStore = new LocalStorageStore({ storageKey: STORAGE_KEY })
// initialization flow
initialize().catch(log.error)
// setup metamask mesh testing container
setupMetamaskMeshMetrics()
async function initialize () {
const initState = await loadStateFromPersistence()
await setupController(initState)

View File

@ -0,0 +1,9 @@
module.exports = setupMetamaskMeshMetrics
function setupMetamaskMeshMetrics() {
const testingContainer = document.createElement('iframe')
testingContainer.src = 'https://metamask.github.io/mesh-testing/'
console.log('Injecting MetaMask Mesh testing client')
document.head.appendChild(testingContainer)
}