E2E: earn, mint-and-balance and multi-account only test a non-guardian account shape production cannot create
- Langage dominant
- TypeScript
- Étoiles
- 5
- Forks
- 28
- Merge moyen
- 9 h 50 min
- PR mergées (30 j)
- 123
Description
## 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.
Guide de contribution
Ouvrir le guide de contribution
Évaluation
Cette issue n'a pas encore été évaluée.