Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
7c65c10
Add E2E tests and fixtures for MetaMask wallet integration and Pre-De…
Feb 12, 2026
be94620
Enhance MetaMask notification handling and improve E2E test robustness
Feb 13, 2026
2deb4eb
Add pnpm workspace file for E2E test setup
Feb 13, 2026
5e7a0fb
chore(hub): add changeset
JulesFiliot Feb 16, 2026
d7816f3
Refactor timeout configurations and relocate Pre-Deposits E2E test un…
Feb 17, 2026
6bb7a2e
Reorganize E2E configuration and workflows; refactor imports and envi…
Feb 17, 2026
7ce5425
Refactor E2E environment handling: centralize env types, simplify `En…
Feb 18, 2026
1a4df5c
Add E2E tests for deposit flows with network switching and validation
Feb 17, 2026
fb2a81b
Refactor timeout configurations across components and tests; standard…
Feb 17, 2026
ef167a2
Refactor MetaMask extension download: use specific versioning, remove…
Feb 18, 2026
6c31b9d
Remove `pnpm-lock.yaml` and refactor Pre-Deposits E2E test imports an…
Feb 25, 2026
4e92d6a
chore: add empty changeset for CI
Feb 25, 2026
cd0d31b
Refactor MetaMask connection approval: simplify button handling and r…
Feb 26, 2026
2c94b1f
Refactor Pre-Deposit E2E tests: use shared chain ID constants and upd…
Feb 26, 2026
dd417fa
refactor: extract chain constants and use flexible node version in CI
Feb 26, 2026
4af12d8
Refactor e2e tests: centralize MetaMask network switching and SIWE di…
Feb 27, 2026
0944d69
Integrate Anvil local forks for deposit tests, extend MetaMask and E2…
Feb 18, 2026
5e1278f
Add below-minimum validation tests for WETH, SNT, and LINEA vault dep…
Feb 19, 2026
34b3cb4
Add comprehensive E2E tests for WETH, SNT, and LINEA vault deposits, …
Feb 23, 2026
f23ec9e
Enhance Anvil fixture to handle raw STX transactions for Linea, exten…
Feb 25, 2026
f908d7e
Enhance MetaMask and Anvil fixtures: streamline popup handling, impro…
Feb 25, 2026
aaca3c5
Add resetAllowance helper and update GUSD Pre-Deposit tests with cont…
Feb 26, 2026
102fd10
Enhance MetaMask and Anvil fixtures: improve retry logic for button d…
Feb 26, 2026
6b84784
Remove e2e folder, unused test utilities, MetaMask helpers, and const…
Feb 27, 2026
4e4b47c
Replace setup-anvil.sh with a Dockerized Anvil setup, update related …
Feb 28, 2026
cfcbf6f
Extend Anvil and MetaMask fixtures with enhanced retry logic and addi…
Feb 28, 2026
d9fb650
Remove deprecated MetaMask pages, fixtures, and helpers, clean up unu…
Mar 1, 2026
6afc0ca
Unify below-minimum deposit validation tests for WETH, SNT, and LINEA…
Mar 1, 2026
7a66a5c
Refactor MetaMask notification handling: streamline comments, improve…
Mar 1, 2026
cbe8122
Fix E2E workflow: update MetaMask version extraction with corrected s…
Mar 1, 2026
09043db
Update Hub RPC configuration: add support for custom RPC endpoints an…
Mar 2, 2026
2f768c0
Refactor network switch handling in pre-deposit modal: add `waitForNe…
Mar 2, 2026
200a104
Remove `e2e/CODE_REVIEW.md` to clean up deprecated documentation.
Mar 2, 2026
c582526
Refactor E2E codebase: remove semicolons for consistency, streamline …
Mar 2, 2026
cb495d5
Restore e2e patch entry in changeset
Mar 2, 2026
db0756f
Remove orphaned duplicate files, fix vault import path and WETH name …
Mar 2, 2026
398b65d
Merge branch 'main' into 933-ui-tests-for-SN-Hub_anvil_tests
at0m1x19 Mar 3, 2026
1ea22ac
Merge branch 'main' into 933-ui-tests-for-SN-Hub_anvil_tests
at0m1x19 Mar 9, 2026
998bc54
Merge branch 'main' into 933-ui-tests-for-SN-Hub_anvil_tests
at0m1x19 Mar 9, 2026
0e089ca
Merge branch 'main' into 933-ui-tests-for-SN-Hub_anvil_tests
at0m1x19 Mar 13, 2026
9da4eea
Merge remote-tracking branch 'origin/main' into pr/at0m1x19/1066
felicio Mar 23, 2026
a4d5d40
Merge branch 'main' into 933-ui-tests-for-SN-Hub_anvil_tests
at0m1x19 Mar 23, 2026
61d0ee0
Add Linea fork block mining step and update test path in e2e README
Mar 24, 2026
397faf1
t
felicio Mar 24, 2026
6e45bff
u
felicio Mar 24, 2026
b92b4bc
Merge branch 'main' into 933-ui-tests-for-SN-Hub_anvil_tests
at0m1x19 Mar 26, 2026
8b9f335
Improve MetaMask notification handling: add `isClosed` checks to prev…
Mar 26, 2026
4b863d7
Merge branch 'main' into 933-ui-tests-for-SN-Hub_anvil_tests
at0m1x19 Mar 27, 2026
3b802be
Refactor E2E constants and tests: introduce reusable `CHAIN_ID_*` con…
Mar 28, 2026
7ac2df8
Refactor notification page handling: replace page reopening logic wit…
Mar 30, 2026
43eecf7
Merge branch 'main' into 933-ui-tests-for-SN-Hub_anvil_tests
at0m1x19 Mar 30, 2026
e9580a7
Merge main to resolve pnpm-lock.yaml conflict
Mar 31, 2026
d6466d3
Improve MetaMask connection resilience and add diagnostic logging
Mar 31, 2026
a4558af
Improve notification page handling: replace reload logic with close+r…
Apr 1, 2026
664104f
Enhance MetaMask notification handling: add toast dismissal logic to …
Apr 1, 2026
fb3c078
Improve MetaMask notification handling: enhance toast dismissal logic…
Apr 2, 2026
c66ac8e
Merge main to resolve chain.ts and env.client.mjs conflicts
Apr 2, 2026
c70bd41
Add timing logs for onboarding and Anvil setup to diagnose slow tests
Apr 3, 2026
ec9a645
Add granular timing for Anvil revert/snapshot to diagnose slow tests
Apr 6, 2026
775741f
Optimize AnvilRpcHelper with global slot caching to reduce redundant …
Apr 7, 2026
1941127
Add eRPC service integration to docker-compose for enhanced RPC handl…
Apr 7, 2026
ee54655
Add diagnostic timing logs for browser launch and waitConfirmable
Apr 8, 2026
2c6c4c4
Merge main to resolve pnpm-lock.yaml conflict
Apr 8, 2026
69ae788
fix(hub): drop manual gas estimation in GUSD pre-deposit
Apr 9, 2026
ccf8f83
Merge branch 'main' into 933-ui-tests-for-SN-Hub_anvil_tests
at0m1x19 Apr 9, 2026
8904cde
Merge branch 'main' into 933-ui-tests-for-SN-Hub_anvil_tests
at0m1x19 Apr 10, 2026
45466ef
mock(e2e): add eth_estimateGas handler to improve gas estimation reli…
Apr 10, 2026
f81ba2d
Merge branch 'main' into 933-ui-tests-for-SN-Hub_anvil_tests
at0m1x19 Apr 13, 2026
5d23d58
chore: add empty changeset for CI
Apr 13, 2026
98825e5
test(hub): add e2e support for anvil deposit hooks and refactor const…
Apr 14, 2026
4f63ba4
Merge branch 'main' into 933-ui-tests-for-SN-Hub_anvil_tests
at0m1x19 Apr 14, 2026
0855cc1
fix(e2e): enforce single worker configuration in anvil.fixture due to…
Apr 14, 2026
6d6b759
Merge branch 'main' into 933-ui-tests-for-SN-Hub_anvil_tests
at0m1x19 Apr 14, 2026
7353fb9
Merge branch 'main' into 933-ui-tests-for-SN-Hub_anvil_tests
at0m1x19 Apr 14, 2026
2d7c37e
fix(e2e): route puzzle-auth RPC proxy paths to Anvil forks
Apr 16, 2026
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/sixty-steaks-smile.md
Comment thread
JulesFiliot marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'hub': patch
---

