Skip to content

Commit

Permalink
6.2 version
Browse files Browse the repository at this point in the history
  • Loading branch information
Velenir committed Jun 11, 2024
1 parent 20d1311 commit 5315baa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
4 changes: 3 additions & 1 deletion src/methods/limitOrders/helpers/buildOrderData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 5315baa

Please sign in to comment.