Skip to content

Commit

Permalink
improve tracker
Browse files Browse the repository at this point in the history
  • Loading branch information
namgold committed Sep 21, 2023
1 parent c6ebf74 commit 08abcaa
Showing 1 changed file with 25 additions and 22 deletions.
47 changes: 25 additions & 22 deletions src/constants/connectors/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,31 @@ import checkForBraveBrowser from 'utils/checkForBraveBrowser'

if (ENV_LEVEL == ENV_TYPE.ADPR) {
setTimeout(() => {
const params = {
level: 'info',
extra: {
'window.ethereum': window.ethereum,
'window.web3': window.web3,
'window.coin98': window.coin98,
'window.coinbaseWalletExtension': window.coinbaseWalletExtension,
'navigator.brave': navigator.brave,
isInjected: getIsInjected(),
isMetaMaskWallet: getIsMetaMaskWallet(),
isCoinbaseWallet: getIsCoinbaseWallet(),
isBraveWallet: getIsBraveWallet(),
isC98Wallet: getIsC98Wallet(),
isRabbyWallet: getIsRabbyWallet(),
isBloctoWallet: getIsBloctoWallet(),
isKrystalWallet: getIsKrystalWallet(),
isTrustWallet: getIsTrustWallet(),
isGenericInjector: getIsGenericInjector(),
},
} as const
captureMessage('Injected window.ethereum', params)
console.log('capturing Injected window.ethereum', { params })
if (getIsGenericInjector()) {
const params = {
level: 'warning',
extra: {
detector: {
isMetaMaskWallet: getIsMetaMaskWallet(),
isCoinbaseWallet: getIsCoinbaseWallet(),
isBraveWallet: getIsBraveWallet(),
isC98Wallet: getIsC98Wallet(),
isRabbyWallet: getIsRabbyWallet(),
isBloctoWallet: getIsBloctoWallet(),
isKrystalWallet: getIsKrystalWallet(),
isTrustWallet: getIsTrustWallet(),
isGenericInjector: getIsGenericInjector(),
},
'window.ethereum': window.ethereum,
'window.web3': window.web3,
'window.coin98': window.coin98,
'window.coinbaseWalletExtension': window.coinbaseWalletExtension,
'navigator.brave': navigator.brave,
},
} as const
captureMessage('Unknown injected window.ethereum', params)
console.info('Capturing injected window.ethereum', { params })
}
}, 5000)
}

Expand Down

0 comments on commit 08abcaa

Please sign in to comment.