Skip to content

Commit b065ca0

Browse files
authored
Merge pull request #169 from paraswap/feat/ignoreBadUsdPrice
Feat/RateOptions.ignoreBadUsdPrice param
2 parents 84d9f66 + aebaff8 commit b065ca0

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ There are multiple ways to use ParaSwap SDK, ranging from a simple construct-and
2727

2828
### Simple SDK
2929

30-
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.
30+
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.
3131

3232
```ts
3333
import { constructSimpleSDK } from '@paraswap/sdk';

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@paraswap/sdk",
3-
"version": "6.10.0",
3+
"version": "6.11.0",
44
"main": "dist/index.js",
55
"module": "dist/sdk.esm.js",
66
"typings": "dist/index.d.ts",
@@ -81,7 +81,7 @@
8181
}
8282
},
8383
"dependencies": {
84-
"@paraswap/core": "2.2.0",
84+
"@paraswap/core": "2.4.0",
8585
"bignumber.js": "^9.0.2",
8686
"ts-essentials": "^9.1.2"
8787
},

src/methods/swap/rates.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ export type RateOptions = {
148148
excludeContractMethods?: ContractMethod[];
149149
includeContractMethods?: ContractMethod[];
150150
partner?: string;
151+
/** @description In %. It's a way to bypass the API price impact check (default = 15%) */
151152
maxImpact?: number;
152153
maxUSDImpact?: number;
153154
otherExchangePrices?: boolean;

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1571,10 +1571,10 @@
15711571
"@nodelib/fs.scandir" "2.1.5"
15721572
fastq "^1.6.0"
15731573

1574-
"@paraswap/core@2.2.0":
1575-
version "2.2.0"
1576-
resolved "https://registry.yarnpkg.com/@paraswap/core/-/core-2.2.0.tgz#848175c7729f1064e715019269b1c193a23a5be8"
1577-
integrity sha512-aENl5zjS0y4ag7PLEq/hHgaAH4XpN5M4Zc7Igt/03D+W6t6tgScG9on2gXKkEUErcgnZ79qnvzKhaU6QgzoBAQ==
1574+
"@paraswap/core@2.4.0":
1575+
version "2.4.0"
1576+
resolved "https://registry.yarnpkg.com/@paraswap/core/-/core-2.4.0.tgz#82dac1f2eb5622b90eec352031f0711037bd8eff"
1577+
integrity sha512-msv0Etc5f7H2UDnDd23wKzNnx64fj1iwt8IlBORTFIpxJ1+fa+TqNO7lhtohfRiVmU3dnnAMcjEi4D+WHSWpvw==
15781578

15791579
"@rollup/plugin-babel@^5.3.1":
15801580
version "5.3.1"

0 commit comments

Comments
 (0)