Skip to content

Conversation

Velenir
Copy link
Member

@Velenir Velenir commented Oct 15, 2025

  • Changes to DeltaPrice response structure (availableBridges, bridgeInfo.destAmountAfterBridgeBeforeFee)
  • Remove BuildOrderParams.beneficiaryType (handled in BE)
  • Remove Across-specific methods
  • Cleanup of some types, tests, comments
  • optional deltaPrice.partner&partnerFee for buildDeltaOrder

@Velenir Velenir requested review from alexshchur and Copilot October 15, 2025 12:46
Copy link

@Copilot Copilot AI left a 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.

Comment on lines 150 to +164
protocolName: ProtocolName;
destAmountAfterBridgeBeforeFee: string;
destAmountAfterBridge: string;
destUSDAfterBridgeBeforeFee: string;
Copy link

Copilot AI Oct 15, 2025

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.

Suggested change
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.

Comment on lines +96 to +101
type AvailableBridge = AvailableBridgePrice & {
bridgeParams: {
bridge: Bridge;
bridgeInfo: BridgePriceInfo;
}[];
};
Copy link

Copilot AI Oct 15, 2025

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.

Copy link

github-actions bot commented Oct 15, 2025

size-limit report 📦

Path Size
dist/sdk.cjs.production.min.js 15.26 KB (-1.11% 🔽)
dist/sdk.esm.js 15.17 KB (-1.39% 🔽)

@Velenir Velenir requested review from andriy-shymkiv and removed request for alexshchur October 15, 2025 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant