Repository navigation
fix(swap): Forward disableFallback to getSwapFee in getRouterFees π§ - #2566
Closed
nunndayox-stack wants to merge 2 commits into
Closed
nunndayox-stack wants to merge 2 commits into
nunndayox-stack wants to merge 2 commits into
Conversation
added 2 commits
November 18, 2026 22:50
getRouterFees called getSwapFee(dex, options) without the disableFallback argument, while the sibling getSwapOriginFee forwards it. With disableFallback: true and a failing swap dry run, the exchange hop therefore returned a paymentInfo fallback fee instead of only a dryRunError, breaking the TGetXcmFeeResult<true> contract. Forward the flag, and coalesce the merged hop fee with ?? 0n (getSwapFee already normalises the fee the same way internally) so the conditional fee type type-checks for a generic TDisableFallback. Signed-off-by: nunndayox-stack <nunndayox@gmail.com> AI-Assisted-By: Muse
Signed-off-by: nunndayox-stack <nunndayox@gmail.com> AI-Assisted-By: Muse
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.
π Bug Fix Pull Request
π Related Issue
Closes #2374
π οΈ Description of the Fix
β Contributor Eligibility
Reasonable(verifiable via Subscan).-S) and includesSigned-off-byandAI-Assisted-By: <tool name(s)>(orAI-Assisted-By: None) trailers.β Checklist
πΈ Polkadot Asset Hub Address (for Reward)
Polkadot Asset Hub Address: To be added β I will update this PR with my AssetHub address once my wallet and on-chain identity setup are complete, before any payout.
π§© Additional Notes (Optional)
Test report (verified locally before submission): getRouterFees.test.ts 19/19 pass; full @paraspell/swap suite 60 files / 376 tests all pass; mutation check done (reverting only getRouterFees.ts makes exactly the new test fail); tsc --noEmit clean.
Transparency note: an earlier 4-fix bundle PR (#2385, closed unmerged) contained the same one-line change; this PR submits the fix standalone per the programme's one-issue-per-PR convention, and adds the type fix needed for tsc to pass.
Review request: @michaeldev5