From 433164ae01acca522c38213e826329e1032941d5 Mon Sep 17 00:00:00 2001 From: Brendan Ryan <1572504+brendanjryan@users.noreply.github.com> Date: Fri, 24 Apr 2026 08:49:49 -0700 Subject: [PATCH] fix docs main ci --- e2e/virtual-addresses.test.ts | 1 + src/components/guides/Demo.tsx | 8 ++++++-- .../guides/VirtualAddressesLiveDemo.tsx | 9 +++++---- src/lib/useRootWebAuthnAccount.ts | 16 +++++++++++++--- 4 files changed, 25 insertions(+), 9 deletions(-) diff --git a/e2e/virtual-addresses.test.ts b/e2e/virtual-addresses.test.ts index 5e3b57f7..d8f55711 100644 --- a/e2e/virtual-addresses.test.ts +++ b/e2e/virtual-addresses.test.ts @@ -31,6 +31,7 @@ test('virtual addresses guide signs in and starts master registration', async ({ await expect( page.getByRole('heading', { name: 'Use virtual addresses for deposits' }), ).toBeVisible() + await page.getByRole('tab', { name: 'Real registration' }).click() await expect(page.getByRole('button', { name: 'Sign out' }).first()).toBeVisible({ timeout: 30000, }) diff --git a/src/components/guides/Demo.tsx b/src/components/guides/Demo.tsx index f057ae82..c5e5b36b 100644 --- a/src/components/guides/Demo.tsx +++ b/src/components/guides/Demo.tsx @@ -104,7 +104,10 @@ export function ReceiptHash({ hash }: { hash: string }) { export function ExplorerAccountLink({ address, inline = false, -}: { address: string; inline?: boolean }) { +}: { + address: string + inline?: boolean +}) { const { trackExternalLinkClick } = usePostHogTracking() const url = `${getExplorerHost()}/address/${address}` @@ -459,7 +462,7 @@ export function Step(
@@ -605,6 +608,7 @@ export function Button( const Element = render ? (p: typeof props) => React.cloneElement(render, p) : 'button' return ( {registration.virtualAddress} - {hasExplorerLink && } + {hasExplorerLink && ( + + )}
@@ -700,9 +702,8 @@ export function VirtualAddressesLiveDemo() {
Transfer events in this receipt
- Treat the sender → virtual{' '} - and virtual → master pair as - one + Treat the sender → virtual and{' '} + virtual → master pair as one logical deposit to the registered wallet. Other transfer logs in the receipt, like fees, are separate.
diff --git a/src/lib/useRootWebAuthnAccount.ts b/src/lib/useRootWebAuthnAccount.ts index f3cb1eca..9da27db2 100644 --- a/src/lib/useRootWebAuthnAccount.ts +++ b/src/lib/useRootWebAuthnAccount.ts @@ -17,6 +17,8 @@ type RootWebAuthnAccountProvider = { request: (args: { method: 'eth_accounts' }) => Promise } +const rootWebAuthnAccountTimeoutMs = 30_000 + export function useRootWebAuthnAccount() { const { address, connector } = useConnection() @@ -29,7 +31,11 @@ export function useRootWebAuthnAccount() { const provider = await connector.getProvider() if (isRootWebAuthnAccountProvider(provider)) { - await waitForProviderAccount(provider, address as `0x${string}`) + await waitForProviderAccount( + provider, + address as `0x${string}`, + rootWebAuthnAccountTimeoutMs, + ) return provider.getAccount({ accessKey: false, @@ -38,12 +44,16 @@ export function useRootWebAuthnAccount() { }) } - const credential = await waitForStoredCredential(address as `0x${string}`) + const credential = await waitForStoredCredential( + address as `0x${string}`, + rootWebAuthnAccountTimeoutMs, + ) return accountFromCredential(credential) }, refetchOnReconnect: false, refetchOnWindowFocus: false, - retry: false, + retry: 2, + retryDelay: 500, staleTime: Number.POSITIVE_INFINITY, }) }