镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Stealth Swap ignores the Houdini exchange toggle - #6241

Open
j0ntz wants to merge 2 commits into
developfrom
jon/stealth-swap-ignore-houdini-toggle
Open

j0ntz wants to merge 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.
  • 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

j0ntz added 2 commits October 7, 2026 09:53
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.
@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.

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.

1 participant