0xMiden / 0xMiden/wallet-adapter

WalletModal can crash when no wallet adapters are available

Abierto
#105 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
TypeScript
Estrellas
2
Forks
9
Merge medio
25 min
PR fusionados (30 d)
1

Descripción

`WalletModal` assumes there is always at least one wallet adapter available when no installed wallets are present.

Evidence in `packages/ui/src/WalletModal.tsx`:
- `getStartedWallet` falls back to `otherWallets[0]!` when there are no installed wallets and the Bread wallet adapter is not found.
- The empty-installed-wallet render path then reads `getStartedWallet.adapter.url` for the Chrome badge link.

If a consumer renders the modal with an empty `wallets` array, or with a set of adapters that does not include the Bread wallet and produces no loadable/not-detected fallback, `getStartedWallet` can be `undefined` at runtime and the modal crashes instead of rendering a stable empty state.

This should be guarded so the modal handles an empty wallet list without throwing.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.