From 5315baa8d657e2e1c2a66aa9b0d5504fc22d2ba4 Mon Sep 17 00:00:00 2001 From: Velenir Date: Tue, 11 Jun 2024 17:58:34 +0200 Subject: [PATCH] 6.2 version --- README.md | 2 +- src/methods/limitOrders/helpers/buildOrderData.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f8f65c36..55fb7685 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ There are multiple ways to use ParaSwap SDK, ranging from a simple construct-and ### Simple SDK -Can be created by providing `chainId` and either `axios` or `window.fetch` (or alternative `fetch` implementation), and an optional `version` (`'5'` or `'6.1'`) parameter that corresponds to the API version SDK will be making requests to. The resulting SDK will be able to use all methods that query the API. +Can be created by providing `chainId` and either `axios` or `window.fetch` (or alternative `fetch` implementation), and an optional `version` (`'5'` or `'6.2'`) parameter that corresponds to the API version SDK will be making requests to. The resulting SDK will be able to use all methods that query the API. ```ts import { constructSimpleSDK } from '@paraswap/sdk'; diff --git a/src/methods/limitOrders/helpers/buildOrderData.ts b/src/methods/limitOrders/helpers/buildOrderData.ts index 67445924..8a0ed322 100644 --- a/src/methods/limitOrders/helpers/buildOrderData.ts +++ b/src/methods/limitOrders/helpers/buildOrderData.ts @@ -90,7 +90,9 @@ export function buildOrderData({ taker = ZERO_ADDRESS; } else { // otherwise for p2p order -> - if (AppVersion === '6.1') { + if (AppVersion.startsWith('6.')) { + //support 6.1+ versions + // limit taker to EOA for v6 version (no Arbitrary Token Swaps + OTC Fill, or OTC Fill through AugustusSwapper) taker = takerInNonce; } else {