Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
09bade0
BridgePriceInfo/add new props
Velenir Oct 15, 2025
4a7189e
ProtocolName/more protocols
Velenir Oct 15, 2025
a9e239a
BridgePrice/add availableBridges
Velenir Oct 15, 2025
7909fce
add no longer used across methods
Velenir Oct 15, 2025
0aa40ea
BuildDeltaOrderDataParams/remove unused beneficiaryType
Velenir Oct 15, 2025
96e7f06
remove extra types
Velenir Oct 15, 2025
f0e8c91
tests/simpleSdk/update snapshots
Velenir Oct 15, 2025
ed1f4e8
test/nft/update snapshots
Velenir Oct 15, 2025
add2e16
tests/quote/fix amounts
Velenir Oct 15, 2025
8d6447e
tests/delta/fix for new price shape
Velenir Oct 15, 2025
a1d61c5
tests/quote/relax condition
Velenir Oct 15, 2025
843879f
test/simple & partial/more permissive results check
Velenir Oct 15, 2025
7a83b93
buildDeltaOrder/mark partner & partnerFee as optional
Velenir Oct 15, 2025
c6ef5f2
tests/partial/update snapshot
Velenir Oct 15, 2025
65981ab
test/quote/update amounts
Velenir Oct 15, 2025
d15bac9
getDeltaOrders/ `chainId` and `status` filters
andriy-shymkiv Oct 17, 2025
d3e5555
getDeltaOrders/ get rid of type=ALL
andriy-shymkiv Oct 17, 2025
0d5ee12
update DeltaPirce types
Velenir Oct 22, 2025
d188b0a
fix some tests
Velenir Oct 22, 2025
9aaf6d8
fix some tests
Velenir Oct 22, 2025
292fa4e
getDeltaOrders/simplify join
Velenir Oct 27, 2025
a17c31a
reexport DeltaOrderFilterByStatus
Velenir Oct 27, 2025
93e63a9
Merge pull request #215 from VeloraDEX/feat/extend_delta_orders_filte…
Velenir Oct 27, 2025
e2a5612
fix some tests
Velenir Oct 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,6 @@ import {
SignableDeltaOrderData,
SwapSideUnion,
} from './methods/delta/buildDeltaOrder';
import {
constructBuildCrosschainOrderBridge,
BuildCrosschainOrderBridgeFunctions,
BuildCrosschainOrderBridgeParams,
CrosschainOrderBridgeAndChanges,
} from './methods/delta/buildCrosschainOrderBridge';
import {
constructPostDeltaOrder,
DeltaOrderApiResponse,
Expand Down Expand Up @@ -196,11 +190,6 @@ import {
GetBridgeInfoFunctions,
BridgeInfo,
} from './methods/delta/getBridgeInfo';
import {
constructGetMulticallHandlers,
GetMulticallHandlersFunctions,
MulticallHandlersResponse,
} from './methods/delta/getMulticallHandlers';
import {
constructIsTokenSupportedInDelta,
IsTokenSupportedInDeltaFunctions,
Expand Down Expand Up @@ -296,7 +285,6 @@ export {
constructBuildNFTOrderTx,
// Delta methods
constructBuildDeltaOrder,
constructBuildCrosschainOrderBridge,
constructPostDeltaOrder,
constructSignDeltaOrder,
constructGetDeltaContract,
Expand All @@ -310,7 +298,6 @@ export {
constructGetPartnerFee,
constructGetBridgeInfo,
constructIsTokenSupportedInDelta,
constructGetMulticallHandlers,
constructEthersContractCaller, // same as constructEthersV5ContractCaller for backwards compatibility
constructEthersV5ContractCaller,
constructEthersV6ContractCaller,
Expand Down Expand Up @@ -387,9 +374,6 @@ export type {
BuildDeltaOrderDataParams,
BuildDeltaOrderFunctions,
SignableDeltaOrderData,
BuildCrosschainOrderBridgeFunctions,
BuildCrosschainOrderBridgeParams,
CrosschainOrderBridgeAndChanges,
PostDeltaOrderFunctions,
PostDeltaOrderParams,
SignDeltaOrderFunctions,
Expand All @@ -413,8 +397,6 @@ export type {
GetPartnerFeeFunctions,
GetBridgeInfoFunctions,
IsTokenSupportedInDeltaFunctions,
GetMulticallHandlersFunctions,
MulticallHandlersResponse,
Token,
Address,
AddressOrSymbol,
Expand Down
7 changes: 0 additions & 7 deletions src/methods/common/orders/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,3 @@ export type OrderTransaction = {
};

export type OrderType = 'LIMIT' | 'P2P';

// display states such as EXPIRED and PARTIALLY_FILLLED derived on client side
// returned by API but can be calculated too, EXPIRED == order.expiry < Date.now()/1000
// PARTIALLY_FILLED == order.fillableBalance < order.makerAmount && order.fillableBalance !== '0'
export type OrderState = 'PENDING' | 'FULFILLED' | 'CANCELLED' | 'EXPIRED';

export type BeneficiaryType = 'EOA' | 'SmartContract';
96 changes: 0 additions & 96 deletions src/methods/delta/buildCrosschainOrderBridge.ts

This file was deleted.

3 changes: 0 additions & 3 deletions src/methods/delta/buildDeltaOrder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
type SignableDeltaOrderData,
} from './helpers/buildDeltaOrderData';
import { SwapSideToOrderKind } from './helpers/types';
import { BeneficiaryType } from '../common/orders/types';
import { SwapSide } from '../../constants';
export type { SignableDeltaOrderData } from './helpers/buildDeltaOrderData';

Expand Down Expand Up @@ -42,8 +41,6 @@ export type BuildDeltaOrderDataParams = {

/** @description Destination Chain ID for Crosschain Orders */
destChainId?: number;
/** @description Whether the beneficiary is a contract. Needed to automatically fill in crosschain Bridge */
beneficiaryType?: BeneficiaryType;

/** @description price response received from /delta/prices (getDeltaPrice method) */
deltaPrice: Pick<
Expand Down
21 changes: 21 additions & 0 deletions src/methods/delta/getDeltaPrice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,26 @@ export type DeltaPrice = {
bridge: Bridge; // for single-chain DeltaPrice, it's DEFAULT_BRIDGE
};

type AvailableBridgePrice = Pick<
DeltaPrice,
| 'destToken'
| 'destAmount'
| 'destAmountBeforeFee'
| 'destUSD'
| 'destUSDBeforeFee'
| 'gasCostUSD'
| 'gasCost'
| 'gasCostUSDBeforeFee'
| 'gasCostBeforeFee'
>;

type AvailableBridge = AvailableBridgePrice & {
bridgeParams: {
bridge: Bridge;
bridgeInfo: BridgePriceInfo;
}[];
};
Comment on lines +103 to +108
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.

export type BridgePrice = Omit<DeltaPrice, 'bridge'> & {
// destAmountAfterBridge: string; // became bridgeInfo.destAmountAfterBridge
// destUSDAfterBridge: string; // became bridgeInfo.destUSDAfterBridge
Expand All @@ -88,6 +108,7 @@ export type BridgePrice = Omit<DeltaPrice, 'bridge'> & {
// poolAddress: string;
bridge: Bridge;
bridgeInfo: BridgePriceInfo;
availableBridges: AvailableBridge[];
};

type DeltaPriceResponse = {
Expand Down
44 changes: 0 additions & 44 deletions src/methods/delta/getMulticallHandlers.ts

This file was deleted.

Loading
Loading