Skip to content

Commit 701ca38

Browse files
committed
more matomo tracking
1 parent 124f47a commit 701ca38

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

apps/remix-ide/src/blockchain/blockchain.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -787,6 +787,7 @@ export class Blockchain extends Plugin {
787787
)
788788

789789
web3Runner.event.register('transactionBroadcasted', (txhash, isUserOp) => {
790+
if (isUserOp) _paq.push(['trackEvent', 'udapp', 'safeSmartAccount', `txBroadcastedFromSmartAccount`])
790791
this.executionContext.detectNetwork(async (error, network) => {
791792
if (error || !network) return
792793
if (network.name === 'VM') return
@@ -971,7 +972,6 @@ export class Blockchain extends Plugin {
971972
reject(e)
972973
return
973974
}
974-
975975
const tx = {
976976
to: args.to,
977977
data: args.data.dataHex,
@@ -996,6 +996,7 @@ export class Blockchain extends Plugin {
996996
if (!tx.timestamp) tx.timestamp = Date.now()
997997
const timestamp = tx.timestamp
998998
this._triggerEvent('initiatingTransaction', [timestamp, tx, payLoad])
999+
if (fromSmartAccount) _paq.push(['trackEvent', 'udapp', 'safeSmartAccount', `txInitiatedFromSmartAccount`])
9991000
try {
10001001
this.txRunner.rawRun(tx, confirmationCb, continueCb, promptCb, async (error, result) => {
10011002
if (error) {

libs/remix-ui/run-tab/src/lib/actions/account.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ export const createSmartAccount = async (plugin: RunTab, dispatch: React.Dispatc
275275
_paq.push(['trackEvent', 'udapp', 'safeSmartAccount', 'createdSuccessfully'])
276276
return plugin.call('notification', 'toast', `Safe account ${safeAccount.address} created for owner ${account}`)
277277
} catch (error) {
278-
_paq.push(['trackEvent', 'udapp', 'safeSmartAccount', 'creationFailed'])
278+
_paq.push(['trackEvent', 'udapp', 'safeSmartAccount', `creationFailedWithError:${error.message}`])
279279
console.error('Failed to create safe smart account: ', error)
280280
return plugin.call('notification', 'toast', `Failed to create safe smart account !!!`)
281281
}

0 commit comments

Comments
 (0)