Skip to content

fix(faucet): keep the send-to-address field visible once a wallet connects - #8

Merged
psofiterol merged 1 commit into
mainfrom
fix/paste-address-visible-when-connected
Aug 28, 2026
Merged

fix(faucet): keep the send-to-address field visible once a wallet connects#8
psofiterol merged 1 commit into
mainfrom
fix/paste-address-visible-when-connected

Conversation

@psofiterol

Copy link
Copy Markdown
Member

The paste-an-address field lived only in the !isConnected branch of FaucetCard, which had two faults.

The visible one. Wallet state rehydrates from localStorage a beat after mount, so anyone with a previously-connected wallet saw the section render and then vanish as isConnected flipped to true:

mount     isConnected = false  -> paste field renders
+~200ms   wagmi rehydrates
          isConnected = true   -> FaucetCardContent renders (no field)

It read as the page flashing the new UI and reverting to the old one, and it reproduced in Chromium but not Firefox purely because a wallet was connected in one and not the other. Nothing to do with caching or the deploy.

The worse one. Connected visitors never got the feature at all. Funding an agent’s address has nothing to do with whether your wallet is connected, yet only disconnected visitors could see the field — which excludes most returning users, and plausibly most of the people being asked to unblock an agent.

Change

The section is now mounted in both branches, so it cannot disappear and cannot be missed. The divider label adapts: or when disconnected, or send to another address when connected, where it is a second distinct action rather than an alternative to connecting.

Deliberately out of scope

useConnection also exposes isReconnecting, and a skeleton would suppress the Connect-button flash on the top half of the card too. Left alone: with reconnectOnMount the status passes through reconnecting on every load even when nothing is stored, so a skeleton would introduce a flash for visitors who currently get an instant button. That transition is pre-existing and affects all three faucets equally.

Verification

pnpm fmt --check, pnpm typecheck, type-aware oxlint and pnpm build all pass.

To check once deployed: in Chromium with a wallet connected, the field should stay put rather than flash and vanish, and should sit under an or send to another address divider.

…nects

It lived only in the `!isConnected` branch, which had two faults.

THE VISIBLE ONE. Wallet state rehydrates from localStorage a beat after mount, so anyone
with a previously-connected wallet saw the section render and then vanish as `isConnected`
flipped to true. It read as the page flashing the new UI and reverting to the old one, and
it reproduced in Chromium but not Firefox purely because a wallet was connected in one and
not the other. Nothing to do with caching or the deploy, which is where I looked first.

THE WORSE ONE. Connected visitors never got the feature at all. Funding an agent's address
has nothing to do with whether YOUR wallet is connected, yet only disconnected visitors
could see the field — which excludes most returning users, and plausibly most of the people
being asked to unblock an agent.

Now mounted in both branches, so it cannot disappear and cannot be missed. The divider
label adapts: "or" when disconnected, "or send to another address" when connected, where it
is a second distinct action rather than an alternative to connecting.

Deliberately NOT fixing the top half of the card. `useConnection` exposes `isReconnecting`
and a skeleton would suppress the Connect-button flash too, but with `reconnectOnMount` the
status passes through `reconnecting` on every load even when nothing is stored — so a
skeleton would introduce a flash for visitors who currently get an instant button. That
transition is pre-existing and affects all three faucets equally; it wants its own change.

fmt --check, typecheck, type-aware lint and build all pass.
@vercel

vercel Bot commented Aug 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
faucet-ui Ready Ready Preview Aug 28, 2026 1:41pm

Request Review

@psofiterol
psofiterol merged commit 2a59081 into main Aug 28, 2026
6 checks passed
@psofiterol
psofiterol deleted the fix/paste-address-visible-when-connected branch August 28, 2026 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant