feat(fusion): allow fetching quotes for cross chain swaps#762
Open
feat(fusion): allow fetching quotes for cross chain swaps#762
Conversation
Base automatically changed from
feat/fusion-auto-slippage
to
feat/fusion-target-tokens
February 11, 2026 10:07
2b5ecde to
04da01e
Compare
04da01e to
a9497c2
Compare
There was a problem hiding this comment.
Pull request overview
Enables Fusion to fetch quotes for cross-chain swaps by introducing bridge/service initialization plumbing and splitting SDK initialization into smaller hooks/utils.
Changes:
- Expanded Fusion feature flags to enable/disable individual transfer services (Markr, Avalanche EVM, Lombard directions).
- Added Fusion helpers/hooks to derive environment, enabled services, and service initializers; updated TransferManager creation accordingly.
- Added signer types and extended the EVM signer to support message signing.
Reviewed changes
Copilot reviewed 16 out of 18 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/types/src/feature-flags.ts | Replaces the single Fusion gate with multiple service-specific Fusion gates. |
| packages/common/src/feature-flags.ts | Adds defaults/disabled values for new Fusion feature gates. |
| apps/next/src/pages/Portfolio/.../PortfolioActionButtons.tsx | Switches gating check to the new Fusion feature flag. |
| apps/next/src/pages/Fusion/types.ts | Adds a shared Signers type for Fusion hooks/services. |
| apps/next/src/pages/Fusion/lib/signers/evm.ts | Updates EVM signer type and adds signMessage support. |
| apps/next/src/pages/Fusion/lib/getServiceInitializer.ts | Centralizes creation of service initializer objects per service type. |
| apps/next/src/pages/Fusion/lib/getEnvironment.ts | Adds environment selection logic for TransferManager creation. |
| apps/next/src/pages/Fusion/lib/getEnabledTransferServices.ts | Derives enabled transfer services from feature flags. |
| apps/next/src/pages/Fusion/contexts/hooks/useTransferServiceInitializers.ts | Hook to build service initializers for enabled services. |
| apps/next/src/pages/Fusion/contexts/hooks/useTransferManager.ts | Refactors TransferManager creation to use new hooks and enabled services. |
| apps/next/src/pages/Fusion/contexts/hooks/useTransferEnvironment.ts | Hook wrapper around environment selection. |
| apps/next/src/pages/Fusion/contexts/FusionStateContext.tsx | Uses the new TransferManager hook and broadens target token list input. |
| apps/next/src/pages/Bridge/.../hooks/index.ts | Stops re-exporting useBridgeEnvironment from this index. |
| apps/next/src/pages/Bridge/.../NextUnifiedBridge.tsx | Updates import to use the app-level useBridgeEnvironment hook. |
| apps/next/package.json | Bumps unified-asset-transfer dependency version. |
| .env.example | Clarifies Markr env vars usage for Fusion swap. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
apps/next/src/pages/Fusion/contexts/hooks/useTransferServiceInitializers.ts
Show resolved
Hide resolved
bartosz-the-coder-at-avalabs
previously approved these changes
Feb 11, 2026
a9497c2 to
bcd163f
Compare
bartosz-the-coder-at-avalabs
approved these changes
Feb 18, 2026
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.
Changes
Known issues
There are a lot of routes you will NOT get a quote for (e.g. it's possible to select AVAX -> Bitcoin, but you won't get a quote for it). This will be fixed in the upcoming PRs.
There is not tracking yet. If you want to see the progress of your transaction, get your transaction hash (click the success toast) and go to this URL:
When
finalizedistrue, you should see the transaction hash on the target chain and funds on your account.Testing
Play around with the Fusion feature. You should be able to select any token from chains supported by the SDK as the target token.
Screenshots
Checklist for the author