Skip to content

Test the Zcash payout warning on a pasted u1 - #6334

Merged
j0ntz merged 2 commits into
developfrom
jon/houdini-zec-pasted-u1-warning-test
Nov 13, 2026
Merged

j0ntz merged 2 commits into
developfrom
jon/houdini-zec-pasted-u1-warning-test

Conversation

@j0ntz

@j0ntz j0ntz commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

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:

  • A Stealth send to a pasted u1 shows the card before the slide.
  • A Stealth send to a pasted t1 shows no card.
  • A u1 send with Stealth off shows no card.

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?

  • Yes
  • No

Dependencies

none

Requirements

If you have made any visual changes to the GUI. Make sure you have:

  • Tested on iOS device
  • Tested on Android device
  • Tested on small-screen device (iPod Touch)
  • Tested on large-screen device (tablet)

Note

Low Risk
Test-only changes to fixtures and assertions; no production Send scene behavior modified.

Overview
Extends SendScene2.recipientNetwork.ui.test.tsx so 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.enabled is set. Test helpers add settleInAct (up to 4s polling inside act, replacing shorter manual loops) and sliderLive via SafeSlider, 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

bd858aa
Test 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

@j0ntz j0ntz left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 through settleInAct, folded into "Give recipient tests' wallet pick more time".
Rejected in curation (1)
  • src/__tests__/scenes/SendScene2.recipientNetwork.ui.test.tsx:407: the 4 s settleInAct cap 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 peachbits left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

@j0ntz
j0ntz force-pushed the jon/houdini-zec-pasted-u1-warning-test branch from bd858aa to 3065db4 Compare November 13, 2026 20:29
@cursor

cursor Bot commented Nov 13, 2026

Copy link
Copy Markdown

Bugbot is paused — on-demand spend limit reached

Bugbot 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.

@j0ntz

j0ntz commented Nov 13, 2026

Copy link
Copy Markdown
Contributor Author

The inline is addressed in 2e38bb1 and 12f09ab: the suite mocks the ZcashNames reverse lookup, and the comment and commit message no longer blame core work.

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.
@j0ntz
j0ntz force-pushed the jon/houdini-zec-pasted-u1-warning-test branch from 3065db4 to bf87d1d Compare November 13, 2026 21:19
@j0ntz
j0ntz enabled auto-merge November 13, 2026 21:19
@j0ntz
j0ntz disabled auto-merge November 13, 2026 21:38
@j0ntz j0ntz closed this Nov 13, 2026
@j0ntz j0ntz reopened this Nov 13, 2026
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.
@j0ntz
j0ntz force-pushed the jon/houdini-zec-pasted-u1-warning-test branch from bf87d1d to 4a1798c Compare November 13, 2026 21:41
@j0ntz
j0ntz enabled auto-merge November 13, 2026 21:43
@j0ntz
j0ntz merged commit ebec7c1 into develop Nov 13, 2026
5 checks passed
@j0ntz
j0ntz deleted the jon/houdini-zec-pasted-u1-warning-test branch November 13, 2026 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants