Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated UI #2

Open
wants to merge 59 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
6c12051
fix: ci should reflect extension name change
jurevans Sep 10, 2024
7cf74b3
wip impl genesis tx on namada shared
dimiandre Sep 27, 2024
42c07a4
fix extension tx display
dimiandre Sep 27, 2024
24b4577
cleanup rust code (shared.wasm)
dimiandre Sep 28, 2024
fb81bd2
namadillo temp gensis page
dimiandre Sep 28, 2024
0ea3482
initial commit for genesis bond ui
dimiandre Sep 28, 2024
913f32a
cleanup useless stuff
dimiandre Sep 28, 2024
a55651b
genesis bond form first version
dimiandre Sep 28, 2024
dc9b4dd
add toml generation of signature
dimiandre Sep 28, 2024
af89216
finalize genesis tx ui functionality
dimiandre Sep 29, 2024
18c83e4
add loading state
dimiandre Sep 29, 2024
da3e703
update faq add disclaimer
dimiandre Sep 29, 2024
939cbcd
add metas
dimiandre Sep 29, 2024
043304a
correct og url
dimiandre Sep 29, 2024
1248ca2
better error message for chain id mismatch
dimiandre Oct 2, 2024
ed88b28
better og image
dimiandre Oct 2, 2024
28511bc
better error messages
dimiandre Oct 2, 2024
9455f19
fix unknown error message
dimiandre Oct 2, 2024
b826cb4
show previous bonds
dimiandre Oct 3, 2024
63a5cc4
add possibility to set default validator in query string
dimiandre Oct 3, 2024
358c249
fallback to address if validator alias is not set
dimiandre Oct 4, 2024
52c6e69
feat: integrate table
neocybereth Oct 7, 2024
fac53c4
fix: overhaul
neocybereth Oct 7, 2024
721d4fa
feat: update tip
neocybereth Oct 7, 2024
b245a46
fix: update ui
neocybereth Oct 7, 2024
534fb28
feat: prbot
neocybereth Oct 7, 2024
3debeee
fix: proxy attempt
neocybereth Oct 8, 2024
4b591db
fix: previous bonds
neocybereth Oct 8, 2024
29332d7
fix: update bond pos
neocybereth Oct 8, 2024
7d6ee41
fix: clean
neocybereth Oct 8, 2024
6da9464
feat: add pr stuff
neocybereth Oct 8, 2024
a131c8f
fix: update branch
neocybereth Oct 8, 2024
2123389
fix: update pR stuff
neocybereth Oct 8, 2024
9545427
fix: sanitize discord handle
neocybereth Oct 8, 2024
148fec7
fix: lowercase
neocybereth Oct 8, 2024
2d09daf
fix: show all validators in select validator but default to row click…
neocybereth Oct 9, 2024
6c3650e
fix: disable when too little nam
neocybereth Oct 9, 2024
c1f8746
fix: cleanup logs
neocybereth Oct 9, 2024
033cc54
fix: change validator from form
neocybereth Oct 9, 2024
8ed7211
fix: update urls for git
neocybereth Oct 9, 2024
9d74c09
fix: update rpo
neocybereth Oct 10, 2024
01c5910
fix: remove owner repo pass through
neocybereth Oct 10, 2024
8f99b9f
fix: update validity row
neocybereth Oct 10, 2024
a562e9b
fix: add https to all websites
neocybereth Oct 10, 2024
49ffcf0
fix: built errything
neocybereth Oct 10, 2024
f54070b
fix: update bond
neocybereth Oct 10, 2024
4f67217
fix: remove zip
neocybereth Oct 10, 2024
69608bc
fix: update
neocybereth Oct 10, 2024
4808ca7
fix: update
neocybereth Oct 10, 2024
bac6a4a
fix: update
neocybereth Oct 10, 2024
d65fce7
fix: add description for PR
neocybereth Oct 10, 2024
2b8d77b
fix: remove discord stuff
neocybereth Oct 10, 2024
10e27f5
fix: update filename
neocybereth Oct 10, 2024
7654daa
fix: cleanup
neocybereth Oct 10, 2024
e756130
fix: update git lnk
neocybereth Oct 10, 2024
25c48b7
fix: update
neocybereth Oct 11, 2024
a4ec8ad
Update success msg
salis Oct 13, 2024
f8e1e7d
Update branch naming in PRbot
salis Oct 13, 2024
899eceb
fix: remove auto submits
neocybereth Oct 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions .github/workflows/release-wallet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ jobs:

- uses: actions/upload-artifact@v3
with:
name: namada-extension-chrome
path: ./apps/extension/build/chrome/namada_extension-*.zip
name: namada-keychain-chrome
path: ./apps/extension/build/chrome/namada_keychain-*.zip

build-extension-firefox:
needs: setup
Expand Down Expand Up @@ -102,8 +102,8 @@ jobs:

- uses: actions/upload-artifact@v3
with:
name: namada-extension-firefox
path: ./apps/extension/build/firefox/namada_extension-*.zip
name: namada-keychain-firefox
path: ./apps/extension/build/firefox/namada_keychain-*.zip

release:
needs: [setup, build-extension-chrome, build-extension-firefox]
Expand All @@ -112,20 +112,20 @@ jobs:
- name: Download Chrome extension build
uses: actions/download-artifact@v3
with:
name: namada-extension-chrome
path: ./namada-extension-chrome
name: namada-keychain-chrome
path: ./namada-keychain-chrome

- name: Download Firefox extension build
uses: actions/download-artifact@v3
with:
name: namada-extension-firefox
path: ./namada-extension-firefox
name: namada-keychain-firefox
path: ./namada-keychain-firefox

- name: Get extension filenames
id: get-filenames
run: |
echo "CHROME_FILENAME=$(ls -1 ./namada-extension-chrome)" >> "$GITHUB_OUTPUT"
echo "FIREFOX_FILENAME=$(ls -1 ./namada-extension-firefox)" >> "$GITHUB_OUTPUT"
echo "CHROME_FILENAME=$(ls -1 ./namada-keychain-chrome)" >> "$GITHUB_OUTPUT"
echo "FIREFOX_FILENAME=$(ls -1 ./namada-keychain-firefox)" >> "$GITHUB_OUTPUT"

- name: Make release body text
run: |
Expand All @@ -149,8 +149,8 @@ jobs:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create-release.outputs.upload_url }}
asset_path: ./namada-extension-chrome/${{ steps.get-filenames.outputs.CHROME_FILENAME }}
asset_name: namada-extension-chrome_${{ needs.setup.outputs.VERSION }}.zip
asset_path: ./namada-keychain-chrome/${{ steps.get-filenames.outputs.CHROME_FILENAME }}
asset_name: namada-keychain-chrome_${{ needs.setup.outputs.VERSION }}.zip
asset_content_type: application/zip

- name: Add Firefox extension to release
Expand All @@ -159,6 +159,6 @@ jobs:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create-release.outputs.upload_url }}
asset_path: ./namada-extension-firefox/${{ steps.get-filenames.outputs.FIREFOX_FILENAME }}
asset_name: namada-extension-firefox_${{ needs.setup.outputs.VERSION }}.zip
asset_path: ./namada-keychain-firefox/${{ steps.get-filenames.outputs.FIREFOX_FILENAME }}
asset_name: namada-keychain-firefox_${{ needs.setup.outputs.VERSION }}.zip
asset_content_type: application/zip
24 changes: 24 additions & 0 deletions .vscode/bookmarks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"files": [
{
"path": "apps/namadillo/src/atoms/staking/services.ts",
"bookmarks": [
{
"line": 20,
"column": 0,
"label": ""
}
]
},
{
"path": "apps/namadillo/src/atoms/staking/atoms.ts",
"bookmarks": [
{
"line": 32,
"column": 0,
"label": ""
}
]
}
]
}
1 change: 1 addition & 0 deletions apps/genesis-bond/.env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NAMADA_INTERFACE_GENESIS_API_URL=http://127.0.0.1:3000
3 changes: 3 additions & 0 deletions apps/genesis-bond/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.css
*.svg
webpack.config.js
6 changes: 6 additions & 0 deletions apps/genesis-bond/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
extends: require.resolve("@namada/config/eslint/react.js"),
rules: {
"@typescript-eslint/no-explicit-any": "off",
},
};
4 changes: 4 additions & 0 deletions apps/genesis-bond/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# dependencies
/node_modules
/build
.env
78 changes: 78 additions & 0 deletions apps/genesis-bond/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# faucet

This is a front-end app to the [namada-faucet](https://github.com/heliaxdev/namada-faucet) server.

## Table of Contents

- [Setup](#setup)
- [Local Development](#local-development)
- [Proxying Requests](#proxying-requests)
- [Building the Project](#building-the-project)
- [Notes](#notes)

## Setup

To install dependencies, from the root `namada-interface` folder, run the following:

```bash
yarn
```

Then, look at the potential variables you may override in [.env.sample](./.env.sample) in `apps/faucet`. You can copy these variables into a `.env` file,
and they will be used when the application is built.

As an example, if all you want to override the the API url or endpoint, you can override the following default values in a `.env`:

```bash
# Faucet API Endpoint override
NAMADA_INTERFACE_FAUCET_API_URL=http://127.0.0.1:5000
NAMADA_INTERFACE_FAUCET_API_ENDPOINT=/api/v1/faucet
```

[ [Table of Contents](#table-of-contents) ]

## Local Development

In `apps/faucet`, you can issue the following command to run the Faucet app locally in development mode:

```bash
yarn dev
```

The app will be accessible at `http://localhost:8081`.

[ [Table of Contents](#table-of-contents) ]

## Proxying Requests

If you are experiencing request failures due to CORS origin problems (e.g., if you are connecting to a remote server from a local dev instance),
you can launch the local CORS proxy via the following:

```bash
yarn dev:proxy
```

This will proxy the `NAMADA_INTERFACE_FAUCET_API_URL` (or default URL if this is unspecified) via a Node server, which should resolve the issue.

[ [Table of Contents](#table-of-contents) ]

## Building the project

To build the final, static HTML version of this app, simply run the following:

```bash
yarn build
```

This will build the production version of the app, and the resulting bundle will be available in `apps/faucet/build`. This contents of this folder can be served on a web host
as a static HTML website.

[ [Table of Contents](#table-of-contents) ]

## Notes

The logic for the API calls, as well as the mining logic can be found in [utils/](./src/utils/).

The form interface where these calls are invoked is located in [Faucet.tsx](./src/App/Faucet.tsx).

[ [Table of Contents](#table-of-contents) ]
4 changes: 4 additions & 0 deletions apps/genesis-bond/babel.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"presets": [],
"plugins": ["@babel/plugin-transform-modules-commonjs"]
}
65 changes: 65 additions & 0 deletions apps/genesis-bond/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"name": "@kintsugi-tech/namada-genesis-bonds",
"version": "0.1.0",
"description": "Namada Genesis Pre-Bond Generator",
"repository": "https://github.com/anoma/namada-interface/",
"author": "Heliax Dev <[email protected]>",
"license": "MIT",
"private": true,
"scripts": {
"start": "webpack-dev-server",
"start:proxy": "node ./scripts/startProxy.js",
"dev": "NODE_ENV=development yarn start",
"dev:proxy": "./scripts/start-proxy.sh; NAMADA_INTERFACE_PROXY=true yarn dev",
"build": "NODE_ENV=production webpack-cli",
"lint": "eslint src --ext .ts,.tsx",
"lint:fix": "yarn lint -- --fix"
},
"dependencies": {
"@cosmjs/encoding": "^0.29.0",
"@emotion/react": "^11.13.3",
"@emotion/styled": "^11.13.0",
"@mui/icons-material": "^6.1.2",
"@mui/material": "^6.1.2",
"@mui/x-data-grid": "^7.19.0",
"@prb0t/pr": "^2.0.1",
"buffer": "^6.0.3",
"dompurify": "^3.0.5",
"node-forge": "^1.3.1",
"react": "^18.3.0",
"react-dom": "^18.3.0",
"react-router-dom": "^6.0.0",
"styled-components": "^5.3.5"
},
"devDependencies": {
"@babel/plugin-transform-modules-commonjs": "^7.20.11",
"@svgr/webpack": "^6.3.1",
"@types/dompurify": "^3.0.5",
"@types/node": "^22.5.4",
"@types/node-forge": "^1.3.6",
"@types/react": "^18.3.5",
"@types/react-dom": "^18.3.0",
"@types/styled-components": "^5.1.26",
"dotenv": "^16.0.3",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.3",
"eslint-plugin-import": "^2.30.0",
"eslint-plugin-react": "^7.35.2",
"eslint-plugin-react-hooks": "^4.6.0",
"html-webpack-plugin": "^5.6.0",
"local-cors-proxy": "^1.1.0",
"postcss": "^8.4.32",
"postcss-loader": "^8.1.0",
"postcss-preset-env": "^9.3.0",
"tailwindcss": "^3.4.1",
"ts-loader": "^9.3.1",
"ts-node": "^10.9.1",
"tsconfig-paths-webpack-plugin": "^4.1.0",
"typescript": "^5.5.4",
"typescript-plugin-styled-components": "^2.0.0",
"webpack": "^5.9.4",
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.11.1"
}
}
6 changes: 6 additions & 0 deletions apps/genesis-bond/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};
1 change: 1 addition & 0 deletions apps/genesis-bond/public/_redirects
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* /index.html 200
Binary file added apps/genesis-bond/public/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions apps/genesis-bond/public/bg-dots.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/genesis-bond/public/chain-setting.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/genesis-bond/public/favicon-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/genesis-bond/public/favicon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions apps/genesis-bond/public/incline-arrow-black.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions apps/genesis-bond/public/incline-arrow-yellow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 43 additions & 0 deletions apps/genesis-bond/public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<!doctype html>
<html lang="en" style="height: 100%">
<head>
<meta charset="utf-8" />
<meta name="”robots”" content="”noindex,nofollow”" />
<link rel="icon" href="/assets/favicon-32x32.png" />
<meta name="viewport" content="width=device-width" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Create your pre-bond transaction to be included in Namada Genesis Block!"
/>
<link rel="apple-touch-icon" href="/assets/apple-touch-icon.png" />
<link rel="manifest" href="/manifest.json" />
<title>Namada Genesis Pre-Bond</title>
<meta property="og:title" content="Namada Genesis Pre-Bond" />
<meta
property="og:description"
content="Create your pre-bond transaction to be included in Namada Genesis Block!"
/>
<meta
property="og:image"
content="https://pbs.twimg.com/profile_images/1686149805217828864/u7RALHKq_400x400.jpg"
/>

<meta property="twitter:card" content="summary_large_image" />
<meta property="twitter:url" content="https://x.com/ValidityOps" />
<meta property="twitter:title" content="Namada Genesis Pre-Bond" />
<meta
property="twitter:description"
content="Create your pre-bond transaction to be included in Namada Genesis Block!"
/>
<meta
property="twitter:image"
content="https://pbs.twimg.com/profile_images/1686149805217828864/u7RALHKq_400x400.jpg"
/>
</head>

<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
</body>
</html>
25 changes: 25 additions & 0 deletions apps/genesis-bond/public/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"short_name": "Namada Genesis Pre-Bond",
"name": "Namada Genesis Pre-Bond Generator",
"icons": [
{
"src": "apple-touch-icon.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "favicon-16x16.png",
"type": "image/png",
"sizes": "16x16"
},
{
"src": "favicon-32x32.png",
"type": "image/png",
"sizes": "32x32"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
Binary file added apps/genesis-bond/public/og.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions apps/genesis-bond/public/plus-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions apps/genesis-bond/public/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:
6 changes: 6 additions & 0 deletions apps/genesis-bond/scripts/start-proxy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh

SCRIPT_DIR=$(cd "$(dirname "$0")"; pwd -P)

node $SCRIPT_DIR/startProxies.js&

Loading