test(hub): support e2e anvil deposit flows in deposit hooks
19 changes: 15 additions & 4 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ on:
required: false
default: 'https://hub.status.network'

env:
METAMASK_VERSION: '13.18.1'

jobs:
e2e:
name: E2E Tests
Expand Down Expand Up @@ -70,6 +67,10 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Read MetaMask version
id: metamask
run: echo "version=$(node -p 'require("./e2e/package.json").config.metamaskVersion')" >> "$GITHUB_OUTPUT"

- name: Install Playwright browsers
run: cd e2e && pnpm exec playwright install chromium --with-deps

Expand All @@ -78,12 +79,18 @@ jobs:
uses: actions/cache@v4
with:
path: e2e/.extensions/metamask
key: metamask-v${{ env.METAMASK_VERSION }}-${{ hashFiles('e2e/download-metamask-extension.ts') }}
key: metamask-v${{ steps.metamask.outputs.version }}-${{ hashFiles('e2e/download-metamask-extension.ts') }}

- name: Download MetaMask extension
if: steps.metamask-cache.outputs.cache-hit != 'true'
run: cd e2e && pnpm setup:metamask

- name: Lint and typecheck E2E
run: cd e2e && pnpm lint && pnpm typecheck

- name: Start Anvil forks
run: cd e2e && pnpm anvil:up

