Skip to content

Stealth Swap ignores the Houdini exchange toggle - #6241

Merged
j0ntz merged 2 commits into
developfrom
jon/stealth-swap-ignore-houdini-toggle
Oct 16, 2026
Merged

j0ntz merged 2 commits into
developfrom
jon/stealth-swap-ignore-houdini-toggle

Conversation

@j0ntz

@j0ntz j0ntz commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Description

The HoudiniSwap switch in Exchange Settings now affects only swaps with Stealth off. A Stealth Swap and every send scene path always use Houdini.

Use case Houdini switch on Houdini switch off
Swap scene, Stealth off Houdini competes with other providers No Houdini quote (unchanged)
Swap scene, Stealth on Houdini only Houdini only (was: no quote)
Send scene (Stealth Send, swap-and-send) Houdini Houdini (unchanged)

The info server's kill switches (disabled, disableAssets) still block Houdini in every row.

Declining Houdini's terms:

Use case Before After
Swap, Stealth off Switches Houdini off, re-quotes Unchanged
Swap, Stealth on Switches Houdini off, re-quotes with no provider left Saves nothing. Returns to the create scene with the same pair and amount and Stealth off. The modal shows again on the next Stealth attempt.

How: makeStealthSwapRequestOptions (src/util/stealthSwap.ts) always force-enables Houdini, and its ignoreProviderSetting flag is gone. swapVerifyTerms takes declineIsCancelOnly, which the confirmation scene sets for a Stealth Swap.

Testing:

  • Unit: stealthSwapQuotes.test.ts runs every row of the first table with the switch on and off through the core's quote fetcher, plus the kill switch. SwapConfirmationScene.test.tsx and SwapVerifyTermsModal.test.tsx cover both decline rows. SwapCreateScene.test.tsx checks that the quote request after a Stealth decline is an ordinary one, with no privacy flag and no force-enable.
  • iOS simulator, switch off, BTC to ETH at 30 USD: plain swap has no Houdini quote (cell 2); Stealth decline, retry, accept and complete (cells 3 to 9); no modal once accepted (cell 10); kill switch refuses a Stealth Swap (cell 12, forced by a temporary local info-server edit not in this branch).
  • Not driven on device: a plain swap with the switch on, and the send scene. The send scene's quote request is identical to develop's.

Design doc: stealth-send-swap.md.

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)

Test evidence

05e39c7
Ignore the Houdini toggle for Stealth Swap
2026-10-07
🪓 Frame 12 only: a temporary uncommitted edit added an ETH entry to the info server's swap disableAssets list, then was reverted. Frames 1 to 11 are unforced.

1. exchange settings houdini off

2. plain swap providers no houdini

3. stealth on houdini off

4. stealth quote terms modal

5. after decline stealth off

6. stealth again terms modal again

7. stealth quote houdini off

8. stealth swap success

9. stealth swap transaction details

10. accepted user stealth quote no modal

11. exchange settings houdini restored

12. 🪓 stealth swap kill switch

Note

Medium Risk
Changes swap quoting and provider terms handling on the exchange flow; behavior is scoped to Stealth mode but touches fund-movement paths and user exchange settings.

Overview
Stealth Swap now quotes Houdini even when that provider is turned off in Exchange Settings, matching Stealth Send. makeStealthSwapRequestOptions always adds forceEnabled for Houdini and drops the send-only ignoreProviderSetting flag; ordinary swaps still respect the toggle, and info-server kill switches via disabled are unchanged.

Terms decline on Stealth Swap no longer disables Houdini or re-quotes (which would loop on the same provider). swapVerifyTerms gains declineIsCancelOnly; the confirmation scene uses it for privacy: 'required', calls onStealthTermsDeclined to turn the Stealth toggle off on the create scene, and navigates back with the wallet pair preserved. Non-stealth swaps keep the old decline behavior (disable provider + re-quote).

Unit tests cover quote selection with Houdini on/off, terms-modal modes, and the create/confirmation decline wiring; the stealth design doc is updated.

Reviewed by Cursor Bugbot for commit adeea34. Bugbot is set up for automated code reviews on this repo. Configure here.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

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

Suggestion: a note for whichever of these lands later. EdgeApp/edge-react-gui#6253 still passes { ignoreProviderSetting: true } to makeStealthSwapRequestOptions in SendScene2, which this PR removes; that is a type error only, since forceEnabled is now unconditional. EdgeApp/edge-react-gui#6257 replaces the create scene's setStealth with a saved toggle plus stealthOverride, so handleStealthTermsDeclined should become setStealthOverride(false). Writing the saved value instead would persist the decline, which the task rules out.

Comment thread src/docs/stealth-send-swap.md Outdated
Comment thread src/components/scenes/SwapCreateScene.tsx
@j0ntz
j0ntz force-pushed the jon/stealth-swap-ignore-houdini-toggle branch from 05e39c7 to 86af1cc Compare October 15, 2026 23:49
@j0ntz

j0ntz commented Oct 15, 2026

Copy link
Copy Markdown
Contributor Author

No change on this PR. Whichever of EdgeApp/edge-react-gui#6253 and EdgeApp/edge-react-gui#6257 lands after this one takes the follow-up: #6253 drops the { ignoreProviderSetting: true } argument in SendScene2, and on #6257 handleStealthTermsDeclined becomes setStealthOverride(false), so the decline is never saved.

@j0ntz
j0ntz force-pushed the jon/stealth-swap-ignore-houdini-toggle branch from 86af1cc to 89a3cab Compare October 16, 2026 00:20
@j0ntz
j0ntz enabled auto-merge October 16, 2026 00:20
@j0ntz
j0ntz disabled auto-merge October 16, 2026 01:09
j0ntz added 2 commits October 15, 2026 18:11
A Stealth Swap has a single provider. Declining that provider's terms
used to save the decline and switch the provider off in Exchange
Settings, then re-quote. Stealth Swap is about to query the provider
whatever that setting says, so the re-quote would return the same
provider and open the terms modal again, without end.

A decline on a Stealth Swap now turns the Stealth toggle off, returns
to the swap create scene, and saves nothing: the user's exchange
setting stays as they left it, and the terms are offered again on each
later Stealth attempt until they are accepted. A swap with Stealth off
keeps the existing behavior.

The design doc covers the decline, and the request rule the next
commit adds.
Stealth Swap got no quote when Houdini was switched off in Exchange
Settings, while Stealth Send kept working: only the send scene asked
the core to force-enable the provider for its request.

makeStealthSwapRequestOptions now force-enables Houdini for every
caller, so the opt-in flag goes away. The exchange setting governs
which providers the aggregator may pick among for an ordinary swap, and
a swap with Stealth off still honors it. A Stealth request names its
one provider, so there is nothing for the setting to choose between.

The core ranks disabled above forceEnabled, so the info server's kill
switches, which reach the request as disabled entries, still stop a
Stealth Swap. A new test runs both toggle states through the core's
quote fetcher on a fake account.
@j0ntz
j0ntz force-pushed the jon/stealth-swap-ignore-houdini-toggle branch from 89a3cab to adeea34 Compare October 16, 2026 01:17
@j0ntz
j0ntz enabled auto-merge October 16, 2026 01:21
@j0ntz
j0ntz merged commit a3e69af into develop Oct 16, 2026
7 checks passed
@j0ntz
j0ntz deleted the jon/stealth-swap-ignore-houdini-toggle branch October 16, 2026 01:42
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