From 14aeb6b85aeedecb1ec55ce4f696ca6c5c566bf8 Mon Sep 17 00:00:00 2001 From: Velenir Date: Mon, 17 Jun 2024 12:27:15 +0200 Subject: [PATCH 1/5] update core lib --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 83f2d47c..db8dc50b 100644 --- a/package.json +++ b/package.json @@ -81,7 +81,7 @@ } }, "dependencies": { - "@paraswap/core": "2.2.0", + "@paraswap/core": "2.3.0", "bignumber.js": "^9.0.2", "ts-essentials": "^9.1.2" }, diff --git a/yarn.lock b/yarn.lock index 4a710fdc..78886102 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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.3.0": + version "2.3.0" + resolved "https://registry.yarnpkg.com/@paraswap/core/-/core-2.3.0.tgz#3882f0f4be7f34d24cfb60bfe57ee753ab61a969" + integrity sha512-WeRDmnGoenkSQ8b4Q/fFcyWAlmnyQq6bzRjYPRW3VQSjOU10d5QAcspH9Ex7zeN22n7ZZjmi9Q/xn8tpxTOSMQ== "@rollup/plugin-babel@^5.3.1": version "5.3.1" From e5bfa9512a49d0d0973b52b8c669e38d0299b33b Mon Sep 17 00:00:00 2001 From: Velenir Date: Mon, 17 Jun 2024 12:28:12 +0200 Subject: [PATCH 2/5] revert README change --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 55fb7685..f8f65c36 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.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'; From 9b3ca21915667957e9f4a6f7f21cc96ceb2c5849 Mon Sep 17 00:00:00 2001 From: Velenir Date: Mon, 17 Jun 2024 12:42:59 +0200 Subject: [PATCH 3/5] prices/add RateOptions.ignoreBadUsdPrice param --- src/methods/swap/rates.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/methods/swap/rates.ts b/src/methods/swap/rates.ts index 5ddf8898..ce7cfbea 100644 --- a/src/methods/swap/rates.ts +++ b/src/methods/swap/rates.ts @@ -31,6 +31,7 @@ export type RateOptions = { excludeContractMethodsWithoutFeeModel?: boolean; adapterVersion?: string; partner?: string; + /** @description In %. It's a way to bypass the API price impact check (default = 15%) */ maxImpact?: number; maxUSDImpact?: number; otherExchangePrices?: boolean; @@ -38,6 +39,8 @@ export type RateOptions = { destTokenTransferFee?: number; srcTokenDexTransferFee?: number; destTokenDexTransferFee?: number; + /** @description proceed with priceRoute building even when tokens don't have USD price */ + ignoreBadUsdPrice?: boolean; }; type CommonGetRateInput = { From d69213ac4993da42b9e0f4a0a03a78b2c52864b9 Mon Sep 17 00:00:00 2001 From: Velenir Date: Mon, 24 Jun 2024 17:52:06 +0200 Subject: [PATCH 4/5] update core lib --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 516563cd..15b1cad5 100644 --- a/package.json +++ b/package.json @@ -81,7 +81,7 @@ } }, "dependencies": { - "@paraswap/core": "2.3.0", + "@paraswap/core": "2.4.0", "bignumber.js": "^9.0.2", "ts-essentials": "^9.1.2" }, diff --git a/yarn.lock b/yarn.lock index 78886102..d0fcf4ea 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1571,10 +1571,10 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@paraswap/core@2.3.0": - version "2.3.0" - resolved "https://registry.yarnpkg.com/@paraswap/core/-/core-2.3.0.tgz#3882f0f4be7f34d24cfb60bfe57ee753ab61a969" - integrity sha512-WeRDmnGoenkSQ8b4Q/fFcyWAlmnyQq6bzRjYPRW3VQSjOU10d5QAcspH9Ex7zeN22n7ZZjmi9Q/xn8tpxTOSMQ== +"@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" From aebaff86ac9bb7216d3d69120a26ab2ad9edfdee Mon Sep 17 00:00:00 2001 From: Velenir Date: Wed, 23 Oct 2024 14:39:41 +0200 Subject: [PATCH 5/5] Release 6.11.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 853a0745..5b782175 100644 --- a/package.json +++ b/package.json @@ -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",