Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
fAnselmi-Ledger committed Feb 7, 2025
1 parent c93d6ac commit d4c4af4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ describe("useTrackAddAccountModal", () => {
renderHook(() =>
useTrackAddAccountModal({
...defaultArgs,
//@ts-expect-error location should be HOOKS_TRACKING_LOCATIONS enum
location: "NOT Add account",
}),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ describe("useTrackReceiveFlow", () => {

it("should not track events if location is not 'Receive Modal'", () => {
renderHook((props: UseTrackReceiveFlow) => useTrackReceiveFlow(props), {
//@ts-expect-error location should be HOOKS_TRACKING_LOCATIONS enum
initialProps: { ...defaultArgs, location: "Other Modal" },
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ export const DeviceActionDefaultRendering = <R, H extends States, P>({
const walletState = useSelector(walletSelector);

useTrackManagerSectionEvents({
location,
location: location as HOOKS_TRACKING_LOCATIONS.managerDashboard,
device,
allowManagerRequested: hookState.allowManagerRequested,
clsImageRemoved: hookState.imageRemoved,
Expand All @@ -253,15 +253,15 @@ export const DeviceActionDefaultRendering = <R, H extends States, P>({
});

useTrackReceiveFlow({
location,
location: location as HOOKS_TRACKING_LOCATIONS.receiveModal,
device,
error,
inWrongDeviceForAccount,
isTrackingEnabled: useSelector(trackingEnabledSelector),
});

useTrackAddAccountModal({
location,
location: location as HOOKS_TRACKING_LOCATIONS.addAccountModal,
device,
error,
isTrackingEnabled: useSelector(trackingEnabledSelector),
Expand All @@ -271,7 +271,7 @@ export const DeviceActionDefaultRendering = <R, H extends States, P>({
});

useTrackSyncFlow({
location,
location: location as HOOKS_TRACKING_LOCATIONS.ledgerSync,
device,
error,
allowManagerRequested: hookState.allowManagerRequested,
Expand Down

0 comments on commit d4c4af4

Please sign in to comment.