-
Notifications
You must be signed in to change notification settings - Fork 363
fix: better network comparison + WC peer tracking #3729
Conversation
CLA Assistant Lite All Contributors have signed the CLA. |
@@ -15,7 +15,7 @@ export const onConnectButtonClick = async (): Promise<void> => { | |||
} | |||
|
|||
const ConnectButton = (props: { 'data-testid': string }): ReactElement => ( | |||
<Track {...OVERVIEW_EVENTS.ONBOARD}> | |||
<Track {...OVERVIEW_EVENTS.OPEN_ONBOARD}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was not the correct event key.
ESLint Summary View Full Report
Report generated by eslint-plus-action |
if (payload === account) { | ||
trackEvent({ ...WALLET_EVENTS.CONNECT, label: name }) | ||
// Only track when store/UI is in sync with onboard | ||
if (account === checksumAddress(address) && !shouldSwitchNetwork(wallet)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The address
retrieved from onboard's state is not checksummed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Pull Request Test Coverage Report for Build 2059294936
💛 - Coveralls |
What it solves
Resolves #2812 + #3579
How this PR fixes it
The name of the WalletConnect peer is now tracked in the provider middleware alongside the connected wallet when the user is connected to a network.
shouldSwitchNetwork
was improved to prevent this from being over-tracked.How to test it
Connect to the Safe via MM as an example and observe the following wallet tracking:
The WC peer should be tracked in the same instances.
The "Switch wallet to {{chainName}}" button should continue to work as before.
Analytics changes
The WC peer name should now be tracked, tracking as 'Unknown' if one doesn't exist.
Screenshots