Skip to content

Commit

Permalink
fix: manage tokens toggle, closes #5974
Browse files Browse the repository at this point in the history
  • Loading branch information
alter-eggo authored and kyranjamie committed Nov 25, 2024
1 parent 359a17d commit b515bd9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,18 @@ export function CryptoAssetItemToggle({
});
}

function onClick() {
switchRef.current?.click();
}

const toggle = (
<VStack h="100%" justifyContent="center">
<Switch.Root
ref={switchRef}
defaultChecked={isCheckedByDefault}
onCheckedChange={handleSelection}
id={assetId}
onClick={onClick}
>
<Switch.Thumb />
</Switch.Root>
Expand All @@ -58,7 +63,7 @@ export function CryptoAssetItemToggle({

return (
<Box my="space.02">
<Pressable onClick={() => switchRef.current?.click()} data-testid={sanitize(assetId)}>
<Pressable onClick={onClick} data-testid={sanitize(assetId)}>
<ItemLayout
img={icon}
titleLeft={spamFilter(titleLeft)}
Expand Down
1 change: 1 addition & 0 deletions tests/specs/manage-tokens/manage-tokens.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ test.describe('Manage tokens', () => {
test.beforeEach(async ({ extensionId, globalPage, onboardingPage }) => {
await globalPage.setupAndUseApiCalls(extensionId);
await onboardingPage.signInWithTestAccount(extensionId);
await globalPage.page.waitForLoadState('networkidle');
});

test('that supported sip10 token is shown', async ({ homePage }) => {
Expand Down

0 comments on commit b515bd9

Please sign in to comment.