Daily XECX payouts and Firma yield payments were using the generic
"Payment received" title. Title valid XECX staking payouts as "Daily XECX
Payout" with body "You received <amount> XEC", and Firma yield (same
sender-script detection as Cashtab history) as "Daily Firma Rewards" with
the token name instead of the FIRMA ticker. Other payments are unchanged.
Details
Details
- Reviewers
Fabien - Group Reviewers
Restricted Project - Commits
- rABC63da4686546e: [notifications-server] Distinct push copy for XECX and Firma rewards
- cd apps/notifications-server && npm test
- Confirm a daily XECX payout push reads "Daily XECX Payout" / "You received 1.05k XEC"
- Confirm a Firma yield push reads "Daily Firma Rewards" / "Received 0.1908 Firma"
- Confirm a normal XEC or FIRMA receive still uses "Payment received"
Diff Detail
Diff Detail
- Repository
- rABC Bitcoin ABC
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
Build Bitcoin ABC Diffs / Diff Testing (ai-review) passed.
CodeRabbit Review
Diff : committed changes only
Compare : HEAD → master
Directory : work
────────────────────────────────────────
(\(\
(• .•) Great news: you fixed the bug. Bad news: you introduced its entire family.
────────────────────────────────────────────────────────────────────────
minor [Functional Correctness]
→ ]8;;vscode://file//work/apps/notifications-server/src/pushTxParse.ts:50apps/notifications-server/src/pushTxParse.ts:50-59]8;;
Search all inputs for the Firma yield wallet script.
tx.inputs[0] checks only the first input. Input order does not identify
the sender wallet. A valid multi-input Firma reward can place the
yield-wallet input later. isFirmaYield then returns false, and the
notification uses generic copy.
Use tx.inputs.some(...). Make the same change in isFirmaYieldFixture
and add a non-first-input regression test.
Proposed fix
return (
- tx.inputs[0].outputScript === FIRMA_YIELD_OUTPUT_SCRIPT &&
+ tx.inputs.some(
+ input => input.outputScript === FIRMA_YIELD_OUTPUT_SCRIPT,
+ ) &&
typeof entry !== 'undefined' &&
entry.tokenId === FIRMA_TOKEN_ID
);────────────────────────────────────────
Review complete
1 finding ✔
Minor 1
3 files reviewed:
- apps/notifications-server/src/constants/hotTokenGenesisInfo.ts
- apps/notifications-server/src/pushTxParse.test.ts
- apps/notifications-server/src/pushTxParse.ts
────────────────────────────────────────
Print all AI prompts: coderabbit review --show-prompts