From ec20b610785edbbd721cb56502ae8fd60c11cb3c Mon Sep 17 00:00:00 2001 From: IshaVenikar Date: Thu, 8 Aug 2024 15:37:28 +0530 Subject: [PATCH 1/2] Configure pre-commit linter and fix lint errors --- .eslintrc.json | 17 ++ .husky/pre-commit | 1 + config-overrides.js | 86 +++++------ package.json | 9 ++ src/App.tsx | 6 +- src/components/HDPath.tsx | 2 +- src/context/AccountsContext.tsx | 12 +- src/context/NetworksContext.tsx | 16 +- src/utils/accounts.ts | 16 +- src/utils/key-store.ts | 12 +- .../wallet-connect/wallet-connect-requests.ts | 22 +-- yarn.lock | 146 ++++++++++++++++-- 12 files changed, 250 insertions(+), 95 deletions(-) create mode 100644 .eslintrc.json create mode 100644 .husky/pre-commit diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..98c2686 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,17 @@ +{ + "parser": "@typescript-eslint/parser", + "plugins": ["react"], + "extends": [ + "react-app", + "react-app/jest", + "plugin:react/recommended" + ], + "settings": { + "react": { + "version": "detect" + } + }, + "rules": { + "indent": ["error", 2, { "SwitchCase": 1 }] + } +} diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 0000000..39abe4d --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1 @@ +yarn lint diff --git a/config-overrides.js b/config-overrides.js index d10f3ea..af26d75 100644 --- a/config-overrides.js +++ b/config-overrides.js @@ -2,52 +2,52 @@ const webpack = require('webpack') module.exports = function override(config, env) { - config.module.rules.push({ - test: /\.js$/, - exclude: /node_modules[/\\](?!react-native-vector-icons)/, - use: { - loader: "babel-loader", - options: { - // Disable reading babel configuration - babelrc: false, - configFile: false, + config.module.rules.push({ + test: /\.js$/, + exclude: /node_modules[/\\](?!react-native-vector-icons)/, + use: { + loader: "babel-loader", + options: { + // Disable reading babel configuration + babelrc: false, + configFile: false, - // The configuration for compilation - presets: [ - ["@babel/preset-env", { useBuiltIns: "usage", "corejs": "3" }], - "@babel/preset-react", - "@babel/preset-flow", - "@babel/preset-typescript", - ], - plugins: [ - "@babel/plugin-proposal-class-properties", - "@babel/plugin-proposal-object-rest-spread", - "@babel/plugin-transform-modules-commonjs" - ] - } + // The configuration for compilation + presets: [ + ["@babel/preset-env", { useBuiltIns: "usage", "corejs": "3" }], + "@babel/preset-react", + "@babel/preset-flow", + "@babel/preset-typescript", + ], + plugins: [ + "@babel/plugin-proposal-class-properties", + "@babel/plugin-proposal-object-rest-spread", + "@babel/plugin-transform-modules-commonjs" + ] } - }); - - config.plugins.push( - new webpack.ProvidePlugin({ - Buffer: ["buffer", "Buffer"], - }) - ) - - config.module.rules.push({ - test: /\.(jpg|png|woff|woff2|eot|ttf|svg)$/, - type: 'asset/resource' - }) - - config.resolve.fallback = { - crypto: require.resolve("crypto-browserify"), - stream: require.resolve("stream-browserify"), - http: require.resolve('stream-http'), - https: require.resolve('https-browserify'), - url: false } + }); - config.resolve.alias['react-native$'] = require.resolve('react-native-web'); + config.plugins.push( + new webpack.ProvidePlugin({ + Buffer: ["buffer", "Buffer"], + }) + ) - return config; + config.module.rules.push({ + test: /\.(jpg|png|woff|woff2|eot|ttf|svg)$/, + type: 'asset/resource' + }) + + config.resolve.fallback = { + crypto: require.resolve("crypto-browserify"), + stream: require.resolve("stream-browserify"), + http: require.resolve('stream-http'), + https: require.resolve('https-browserify'), + url: false + } + + config.resolve.alias['react-native$'] = require.resolve('react-native-web'); + + return config; }; diff --git a/package.json b/package.json index 6574ed6..36bb092 100644 --- a/package.json +++ b/package.json @@ -20,12 +20,19 @@ "@react-navigation/stack": "^6.4.1", "@testing-library/jest-dom": "^5.14.1", "@testing-library/react": "^13.0.0", + "@typescript-eslint/eslint-plugin": "^6.13.2", + "@typescript-eslint/parser": "^6.13.2", "@walletconnect/web3wallet": "^1.13.0", "assert": "^2.1.0", "chain-registry": "^1.41.2", "cosmjs-types": "^0.9.0", + "eslint": "^8.3.0", + "eslint-config-react-app": "^7.0.1", + "eslint-plugin-react": "^7.33.2", + "eslint-webpack-plugin": "^3.1.1", "ethers": "5.7.2", "https-browserify": "^1.0.0", + "husky": "^9.0.11", "lodash": "^4.17.21", "react": "^18.3.1", "react-dom": "^18.3.1", @@ -49,6 +56,8 @@ "start": "react-app-rewired start", "build": "react-app-rewired build", "test": "react-app-rewired test", + "lint": "eslint .", + "prepare": "husky", "eject": "react-scripts eject" }, "eslintConfig": { diff --git a/src/App.tsx b/src/App.tsx index f83360a..fb1a4ae 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -5,8 +5,8 @@ import { TxBody, AuthInfo } from 'cosmjs-types/cosmos/tx/v1beta1/tx'; import { SignClientTypes } from '@walletconnect/types'; import { useNavigation } from '@react-navigation/native'; import { -createStackNavigator, -StackNavigationProp, + createStackNavigator, + StackNavigationProp, } from '@react-navigation/stack'; import { getSdkError } from '@walletconnect/utils'; import { Web3WalletTypes } from '@walletconnect/web3wallet'; @@ -254,7 +254,7 @@ const App = (): React.JSX.Element => { headerTitle: () => Bad Request, }} /> - - '/ + {'\'/'} void; currentIndex: number; setCurrentIndex: (index: number) => void; -}>({ - accounts: [], - setAccounts: () => {}, - currentIndex: 0, - setCurrentIndex: () => {}, -}); + }>({ + accounts: [], + setAccounts: () => {}, + currentIndex: 0, + setCurrentIndex: () => {}, + }); const useAccounts = () => { const accountsContext = useContext(AccountsContext); diff --git a/src/context/NetworksContext.tsx b/src/context/NetworksContext.tsx index 7d1dfeb..10c49f5 100644 --- a/src/context/NetworksContext.tsx +++ b/src/context/NetworksContext.tsx @@ -13,14 +13,14 @@ const NetworksContext = createContext<{ setSelectedNetwork: React.Dispatch< React.SetStateAction >; -}>({ - networksData: [], - setNetworksData: () => {}, - networkType: '', - setNetworkType: () => {}, - selectedNetwork: {} as NetworksDataState, - setSelectedNetwork: () => {}, -}); + }>({ + networksData: [], + setNetworksData: () => {}, + networkType: '', + setNetworkType: () => {}, + selectedNetwork: {} as NetworksDataState, + setSelectedNetwork: () => {}, + }); const useNetworks = () => { const networksContext = useContext(NetworksContext); diff --git a/src/utils/accounts.ts b/src/utils/accounts.ts index e844563..b3f6f9e 100644 --- a/src/utils/accounts.ts +++ b/src/utils/accounts.ts @@ -8,10 +8,10 @@ import { utils } from 'ethers'; import { HDNode } from 'ethers/lib/utils'; import { - setInternetCredentials, - resetInternetCredentials, - getInternetCredentials, - } from './key-store'; + setInternetCredentials, + resetInternetCredentials, + getInternetCredentials, +} from './key-store'; import { Secp256k1HdWallet } from '@cosmjs/amino'; import { AccountData } from '@cosmjs/proto-signing'; import { stringToPath } from '@cosmjs/crypto'; @@ -53,7 +53,7 @@ const createWallet = async ( throw new Error('Unsupported namespace'); } -const accountInfo = `${hdPath},${node.privateKey},${node.publicKey},${address}`; + const accountInfo = `${hdPath},${node.privateKey},${node.publicKey},${address}`; await Promise.all([ setInternetCredentials( @@ -197,9 +197,9 @@ const retrieveAccounts = async ( return; } const loadedAccounts = await retrieveAccountsForNetwork( - `${currentNetworkData.namespace}:${currentNetworkData.chainId}`, - accountIndices, - ) + `${currentNetworkData.namespace}:${currentNetworkData.chainId}`, + accountIndices, + ) return loadedAccounts; }; diff --git a/src/utils/key-store.ts b/src/utils/key-store.ts index 534b32e..f71fdff 100644 --- a/src/utils/key-store.ts +++ b/src/utils/key-store.ts @@ -1,17 +1,17 @@ const setInternetCredentials = (name:string, username:string, password:string) => { - localStorage.setItem(name, password); + localStorage.setItem(name, password); }; const getInternetCredentials = (name:string) : string | null => { - return localStorage.getItem(name); + return localStorage.getItem(name); }; const resetInternetCredentials = (name:string) => { - localStorage.removeItem(name); + localStorage.removeItem(name); }; export { - setInternetCredentials, - getInternetCredentials, - resetInternetCredentials + setInternetCredentials, + getInternetCredentials, + resetInternetCredentials } diff --git a/src/utils/wallet-connect/wallet-connect-requests.ts b/src/utils/wallet-connect/wallet-connect-requests.ts index 7b0cb09..a676df2 100644 --- a/src/utils/wallet-connect/wallet-connect-requests.ts +++ b/src/utils/wallet-connect/wallet-connect-requests.ts @@ -97,18 +97,18 @@ export async function approveWalletConnectRequest( const updatedTransaction = options.maxFeePerGas && options.maxPriorityFeePerGas ? { - ...sendTransaction, - gasLimit: options.ethGasLimit, - maxFeePerGas: options.maxFeePerGas, - maxPriorityFeePerGas: options.maxPriorityFeePerGas, - type: 2, - } + ...sendTransaction, + gasLimit: options.ethGasLimit, + maxFeePerGas: options.maxFeePerGas, + maxPriorityFeePerGas: options.maxPriorityFeePerGas, + type: 2, + } : { - ...sendTransaction, - gasLimit: options.ethGasLimit, - gasPrice: options.ethGasPrice, - type: 0, - }; + ...sendTransaction, + gasLimit: options.ethGasLimit, + gasPrice: options.ethGasPrice, + type: 0, + }; const connectedWallet = wallet.connect(options.provider); diff --git a/yarn.lock b/yarn.lock index f03785b..a05bdbc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1746,14 +1746,14 @@ resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.4.0.tgz#5e13fac887f08c44f76b0ccaf3370eb00fec9bb6" integrity sha512-snKqtPW01tN0ui7yu9rGv69aJXr/a/Ywvl11sUjNtEcRc+ng/mQriFL0wLXMef74iHa/EkftbDzU9F8iFbH+zg== -"@eslint-community/eslint-utils@^4.2.0": +"@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": version "4.4.0" resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== dependencies: eslint-visitor-keys "^3.3.0" -"@eslint-community/regexpp@^4.4.0", "@eslint-community/regexpp@^4.6.1": +"@eslint-community/regexpp@^4.4.0", "@eslint-community/regexpp@^4.5.1", "@eslint-community/regexpp@^4.6.1": version "4.11.0" resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.11.0.tgz#b0ffd0312b4a3fd2d6f77237e7248a5ad3a680ae" integrity sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A== @@ -3834,7 +3834,7 @@ expect "^29.0.0" pretty-format "^29.0.0" -"@types/json-schema@*", "@types/json-schema@^7.0.4", "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9": +"@types/json-schema@*", "@types/json-schema@^7.0.12", "@types/json-schema@^7.0.4", "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9": version "7.0.15" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== @@ -3973,7 +3973,7 @@ dependencies: "@types/node" "*" -"@types/semver@^7.3.12": +"@types/semver@^7.3.12", "@types/semver@^7.5.0": version "7.5.8" resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.8.tgz#8268a8c57a3e4abd25c165ecd36237db7948a55e" integrity sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ== @@ -4075,6 +4075,23 @@ semver "^7.3.7" tsutils "^3.21.0" +"@typescript-eslint/eslint-plugin@^6.13.2": + version "6.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz#30830c1ca81fd5f3c2714e524c4303e0194f9cd3" + integrity sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA== + dependencies: + "@eslint-community/regexpp" "^4.5.1" + "@typescript-eslint/scope-manager" "6.21.0" + "@typescript-eslint/type-utils" "6.21.0" + "@typescript-eslint/utils" "6.21.0" + "@typescript-eslint/visitor-keys" "6.21.0" + debug "^4.3.4" + graphemer "^1.4.0" + ignore "^5.2.4" + natural-compare "^1.4.0" + semver "^7.5.4" + ts-api-utils "^1.0.1" + "@typescript-eslint/experimental-utils@^5.0.0": version "5.62.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-5.62.0.tgz#14559bf73383a308026b427a4a6129bae2146741" @@ -4092,6 +4109,17 @@ "@typescript-eslint/typescript-estree" "5.62.0" debug "^4.3.4" +"@typescript-eslint/parser@^6.13.2": + version "6.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.21.0.tgz#af8fcf66feee2edc86bc5d1cf45e33b0630bf35b" + integrity sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ== + dependencies: + "@typescript-eslint/scope-manager" "6.21.0" + "@typescript-eslint/types" "6.21.0" + "@typescript-eslint/typescript-estree" "6.21.0" + "@typescript-eslint/visitor-keys" "6.21.0" + debug "^4.3.4" + "@typescript-eslint/scope-manager@5.62.0": version "5.62.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz#d9457ccc6a0b8d6b37d0eb252a23022478c5460c" @@ -4100,6 +4128,14 @@ "@typescript-eslint/types" "5.62.0" "@typescript-eslint/visitor-keys" "5.62.0" +"@typescript-eslint/scope-manager@6.21.0": + version "6.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz#ea8a9bfc8f1504a6ac5d59a6df308d3a0630a2b1" + integrity sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg== + dependencies: + "@typescript-eslint/types" "6.21.0" + "@typescript-eslint/visitor-keys" "6.21.0" + "@typescript-eslint/type-utils@5.62.0": version "5.62.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz#286f0389c41681376cdad96b309cedd17d70346a" @@ -4110,11 +4146,26 @@ debug "^4.3.4" tsutils "^3.21.0" +"@typescript-eslint/type-utils@6.21.0": + version "6.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.21.0.tgz#6473281cfed4dacabe8004e8521cee0bd9d4c01e" + integrity sha512-rZQI7wHfao8qMX3Rd3xqeYSMCL3SoiSQLBATSiVKARdFGCYSRvmViieZjqc58jKgs8Y8i9YvVVhRbHSTA4VBag== + dependencies: + "@typescript-eslint/typescript-estree" "6.21.0" + "@typescript-eslint/utils" "6.21.0" + debug "^4.3.4" + ts-api-utils "^1.0.1" + "@typescript-eslint/types@5.62.0": version "5.62.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.62.0.tgz#258607e60effa309f067608931c3df6fed41fd2f" integrity sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ== +"@typescript-eslint/types@6.21.0": + version "6.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.21.0.tgz#205724c5123a8fef7ecd195075fa6e85bac3436d" + integrity sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg== + "@typescript-eslint/typescript-estree@5.62.0": version "5.62.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz#7d17794b77fabcac615d6a48fb143330d962eb9b" @@ -4128,6 +4179,20 @@ semver "^7.3.7" tsutils "^3.21.0" +"@typescript-eslint/typescript-estree@6.21.0": + version "6.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz#c47ae7901db3b8bddc3ecd73daff2d0895688c46" + integrity sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ== + dependencies: + "@typescript-eslint/types" "6.21.0" + "@typescript-eslint/visitor-keys" "6.21.0" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + minimatch "9.0.3" + semver "^7.5.4" + ts-api-utils "^1.0.1" + "@typescript-eslint/utils@5.62.0", "@typescript-eslint/utils@^5.58.0": version "5.62.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.62.0.tgz#141e809c71636e4a75daa39faed2fb5f4b10df86" @@ -4142,6 +4207,19 @@ eslint-scope "^5.1.1" semver "^7.3.7" +"@typescript-eslint/utils@6.21.0": + version "6.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.21.0.tgz#4714e7a6b39e773c1c8e97ec587f520840cd8134" + integrity sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ== + dependencies: + "@eslint-community/eslint-utils" "^4.4.0" + "@types/json-schema" "^7.0.12" + "@types/semver" "^7.5.0" + "@typescript-eslint/scope-manager" "6.21.0" + "@typescript-eslint/types" "6.21.0" + "@typescript-eslint/typescript-estree" "6.21.0" + semver "^7.5.4" + "@typescript-eslint/visitor-keys@5.62.0": version "5.62.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz#2174011917ce582875954ffe2f6912d5931e353e" @@ -4150,6 +4228,14 @@ "@typescript-eslint/types" "5.62.0" eslint-visitor-keys "^3.3.0" +"@typescript-eslint/visitor-keys@6.21.0": + version "6.21.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz#87a99d077aa507e20e238b11d56cc26ade45fe47" + integrity sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A== + dependencies: + "@typescript-eslint/types" "6.21.0" + eslint-visitor-keys "^3.4.1" + "@ungap/structured-clone@^1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406" @@ -7101,7 +7187,7 @@ eslint-plugin-react-hooks@^4.3.0: resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.2.tgz#c829eb06c0e6f484b3fbb85a97e57784f328c596" integrity sha512-QzliNJq4GinDBcD8gPB5v0wh6g8q3SUi6EFF0x8N/BL9PoVs0atuGc47ozMRyOWAKdwaZ5OnbOEa3WR+dSGKuQ== -eslint-plugin-react@^7.27.1: +eslint-plugin-react@^7.27.1, eslint-plugin-react@^7.33.2: version "7.35.0" resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.35.0.tgz#00b1e4559896710e58af6358898f2ff917ea4c41" integrity sha512-v501SSMOWv8gerHkk+IIQBkcGRGrO2nfybfj5pLxuJNFTPxxA3PSryhXTK+9pNbtkggheDdsC0E9Q8CuPk6JKA== @@ -8323,6 +8409,11 @@ human-signals@^5.0.0: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-5.0.0.tgz#42665a284f9ae0dade3ba41ebc37eb4b852f3a28" integrity sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ== +husky@^9.0.11: + version "9.1.4" + resolved "https://registry.yarnpkg.com/husky/-/husky-9.1.4.tgz#926fd19c18d345add5eab0a42b2b6d9a80259b34" + integrity sha512-bho94YyReb4JV7LYWRWxZ/xr6TtOTt8cMfmQ39MQYJ7f/YE268s3GdghGwi+y4zAeqewE5zYLvuhV0M0ijsDEA== + hyphenate-style-name@^1.0.3: version "1.1.0" resolved "https://registry.yarnpkg.com/hyphenate-style-name/-/hyphenate-style-name-1.1.0.tgz#1797bf50369588b47b72ca6d5e65374607cf4436" @@ -8369,7 +8460,7 @@ ieee754@^1.1.13, ieee754@^1.2.1: resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== -ignore@^5.2.0: +ignore@^5.2.0, ignore@^5.2.4: version "5.3.1" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef" integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw== @@ -10374,6 +10465,13 @@ minimalistic-crypto-utils@^1.0.1: resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" integrity sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg== +minimatch@9.0.3: + version "9.0.3" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.3.tgz#a6e00c3de44c3a542bfaae70abfc22420a6da825" + integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg== + dependencies: + brace-expansion "^2.0.1" + minimatch@^3.0.2, minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" @@ -13127,7 +13225,16 @@ string-natural-compare@^3.0.1: resolved "https://registry.yarnpkg.com/string-natural-compare/-/string-natural-compare-3.0.1.tgz#7a42d58474454963759e8e8b7ae63d71c1e7fdf4" integrity sha512-n3sPwynL1nwKi3WJ6AIsClwBMa0zTi54fn2oLU6ndfTSIO05xaznjSf15PcBZU6FNWbmN5Q6cxT4V5hGvB4taw== -"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0": + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -13230,7 +13337,7 @@ stringify-object@^3.3.0: is-obj "^1.0.1" is-regexp "^1.0.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -13244,6 +13351,13 @@ strip-ansi@^5.0.0, strip-ansi@^5.2.0: dependencies: ansi-regex "^4.1.0" +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + strip-ansi@^7.0.1: version "7.1.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" @@ -13646,6 +13760,11 @@ tryer@^1.0.1: resolved "https://registry.yarnpkg.com/tryer/-/tryer-1.0.1.tgz#f2c85406800b9b0f74c9f7465b81eaad241252f8" integrity sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA== +ts-api-utils@^1.0.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.3.0.tgz#4b490e27129f1e8e686b45cc4ab63714dc60eea1" + integrity sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ== + ts-interface-checker@^0.1.9: version "0.1.13" resolved "https://registry.yarnpkg.com/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz#784fd3d679722bc103b1b4b8030bcddb5db2a699" @@ -14535,7 +14654,7 @@ workbox-window@6.6.1: "@types/trusted-types" "^2.0.2" workbox-core "6.6.1" -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -14553,6 +14672,15 @@ wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" -- 2.45.2 From 1c90a0241c54a1d49d619f2d665181d157da1787 Mon Sep 17 00:00:00 2001 From: Nabarun Date: Thu, 8 Aug 2024 16:04:32 +0530 Subject: [PATCH 2/2] Add loader in index html --- package.json | 14 +++++++------- public/index.html | 42 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 48 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 36bb092..91e19c9 100644 --- a/package.json +++ b/package.json @@ -20,19 +20,12 @@ "@react-navigation/stack": "^6.4.1", "@testing-library/jest-dom": "^5.14.1", "@testing-library/react": "^13.0.0", - "@typescript-eslint/eslint-plugin": "^6.13.2", - "@typescript-eslint/parser": "^6.13.2", "@walletconnect/web3wallet": "^1.13.0", "assert": "^2.1.0", "chain-registry": "^1.41.2", "cosmjs-types": "^0.9.0", - "eslint": "^8.3.0", - "eslint-config-react-app": "^7.0.1", - "eslint-plugin-react": "^7.33.2", - "eslint-webpack-plugin": "^3.1.1", "ethers": "5.7.2", "https-browserify": "^1.0.0", - "husky": "^9.0.11", "lodash": "^4.17.21", "react": "^18.3.1", "react-dom": "^18.3.1", @@ -84,7 +77,14 @@ "@types/node": "^16.7.13", "@types/react": "^18.0.0", "@types/react-dom": "^18.0.0", + "@typescript-eslint/eslint-plugin": "^6.13.2", + "@typescript-eslint/parser": "^6.13.2", "crypto-browserify": "^3.12.0", + "eslint": "^8.3.0", + "eslint-config-react-app": "^7.0.1", + "eslint-plugin-react": "^7.33.2", + "eslint-webpack-plugin": "^3.1.1", + "husky": "^9.0.11", "react-app-rewired": "^2.2.1", "stream-browserify": "^3.0.0" } diff --git a/public/index.html b/public/index.html index 1a6d95a..1e28cec 100644 --- a/public/index.html +++ b/public/index.html @@ -25,10 +25,50 @@ Learn how to configure a non-root public URL by running `npm run build`. --> Laconic Wallet + -
+
+
+
+
+