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

feat: require chainId on add network FE-827 #1635

Merged
merged 62 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
c3455f9
feat: allow user to view and choose chainId when adding a new network
arthurgeron Oct 27, 2024
917d762
chore: upgrade rust minor
arthurgeron Oct 27, 2024
8abd90b
feat: show chainId in review card
arthurgeron Oct 28, 2024
2493f8f
chore: adjust spacing
arthurgeron Oct 28, 2024
4580ef3
fix: vulnerability when fetching chainId from provider
arthurgeron Oct 28, 2024
5c0221a
feat: disable accept risk checkbox
arthurgeron Oct 28, 2024
56927d5
fix: type errors
arthurgeron Oct 28, 2024
a8df5cb
chore: remove acceptRisk checkbox
arthurgeron Oct 28, 2024
7e25fc9
feat: add tooltip to chainId
arthurgeron Oct 28, 2024
cb5eadf
Merge branch 'master' of github.com:FuelLabs/fuels-wallet into ag/fea…
arthurgeron Oct 28, 2024
725a423
chore: changeset
arthurgeron Oct 28, 2024
6e1ca1a
chore: remove page pause
arthurgeron Oct 28, 2024
72587e9
fix: handling of chainId 0
arthurgeron Oct 28, 2024
5085705
improve: network e2e
arthurgeron Oct 28, 2024
3c27380
Merge branch 'master' into ag/feat/fe-827
arthurgeron Oct 29, 2024
45f0c90
chore: reword chainId tooltip
arthurgeron Oct 29, 2024
a469705
chore: reword
arthurgeron Oct 29, 2024
26938c2
fix: always setting value from provider
arthurgeron Oct 29, 2024
d792368
fix: casting empty field to number
arthurgeron Oct 29, 2024
5c9f115
feat: clear errors on url change
arthurgeron Oct 29, 2024
7b68ba2
feat: validate chainId when chainInfo data arrives
arthurgeron Oct 29, 2024
3c5b450
fix: casting 0 as a falsy "undefined"
arthurgeron Oct 29, 2024
cb3edea
feat: test on invalid chainId
arthurgeron Oct 29, 2024
1acdb26
improvement: use native hooks for watching form values
arthurgeron Oct 29, 2024
8251715
chore: remove before all delay
arthurgeron Oct 29, 2024
7b84b54
feat: add more test cases
arthurgeron Oct 29, 2024
848b787
revert: removal of timeout in beforeall
arthurgeron Oct 29, 2024
fd27d22
fix: valid ECDSA signatures erroneously rejected in elliptic
arthurgeron Oct 29, 2024
6ccce9e
feat: ensure chainInfo cleared when changing url
arthurgeron Oct 29, 2024
87a79bf
feat: await test connection button availability
arthurgeron Oct 29, 2024
3c65e9c
fix: flaky e2e helper
arthurgeron Oct 29, 2024
ee4572a
fix: flaky e2e crx
arthurgeron Oct 29, 2024
599cf1c
chore: add timeout before pressing button
arthurgeron Oct 29, 2024
ad6b900
feat: add network form
LuizAsFight Oct 30, 2024
18163c7
chore: e2e
LuizAsFight Oct 30, 2024
c6c516f
chore: fix tests
LuizAsFight Oct 30, 2024
0e877a9
chore: test
LuizAsFight Oct 31, 2024
5b8b595
chore: allow faucetUrl from db
LuizAsFight Oct 31, 2024
bdd32d2
fix: e2e-contracts
LuizAsFight Oct 31, 2024
8c2e167
chore: make e2e-contract fail on first error
LuizAsFight Oct 31, 2024
91b1f7b
chore
LuizAsFight Oct 31, 2024
20d5f14
chore
LuizAsFight Oct 31, 2024
1d1ea16
feat: split tests
LuizAsFight Oct 31, 2024
2f1ea54
chore
LuizAsFight Oct 31, 2024
ecc0bcc
chore
LuizAsFight Oct 31, 2024
a2ba879
chore
LuizAsFight Oct 31, 2024
d46c734
chore: fix flaky
LuizAsFight Oct 31, 2024
d6025bc
chore
LuizAsFight Oct 31, 2024
5bbfd85
chore: add screenshot
LuizAsFight Oct 31, 2024
165c719
chore: fix config
LuizAsFight Oct 31, 2024
d7ad848
chore
LuizAsFight Oct 31, 2024
5484d62
chore
LuizAsFight Oct 31, 2024
e723d81
chore
LuizAsFight Oct 31, 2024
16fee37
chore
LuizAsFight Oct 31, 2024
f64d960
chore
LuizAsFight Oct 31, 2024
40a9263
chore
LuizAsFight Oct 31, 2024
f207ef4
chore
LuizAsFight Oct 31, 2024
8699795
chore
LuizAsFight Oct 31, 2024
bead381
chore
LuizAsFight Oct 31, 2024
6b1a8d9
Merge branch 'master' into ag/feat/fe-827
LuizAsFight Oct 31, 2024
4967cae
chore: remove trash popups
LuizAsFight Oct 31, 2024
565eb50
Merge branch 'ag/feat/fe-827' of github.com:FuelLabs/fuels-wallet int…
LuizAsFight Oct 31, 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
5 changes: 5 additions & 0 deletions .changeset/six-chairs-collect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"fuels-wallet": patch
---