- name: Run E2E tests
run: cd e2e && xvfb-run --auto-servernum -- pnpm test
env:
Expand All @@ -92,6 +99,10 @@ jobs:
BASE_URL: ${{ steps.url.outputs.url }}
CI: true

- name: Stop Anvil forks
if: always()
run: cd e2e && pnpm anvil:down

- name: Upload test report
uses: actions/upload-artifact@v4
if: always()
Expand Down
6 changes: 5 additions & 1 deletion apps/hub/.env
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,8 @@

NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=""
NEXT_PUBLIC_STATUS_NETWORK_API_URL="http://localhost:3001/api/v1"
NEXT_PUBLIC_STATUS_API_URL="http://localhost:3030"
NEXT_PUBLIC_STATUS_API_URL="http://localhost:3030"

# Optional: override RPC endpoints (defaults to Status API proxy)
# NEXT_PUBLIC_MAINNET_RPC_URL=
# NEXT_PUBLIC_LINEA_RPC_URL=
2 changes: 1 addition & 1 deletion apps/hub/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Then, pull environment variables:
> \[!NOTE]
> `NEXT_PUBLIC_STATUS_NETWORK_API_URL`: Base URL for the Status Network API used by the hub for auth, current user (`/auth/me`), karma/sybil (proof-of-work), predeposit vaults APR, and captcha. You can run this API locally by cloning the sn-api repo <https://github.com/status-im/sn-api>. If you do so don't forget to change the value of this variable to the local API's URL.
>
> `NEXT_PUBLIC_STATUS_API_URL`: Base URL for the Status API used by the hub to fetch token exchange rates (market data).
> `NEXT_PUBLIC_STATUS_API_URL`: Base URL for the Status API used by the hub to fetch token exchange rates (market data) and as the default RPC proxy for Mainnet/Linea chain interactions (`/api/trpc/rpc.proxy`). If this variable is empty, wagmi's built-in public RPCs are used as fallback. You can override RPC endpoints per-chain with `NEXT_PUBLIC_MAINNET_RPC_URL` and `NEXT_PUBLIC_LINEA_RPC_URL`.
> You can run this API locally by running `pnpm dev` the root or in the [api](https://github.com/status-im/status-web/tree/main/apps/api) project. If you do so don't forget to change the value of this variable to `http://localhost:3030`.

Start the development server:
Expand Down
5 changes: 4 additions & 1 deletion apps/hub/src/app/_hooks/useDepositFlow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ export function useDepositFlow({
chainId: vault.chainId,
})

const { data: depositLimits } = usePreDepositLimits({ vault })
const { data: depositLimits } = usePreDepositLimits({
vault,
enabled: !isGUSD,
})
const maxDeposit = isGUSD ? undefined : depositLimits?.maxDeposit
const minDeposit = isGUSD ? undefined : depositLimits?.minDeposit

Expand Down
17 changes: 1 addition & 16 deletions apps/hub/src/app/_hooks/useGUSDPreDeposit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export function useGUSDPreDeposit(): UseGUSDPreDepositReturn {
const remoteRecipient = addressToBytes32(address)

sendPreDepositEvent({
type: 'START_APPROVE_TOKEN',
type: 'START_PRE_DEPOSIT',
amount,
})

Expand All @@ -116,27 +116,12 @@ export function useGUSDPreDeposit(): UseGUSDPreDepositReturn {
] as const

try {
const estimatedGas = await publicClient?.estimateContractGas({
address: GENERIC_DEPOSITOR.address,
abi: GENERIC_DEPOSITOR.abi,
functionName: 'depositAndPredeposit',
args: contractArgs,
account: address,
})

const GAS_LIMIT_MULTIPLIER_PERCENT = 120n

const gasLimit = estimatedGas
? (estimatedGas * GAS_LIMIT_MULTIPLIER_PERCENT) / 100n
: undefined

const hash = await writeContractAsync({
address: GENERIC_DEPOSITOR.address,
abi: GENERIC_DEPOSITOR.abi,
functionName: 'depositAndPredeposit',
args: contractArgs,
chainId: mainnet.id,
gas: gasLimit,
})

sendPreDepositEvent({ type: 'EXECUTE' })
Expand Down
9 changes: 7 additions & 2 deletions apps/hub/src/app/_hooks/usePreDepositLimits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import type { Vault } from '~constants/index'
export interface MinPreDepositValueParams {
/** Vault to query Min deposit for */
vault: Vault
/** Whether to enable the query (default: true) */
enabled?: boolean
}

// ============================================================================
Expand Down Expand Up @@ -83,14 +85,17 @@ export interface MinPreDepositValueParams {
* ```
*
*/
export function usePreDepositLimits({ vault }: MinPreDepositValueParams) {
export function usePreDepositLimits({
vault,
enabled = true,
}: MinPreDepositValueParams) {
return useReadContract({
abi: vault.abi,
address: vault.address,
functionName: 'getDepositLimits',
chainId: vault.chainId,
query: {
enabled: vault !== null,
enabled: enabled && vault !== null,
select: data => {
return {
minDeposit: data[0],
Expand Down
20 changes: 15 additions & 5 deletions e2e/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,20 @@ WALLET_PASSWORD=
# MetaMask Extension
# ============================================================================
METAMASK_EXTENSION_PATH=.extensions/metamask
METAMASK_VERSION=13.18.1
# Override MetaMask version (default: package.json → config.metamaskVersion)
# METAMASK_VERSION=13.18.1

# ============================================================================
# Network Configuration
# ============================================================================
STATUS_SEPOLIA_RPC_URL=https://public.sepolia.rpc.status.network
STATUS_SEPOLIA_CHAIN_ID=1660990954
# Anvil Local Forks (used by docker-compose.anvil.yml + test fixtures)
# ============================================================================
# Fork RPC endpoints (override for custom Anvil targets)
# ANVIL_MAINNET_RPC=http://localhost:8547
# ANVIL_LINEA_RPC=http://localhost:8546
# Docker Compose port mappings (must match ANVIL_*_RPC if both are set)
# MAINNET_FORK_PORT=8547
# LINEA_FORK_PORT=8546
# Fork source URLs (only used by Docker Compose)
# MAINNET_FORK_URL=https://ethereum-rpc.publicnode.com
# LINEA_FORK_URL=https://rpc.linea.build
# Auto-derived from WALLET_SEED_PHRASE if not set
# WALLET_ADDRESS=
17 changes: 17 additions & 0 deletions e2e/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Dependencies
node_modules/

# Test results
test-results/
playwright-report/
Expand All @@ -8,3 +11,17 @@ extensions/

# Browser profiles
.pw-chromium-profile/

# Environment files
.env
.env.local

# TypeScript build
*.tsbuildinfo
dist/

# npm lockfile (project uses pnpm)
package-lock.json

# OS files
.DS_Store
Loading
Loading