Skip to content

Commit 3e07fea

Browse files
committed
fix axios@1 paramsSerializer
1 parent c68c0d4 commit 3e07fea

File tree

5 files changed

+19
-4
lines changed

5 files changed

+19
-4
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 0.46.2 - 2023.08.13
2+
- fix axios@1 paramsSerializer
3+
14
## 0.46.1 - 2023.06.02
25
- `getPoolInfo` now accepts coin symbols as params
36

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "minter-js-sdk",
3-
"version": "0.46.1",
3+
"version": "0.46.2",
44
"description": "JS SDK for Minter Blockchain",
55
"main": "dist/cjs/index.js",
66
"module": "src/index.js",

src/api/estimate-coin-buy.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,11 @@ export default function EstimateCoinBuy(apiInstance, factoryAxiosOptions) {
6969
...factoryAxiosOptions,
7070
...axiosOptions,
7171
params,
72-
paramsSerializer: (query) => qsStringify(query, {arrayFormat: 'repeat'}),
72+
// @see https://github.com/axios/axios/issues/5058#issuecomment-1272107602
73+
paramsSerializer: {
74+
// eslint-disable-next-line unicorn/no-null
75+
indexes: null,
76+
},
7377
})
7478
.then((response) => {
7579
const resData = response.data;

src/api/estimate-coin-sell-all.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,11 @@ export default function EstimateCoinSellAll(apiInstance, factoryAxiosOptions) {
6464
...factoryAxiosOptions,
6565
...axiosOptions,
6666
params,
67-
paramsSerializer: (query) => qsStringify(query, {arrayFormat: 'repeat'}),
67+
// @see https://github.com/axios/axios/issues/5058#issuecomment-1272107602
68+
paramsSerializer: {
69+
// eslint-disable-next-line unicorn/no-null
70+
indexes: null,
71+
},
6872
})
6973
.then((response) => {
7074
const resData = response.data;

src/api/estimate-coin-sell.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,11 @@ export default function EstimateCoinSell(apiInstance, factoryAxiosOptions) {
6969
...factoryAxiosOptions,
7070
...axiosOptions,
7171
params,
72-
paramsSerializer: (query) => qsStringify(query, {arrayFormat: 'repeat'}),
72+
// @see https://github.com/axios/axios/issues/5058#issuecomment-1272107602
73+
paramsSerializer: {
74+
// eslint-disable-next-line unicorn/no-null
75+
indexes: null,
76+
},
7377
})
7478
.then((response) => {
7579
const resData = response.data;

0 commit comments

Comments
 (0)