From 586047790363e7961726824506c09cfa1cf5e48b Mon Sep 17 00:00:00 2001 From: Daniel Sinclair Date: Thu, 21 Nov 2024 13:26:14 -0500 Subject: [PATCH] fix: lint --- src/analytics/__mocks__/index.ts | 2 +- src/analytics/__tests__/index.test.ts | 6 +++--- src/analytics/index.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/analytics/__mocks__/index.ts b/src/analytics/__mocks__/index.ts index 152057d258b..71f987845ab 100644 --- a/src/analytics/__mocks__/index.ts +++ b/src/analytics/__mocks__/index.ts @@ -9,7 +9,7 @@ export const analyticsV2 = { screen: jest.fn(), track: jest.fn(), setDeviceId: jest.fn(), - setWalletAddressHash: jest.fn(), + setWalletContext: jest.fn(), enable: jest.fn(), disable: jest.fn(), event, diff --git a/src/analytics/__tests__/index.test.ts b/src/analytics/__tests__/index.test.ts index 4b9a62cdec7..94a2624510a 100644 --- a/src/analytics/__tests__/index.test.ts +++ b/src/analytics/__tests__/index.test.ts @@ -18,7 +18,7 @@ describe.skip('@/analytics', () => { test('track', () => { const analytics = new Analytics(); - analytics.setWalletAddressHash('hash'); + analytics.setWalletContext({ walletAddressHash: 'hash', walletType: 'owned' }); analytics.track(analytics.event.pressedButton); expect(analytics.client.track).toHaveBeenCalledWith(analytics.event.pressedButton, { @@ -29,7 +29,7 @@ describe.skip('@/analytics', () => { test('identify', () => { const analytics = new Analytics(); - analytics.setWalletAddressHash('hash'); + analytics.setWalletContext({ walletAddressHash: 'hash', walletType: 'owned' }); analytics.setDeviceId('id'); analytics.identify({ currency: 'USD' }); @@ -42,7 +42,7 @@ describe.skip('@/analytics', () => { test('screen', () => { const analytics = new Analytics(); - analytics.setWalletAddressHash('hash'); + analytics.setWalletContext({ walletAddressHash: 'hash', walletType: 'owned' }); analytics.screen(Routes.BACKUP_SHEET); expect(analytics.client.screen).toHaveBeenCalledWith(Routes.BACKUP_SHEET, { diff --git a/src/analytics/index.ts b/src/analytics/index.ts index 6c24141692a..222cf513b34 100644 --- a/src/analytics/index.ts +++ b/src/analytics/index.ts @@ -93,7 +93,7 @@ export class Analytics { } /** - * Set `walletAddressHash` for use in events. This DOES NOT call + * Set `walletAddressHash` and `walletType` for use in events. This DOES NOT call * `identify()`, you must do that on your own. */ setWalletContext(walletContext: WalletContext) {