Skip to content

Commit

Permalink
chore: remove the @ungap/url-search-params polyfill (#3342)
Browse files Browse the repository at this point in the history
Use URLSearchParams instead.
  • Loading branch information
silasbw authored Jan 10, 2023
1 parent 8c77bc5 commit b53b693
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@
"@sentry/react-native": "^4.10.1",
"@sentry/types": "^7.22.0",
"@th3rdwave/react-navigation-bottom-sheet": "^0.2.1",
"@ungap/url-search-params": "^0.1.2",
"@walletconnect/client": "^1.8.0",
"@walletconnect/react-native-compat": "^2.1.3",
"@walletconnect/sign-client": "^2.1.3",
Expand Down
5 changes: 2 additions & 3 deletions src/app/saga.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { compressedPubKey } from '@celo/cryptographic-utils'
import { PhoneNumberHashDetails } from '@celo/identity/lib/odis/phone-number-identifier'
import { hexToBuffer } from '@celo/utils/lib/address'
import URLSearchParamsReal from '@ungap/url-search-params'
import { AppState, Platform } from 'react-native'
import DeviceInfo from 'react-native-device-info'
import * as Keychain from 'react-native-keychain'
Expand Down Expand Up @@ -78,7 +77,7 @@ import {
mtwAddressSelector,
walletAddressSelector,
} from 'src/web3/selectors'
import { parse } from 'url'
import { URLSearchParams, parse } from 'url'

const TAG = 'app/saga'

Expand Down Expand Up @@ -249,7 +248,7 @@ function parseValue(value: string) {

// Parses the query string into an object. Only works with built-in strings, booleans and numbers.
function convertQueryToScreenParams(query: string) {
const decodedParams = new URLSearchParamsReal(decodeURIComponent(query))
const decodedParams = new URLSearchParams(decodeURIComponent(query))
const params: { [key: string]: any } = {}
for (const [key, value] of decodedParams.entries()) {
params[key] = parseValue(value)
Expand Down
5 changes: 0 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5395,11 +5395,6 @@
"@typescript-eslint/types" "5.15.0"
eslint-visitor-keys "^3.0.0"

"@ungap/url-search-params@^0.1.2":
version "0.1.2"
resolved "https://registry.yarnpkg.com/@ungap/url-search-params/-/url-search-params-0.1.2.tgz#8ba8c0527543fe675d1c29ae0a2daca842e8ee4f"
integrity sha512-WVk5+lJ+AoNLh2sIDMhnEAgLsVQuI067hWLJCzirErH1GYiy1gs09q4+XZxYWSvdAsslKsaO4q1iXXMx2c72dA==

"@valora/eslint-config-typescript@^1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@valora/eslint-config-typescript/-/eslint-config-typescript-1.0.0.tgz#1e88c1b5508d7abd3fe2b40dd9462b1cb1d69331"
Expand Down

0 comments on commit b53b693

Please sign in to comment.