-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* wip: Tenscan gateway * wip: gateway revamp * refactor: UI and logic * chore: move constants and account connections * refactor: services and wallet context * styles: update custom font and logo * remove logs * fix: metamask error handling * fix: conection method * fix connect method * feat: error handling * separate gateway frontend concerns to folder * feat: authenticate account with EIP712 - refactor error handling - add loading state * add `README` file * - update css variables and constant urls - fix: remove conditional params * move gateway base to `walletextension/frontend` * update readme * refactor: account signing and authentication * add docs and error pages * feat: add SEO tags and GTAG * refactor: separate eth and gateway requests * fix: change toast type * chore: cleanup functions and error msgs * fix (dis)connection errors * update toast methods * update meta description * add env example file * remove log * update README to configure env * fix build error * move `GOOGLE_ANALYTICS_ID` to env file * update review suggestions * rm redundant click handler
- Loading branch information
Showing
71 changed files
with
10,664 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "next/core-web-vitals" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
.yarn/install-state.gz | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# local env files | ||
.env*.local | ||
|
||
# vercel | ||
.vercel | ||
|
||
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# Ten Gateway | ||
|
||
Ten Gateway is a Next.js and Tailwind CSS-powered application. | ||
|
||
## Folder Structure | ||
|
||
``` | ||
📁 Ten Gateway | ||
├── 📁 api - Contains server-side code, such as API routes or server logic | ||
├── 📁 public - This directory is used to serve static assets. Files inside this directory can be referenced in your code with a URL path | ||
├── 📁 src - Main source code directory for this project | ||
│ ├── 📁 components - Contains reusable React components used throughout the application | ||
│ ├── 📁 pages - Typically used for Next.js pages. Each .tsx or .js file in this directory becomes a route in your application | ||
│ ├── 📁 hooks - Custom React hooks that can be shared and reused across components | ||
│ ├── 📁 lib - Utility functions or modules that provide common functionalities across the application | ||
│ ├── 📁 routes - Route-related logic or configuration can be placed in this directory | ||
│ ├── 📁 services - Used for services that interact with external APIs or handle other data-related tasks | ||
│ └── 📁 types - Type definitions (.d.ts files or TypeScript files) for TypeScript, describing the shape of data and objects used in the application | ||
└── 📁 styles - Global styles, stylesheets, or styling-related configurations for this project | ||
``` | ||
|
||
## Getting Started | ||
|
||
1. **Clone the Repository:** | ||
```bash | ||
git clone https://github.com/ten-protocol/go-ten.git | ||
cd go-ten/tools/walletextension/frontend | ||
``` | ||
|
||
2. **Install Dependencies:** | ||
```bash | ||
npm install | ||
``` | ||
|
||
3. **Configure Environment Variables:** | ||
Create a `.env.local` file in the root directory of the project and add the following environment variables: | ||
|
||
```bash | ||
NEXT_PUBLIC_API_GATEWAY_URL=******** | ||
``` | ||
|
||
Possible values for `NEXT_PUBLIC_API_GATEWAY_URL` are: | ||
- `https://https://uat-testnet.obscu.ro` | ||
- `https://https://sepolia-testnet.obscu.ro` | ||
- `https://https://dev-testnet.obscu.ro` | ||
|
||
4. **Run the Development Server:** | ||
```bash | ||
npm run dev | ||
``` | ||
|
||
The application will be accessible at [http://localhost:3000](http://localhost:3000). | ||
|
||
## Usage | ||
|
||
- Connect to Ten Testnet using the button in the top right corner of the application or on the homepage | ||
- You can request tokens from the Discord bot by typing `!faucet <your address>` in the #faucet channel | ||
- You can also revoke accounts by clicking the "Revoke Accounts" button on the homepage | ||
|
||
## Built With | ||
|
||
- [Next.js](https://nextjs.org/) | ||
- [Tailwind CSS](https://tailwindcss.com/) | ||
- [Shadcn-UI](https://shadcn.com/) | ||
- [TypeScript](https://www.typescriptlang.org/) | ||
|
||
|
||
## Contributing | ||
|
||
Contributions are welcome! Please follow our [contribution guidelines](/docs/_docs/community/contributions.md). | ||
|
||
## License | ||
|
||
This project is licensed under the [GNU Affero General Public License v3.0](/LICENSE). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
NEXT_PUBLIC_API_GATEWAY_URL= | ||
NEXT_PUBLIC_GOOGLE_ANALYTICS_ID= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = { | ||
reactStrictMode: true, | ||
} | ||
|
||
module.exports = nextConfig |
Oops, something went wrong.