diff options
| author | Adam Soltys <[email protected]> | 2026-10-28 00:39:51 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-10-28 00:39:51 -0700 |
| commit | 3c4b0c5000c32ffab68a734959a34b2f97de1f06 (patch) | |
| tree | a5037971c1098f7a35e53ed925109c73e2213ebb /src/features/gifts-wallet.js | |
| parent | 2302a4f0e25562c4d4977990918b86d4c6baba27 (diff) | |
| download | coinosv3-3c4b0c5000c32ffab68a734959a34b2f97de1f06.tar.gz coinosv3-3c4b0c5000c32ffab68a734959a34b2f97de1f06.zip | |
A gift link names its sender: the link carries the sender's nostr key, signed over the gift's code (#f=…, beside the note), so the claim screen shows "From <name>" and claiming follows them. A signature that doesn't match the code names nobody, so a link can't be passed on as someone else's gift. "Show it's from me" is ticked by default when making a gift, and unticking it is remembered; the gift's record keeps the sender, so View and Copy link again keep it too
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/features/gifts-wallet.js')
| -rw-r--r-- | src/features/gifts-wallet.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/features/gifts-wallet.js b/src/features/gifts-wallet.js index 7004b12..9532125 100644 --- a/src/features/gifts-wallet.js +++ b/src/features/gifts-wallet.js @@ -274,9 +274,9 @@ export function installGiftWallet(wallet) { // gift's link/QR can be re-viewed later and a claimed one identified in history. _giftRecordsKey() { return this._cacheKey() + ':giftrec'; }, - recordGift({ code, locked, amount, claimCode, outpoints, note }) { + recordGift({ code, locked, amount, claimCode, outpoints, note, from }) { if (!outpoints || !outpoints.length) return; - this.giftRecords()[outpoints[0]] = { id: outpoints[0], code, locked: !!locked, amount, claimCode: claimCode || null, outpoints, created: Date.now(), revoked: false, ...(note ? { note } : {}) }; + this.giftRecords()[outpoints[0]] = { id: outpoints[0], code, locked: !!locked, amount, claimCode: claimCode || null, outpoints, created: Date.now(), revoked: false, ...(note ? { note } : {}), ...(from ? { from } : {}) }; this._saveGiftRecords(); try { this.saveCache(); } catch {} // publish the new gift to cross-device sync }, |
