Skip to content

Commit

Permalink
Fix browser side querystring issue (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaushalrajbacancy authored Mar 16, 2024
1 parent 78f1653 commit 310dc80
Show file tree
Hide file tree
Showing 4 changed files with 189 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Changelog
## [1.6.2] - 2024-03-15
### Bug Fixes
- Fixed browser-side querystring issue

## [1.6.1] - 2024-03-14
### New
- Added Base Sepolia Network
Expand Down
184 changes: 180 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@etherspot/prime-sdk",
"version": "1.6.1",
"version": "1.6.2",
"description": "Etherspot Prime (Account Abstraction) SDK",
"keywords": [
"ether",
Expand Down Expand Up @@ -76,12 +76,14 @@
"ethers": "5.7.2",
"graphql-ws": "5.14.2",
"prettier": "2.8.8",
"qs": "6.12.0",
"reflect-metadata": "0.1.14",
"rxjs": "6.6.7"
},
"devDependencies": {
"@types/node": "18.11.9",
"@types/prettier": "2.7.3",
"@types/qs": "6.9.12",
"@typescript-eslint/eslint-plugin": "5.45.0",
"@typescript-eslint/parser": "5.45.0",
"dotenv": "16.0.3",
Expand Down
4 changes: 2 additions & 2 deletions src/sdk/api/restApi.service.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import fetch from 'cross-fetch';
import qs from 'querystring';
import qs from 'qs';
import { QueryParams } from './interfaces';
import { BACKEND_API_ENDPOINT } from './constants';

export class RestApiService {
async makeRequest(endpoint: string, method = 'GET', queryParams = {}, body = null) {
const queryString = qs.stringify(this.buildQueryParams(queryParams));
const queryString = qs.stringify(this.buildQueryParams(queryParams), { indices: false });
const url = new URL(`${BACKEND_API_ENDPOINT}/${endpoint}?${queryString}`);

const requestOptions = {
Expand Down

0 comments on commit 310dc80

Please sign in to comment.