Conversation
The info server leaves tokenId off a mainnet entry, so the cleaned
value is undefined, but the swap scene has compared it to a null
tokenId since the move from GuiCurrencyInfo to tokenId. Mainnet bans
such as { pluginId: 'bitcoinsv' } have not applied since then.
Move the check into a pure isAssetDisabled helper that treats a
missing tokenId as null, and test it.
Read exchangeInfo.swap.disableAssetsByPlugin from the info server. It uses the disableAssets list shape, keyed by swap pluginId. When the source or destination asset of a quote request matches a provider's lists, that provider joins the request's disabled map, and the other providers still quote. The check runs in SwapProcessingScene, the only place the swap flow fetches quotes, so it covers both the first quote and the requote from the confirmation scene. exchangeInfo is parsed from the raw rollup because asInfoRollup in edge-info-server 3.12.0 drops the new key.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Asana task
Swap asset bans can now target a single provider. The app reads
exchangeInfo.swap.disableAssetsByPluginfrom the info server (schema in EdgeApp/edge-info-server#165): a map from swap pluginId to the same{source, destination}listsdisableAssetsuses. When a quote request's source or destination matches a provider's lists, that provider joins the request'sdisabledmap and the other providers still quote.SwapProcessingScene, the onlyfetchSwapQuotescall in the swap flow, so it covers the first quote and the requote from the confirmation scene.exchangeInfois parsed frominfoServerData.rollupRaw:asInfoRollupin edge-info-server 3.12.0 drops the new key, so this ships without a package bump.tokenIdon a mainnet entry (undefined), and the swap scene compared it to anulltokenId.isAssetDisablednow treats a missing tokenId as null.Behavior change on the live info server: the global
disableAssetslists the mainnet entriesbitcoinsv,ravencoinandzano. They have been no-ops because of the mismatch above. With this PR they take effect, so those assets become unswappable in the app. Remove them from the info server first if that is not intended.Tested on the iOS simulator with a local, uncommitted ban
changenow: { destination: [{ pluginId: 'bitcoin' }] }injected into the raw rollup (evidence table below):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
Cursor Bugbot is generating a summary for commit cafb5cb. Configure here.
Test evidence
cafb5cbDisable swap assets per provider
2026-09-30
1. baseline fil btc changenow
2. baseline provider sheet
3. banned fil btc no changenow
4. banned fil ltc changenow quote
5. swap success
6. noban xlm btc changenow
7. banned xlm btc no changenow