From e6c6affd966e29b23d5acb8f3cc6befd26d3081f Mon Sep 17 00:00:00 2001 From: npty Date: Thu, 7 Nov 2024 19:10:19 +0700 Subject: [PATCH] feat: update typescript and fix build errors --- package.json | 2 +- pnpm-lock.yaml | 116 +++++++++--------- src/constants/GasToken.ts | 2 - .../constants/chain/mainnet.ts | 5 - .../constants/chain/testnet.ts | 5 - 5 files changed, 62 insertions(+), 68 deletions(-) diff --git a/package.json b/package.json index 31ea5d90..cf598374 100644 --- a/package.json +++ b/package.json @@ -90,7 +90,7 @@ "rimraf": "^5.0.1", "strip-ansi": "^6.0.0", "ts-node": "^10.9.1", - "typescript": "^4.8.4", + "typescript": "^5.6.3", "vitest": "^0.32.0" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f3edd8f5..48df19a3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -28,7 +28,7 @@ dependencies: version: 5.7.2 '@mysten/sui': specifier: ^1.14.2 - version: 1.14.2(typescript@4.8.4) + version: 1.14.2(typescript@5.6.3) '@types/uuid': specifier: ^8.3.1 version: 8.3.1 @@ -90,10 +90,10 @@ devDependencies: version: 2.0.1 '@typescript-eslint/eslint-plugin': specifier: ^5.39.0 - version: 5.39.0(@typescript-eslint/parser@5.30.0)(eslint@8.24.0)(typescript@4.8.4) + version: 5.39.0(@typescript-eslint/parser@5.30.0)(eslint@8.24.0)(typescript@5.6.3) '@typescript-eslint/parser': specifier: ^5.30.0 - version: 5.30.0(eslint@8.24.0)(typescript@4.8.4) + version: 5.30.0(eslint@8.24.0)(typescript@5.6.3) chalk: specifier: ^4.1.2 version: 4.1.2 @@ -108,7 +108,7 @@ devDependencies: version: 8.8.0(eslint@8.24.0) eslint-config-standard-with-typescript: specifier: ^23.0.0 - version: 23.0.0(@typescript-eslint/eslint-plugin@5.39.0)(eslint-plugin-import@2.26.0)(eslint-plugin-n@15.3.0)(eslint-plugin-promise@6.0.1)(eslint@8.24.0)(typescript@4.8.4) + version: 23.0.0(@typescript-eslint/eslint-plugin@5.39.0)(eslint-plugin-import@2.26.0)(eslint-plugin-n@15.3.0)(eslint-plugin-promise@6.0.1)(eslint@8.24.0)(typescript@5.6.3) eslint-plugin-import: specifier: ^2.26.0 version: 2.26.0(@typescript-eslint/parser@5.30.0)(eslint@8.24.0) @@ -147,10 +147,10 @@ devDependencies: version: 6.0.1 ts-node: specifier: ^10.9.1 - version: 10.9.1(@types/node@20.2.5)(typescript@4.8.4) + version: 10.9.1(@types/node@20.2.5)(typescript@5.6.3) typescript: - specifier: ^4.8.4 - version: 4.8.4 + specifier: ^5.6.3 + version: 5.6.3 vitest: specifier: ^0.32.0 version: 0.32.0 @@ -168,15 +168,15 @@ packages: graphql: 16.9.0 dev: false - /@0no-co/graphqlsp@1.12.16(graphql@16.9.0)(typescript@4.8.4): + /@0no-co/graphqlsp@1.12.16(graphql@16.9.0)(typescript@5.6.3): resolution: {integrity: sha512-B5pyYVH93Etv7xjT6IfB7QtMBdaaC07yjbhN6v8H7KgFStMkPvi+oWYBTibMFRMY89qwc9H8YixXg8SXDVgYWw==} peerDependencies: graphql: ^15.5.0 || ^16.0.0 || ^17.0.0 typescript: ^5.0.0 dependencies: - '@gql.tada/internal': 1.0.8(graphql@16.9.0)(typescript@4.8.4) + '@gql.tada/internal': 1.0.8(graphql@16.9.0)(typescript@5.6.3) graphql: 16.9.0 - typescript: 4.8.4 + typescript: 5.6.3 dev: false /@ampproject/remapping@2.2.1: @@ -2050,7 +2050,7 @@ packages: '@ethersproject/properties': 5.7.0 '@ethersproject/strings': 5.7.0 - /@gql.tada/cli-utils@1.6.3(@0no-co/graphqlsp@1.12.16)(graphql@16.9.0)(typescript@4.8.4): + /@gql.tada/cli-utils@1.6.3(@0no-co/graphqlsp@1.12.16)(graphql@16.9.0)(typescript@5.6.3): resolution: {integrity: sha512-jFFSY8OxYeBxdKi58UzeMXG1tdm4FVjXa8WHIi66Gzu9JWtCE6mqom3a8xkmSw+mVaybFW5EN2WXf1WztJVNyQ==} peerDependencies: '@0no-co/graphqlsp': ^1.12.13 @@ -2064,13 +2064,13 @@ packages: '@gql.tada/vue-support': optional: true dependencies: - '@0no-co/graphqlsp': 1.12.16(graphql@16.9.0)(typescript@4.8.4) - '@gql.tada/internal': 1.0.8(graphql@16.9.0)(typescript@4.8.4) + '@0no-co/graphqlsp': 1.12.16(graphql@16.9.0)(typescript@5.6.3) + '@gql.tada/internal': 1.0.8(graphql@16.9.0)(typescript@5.6.3) graphql: 16.9.0 - typescript: 4.8.4 + typescript: 5.6.3 dev: false - /@gql.tada/internal@1.0.8(graphql@16.9.0)(typescript@4.8.4): + /@gql.tada/internal@1.0.8(graphql@16.9.0)(typescript@5.6.3): resolution: {integrity: sha512-XYdxJhtHC5WtZfdDqtKjcQ4d7R1s0d1rnlSs3OcBEUbYiPoJJfZU7tWsVXuv047Z6msvmr4ompJ7eLSK5Km57g==} peerDependencies: graphql: ^15.5.0 || ^16.0.0 || ^17.0.0 @@ -2078,7 +2078,7 @@ packages: dependencies: '@0no-co/graphql.web': 1.0.11(graphql@16.9.0) graphql: 16.9.0 - typescript: 4.8.4 + typescript: 5.6.3 dev: false /@graphql-typed-document-node/core@3.2.0(graphql@16.9.0): @@ -2172,7 +2172,7 @@ packages: bs58: 6.0.0 dev: false - /@mysten/sui@1.14.2(typescript@4.8.4): + /@mysten/sui@1.14.2(typescript@5.6.3): resolution: {integrity: sha512-WkkVLoP9SXhcZYh/yqtXaM8zX8KPdCTfMUY9oNjHBIFBN3K0s6M5mFRPekZdG8+PVGyRLZI1mFQOs7cRyx4xKg==} engines: {node: '>=18'} dependencies: @@ -2184,7 +2184,7 @@ packages: '@scure/bip39': 1.4.0 '@suchipi/femver': 1.0.0 bech32: 2.0.0 - gql.tada: 1.8.10(graphql@16.9.0)(typescript@4.8.4) + gql.tada: 1.8.10(graphql@16.9.0)(typescript@5.6.3) graphql: 16.9.0 tweetnacl: 1.0.3 valibot: 0.36.0 @@ -2427,7 +2427,7 @@ packages: resolution: {integrity: sha512-Y2mHTRAbqfFkpjldbkHGY8JIzRN6XqYRliG8/24FcHm2D2PwW24fl5xMRTVGdrb7iMrwCaIEbLWerGIkXuFWVg==} dev: false - /@typescript-eslint/eslint-plugin@5.39.0(@typescript-eslint/parser@5.30.0)(eslint@8.24.0)(typescript@4.8.4): + /@typescript-eslint/eslint-plugin@5.39.0(@typescript-eslint/parser@5.30.0)(eslint@8.24.0)(typescript@5.6.3): resolution: {integrity: sha512-xVfKOkBm5iWMNGKQ2fwX5GVgBuHmZBO1tCRwXmY5oAIsPscfwm2UADDuNB8ZVYCtpQvJK4xpjrK7jEhcJ0zY9A==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -2438,22 +2438,22 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/parser': 5.30.0(eslint@8.24.0)(typescript@4.8.4) + '@typescript-eslint/parser': 5.30.0(eslint@8.24.0)(typescript@5.6.3) '@typescript-eslint/scope-manager': 5.39.0 - '@typescript-eslint/type-utils': 5.39.0(eslint@8.24.0)(typescript@4.8.4) - '@typescript-eslint/utils': 5.39.0(eslint@8.24.0)(typescript@4.8.4) + '@typescript-eslint/type-utils': 5.39.0(eslint@8.24.0)(typescript@5.6.3) + '@typescript-eslint/utils': 5.39.0(eslint@8.24.0)(typescript@5.6.3) debug: 4.3.4 eslint: 8.24.0 ignore: 5.2.4 regexpp: 3.2.0 semver: 7.5.1 - tsutils: 3.21.0(typescript@4.8.4) - typescript: 4.8.4 + tsutils: 3.21.0(typescript@5.6.3) + typescript: 5.6.3 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/parser@5.30.0(eslint@8.24.0)(typescript@4.8.4): + /@typescript-eslint/parser@5.30.0(eslint@8.24.0)(typescript@5.6.3): resolution: {integrity: sha512-2oYYUws5o2liX6SrFQ5RB88+PuRymaM2EU02/9Ppoyu70vllPnHVO7ioxDdq/ypXHA277R04SVjxvwI8HmZpzA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -2465,10 +2465,10 @@ packages: dependencies: '@typescript-eslint/scope-manager': 5.30.0 '@typescript-eslint/types': 5.30.0 - '@typescript-eslint/typescript-estree': 5.30.0(typescript@4.8.4) + '@typescript-eslint/typescript-estree': 5.30.0(typescript@5.6.3) debug: 4.3.4 eslint: 8.24.0 - typescript: 4.8.4 + typescript: 5.6.3 transitivePeerDependencies: - supports-color dev: true @@ -2489,7 +2489,7 @@ packages: '@typescript-eslint/visitor-keys': 5.39.0 dev: true - /@typescript-eslint/type-utils@5.39.0(eslint@8.24.0)(typescript@4.8.4): + /@typescript-eslint/type-utils@5.39.0(eslint@8.24.0)(typescript@5.6.3): resolution: {integrity: sha512-KJHJkOothljQWzR3t/GunL0TPKY+fGJtnpl+pX+sJ0YiKTz3q2Zr87SGTmFqsCMFrLt5E0+o+S6eQY0FAXj9uA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -2499,12 +2499,12 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 5.39.0(typescript@4.8.4) - '@typescript-eslint/utils': 5.39.0(eslint@8.24.0)(typescript@4.8.4) + '@typescript-eslint/typescript-estree': 5.39.0(typescript@5.6.3) + '@typescript-eslint/utils': 5.39.0(eslint@8.24.0)(typescript@5.6.3) debug: 4.3.4 eslint: 8.24.0 - tsutils: 3.21.0(typescript@4.8.4) - typescript: 4.8.4 + tsutils: 3.21.0(typescript@5.6.3) + typescript: 5.6.3 transitivePeerDependencies: - supports-color dev: true @@ -2519,7 +2519,7 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@typescript-eslint/typescript-estree@5.30.0(typescript@4.8.4): + /@typescript-eslint/typescript-estree@5.30.0(typescript@5.6.3): resolution: {integrity: sha512-hDEawogreZB4n1zoqcrrtg/wPyyiCxmhPLpZ6kmWfKF5M5G0clRLaEexpuWr31fZ42F96SlD/5xCt1bT5Qm4Nw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -2534,13 +2534,13 @@ packages: globby: 11.1.0 is-glob: 4.0.3 semver: 7.5.1 - tsutils: 3.21.0(typescript@4.8.4) - typescript: 4.8.4 + tsutils: 3.21.0(typescript@5.6.3) + typescript: 5.6.3 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/typescript-estree@5.39.0(typescript@4.8.4): + /@typescript-eslint/typescript-estree@5.39.0(typescript@5.6.3): resolution: {integrity: sha512-qLFQP0f398sdnogJoLtd43pUgB18Q50QSA+BTE5h3sUxySzbWDpTSdgt4UyxNSozY/oDK2ta6HVAzvGgq8JYnA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -2555,13 +2555,13 @@ packages: globby: 11.1.0 is-glob: 4.0.3 semver: 7.5.1 - tsutils: 3.21.0(typescript@4.8.4) - typescript: 4.8.4 + tsutils: 3.21.0(typescript@5.6.3) + typescript: 5.6.3 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/utils@5.39.0(eslint@8.24.0)(typescript@4.8.4): + /@typescript-eslint/utils@5.39.0(eslint@8.24.0)(typescript@5.6.3): resolution: {integrity: sha512-+DnY5jkpOpgj+EBtYPyHRjXampJfC0yUZZzfzLuUWVZvCuKqSdJVC8UhdWipIw7VKNTfwfAPiOWzYkAwuIhiAg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -2570,7 +2570,7 @@ packages: '@types/json-schema': 7.0.12 '@typescript-eslint/scope-manager': 5.39.0 '@typescript-eslint/types': 5.39.0 - '@typescript-eslint/typescript-estree': 5.39.0(typescript@4.8.4) + '@typescript-eslint/typescript-estree': 5.39.0(typescript@5.6.3) eslint: 8.24.0 eslint-scope: 5.1.1 eslint-utils: 3.0.0(eslint@8.24.0) @@ -3419,7 +3419,7 @@ packages: eslint: 8.24.0 dev: true - /eslint-config-standard-with-typescript@23.0.0(@typescript-eslint/eslint-plugin@5.39.0)(eslint-plugin-import@2.26.0)(eslint-plugin-n@15.3.0)(eslint-plugin-promise@6.0.1)(eslint@8.24.0)(typescript@4.8.4): + /eslint-config-standard-with-typescript@23.0.0(@typescript-eslint/eslint-plugin@5.39.0)(eslint-plugin-import@2.26.0)(eslint-plugin-n@15.3.0)(eslint-plugin-promise@6.0.1)(eslint@8.24.0)(typescript@5.6.3): resolution: {integrity: sha512-iaaWifImn37Z1OXbNW1es7KI+S7D408F9ys0bpaQf2temeBWlvb0Nc5qHkOgYaRb5QxTZT32GGeN1gtswASOXA==} peerDependencies: '@typescript-eslint/eslint-plugin': ^5.0.0 @@ -3429,14 +3429,14 @@ packages: eslint-plugin-promise: ^6.0.0 typescript: '*' dependencies: - '@typescript-eslint/eslint-plugin': 5.39.0(@typescript-eslint/parser@5.30.0)(eslint@8.24.0)(typescript@4.8.4) - '@typescript-eslint/parser': 5.30.0(eslint@8.24.0)(typescript@4.8.4) + '@typescript-eslint/eslint-plugin': 5.39.0(@typescript-eslint/parser@5.30.0)(eslint@8.24.0)(typescript@5.6.3) + '@typescript-eslint/parser': 5.30.0(eslint@8.24.0)(typescript@5.6.3) eslint: 8.24.0 eslint-config-standard: 17.0.0(eslint-plugin-import@2.26.0)(eslint-plugin-n@15.3.0)(eslint-plugin-promise@6.0.1)(eslint@8.24.0) eslint-plugin-import: 2.26.0(@typescript-eslint/parser@5.30.0)(eslint@8.24.0) eslint-plugin-n: 15.3.0(eslint@8.24.0) eslint-plugin-promise: 6.0.1(eslint@8.24.0) - typescript: 4.8.4 + typescript: 5.6.3 transitivePeerDependencies: - supports-color dev: true @@ -3486,7 +3486,7 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.30.0(eslint@8.24.0)(typescript@4.8.4) + '@typescript-eslint/parser': 5.30.0(eslint@8.24.0)(typescript@5.6.3) debug: 3.2.7(supports-color@5.5.0) eslint: 8.24.0 eslint-import-resolver-node: 0.3.7 @@ -3515,7 +3515,7 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 5.30.0(eslint@8.24.0)(typescript@4.8.4) + '@typescript-eslint/parser': 5.30.0(eslint@8.24.0)(typescript@5.6.3) array-includes: 3.1.6 array.prototype.flat: 1.3.1 debug: 2.6.9 @@ -4029,17 +4029,17 @@ packages: responselike: 3.0.0 dev: true - /gql.tada@1.8.10(graphql@16.9.0)(typescript@4.8.4): + /gql.tada@1.8.10(graphql@16.9.0)(typescript@5.6.3): resolution: {integrity: sha512-FrvSxgz838FYVPgZHGOSgbpOjhR+yq44rCzww3oOPJYi0OvBJjAgCiP6LEokZIYND2fUTXzQAyLgcvgw1yNP5A==} hasBin: true peerDependencies: typescript: ^5.0.0 dependencies: '@0no-co/graphql.web': 1.0.11(graphql@16.9.0) - '@0no-co/graphqlsp': 1.12.16(graphql@16.9.0)(typescript@4.8.4) - '@gql.tada/cli-utils': 1.6.3(@0no-co/graphqlsp@1.12.16)(graphql@16.9.0)(typescript@4.8.4) - '@gql.tada/internal': 1.0.8(graphql@16.9.0)(typescript@4.8.4) - typescript: 4.8.4 + '@0no-co/graphqlsp': 1.12.16(graphql@16.9.0)(typescript@5.6.3) + '@gql.tada/cli-utils': 1.6.3(@0no-co/graphqlsp@1.12.16)(graphql@16.9.0)(typescript@5.6.3) + '@gql.tada/internal': 1.0.8(graphql@16.9.0)(typescript@5.6.3) + typescript: 5.6.3 transitivePeerDependencies: - '@gql.tada/svelte-support' - '@gql.tada/vue-support' @@ -5559,7 +5559,7 @@ packages: resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} dev: false - /ts-node@10.9.1(@types/node@20.2.5)(typescript@4.8.4): + /ts-node@10.9.1(@types/node@20.2.5)(typescript@5.6.3): resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true peerDependencies: @@ -5585,7 +5585,7 @@ packages: create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 4.8.4 + typescript: 5.6.3 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 dev: true @@ -5603,14 +5603,14 @@ packages: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} dev: true - /tsutils@3.21.0(typescript@4.8.4): + /tsutils@3.21.0(typescript@5.6.3): resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} peerDependencies: typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' dependencies: tslib: 1.14.1 - typescript: 4.8.4 + typescript: 5.6.3 dev: true /tweetnacl@1.0.3: @@ -5646,6 +5646,12 @@ packages: resolution: {integrity: sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==} engines: {node: '>=4.2.0'} hasBin: true + dev: true + + /typescript@5.6.3: + resolution: {integrity: sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==} + engines: {node: '>=14.17'} + hasBin: true /ufo@1.1.2: resolution: {integrity: sha512-TrY6DsjTQQgyS3E3dBaOXf0TpPD8u9FVrVYmKVegJuFw51n/YB9XPt+U6ydzFG5ZIN7+DIjPbNmXoBj9esYhgQ==} diff --git a/src/constants/GasToken.ts b/src/constants/GasToken.ts index 17c46ce3..b869211f 100644 --- a/src/constants/GasToken.ts +++ b/src/constants/GasToken.ts @@ -45,7 +45,6 @@ export const nativeGasTokenSymbol: Record> = { [EvmChain.ETHEREUM]: "https://ethereum.publicnode.com", [EvmChain.AURORA]: "https://mainnet.aurora.dev", [EvmChain.BINANCE]: "https://bsc-dataseed.binance.org", - [EvmChain.BNBCHAIN]: "https://bsc-dataseed.binance.org", [EvmChain.ARBITRUM]: "https://arb1.arbitrum.io/rpc", [EvmChain.CELO]: "https://forno.celo.org", [EvmChain.KAVA]: "https://evm.kava.io", @@ -63,10 +62,6 @@ export const networkInfo: Partial> = { chainId: 56, name: EvmChain.BINANCE, }, - [EvmChain.BNBCHAIN]: { - chainId: 56, - name: EvmChain.BNBCHAIN, - }, [EvmChain.ARBITRUM]: { chainId: 42161, name: EvmChain.ARBITRUM, diff --git a/src/libs/TransactionRecoveryApi/constants/chain/testnet.ts b/src/libs/TransactionRecoveryApi/constants/chain/testnet.ts index afd7d8e0..f596163c 100644 --- a/src/libs/TransactionRecoveryApi/constants/chain/testnet.ts +++ b/src/libs/TransactionRecoveryApi/constants/chain/testnet.ts @@ -8,7 +8,6 @@ export const rpcMap: Record = { [EvmChain.AVALANCHE]: "https://api.avax-test.network/ext/bc/C/rpc", [EvmChain.AURORA]: "https://testnet.aurora.dev", [EvmChain.BINANCE]: "https://data-seed-prebsc-1-s1.binance.org:8545", - [EvmChain.BNBCHAIN]: "https://data-seed-prebsc-1-s1.binance.org:8545", [EvmChain.CELO]: "https://alfajores-forno.celo-testnet.org", [EvmChain.KAVA]: "https://evm.testnet.kava.io", "filecoin-2": "https://rpc.ankr.com/filecoin_testnet", @@ -57,10 +56,6 @@ export const networkInfo: Record = { chainId: 97, name: EvmChain.BINANCE, }, - [EvmChain.BNBCHAIN]: { - chainId: 97, - name: EvmChain.BNBCHAIN, - }, [EvmChain.CELO]: { chainId: 44787, name: EvmChain.CELO,