Skip to content

Commit e46ce17

Browse files
authored
Merge pull request #226 from filecoin-project/feat/add-f1-addres-by-filsnap
feat: add f1 address by filsnap
2 parents 3ab3f26 + bf6c890 commit e46ce17

39 files changed

+2073
-9741
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Trigger Jenkins Frontend Build
2+
on:
3+
push:
4+
branches:
5+
- main
6+
paths:
7+
- frontend/*
8+
jobs:
9+
trigger-jenkins:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Trigger Jenkins
13+
run: |
14+
curl -X POST http://162.219.87.220:4972/job/pv-frontend-pro/build?token=pv-frontend-pro

frontend/.env.example

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
VITE_POWER_VOTING_MAINNET_CONTRACT_ADDRESS =
2+
VITE_ORACLE_MAINNET_CONTRACT_ADDRESS =
3+
VITE_POWER_VOTING_FIP_MAINNET_CONTRACT_ADDRESS =
4+
VITE_MAINNET_CHAIN_RPC =
5+
6+
VITE_BASE_API_UR = /api
7+
VITE_WALLET_CONNECT_ID =

frontend/.gitignore

+6-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,12 @@ dist.zip
1717

1818
# env
1919
.env
20-
.env.example
20+
21+
# nginx
22+
nginx.conf
23+
24+
#configuration
25+
configuration.yaml
2126

2227
# misc
2328
.eslintcache

frontend/Dockerfile

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ COPY frontend/package*.json ./
99
RUN pnpm install
1010

1111
COPY frontend .
12-
1312
RUN pnpm run build
1413

1514
FROM nginx:alpine

frontend/Dockerfile.github

+5-8
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,21 @@
1-
FROM node:22 AS build
1+
FROM node:22 as build-stage
22

33
WORKDIR /app
44

55
COPY package*.json ./
66

7-
RUN npm config delete proxy
8-
RUN npm config delete https-proxy
9-
10-
RUN npm install
7+
RUN yarn install
118

129
COPY . .
1310

1411
RUN yarn build
1512

1613
FROM nginx:alpine
1714

18-
COPY --from=build /app/dist /voting/dev/distya
15+
COPY --from=build-stage /app/dist /usr/share/nginx/html
1916

2017
COPY nginx.conf /etc/nginx/conf.d/default.conf
2118

22-
EXPOSE 8080
19+
EXPOSE 80
2320

24-
CMD ["nginx", "-g", "daemon off;"]
21+
CMD ["nginx", "-g", "daemon off;"]

frontend/nginx.conf

-14
This file was deleted.

frontend/nginx.conf.example

+3-14
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,9 @@ server {
1414
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
1515
proxy_pass { BACKEND_HOST }/power_voting/api;
1616
}
17-
location /rpc/v1 {
18-
proxy_set_header X-Real-IP $remote_addr;
19-
proxy_set_header Host $host;
20-
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
21-
proxy_pass { RPC_HOST }
22-
add_header Access-Control-Allow-Origin *;
23-
add_header Access-Control-Allow-Methods "GET, POST, OPTIONS, PUT";
24-
add_header Access-Control-Allow-Headers "Origin, X-Re/power_votingquested-With, Content-Type, Accept";
25-
proxy_hide_header Content-Type;
26-
add_header Content-Type application/json;
27-
if ($request_method = 'OPTIONS') {
28-
return 204;
29-
}
30-
}
17+
18+
19+
3120

3221
listen [::]:{ LISTEN_PORT } ipv6only=on;
3322
listen { LISTEN_PORT };

frontend/package.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
"dependencies": {
1414
"@ant-design/icons": "^5.0.1",
1515
"@headlessui/react": "latest",
16+
"@ledgerhq/hw-app-eth": "^6.45.0",
17+
"@ledgerhq/hw-transport-node-hid": "^6.29.5",
1618
"@ledgerhq/hw-transport-webusb": "^6.29.4",
1719
"@rainbow-me/rainbowkit": "^2.0.7",
1820
"@tailwindcss/forms": "latest",
@@ -21,11 +23,13 @@
2123
"antd": "5.17.3",
2224
"axios": "^1.7.4",
2325
"buffer": "^6.0.3",
26+
"cbor": "^10.0.3",
2427
"classnames": "latest",
2528
"cross-env": "^7.0.3",
2629
"dayjs": "^1.11.9",
30+
"decimal.js": "^10.5.0",
2731
"dotenv": "^16.4.5",
28-
"ethers": "^6.13.4",
32+
"ethers": "^6.13.5",
2933
"filsnap-adapter": "^3.2.0",
3034
"html-webpack-plugin": "^5.5.0",
3135
"i18next": "^23.11.5",

0 commit comments

Comments
 (0)