Commit f8301035 authored by yann300's avatar yann300

add startDebugging info to matomo

parent 006f4c4c
...@@ -198,7 +198,7 @@ class SettingsUI { ...@@ -198,7 +198,7 @@ class SettingsUI {
return return
} }
const networkProvider = this._components.networkModule.getNetworkProvider.bind(this._components.networkModule) const networkProvider = this._components.networkModule.getNetworkProvider.bind(this._components.networkModule)
this.netUI.innerHTML = (networkProvider() !== 'vm') ? `${network.name} (${network.id || '-'}) network` : '' this.netUI.innerHTML = (networkProvider() !== 'vm') ? `${network.name} (${network.id || '-'}) network` : ''
}) })
setInterval(() => { setInterval(() => {
......
...@@ -244,11 +244,11 @@ UniversalDAppUI.prototype.runTransaction = function (lookupOnly, args, valArr, i ...@@ -244,11 +244,11 @@ UniversalDAppUI.prototype.runTransaction = function (lookupOnly, args, valArr, i
outputOverride.appendChild(decoded) outputOverride.appendChild(decoded)
} }
} }
let callinfo = "" let callinfo = ''
if (lookupOnly) callinfo = 'call' if (lookupOnly) callinfo = 'call'
else if (args.funABI.type === 'fallback' || args.funABI.type === 'receive') callinfo = 'lowLevelInteracions' else if (args.funABI.type === 'fallback' || args.funABI.type === 'receive') callinfo = 'lowLevelInteracions'
else callinfo = 'transact' else callinfo = 'transact'
_paq.push(['trackEvent', 'udapp', callinfo, this.blockchain.getCurrentNetworkStatus().network.name]) _paq.push(['trackEvent', 'udapp', callinfo, this.blockchain.getCurrentNetworkStatus().network.name])
const params = args.funABI.type !== 'fallback' ? inputsValues : '' const params = args.funABI.type !== 'fallback' ? inputsValues : ''
this.blockchain.runOrCallContractMethod( this.blockchain.runOrCallContractMethod(
......
...@@ -41,7 +41,7 @@ class Blockchain { ...@@ -41,7 +41,7 @@ class Blockchain {
this.executionContext.event.register('contextChanged', this.resetEnvironment.bind(this)) this.executionContext.event.register('contextChanged', this.resetEnvironment.bind(this))
this.networkcallid = 0 this.networkcallid = 0
this.networkStatus = { name: ' - ', id: ' - ' } this.networkStatus = { name: ' - ', id: ' - ' }
this.setupEvents() this.setupEvents()
this.setupProviders() this.setupProviders()
} }
......
...@@ -9,6 +9,7 @@ import { Toaster } from '@remix-ui/toaster' // eslint-disable-line ...@@ -9,6 +9,7 @@ import { Toaster } from '@remix-ui/toaster' // eslint-disable-line
/* eslint-disable-next-line */ /* eslint-disable-next-line */
import './debugger-ui.css' import './debugger-ui.css'
const helper = require('../../../../../apps/remix-ide/src/lib/helper') const helper = require('../../../../../apps/remix-ide/src/lib/helper')
const _paq = (window as any)._paq = (window as any)._paq || []
export const DebuggerUI = (props: DebuggerUIProps) => { export const DebuggerUI = (props: DebuggerUIProps) => {
const debuggerModule = props.debuggerAPI const debuggerModule = props.debuggerAPI
...@@ -167,7 +168,9 @@ export const DebuggerUI = (props: DebuggerUIProps) => { ...@@ -167,7 +168,9 @@ export const DebuggerUI = (props: DebuggerUIProps) => {
const web3 = await debuggerModule.getDebugWeb3() const web3 = await debuggerModule.getDebugWeb3()
try { try {
if (await web3.eth.net.getId() === 42) { const networkId = await web3.eth.net.getId()
_paq.push(['trackEvent', 'debugger', 'startDebugging', networkId])
if (networkId === 42) {
setState(prevState => { setState(prevState => {
return { return {
...prevState, ...prevState,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment