Repository navigation
fix: release 168 smoke-test fixes (TASK-24947) - #4116
Conversation
…the deposit screen's reason
Smoke test, release 168: a R$22 Pix paid from an account not under the
user's CPF was sent back by Avenia. The deposit screen said why ("Pay again
from an account under your CPF."); the Activity receipt read "Failed" with no
reason.
The API marks such a deposit with the existing extraData.returnReason (owner
only) and keeps the wire status FAILED. A Pix deposit that is FAILED and
carries returnReason now reads as a returned deposit, as returned bank
deposits do: "Returned" on the badge, the date row and the PDF status,
"Returned to sender" on the Activity row, and the reason line. For
third_party it is the deposit screen's own sentence (one string for both),
for other the general line. Nothing was converted, so the receipt keeps the
"≈ BRL 22" estimate and no rate or fee rows. An entry without returnReason
reads as before, and a lapsed code stays Cancelled.
The PDF status row now prints "Returned" for every returned deposit, as the
screen does; it printed "Refunded" for a returned bank deposit too. Two
Screen Library states show the returned receipt and its Activity row. The
receipt screens' word budget grows by the reused sentence (+8); no screen
shows more words than before.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
/chip review |
Code-analysis diffPainscore total: 11100.96 → 11092.56 (-8.4) 🆕 New findings (661)
…and 641 more. ✅ Resolved (661)
…and 641 more. |
There was a problem hiding this comment.
Chip review — no blocking findings — this is not an approval
Returned Pix deposits are shown correctly to the owner, but a shared receipt still reports Failed.
Findings
- MAJOR · src/components/TransactionDetails/transactionTransformer.ts:693 · Shared returned Pix receipts still say Failed
For a FAILED Avenia ONRAMP with a failed ticket, the paired API change sends returnReason only to the owner. An anonymous viewer of its shareable receipt receives the public projection, which retains status=FAILED but strips returnReason. This new branch therefore leaves the shared receipt page and anonymous PDF at Failed while the owner’s Activity and receipt say Returned. Preserve the private reason, but expose a public-safe returned-state marker (or equivalent status) in the paired API projection and use it here; cover both owner and anonymous receipt/PDF paths.
Checked clean
- Exact head and merge base verified; trusted PR metadata matched the supplied author and dev base.
- Traced returned status, reason copy, conversion estimate, Activity row, owner receipt and PDF through the changed code and tests.
- Checked the paired API PR projection: owner-only returnReason is added for failed Avenia tickets, while public receipts retain FAILED and omit that field.
- Design status-words rule requires Returned for money sent back; the Notion Lexicon has no more specific returned-deposit term.
- Head CI had no observed failures; unit, i18n-overflow, press-contract, seo-contract, native-export and preview checks were still running when checked.
Security review by moonshotai/kimi-k3: 0 finding(s), marked with the model name. It reads the diff only and answers only security, privacy and money, so treat its findings as advice.
Third opinion by claude-opus: 0 finding(s), marked with the model name. It answers only product truth, missing tests and the cross-repo contract, so treat its findings as advice.
Copy check by claude-haiku-5-5: 0 finding(s), titled "Copy now wrong". Every quoted passage was checked against the file.
Exact head: 47eb4f43de0f · Context: repo, design, product, paired-api-pr · Took 4m
🧪 UI test report — ✅ all greenSuites
📊 Coverage (unit)
⏱ 10 slowest test cases
|
…receipt too Chip on ui#4116: the returned state came from returnReason, which the API sends to the owner only, so the shared receipt and the anonymous PDF of the same deposit still read "Failed" while the owner read "Returned". The state is public now and the reason stays private: a FAILED Pix deposit reads as returned when extraData.pixReturned is true, for every viewer. The reason line is the deposit screen's CPF sentence only for the owner's third_party reason, and the general line otherwise. The shared receipt layout never prints the CPF sentence, even if a reason reached it, because it speaks to the payer. An entry without the flag reads "Failed" as before, whatever returnReason says.
…b6cb9e67d GET /history/:entryId extraData gains pixReturned (true only on a Pix deposit the provider gave back, to every viewer). Nothing else differs from b0d06b9af, the snapshot's previous source.
Summary
Fixes found on staging during the release 168 smoke test of BRL on Avenia (real money, 16 Nov). One commit per finding; later findings join this PR. Pairs with the API PR of the same branch name.
extraData.pixReturnedflag, so the shared receipt and the anonymous PDF read "Returned" too; the CPF sentence shows only to the owner (returnReasonis owner only) and anyone else reads the general line. An entry without the flag reads "Failed" as before, and a lapsed code stays "Cancelled".The dollar amount on that receipt ("$22" for a R$22 deposit) is an API defect and is fixed in the API PR; the app needs no change for it.
Screens (fixtures, 375×667, English)
The dollar figure in the fixture is the quoted USD (the API PR's fix), not the reais.
Task
TASK-24947 "BRL on Avenia: Pix for residents and non-residents, Manteca BRL off": https://www.notion.so/418838117579816c870fc7b38beddc5b
Risks
pixReturnedon a returned Avenia deposit, the receipt reads "Failed" as today. Either order of release is safe.QA
3a4b06997: typecheck, eslint, prettier, ds-lint, the word budget and the screen tests pass; the touched suites pass.pix-deposit-returned.test.tsxhas 11 tests over the owner and the anonymous paths (drawer, Activity row, shared receipt, PDF). The full unit suite was not re-run locally after the second commit: CI is the proof.api.openapi.jsonis refreshed from the API branch's headb6cb9e67d(one field:pixReturned).pix-deposit-receipt-returned,pix-deposit-returned-row. No copy key is added; the reused sentence adds 8 words to the receipt screens' budget.