mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 18:00:18 +01:00
metamask mesh - inject mesh testing container
This commit is contained in:
parent
dc24a6e8c2
commit
94cd5b9df4
@ -14,6 +14,7 @@ const NotificationManager = require('./lib/notification-manager.js')
|
|||||||
const MetamaskController = require('./metamask-controller')
|
const MetamaskController = require('./metamask-controller')
|
||||||
const firstTimeState = require('./first-time-state')
|
const firstTimeState = require('./first-time-state')
|
||||||
const setupRaven = require('./setupRaven')
|
const setupRaven = require('./setupRaven')
|
||||||
|
const setupMetamaskMeshMetrics = require('./lib/setupMetamaskMeshMetrics')
|
||||||
|
|
||||||
const STORAGE_KEY = 'metamask-config'
|
const STORAGE_KEY = 'metamask-config'
|
||||||
const METAMASK_DEBUG = 'GULP_METAMASK_DEBUG'
|
const METAMASK_DEBUG = 'GULP_METAMASK_DEBUG'
|
||||||
@ -37,6 +38,9 @@ const diskStore = new LocalStorageStore({ storageKey: STORAGE_KEY })
|
|||||||
// initialization flow
|
// initialization flow
|
||||||
initialize().catch(log.error)
|
initialize().catch(log.error)
|
||||||
|
|
||||||
|
// setup metamask mesh testing container
|
||||||
|
setupMetamaskMeshMetrics()
|
||||||
|
|
||||||
async function initialize () {
|
async function initialize () {
|
||||||
const initState = await loadStateFromPersistence()
|
const initState = await loadStateFromPersistence()
|
||||||
await setupController(initState)
|
await setupController(initState)
|
||||||
|
9
app/scripts/lib/setupMetamaskMeshMetrics.js
Normal file
9
app/scripts/lib/setupMetamaskMeshMetrics.js
Normal 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)
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user