0xMiden / 0xMiden/wallet

E2E: earn, mint-and-balance and multi-account only test a non-guardian account shape production cannot create

Abierto
#769 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
TypeScript
Estrellas
5
Forks
28
Merge medio
9 h 50 min
PR fusionados (30 d)
123

Descripción

## What

Several value-moving E2E suites create wallets with `createNewWallet()`, which routes to `createWalletViaBypass({ walletType: 'offchain' })`. The harness documents that shape as unreachable in production:

> Note this is NOT a configuration production can reach: `ChooseGuardian` always emits an operator endpoint. It is kept as a leg because the offchain path is still the cheaper signal and runs without a guardian container.
>
> — `playwright/e2e/helpers/money-path.ts`, `offChainAxis`

`allowNoGuardian` defaults to `false` and is described in `effective-endpoints.ts` as "dev-only: expose a 'No guardian' card in onboarding", so every account a real user has is a guardian account.

## Why it matters

For a guardian account, `send`, `consume`, `swap`, `bridged-send` and `earn-deposit` are all in `OFFSCREEN_ROUTABLE_GUARDIAN_TYPES`, and `generateTransaction` routes any `isGuardianAccount` row through `generateGuardianTransaction`. The offchain leg therefore exercises a completely different pipeline from the one every real transaction takes — different proving path, different failure modes, no co-signing round trip.

The earn workflow states the assumption explicitly, and it is wrong:

```yaml
# (Guardian co-signer is still omitted — earn needs no co-signing.)
```

A production earn deposit **is** co-signed.

## Scope

Most suites already pair the cheap offchain leg with a guardian twin — `multi-claim` / `guardian-multi-claim`, `send-private` / `guardian-send-private`, `swap-guardian`, `bridge-out-epoch-guardian`. The ones with no guardian leg at all:

- `tests/earn/earn-deposit.spec.ts`, `tests/earn/earn-withdraw.spec.ts`
- `tests/mint-and-balance.spec.ts`
- `tests/multi-account.spec.ts`

## Suggested fix

Add a guardian leg to each, following the `guardian-multi-claim` pattern (`guardianAxis(getEnvironmentConfig().guardianUrl)` where the journey helper applies). Earn needs a guardian container added to `pr-e2e-earn.yml` and its "earn needs no co-signing" comment removed.

Keeping the offchain leg is fine — it is the cheaper signal — as long as it is not the only one.

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

The issue identifies three test suites that need a guardian leg added: earn-deposit.spec.ts, earn-withdraw.spec.ts, mint-and-balance.spec.ts, and multi-account.spec.ts. Start by examining the existing guardian test pattern in guardian-multi-claim to understand how to integrate guardianAxis. You'll need to add a guardian container to the pr-e2e-earn.yml configuration. Run the existing tests to understand the current flow before adding the new guardian path.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
typescript
Área
testing-qa
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Activo
Claridad
Bien especificado
Aptitud para principiantes
65/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.