Repository navigation
Test the Zcash payout warning on a pasted u1 - #6334
Conversation
j0ntz
left a comment
There was a problem hiding this comment.
The high self-review ran on this branch before the PR opened. It raised 7 candidates; verifiers refuted 4, and curation kept 2.
Fixed before review (1)
src/__tests__/scenes/SendScene2.recipientNetwork.ui.test.tsx:1206: the error-card test polled inline 50 times at 20 ms instead of through the shared helper. Now waits throughsettleInAct, folded into "Give recipient tests' wallet pick more time".
Rejected in curation (1)
src/__tests__/scenes/SendScene2.recipientNetwork.ui.test.tsx:407: the 4 ssettleInActcap sits inside Jest's 5 s default timeout and could surface as a generic timeout. Rejected: the u1 test runs in 125 ms and the helper returns as soon as its condition holds. The cap binds only on a run that is already failing, which Jest still fails. It cannot produce a false pass.
peachbits
left a comment
There was a problem hiding this comment.
The three cases are covered, and each fails when its part of the card's condition breaks. Dropping the Stealth check fails the Stealth-off test, dropping the t1 check fails the new t1 test (and the older same-chain one), and hiding the card once a quote is live fails only the new u1 test, which is the state this PR adds. Locally tsc and eslint are clean and the file passes 48/48.
Non-blocking: the first commit's longer wait covers a network request (inline 1).
bd858aa to
3065db4
Compare
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
A same-chain Zcash Myself pick falls through to a ZcashNames reverse lookup over the network, which can outlast the one-second act poll, so the Myself quote test failed about one run in three. Mock the lookup, as AddressTile2.test.tsx does, and poll for up to four seconds through a shared helper, which the quote waits also use.
3065db4 to
bf87d1d
Compare
Once the provider decodes a pasted unified address to its t1, a Stealth send to that address succeeds and pays a transparent address. Cover the transparent payout card on that path with a provider that quotes: a Stealth u1 send shows it before the slide, while a pasted t1 and a u1 send with Stealth off show none.
bf87d1d to
4a1798c
Compare
Description
Houdini pays every Zcash payout to a transparent address. Once EdgeApp/edge-exchange-plugins#512 decodes a pasted unified address to its t1, a Stealth send to a pasted u1 succeeds and pays that t1. The Send scene shows the "Transparent Zcash payout" card for that case. This PR adds the UI tests that pin it down:
The tests use a provider stub that quotes. They run without #512.
The first commit fixes a flake in the same file. A same-chain "Myself" pick can take up to two seconds of core work, past the one-second act poll, and the Myself quote test failed in 2 of 6 runs on develop. The wallet pick now polls for up to four seconds through a shared helper.
Sim check (iOS, #512 linked locally): a Stealth send from an ETH wallet to a pasted u1, 0.0160 ETH in and about 0.0311 ZEC out on a live private quote, shows the card above "Slide to send stealthily". Nothing was sent.
Asana task
CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
none
Requirements
If you have made any visual changes to the GUI. Make sure you have:
Note
Low Risk
Test-only changes to fixtures and assertions; no production Send scene behavior modified.
Overview
Extends
SendScene2.recipientNetwork.ui.test.tsxso Stealth sends with a live Houdini quote can be exercised in UI tests, and pins when the “Transparent Zcash payout” card appears before slide-to-send.The fake Houdini swap plugin can now return a 1:1 quote when
fakeHoudiniQuotes.enabledis set. Test helpers addsettleInAct(up to 4s polling insideact, replacing shorter manual loops) andsliderLiveviaSafeSlider, which fixes flaky “Myself” wallet-pick timing.New cases under “with a pasted Zcash address the provider quotes” assert: Stealth + pasted u1 shows the warning; Stealth + pasted t1 does not; u1 with Stealth off does not.
Reviewed by Cursor Bugbot for commit bd858aa. Bugbot is set up for automated code reviews on this repo. Configure here.
Test evidence
bd858aaTest the Zcash payout warning on a pasted u1
2026-11-11
1. u1 transparent payout card
Stealth send to a pasted u1 with a live quote: Transparent Zcash payout card sits above the slider
2. t1 no card
Control: the same Stealth send to a pasted t1 with a live quote shows no payout card
3. u1 live quote
Top of the u1 send: pasted u1, You send 0.0160148 ETH ($33.02), recipient gets ~0.03117853 ZEC