Skip to content

Commit

Permalink
Add evm_slippage_tolerance_percent
Browse files Browse the repository at this point in the history
  • Loading branch information
wllmshao committed Jun 26, 2024
1 parent fd2e9c3 commit d06a1e4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/calm-foxes-kneel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@skip-router/core": minor
---

Add evm_slippage_tolerance_percent to smart_swap_options
2 changes: 2 additions & 0 deletions packages/core/src/types/converters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2279,6 +2279,7 @@ export function smartSwapOptionsFromJSON(
return {
splitRoutes: Boolean(smartSwapOptionsJSON.split_routes),
evmSwaps: Boolean(smartSwapOptionsJSON.evm_swaps),
evmSlippageTolerancePercent: smartSwapOptionsJSON.evm_slippage_tolerance_percent,
};
}

Expand All @@ -2288,6 +2289,7 @@ export function smartSwapOptionsToJSON(
return {
split_routes: Boolean(smartSwapOptions.splitRoutes),
evm_swaps: Boolean(smartSwapOptions.evmSwaps),
evm_slippage_tolerance_percent: smartSwapOptions.evmSlippageTolerancePercent,
};
}

Expand Down
2 changes: 2 additions & 0 deletions packages/core/src/types/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -507,9 +507,11 @@ export type OriginAssetsResponse = {
export type SmartSwapOptionsJSON = {
split_routes?: boolean;
evm_swaps?: boolean;
evm_slippage_tolerance_percent?: string;
};

export type SmartSwapOptions = {
splitRoutes?: boolean;
evmSwaps?: boolean;
evmSlippageTolerancePercent?: string;
};

0 comments on commit d06a1e4

Please sign in to comment.