Skip to content

Commit

Permalink
Merge pull request #169 from paraswap/feat/ignoreBadUsdPrice
Browse files Browse the repository at this point in the history
Feat/RateOptions.ignoreBadUsdPrice param
  • Loading branch information
Velenir authored Oct 23, 2024
2 parents 84d9f66 + aebaff8 commit b065ca0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 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.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.
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.

```ts
import { constructSimpleSDK } from '@paraswap/sdk';
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@paraswap/sdk",
"version": "6.10.0",
"version": "6.11.0",
"main": "dist/index.js",
"module": "dist/sdk.esm.js",
"typings": "dist/index.d.ts",
Expand Down Expand Up @@ -81,7 +81,7 @@
}
},
"dependencies": {
"@paraswap/core": "2.2.0",
"@paraswap/core": "2.4.0",
"bignumber.js": "^9.0.2",
"ts-essentials": "^9.1.2"
},
Expand Down
1 change: 1 addition & 0 deletions src/methods/swap/rates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ export type RateOptions = {
excludeContractMethods?: ContractMethod[];
includeContractMethods?: ContractMethod[];
partner?: string;
/** @description In %. It's a way to bypass the API price impact check (default = 15%) */
maxImpact?: number;
maxUSDImpact?: number;
otherExchangePrices?: boolean;
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1571,10 +1571,10 @@
"@nodelib/fs.scandir" "2.1.5"
fastq "^1.6.0"

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

"@rollup/plugin-babel@^5.3.1":
version "5.3.1"
Expand Down

0 comments on commit b065ca0

Please sign in to comment.