E2E: earn, mint-and-balance and multi-account only test a non-guardian account shape production cannot create
- Lingua principale
- TypeScript
- Stelle
- 5
- Fork
- 28
- Merge medio
- 9h 50m
- PR unite (30g)
- 123
Descrizione
## 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.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- typescript
- Ambito
- testing-qa
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Attiva
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 65/100