Skip to content

Commit

Permalink
fix: 1inch query
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean-Grimal committed Jan 9, 2025
1 parent 5d1e9db commit 1ee3d52
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,9 @@ export const check = async <
srcToken,
srcAmount,
market.params,
slippage,
slippage / 10n ** 16n,
repaidAssets,
client.account.address,
);

if (result) {
Expand Down
4 changes: 4 additions & 0 deletions packages/liquidation-sdk-viem/src/LiquidationEncoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,7 @@ export class LiquidationEncoder<
marketParams: MarketParams,
slippage: bigint,
repaidAssets: bigint,
origin: Address,
) {
let srcToken = initialSrcToken;
const srcAmount = initialSrcAmount;
Expand All @@ -476,6 +477,7 @@ export class LiquidationEncoder<
amount: srcAmount,
from: this.address,
slippage,
origin,
includeTokensInfo: false,
includeProtocols: false,
includeGas: false,
Expand Down Expand Up @@ -513,6 +515,7 @@ export class LiquidationEncoder<
dst: marketParams.loanToken,
amount: halfAmount,
from: this.address,
origin,
slippage,
includeTokensInfo: false,
includeProtocols: false,
Expand All @@ -529,6 +532,7 @@ export class LiquidationEncoder<
dst: marketParams.loanToken,
amount: halfAmount,
from: this.address,
origin,
slippage,
includeTokensInfo: false,
includeProtocols: false,
Expand Down
1 change: 1 addition & 0 deletions packages/liquidation-sdk-viem/src/swap/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export interface SwapParams {
dst: string;
amount: BigIntish;
from: string;
origin: string;
slippage: BigIntish;
protocols?: string;
fee?: BigIntish;
Expand Down

0 comments on commit 1ee3d52

Please sign in to comment.