0xMiden / 0xMiden/wallet

Funding-flow follow-ups from #504 review (non-blocking)

Aberta
#709 2 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
TypeScript
Estrelas
5
Forks
28
Merge médio
9h 50min
PRs com merge (30d)
123

Descrição

Non-blocking findings from @WiktorStarczewski's re-review of #504 (https://github.com/0xMiden/wallet/pull/504), split out so they don't hold the lifecycle work:

- **Swap default pair is race-dependent** — `getSwapTokens()` reorders on native-asset discovery while `SwapManager` seeds `useState(() => getSwapTokens()[0]!)` once at mount → cold start defaults to IMIDEN→IETH, warm start to MIDEN→IMIDEN. Pick defaults by symbol, or reorder only for display.
- **Reduced-motion guard for the two new infinite animations** in `main.css` (hourglass flip + progress runner), and/or move them out of `main.css` per the frontend skill; also answers @0xnullifier's 08-07 nit about animations in `main.css`.
- **`faucetHeroActive` can outlive the faucet card** — gate it on `showFaucetPrompt` so pending-notes isn't suppressed against an unmounted card.
- **Clamp the resume backstop** — `Math.min(FAUCET_FUNDS_ARRIVAL_TIMEOUT_MS, …)` and reject a future `requestedAt` when reading the marker (backward clock step currently wedges the hero).
- **>3-minute mint can be minted twice** — the backstop returns a fully actionable card without completing the prompt; decide whether an "already requested" marker should outlive the backstop.
- **"Funded!" amount re-mixes baseline notes** — the success sub-label totals all pending notes, not just the newly arrived mint.
- **Success-beat tests run on real timers** (3000/3500ms budgets against a 2400ms beat).
- **NIT: abort-forwarding test asserts nothing** — `faucet-api.test.ts` 429-region test structurally equates two non-aborted AbortSignals; assert abort→rejection instead.
- **NIT: 429 back-off sleep ignores the caller's abort** (delays cancellation ≤30s).
- **NIT: marker clear writes `null` instead of removing the key.**
- **NIT: `role="button"` card + real inner buttons** — ARIA exposure of the dismiss X, and focus loss when the hero disables `onClick`; consider `aria-disabled` + retained `tabIndex`.

Guia de contribuição

Abrir o guia de contribuição

Direção de pesquisa

Look at the funding-flow components and tests mentioned: `getSwapTokens()` and `SwapManager` for the race condition, `main.css` for animations, `faucetHeroActive` and `showFaucetPrompt` logic, and `faucet-api.test.ts` for abort-signal tests. Start by running existing tests to understand the flow, then address each finding in the relevant file. 'Done' means each of the listed issues is fixed without breaking existing functionality.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
css, typescript
Domínio
frontend, testing
Tipo de issue
Bug
Dificuldade
3/5
Tempo estimado
1-2 dias
Status de atividade
Ativa
Clareza
Razoavelmente clara
Facilidade para iniciantes
55/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.