From 124fee3c15556d62d6efd8714fd4501e95273ebd Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 25 Jun 2026 16:01:39 -0700 Subject: Gift claim: detect already-claimed (even unconfirmed) and block the race MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Opening a gift link now checks whether its funding coin is already spent — via the Esplora outspend endpoint, which reports a spend even by an unconfirmed claim. The Claim button is gated until that check passes; if the coin is spent, show an 'Already claimed' screen with a link to the claim tx instead of a claimable amount. doClaim also re-checks on broadcast failure (the race window), and refuses to run while unchecked/taken — so a second opener can't attempt a doomed double-spend. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/i18n.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/i18n.js') diff --git a/src/i18n.js b/src/i18n.js index 8efb930..65171f7 100644 --- a/src/i18n.js +++ b/src/i18n.js @@ -207,6 +207,8 @@ const STR = { giftSplitFirst: 'Split a coin first', giftLockWhole: 'Lock the whole coin ({n})', giftSplitFailed: 'Could not split the coin.', + giftTakenTitle: 'Already claimed', + giftTakenBody: 'Sorry, this gift has already been claimed.', giftHistoryTitle: 'Gift link', giftUnclaimedTag: 'unclaimed', giftCancel: 'Cancel', -- cgit v1.2.3