Repository navigation
Stealth Swap ignores the Houdini exchange toggle - #6241
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
peachbits
left a comment
There was a problem hiding this comment.
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.
05e39c7 to
86af1cc
Compare
|
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 |
86af1cc to
89a3cab
Compare
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.
89a3cab to
adeea34
Compare
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.
The info server's kill switches (
disabled,disableAssets) still block Houdini in every row.Declining Houdini's terms:
How:
makeStealthSwapRequestOptions(src/util/stealthSwap.ts) always force-enables Houdini, and itsignoreProviderSettingflag is gone.swapVerifyTermstakesdeclineIsCancelOnly, which the confirmation scene sets for a Stealth Swap.Testing:
stealthSwapQuotes.test.tsruns every row of the first table with the switch on and off through the core's quote fetcher, plus the kill switch.SwapConfirmationScene.test.tsxandSwapVerifyTermsModal.test.tsxcover both decline rows.SwapCreateScene.test.tsxchecks that the quote request after a Stealth decline is an ordinary one, with no privacy flag and no force-enable.Design doc: stealth-send-swap.md.
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:
Test evidence
05e39c7Ignore 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.
makeStealthSwapRequestOptionsalways addsforceEnabledfor Houdini and drops the send-onlyignoreProviderSettingflag; ordinary swaps still respect the toggle, and info-server kill switches viadisabledare unchanged.Terms decline on Stealth Swap no longer disables Houdini or re-quotes (which would loop on the same provider).
swapVerifyTermsgainsdeclineIsCancelOnly; the confirmation scene uses it forprivacy: 'required', callsonStealthTermsDeclinedto 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.