-
Notifications
You must be signed in to change notification settings - Fork 112
Feat/DeltaPrice struct change #214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements significant changes to the DeltaPrice response structure and removes deprecated Across-specific bridge functionality. The changes modernize the bridge handling system by removing manual bridging logic in favor of backend-managed bridge selection and order construction.
- Updates DeltaPrice response to include
availableBridges
and enhanced bridge information - Removes
BuildOrderParams.beneficiaryType
parameter (now handled by backend) - Eliminates deprecated Across-specific methods and utilities
Reviewed Changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
tests/quote.test.ts |
Updates test error handling to accommodate multiple error types and adjusts test amounts |
tests/nftOrders.test.ts |
Updates test data with new asset and signature values |
tests/delta.test.ts |
Removes Across bridge tests, updates snapshots for new DeltaPrice structure |
tests/__snapshots__/*.snap |
Updates snapshots to reflect new adapters and response structures |
src/sdk/simple.ts |
Removes references to deprecated bridge and multicall handler functions |
src/methods/*/helpers/types.ts |
Consolidates order transaction types and removes deprecated fields |
src/methods/delta/*.ts |
Major cleanup removing Across helpers, multicall handlers, and bridge construction |
src/index.ts |
Removes exports for deprecated bridge and multicall functionality |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
protocolName: ProtocolName; | ||
destAmountAfterBridgeBeforeFee: string; | ||
destAmountAfterBridge: string; | ||
destUSDAfterBridgeBeforeFee: string; |
Copilot
AI
Oct 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new fields destAmountAfterBridgeBeforeFee
and destUSDAfterBridgeBeforeFee
in BridgePriceInfo
lack documentation. Consider adding JSDoc comments to explain what these fields represent and how they differ from the existing destAmountAfterBridge
and destUSDAfterBridge
fields.
protocolName: ProtocolName; | |
destAmountAfterBridgeBeforeFee: string; | |
destAmountAfterBridge: string; | |
destUSDAfterBridgeBeforeFee: string; | |
protocolName: ProtocolName; | |
/** | |
* @description The amount of destination token expected to be received before any bridge fees are deducted. | |
* This value does not account for protocol or bridge fees. For the net amount after fees, see destAmountAfterBridge. | |
*/ | |
destAmountAfterBridgeBeforeFee: string; | |
/** | |
* @description The amount of destination token expected to be received after all bridge fees are deducted. | |
* This is the net amount the user will actually receive. | |
*/ | |
destAmountAfterBridge: string; | |
/** | |
* @description The USD value of the destination token amount before any bridge fees are deducted. | |
* This value does not account for protocol or bridge fees. For the net USD value after fees, see destUSDAfterBridge. | |
*/ | |
destUSDAfterBridgeBeforeFee: string; | |
/** | |
* @description The USD value of the destination token amount after all bridge fees are deducted. | |
* This is the net USD value the user will actually receive. | |
*/ |
Copilot uses AI. Check for mistakes.
type AvailableBridge = AvailableBridgePrice & { | ||
bridgeParams: { | ||
bridge: Bridge; | ||
bridgeInfo: BridgePriceInfo; | ||
}[]; | ||
}; |
Copilot
AI
Oct 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new AvailableBridge
and AvailableBridgePrice
types lack documentation. Consider adding JSDoc comments to explain their purpose in the context of the new bridge selection system.
Copilot uses AI. Check for mistakes.
size-limit report 📦
|
Uh oh!
There was an error while loading. Please reload this page.