Require chainId on add network
55 changes: 55 additions & 0 deletions .github/workflows/pr-tests-e2e-contracts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Tests E2E - Contracts

on:
pull_request:
branches: [main, master, sdk-v2]
types: [opened, synchronize, reopened]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
tests-e2e-contracts:
name: Test
runs-on: buildjet-8vcpu-ubuntu-2204
steps:
- uses: actions/checkout@v3
- uses: FuelLabs/github-actions/setups/node@master
with:
node-version: 20.11.0
pnpm-version: 9.5.0
- uses: FuelLabs/github-actions/setups/docker@master
with:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: ./.github/actions/setup-rust

- name: Run PNPM install
id: pnpm-cache
run:
pnpm recursive install --frozen-lockfile

- name: Start Test Node
run: pnpm node:up

- name: Generate .env app
run: cp packages/app/.env.example packages/app/.env

- name: Build & Deploy Contracts
run: pnpm deploy:contracts
working-directory: ./packages/e2e-contract-tests

- name: Run E2E Contract Tests - Local
uses: ./.github/actions/e2e-tests-contracts
with:
providerUrl: "http://localhost:4000/v1/graphql"
masterMnemonic: ${{ secrets.VITE_MASTER_WALLET_MNEMONIC }}
genesisSecret: "0xa449b1ffee0e2205fa924c6740cc48b3b473aa28587df6dab12abc245d1f5298"

- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-e2e-contract-tests-report
path: packages/e2e-contract-tests/playwright-results
retention-days: 30
59 changes: 59 additions & 0 deletions .github/workflows/pr-tests-e2e-crx-lock.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Tests E2E - CRX Lock

on:
pull_request:
branches: [main, master, sdk-v2]
types: [opened, synchronize, reopened]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
tests-e2e-crx-lock:
name: Test
runs-on: buildjet-8vcpu-ubuntu-2204
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- uses: FuelLabs/github-actions/setups/node@master
with:
node-version: 20.11.0
pnpm-version: 9.5.0
- uses: FuelLabs/github-actions/setups/docker@master
with:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Start Test Node
run: pnpm node:up

- name: Generate .env
run: cp packages/app/.env.example packages/app/.env

- name: Build Application
run: pnpm build:app
env:
## increase node.js m memory limit for building
## with sourcemaps
NODE_OPTIONS: "--max-old-space-size=4096"

# E2E tests running with Playwright
- name: Install Playwright Browsers
run: npx playwright install --with-deps chromium

- name: Run E2E Tests
run: xvfb-run --auto-servernum -- pnpm test:e2e:crx-lock
timeout-minutes: 3
env:
NODE_ENV: test

- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-app-crx-lock-report
path: packages/app/playwright-results
retention-days: 30

- name: Stop Test Node
run: pnpm node:clean
59 changes: 59 additions & 0 deletions .github/workflows/pr-tests-e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Tests E2E

on:
pull_request:
branches: [main, master, sdk-v2]
types: [opened, synchronize, reopened]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
tests-e2e:
name: Test
timeout-minutes: 20
runs-on: buildjet-8vcpu-ubuntu-2204
steps:
- uses: actions/checkout@v3
- uses: FuelLabs/github-actions/setups/node@master
with:
node-version: 20.11.0
pnpm-version: 9.5.0
- uses: FuelLabs/github-actions/setups/docker@master
with:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Start Test Node
run: pnpm node:up

- name: Generate .env
run: cp packages/app/.env.example packages/app/.env

- name: Build Application
run: pnpm build:app
env:
## increase node.js m memory limit for building
## with sourcemaps
NODE_OPTIONS: "--max-old-space-size=4096"

# E2E tests running with Playwright
- name: Install Playwright Browsers
run: npx playwright install --with-deps chromium

- name: Run E2E Tests
run: xvfb-run --auto-servernum -- pnpm test:e2e
timeout-minutes: 15
env:
NODE_ENV: test

- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-app-report
path: packages/app/playwright-results
retention-days: 30

- name: Stop Test Node
run: pnpm node:clean
50 changes: 50 additions & 0 deletions .github/workflows/pr-tests-jest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Tests Unit

on:
pull_request:
branches: [main, master, sdk-v2]
types: [opened, synchronize, reopened]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
tests-jest:
name: Test
runs-on: buildjet-8vcpu-ubuntu-2204
steps:
- uses: actions/checkout@v3
- uses: FuelLabs/github-actions/setups/node@master
with:
node-version: 20.11.0
pnpm-version: 9.5.0
- uses: FuelLabs/github-actions/setups/docker@master
with:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Start Test Node
run: pnpm node:up

- name: Generate .env
run: cp packages/app/.env.example packages/app/.env

# Unit tests running with JEST
- name: Find PR number
uses: jwalton/gh-find-current-pr@v1
id: findPr

- name: Build libs
run: |
pnpm build:libs

- name: Run Jest Tests
run: |
pnpm test:ci
timeout-minutes: 10
env:
NODE_OPTIONS: "--max-old-space-size=4096"

- name: Stop Test Node
run: pnpm node:clean
Loading
Loading