Conversation
Peanut moved to peanut.me and its claim page no longer opens links made with the SDK: peanut.to redirects to the homepage, dropping the link, and peanut.me only knows links registered through its own backend. The gasless relayer (api.peanut.to) is suspended and the SDK's default RPCs rely on a dead Infura key. The deposits themselves are still claimable on-chain, so reward links now point to a /claim page that reads the link through public RPCs and claims it with the recipient's wallet. Old peanut.to links can be pasted there. The link password lives in the URL fragment, so it is redacted from Sentry events, breadcrumbs and Vercel Analytics, and Session Replay is not started on the claim page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
/claimpage. It reads a reward link from the chain (amount, network, sender, date, already-claimed state) without a wallet, switches the wallet to the link's network, and claims the reward to the connected address. With no link in the URL, it offers a box to paste a link, and oldpeanut.tolinks work there too.{site}/claiminstead ofpeanut.to/claim.peanut.ts: newparseLink,toClaimUrl,getLinkDetailsandclaimLinkhelpers.wallet.svelte.ts: a keyless public RPC (publicnode.com) for each supported network, so a link can be read without a connected wallet./api/mailonly emails links to this site's own/claimpage, and no longer accepts peanut links./claim.Why
Peanut moved to peanut.me and SDK-created links can no longer be claimed through its site:
peanut.to/claim?...returns a 301 to the barehttps://peanut.me/, so the link is lost.peanut.me/claimlooks links up in Peanut's backend (GET api.peanut.me/send-links/{pubKey}). That backend only knows links created through Peanut's app, so it returns404 Send link not foundfor our links.api.peanut.to/claim-v2) replies "This service has been suspended by its owner".The Peanut contracts still work: simulating the claim of an existing Sepolia link (deposit #1778) against the v4.3 contract succeeds. So we can keep the SDK for deposits and host the claim step ourselves.
Design decisions
window.location.origin+/claim), so production links go tohttps://commitkudos.com/claim, local dev tolocalhost, and Vercel previews to the preview URL. Claims can be tested end to end anywhere, and/api/mailonly emails links to its own origin. The trade-off: links created on a preview deployment stop working once that preview is gone. Verified by runninggetLinksFromTxwith thisbaseUrlon the real Sepolia deposit, which producedhttps://commitkudos.com/claim?c=11155111&v=v4.3&i=1778#p=….?c=&v=&i=#p=). This letstoClaimUrlrewrite oldpeanut.tolinks (including the older#?c=…&p=form) with no migration.prepareClaimTxand our own RPC. We don't use the SDK'sclaimLink, which may fall back to the dead default providers. This is the same transaction that was simulated successfully.#p=password can take the funds. A global Sentry event processor redacts it from every event type. Replay frame hooks never see the page URL, so Replay is skipped when the app loads on/claiminstead. Claim links are always opened with a full page load (from an email or a pasted URL).CLAIM_PATHand the redaction helpers live in#lib/claim.ts. That keeps the server mail route from importing the SDK and AppKit, which only run in the browser.Testing
pnpm check,eslint src,prettier --check srcandpnpm buildpass.trueat about 66k gas./claimlink.Follow-ups
peanut.tolinks need to paste them into/claim.🤖 Generated with Claude Code