From 0633f9c1139fd7b4bf4b7d80453a14bbc900c790 Mon Sep 17 00:00:00 2001 From: Alex Kraiz Date: Thu, 4 Jan 2024 11:21:04 +0400 Subject: [PATCH] fix: swapMarket / swapLimit --- src/Unit/Exchange/index.ts | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/Unit/Exchange/index.ts b/src/Unit/Exchange/index.ts index 284ddef..217afb3 100644 --- a/src/Unit/Exchange/index.ts +++ b/src/Unit/Exchange/index.ts @@ -12,6 +12,8 @@ type PureDepositParams = Omit type PureWithdrawParams = Omit type PureGetSwapMarketInfoParams = Omit type PureGenerateSwapCalldataParams = Omit +type PureSwapLimitParams = Omit +type PureSwapMarketParams = Omit export default class Exchange { private readonly unit: Unit; @@ -49,11 +51,17 @@ export default class Exchange { }) } - public swapLimit(params: SwapLimitParams) { - return swapLimit(params); + public swapLimit(params: PureSwapLimitParams) { + return swapLimit({ + ...params, + unit: this.unit, + }); } - public swapMarket(params: SwapMarketParams) { - return swapMarket(params); + public swapMarket(params: PureSwapMarketParams) { + return swapMarket({ + ...params, + unit: this.unit, + }); } }