From dc13dffa33397dfa01e28acbebac07f2f4be21d6 Mon Sep 17 00:00:00 2001 From: Gavrila Andrei Date: Thu, 28 Sep 2023 18:50:19 +0300 Subject: [PATCH] Next template dapp (#125) --- .gitignore | 2 + .swcrc | 31 + README.md | 26 +- config-overrides.js | 12 - public/index.html => index.html | 37 +- jest.config.js | 43 + package.json | 95 +- postcss.config.js | 6 + public/multiversx-white.png | Bin 0 -> 21825 bytes src/App.test.tsx | 8 - src/App.tsx | 95 +- src/assets/img/multiversx-logo.svg | 12 + src/assets/img/multiversx-symbol.svg | 3 - src/assets/img/multiversx.svg | 13 - src/assets/sass/theme.scss | 264 - src/components/AuthRedirectWrapper.tsx | 14 - src/components/Button/Button.tsx | 36 + src/components/Button/index.ts | 1 + src/components/Card/Card.tsx | 34 + src/components/Card/index.ts | 1 + .../ContractAddress/ContractAddress.tsx | 17 + src/components/ContractAddress/index.ts | 1 + src/components/Label/Label.tsx | 5 + src/components/Label/index.ts | 1 + src/components/Layout/Footer/Footer.tsx | 25 + src/components/Layout/Footer/index.ts | 1 + src/components/Layout/Footer/index.tsx | 20 - src/components/Layout/Header/Header.tsx | 47 + src/components/Layout/Header/index.ts | 1 + src/components/Layout/Layout.tsx | 19 +- src/components/Layout/Navbar/index.tsx | 63 - src/components/Layout/{index.tsx => index.ts} | 0 .../MissingNativeAuthError.tsx | 19 + .../MissingNativeAuthError/index.ts | 1 + src/components/MxLink/MxLink.tsx | 19 + src/components/MxLink/index.ts | 1 + .../OutputContainer/OutputContainer.tsx | 26 + .../components/PingPongOutput.tsx | 34 + .../components/TransactionOutput.tsx | 63 + .../components/TransactionsOutput.tsx | 21 + .../OutputContainer/components/index.ts | 2 + src/components/OutputContainer/index.ts | 2 + .../TransactionsTracker.ts | 36 + src/components/TransactionsTracker/index.ts | 1 + src/components/index.ts | 10 + src/components/index.tsx | 4 - ...appComponents.tsx => sdkDappComponents.ts} | 3 + src/config.tsx | 15 - src/config/config.devnet.ts | 9 + src/config/config.mainnet.ts | 8 + src/config/config.testnet.ts | 8 + src/config/sharedConfig.ts | 5 + src/{ => contracts}/ping-pong.abi.json | 0 src/helpers/index.ts | 1 + src/helpers/pingPong/getCountdownSeconds.ts | 26 + src/helpers/pingPong/index.ts | 2 + src/helpers/pingPong/setTimeRemaining.ts | 25 + src/helpers/sdkDappHelpers.ts | 2 + src/hooks/index.ts | 2 + src/hooks/sdkDappHooks.ts | 8 + src/hooks/transactions/index.ts | 1 + .../useSendPingPongTransaction.ts | 184 + .../PageTitle.tsx => hooks/withPageTitle.tsx} | 5 +- src/index.css | 14 - src/index.tsx | 4 +- src/localConstants/index.ts | 4 + src/localConstants/routes/index.ts | 1 + src/localConstants/routes/routeNames.enums.ts | 6 + src/localConstants/sdkDapConstants.ts | 1 + src/localConstants/session/index.ts | 1 + src/localConstants/session/session.enums.ts | 8 + src/localConstants/signMessage/index.ts | 1 + .../signMessage/signMessage.enums.ts | 3 + src/pages/Dashboard/Dashboard.tsx | 194 +- .../Dashboard/components/Actions/Actions.tsx | 178 - .../Dashboard/components/Actions/index.tsx | 1 - .../Dashboard/components/DashboardLayout.tsx | 26 - src/pages/Dashboard/components/TopInfo.tsx | 26 - src/pages/Dashboard/components/index.tsx | 1 - src/pages/Dashboard/dashboard.module.scss | 3 - src/pages/Dashboard/{index.tsx => index.ts} | 0 .../Dashboard/widgets/Account/Account.tsx | 35 + .../widgets/Account/components/Username.tsx | 20 + .../widgets/Account/components/index.ts | 1 + src/pages/Dashboard/widgets/Account/index.ts | 1 + .../BatchTransactions/BatchTransactions.tsx | 166 + .../helpers/getBatchTransactions.ts | 23 + .../helpers/getSwapAndLockTransactions.ts | 43 + .../BatchTransactions/helpers/index.ts | 2 + .../widgets/BatchTransactions/hooks/index.ts | 1 + .../hooks/useSendSignedTransactions.ts | 127 + .../widgets/BatchTransactions/index.ts | 1 + .../widgets/BatchTransactions/types/index.ts | 1 + .../types/transactions.types.ts | 12 + .../widgets/NativeAuth/NativeAuth.tsx | 61 + .../widgets/NativeAuth/hooks/index.ts | 1 + .../widgets/NativeAuth/hooks/useGetProfile.ts | 35 + .../Dashboard/widgets/NativeAuth/index.ts | 1 + .../widgets/PingPongAbi/PingPongAbi.tsx | 121 + .../PingPongAbi/hooks}/index.ts | 0 .../PingPongAbi/hooks}/useGetPingAmount.ts | 5 +- .../PingPongAbi/hooks}/useGetTimeToPong.ts | 15 +- .../Dashboard/widgets/PingPongAbi/index.ts | 1 + .../widgets/PingPongRaw/PingPongRaw.tsx | 115 + .../widgets/PingPongRaw/hooks/index.ts | 2 + .../hooks/tests/useGetTimeToPong.test.ts | 64 + .../PingPongRaw/hooks/useGetPingAmount.ts | 42 + .../PingPongRaw/hooks/useGetTimeToPong.ts | 45 + .../Dashboard/widgets/PingPongRaw/index.ts | 1 + .../widgets/PingPongRaw/types/index.ts | 1 + .../PingPongRaw/types/pingPong.types.ts | 29 + .../PingPongService/PingPongService.tsx | 146 + .../widgets/PingPongService/hooks/index.ts | 3 + .../hooks/tests/useGetPingTransaction.test.ts | 37 + .../hooks/tests/useGetPongTransaction.test.ts | 37 + .../hooks/tests/useGetTimeToPong.test.ts | 41 + .../hooks/useGetPingTransaction.ts | 22 + .../hooks/useGetPongTransaction.ts | 22 + .../PingPongService/hooks/useGetTimeToPong.ts | 23 + .../widgets/PingPongService/index.ts | 1 + .../widgets/PingPongService/types/index.ts | 1 + .../PingPongService/types/pingPong.types.ts | 4 + .../widgets/SignMessage/SignMessage.tsx | 97 + .../SignMessage/components/SignFailure.tsx | 14 + .../SignMessage/components/SignSuccess.tsx | 56 + .../widgets/SignMessage/components/index.ts} | 1 - .../SignMessage/helpers/decodeMessage.ts | 33 + .../widgets/SignMessage/helpers/index.ts | 1 + .../helpers/tests/decodeMessage.test.ts | 22 + .../widgets/SignMessage/index.ts} | 1 - .../widgets/Transactions/Transactions.tsx | 65 + .../widgets/Transactions/hooks/index.ts | 1 + .../Transactions/hooks/useGetTransactions.ts | 43 + .../Dashboard/widgets/Transactions/index.ts | 1 + .../widgets/Transactions/types/index.ts | 1 + .../Transactions/types/transactions.types.ts | 3 + src/pages/Dashboard/widgets/index.ts | 8 + src/pages/Disclaimer/Disclaimer.tsx | 26 + src/pages/Disclaimer/index.ts | 1 + src/pages/Home.tsx | 42 - src/pages/Home/Home.tsx | 27 + src/pages/Home/Transaction/Transaction.tsx | 40 + .../Transaction/helpers/getTransactionUrl.ts | 29 + src/pages/Home/Transaction/helpers/index.ts | 2 + .../helpers/useTransactionOutcome.ts | 20 + src/pages/Home/Transaction/index.ts | 1 + src/pages/Home/index.ts | 1 + src/pages/PageNotFound.tsx | 29 - src/pages/PageNotFound/PageNotFound.tsx | 16 + src/pages/PageNotFound/index.ts | 1 + src/pages/SignMessage/SignMessage.tsx | 75 - .../SignMessage/components/SignFailure.tsx | 37 - .../components/SignMessageWrapper.tsx | 19 - .../SignMessage/components/SignSuccess.tsx | 57 - src/pages/Statistics/Statistics.tsx | 82 - .../components/StatisticsLayout.tsx | 37 - src/pages/Statistics/components/index.tsx | 1 - src/pages/Statistics/index.tsx | 1 - src/pages/Unlock.tsx | 61 - src/pages/Unlock/Unlock.tsx | 67 + src/pages/Unlock/index.ts | 1 + src/pages/{index.tsx => index.ts} | 3 +- src/routes.ts | 58 - src/routes/index.ts | 1 + src/routes/routes.ts | 25 + src/services/index.ts | 1 + src/services/sdkDappServices.ts | 9 + src/setupTests.ts | 12 +- src/styles/globals.css | 25 + src/types/sdkCoreTypes.ts | 1 + src/types/sdkDappTypes.ts | 2 + src/utils/getChainId.ts | 6 + src/utils/index.ts | 2 + src/utils/sdkDappCore.ts | 8 + src/utils/sdkDappUtils.ts | 4 + .../helpers => utils}/smartContract.ts | 4 +- .../AuthRedirectWrapper.tsx | 25 + src/wrappers/AuthRedirectWrapper/index.ts | 1 + .../BatchTransactionsContextProvider.tsx | 41 + .../BatchTransactionsContextProvider/index.ts | 1 + src/wrappers/PageWrapper/PageWrapper.tsx | 9 + src/wrappers/PageWrapper/index.ts | 1 + src/wrappers/index.ts | 3 + tailwind.config.js | 16 + tsconfig.json | 14 +- vite-env.d.ts | 1 + vite.config.ts | 40 + workflows/deploy-integration.yml | 44 + workflows/deploy.yml | 44 + workflows/pre-merge-e2e-tests.yml | 25 + yarn.lock | 8339 ++++++----------- 191 files changed, 5950 insertions(+), 7092 deletions(-) create mode 100644 .swcrc delete mode 100644 config-overrides.js rename public/index.html => index.html (81%) create mode 100644 jest.config.js create mode 100644 postcss.config.js create mode 100644 public/multiversx-white.png delete mode 100644 src/App.test.tsx create mode 100644 src/assets/img/multiversx-logo.svg delete mode 100644 src/assets/img/multiversx-symbol.svg delete mode 100644 src/assets/img/multiversx.svg delete mode 100644 src/assets/sass/theme.scss delete mode 100644 src/components/AuthRedirectWrapper.tsx create mode 100644 src/components/Button/Button.tsx create mode 100644 src/components/Button/index.ts create mode 100644 src/components/Card/Card.tsx create mode 100644 src/components/Card/index.ts create mode 100644 src/components/ContractAddress/ContractAddress.tsx create mode 100644 src/components/ContractAddress/index.ts create mode 100644 src/components/Label/Label.tsx create mode 100644 src/components/Label/index.ts create mode 100644 src/components/Layout/Footer/Footer.tsx create mode 100644 src/components/Layout/Footer/index.ts delete mode 100644 src/components/Layout/Footer/index.tsx create mode 100644 src/components/Layout/Header/Header.tsx create mode 100644 src/components/Layout/Header/index.ts delete mode 100644 src/components/Layout/Navbar/index.tsx rename src/components/Layout/{index.tsx => index.ts} (100%) create mode 100644 src/components/MissingNativeAuthError/MissingNativeAuthError.tsx create mode 100644 src/components/MissingNativeAuthError/index.ts create mode 100644 src/components/MxLink/MxLink.tsx create mode 100644 src/components/MxLink/index.ts create mode 100644 src/components/OutputContainer/OutputContainer.tsx create mode 100644 src/components/OutputContainer/components/PingPongOutput.tsx create mode 100644 src/components/OutputContainer/components/TransactionOutput.tsx create mode 100644 src/components/OutputContainer/components/TransactionsOutput.tsx create mode 100644 src/components/OutputContainer/components/index.ts create mode 100644 src/components/OutputContainer/index.ts create mode 100644 src/components/TransactionsTracker/TransactionsTracker.ts create mode 100644 src/components/TransactionsTracker/index.ts create mode 100644 src/components/index.ts delete mode 100644 src/components/index.tsx rename src/components/{sdkDappComponents.tsx => sdkDappComponents.ts} (87%) delete mode 100644 src/config.tsx create mode 100644 src/config/config.devnet.ts create mode 100644 src/config/config.mainnet.ts create mode 100644 src/config/config.testnet.ts create mode 100644 src/config/sharedConfig.ts rename src/{ => contracts}/ping-pong.abi.json (100%) create mode 100644 src/helpers/pingPong/getCountdownSeconds.ts create mode 100644 src/helpers/pingPong/index.ts create mode 100644 src/helpers/pingPong/setTimeRemaining.ts create mode 100644 src/hooks/transactions/index.ts create mode 100644 src/hooks/transactions/useSendPingPongTransaction.ts rename src/{components/PageTitle.tsx => hooks/withPageTitle.tsx} (53%) delete mode 100644 src/index.css create mode 100644 src/localConstants/index.ts create mode 100644 src/localConstants/routes/index.ts create mode 100644 src/localConstants/routes/routeNames.enums.ts create mode 100644 src/localConstants/sdkDapConstants.ts create mode 100644 src/localConstants/session/index.ts create mode 100644 src/localConstants/session/session.enums.ts create mode 100644 src/localConstants/signMessage/index.ts create mode 100644 src/localConstants/signMessage/signMessage.enums.ts delete mode 100644 src/pages/Dashboard/components/Actions/Actions.tsx delete mode 100644 src/pages/Dashboard/components/Actions/index.tsx delete mode 100644 src/pages/Dashboard/components/DashboardLayout.tsx delete mode 100644 src/pages/Dashboard/components/TopInfo.tsx delete mode 100644 src/pages/Dashboard/components/index.tsx delete mode 100644 src/pages/Dashboard/dashboard.module.scss rename src/pages/Dashboard/{index.tsx => index.ts} (100%) create mode 100644 src/pages/Dashboard/widgets/Account/Account.tsx create mode 100644 src/pages/Dashboard/widgets/Account/components/Username.tsx create mode 100644 src/pages/Dashboard/widgets/Account/components/index.ts create mode 100644 src/pages/Dashboard/widgets/Account/index.ts create mode 100644 src/pages/Dashboard/widgets/BatchTransactions/BatchTransactions.tsx create mode 100644 src/pages/Dashboard/widgets/BatchTransactions/helpers/getBatchTransactions.ts create mode 100644 src/pages/Dashboard/widgets/BatchTransactions/helpers/getSwapAndLockTransactions.ts create mode 100644 src/pages/Dashboard/widgets/BatchTransactions/helpers/index.ts create mode 100644 src/pages/Dashboard/widgets/BatchTransactions/hooks/index.ts create mode 100644 src/pages/Dashboard/widgets/BatchTransactions/hooks/useSendSignedTransactions.ts create mode 100644 src/pages/Dashboard/widgets/BatchTransactions/index.ts create mode 100644 src/pages/Dashboard/widgets/BatchTransactions/types/index.ts create mode 100644 src/pages/Dashboard/widgets/BatchTransactions/types/transactions.types.ts create mode 100644 src/pages/Dashboard/widgets/NativeAuth/NativeAuth.tsx create mode 100644 src/pages/Dashboard/widgets/NativeAuth/hooks/index.ts create mode 100644 src/pages/Dashboard/widgets/NativeAuth/hooks/useGetProfile.ts create mode 100644 src/pages/Dashboard/widgets/NativeAuth/index.ts create mode 100644 src/pages/Dashboard/widgets/PingPongAbi/PingPongAbi.tsx rename src/pages/Dashboard/{components/Actions/helpers => widgets/PingPongAbi/hooks}/index.ts (100%) rename src/pages/Dashboard/{components/Actions/helpers => widgets/PingPongAbi/hooks}/useGetPingAmount.ts (83%) rename src/pages/Dashboard/{components/Actions/helpers => widgets/PingPongAbi/hooks}/useGetTimeToPong.ts (86%) create mode 100644 src/pages/Dashboard/widgets/PingPongAbi/index.ts create mode 100644 src/pages/Dashboard/widgets/PingPongRaw/PingPongRaw.tsx create mode 100644 src/pages/Dashboard/widgets/PingPongRaw/hooks/index.ts create mode 100644 src/pages/Dashboard/widgets/PingPongRaw/hooks/tests/useGetTimeToPong.test.ts create mode 100644 src/pages/Dashboard/widgets/PingPongRaw/hooks/useGetPingAmount.ts create mode 100644 src/pages/Dashboard/widgets/PingPongRaw/hooks/useGetTimeToPong.ts create mode 100644 src/pages/Dashboard/widgets/PingPongRaw/index.ts create mode 100644 src/pages/Dashboard/widgets/PingPongRaw/types/index.ts create mode 100644 src/pages/Dashboard/widgets/PingPongRaw/types/pingPong.types.ts create mode 100644 src/pages/Dashboard/widgets/PingPongService/PingPongService.tsx create mode 100644 src/pages/Dashboard/widgets/PingPongService/hooks/index.ts create mode 100644 src/pages/Dashboard/widgets/PingPongService/hooks/tests/useGetPingTransaction.test.ts create mode 100644 src/pages/Dashboard/widgets/PingPongService/hooks/tests/useGetPongTransaction.test.ts create mode 100644 src/pages/Dashboard/widgets/PingPongService/hooks/tests/useGetTimeToPong.test.ts create mode 100644 src/pages/Dashboard/widgets/PingPongService/hooks/useGetPingTransaction.ts create mode 100644 src/pages/Dashboard/widgets/PingPongService/hooks/useGetPongTransaction.ts create mode 100644 src/pages/Dashboard/widgets/PingPongService/hooks/useGetTimeToPong.ts create mode 100644 src/pages/Dashboard/widgets/PingPongService/index.ts create mode 100644 src/pages/Dashboard/widgets/PingPongService/types/index.ts create mode 100644 src/pages/Dashboard/widgets/PingPongService/types/pingPong.types.ts create mode 100644 src/pages/Dashboard/widgets/SignMessage/SignMessage.tsx create mode 100644 src/pages/Dashboard/widgets/SignMessage/components/SignFailure.tsx create mode 100644 src/pages/Dashboard/widgets/SignMessage/components/SignSuccess.tsx rename src/pages/{SignMessage/components/index.tsx => Dashboard/widgets/SignMessage/components/index.ts} (62%) create mode 100644 src/pages/Dashboard/widgets/SignMessage/helpers/decodeMessage.ts create mode 100644 src/pages/Dashboard/widgets/SignMessage/helpers/index.ts create mode 100644 src/pages/Dashboard/widgets/SignMessage/helpers/tests/decodeMessage.test.ts rename src/pages/{SignMessage/index.tsx => Dashboard/widgets/SignMessage/index.ts} (50%) create mode 100644 src/pages/Dashboard/widgets/Transactions/Transactions.tsx create mode 100644 src/pages/Dashboard/widgets/Transactions/hooks/index.ts create mode 100644 src/pages/Dashboard/widgets/Transactions/hooks/useGetTransactions.ts create mode 100644 src/pages/Dashboard/widgets/Transactions/index.ts create mode 100644 src/pages/Dashboard/widgets/Transactions/types/index.ts create mode 100644 src/pages/Dashboard/widgets/Transactions/types/transactions.types.ts create mode 100644 src/pages/Dashboard/widgets/index.ts create mode 100644 src/pages/Disclaimer/Disclaimer.tsx create mode 100644 src/pages/Disclaimer/index.ts delete mode 100644 src/pages/Home.tsx create mode 100644 src/pages/Home/Home.tsx create mode 100644 src/pages/Home/Transaction/Transaction.tsx create mode 100644 src/pages/Home/Transaction/helpers/getTransactionUrl.ts create mode 100644 src/pages/Home/Transaction/helpers/index.ts create mode 100644 src/pages/Home/Transaction/helpers/useTransactionOutcome.ts create mode 100644 src/pages/Home/Transaction/index.ts create mode 100644 src/pages/Home/index.ts delete mode 100644 src/pages/PageNotFound.tsx create mode 100644 src/pages/PageNotFound/PageNotFound.tsx create mode 100644 src/pages/PageNotFound/index.ts delete mode 100644 src/pages/SignMessage/SignMessage.tsx delete mode 100644 src/pages/SignMessage/components/SignFailure.tsx delete mode 100644 src/pages/SignMessage/components/SignMessageWrapper.tsx delete mode 100644 src/pages/SignMessage/components/SignSuccess.tsx delete mode 100644 src/pages/Statistics/Statistics.tsx delete mode 100644 src/pages/Statistics/components/StatisticsLayout.tsx delete mode 100644 src/pages/Statistics/components/index.tsx delete mode 100644 src/pages/Statistics/index.tsx delete mode 100644 src/pages/Unlock.tsx create mode 100644 src/pages/Unlock/Unlock.tsx create mode 100644 src/pages/Unlock/index.ts rename src/pages/{index.tsx => index.ts} (64%) delete mode 100644 src/routes.ts create mode 100644 src/routes/index.ts create mode 100644 src/routes/routes.ts create mode 100644 src/services/index.ts create mode 100644 src/services/sdkDappServices.ts create mode 100644 src/styles/globals.css create mode 100644 src/types/sdkCoreTypes.ts create mode 100644 src/utils/getChainId.ts create mode 100644 src/utils/index.ts create mode 100644 src/utils/sdkDappCore.ts create mode 100644 src/utils/sdkDappUtils.ts rename src/{pages/Dashboard/components/Actions/helpers => utils}/smartContract.ts (60%) create mode 100644 src/wrappers/AuthRedirectWrapper/AuthRedirectWrapper.tsx create mode 100644 src/wrappers/AuthRedirectWrapper/index.ts create mode 100644 src/wrappers/BatchTransactionsContextProvider/BatchTransactionsContextProvider.tsx create mode 100644 src/wrappers/BatchTransactionsContextProvider/index.ts create mode 100644 src/wrappers/PageWrapper/PageWrapper.tsx create mode 100644 src/wrappers/PageWrapper/index.ts create mode 100644 src/wrappers/index.ts create mode 100644 tailwind.config.js create mode 100644 vite-env.d.ts create mode 100644 vite.config.ts create mode 100644 workflows/deploy-integration.yml create mode 100644 workflows/deploy.yml create mode 100644 workflows/pre-merge-e2e-tests.yml diff --git a/.gitignore b/.gitignore index cf01bc35..f6249c0d 100644 --- a/.gitignore +++ b/.gitignore @@ -14,12 +14,14 @@ videos /build # misc +/src/config/index.ts .DS_Store .idea .env.local .env.development.local .env.test.local .env.production.local +.vscode npm-debug.log* yarn-debug.log* diff --git a/.swcrc b/.swcrc new file mode 100644 index 00000000..30025bf1 --- /dev/null +++ b/.swcrc @@ -0,0 +1,31 @@ +{ + "jsc": { + "target": "es2017", + "parser": { + "syntax": "typescript", + "tsx": true, + "decorators": false, + "dynamicImport": false + }, + "transform": { + "react": { + "pragma": "React.createElement", + "pragmaFrag": "React.Fragment", + "throwIfNamespace": true, + "development": false, + "useBuiltins": false, + "runtime": "automatic" + }, + "hidden": { + "jest": true + } + } + }, + "module": { + "type": "commonjs", + "strict": false, + "strictMode": true, + "lazy": false, + "noInterop": false + } +} diff --git a/README.md b/README.md index a985cc20..ae7201e7 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,8 @@ See [Dapp template](https://template-dapp.multiversx.com/) for live demo. ## Requirements -- Node.js version 12.16.2+ -- Npm version 6.14.4+ +- Node.js version 16.20.0+ +- Npm version 8.19.4+ ## Getting Started @@ -24,35 +24,31 @@ From a terminal, navigate to the project folder and run: yarn install ``` -### Step 2. Update environment - -Go to `App.tsx` and edit the `environment` variable according to the environment you want the app to run on. -Valid values are `testnet`, `devnet` or `mainnet` - -If you need to edit the network configuration, you can pass in a `customNetworkConfig` object. -More info about this can be found in [sdk-dapp documentation](https://github.com/multiversx/sdk-dapp) - -### Step 3. Running in development mode +### Step 2. Running in development mode In the project folder run: ```bash -yarn start +yarn start-devnet - DEVNET environment +yarn start-testnet - TESTNET environmnet +yarn start-mainnet - MAINNET environmnet ``` -This will start the React app in development mode, using the configs found in the `config.tsx` file. +This will start the React app in development mode, using the configs found in the `vite.config.ts` file. Open [http://localhost:3000](http://localhost:3000) to view it in the browser. The page will reload if you make edits.\ You will also see any lint errors in the console. -### Step 4. Build for testing and production use +### Step 3. Build for testing and production use A build of the app is necessary to deploy for testing purposes or for production use. To build the project run: ```bash -yarn build +yarn build-devnet +yarn build-testnet +yarn build-mainnet ``` ## Roadmap diff --git a/config-overrides.js b/config-overrides.js deleted file mode 100644 index 1d5c1a80..00000000 --- a/config-overrides.js +++ /dev/null @@ -1,12 +0,0 @@ -module.exports = function override(config) { - console.log('override'); - let loaders = config.resolve; - loaders.fallback = { - fs: false, - path: require.resolve('path-browserify'), - stream: require.resolve('stream-browserify'), - crypto: require.resolve('crypto-browserify') - }; - - return config; -}; diff --git a/public/index.html b/index.html similarity index 81% rename from public/index.html rename to index.html index 732752fd..c68c24a5 100644 --- a/public/index.html +++ b/index.html @@ -1,4 +1,4 @@ - + @@ -12,30 +12,12 @@ manifest.json provides metadata used when your web app is installed on a user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/ --> - - - - - - + + + + + +