---
title: "Wallet No Account Message — Quick Fix"
type: quick-fix
date: 2026-06-04
---

# Wallet No Account Message — Quick Fix

## Bug
When a wallet provider was detected but returned no account, the wallet login UI displayed the raw internal error key `walletNoAccount`.

## Root Cause
`connectInjectedWallet` throws `Error("walletNoAccount")`, but the modal and toast paths rendered `error.message` directly. The locale dictionaries also did not define a friendly `walletNoAccount` message.

## Fix
Translate wallet error keys before rendering them, and add user-facing English and Simplified Chinese text for `walletNoAccount`.

### Files Modified
- `src/wallet/WalletLoginModal.tsx` — translate wallet error messages before showing modal errors.
- `src/wallet/WalletProvider.tsx` — translate wallet error messages before showing toast errors.
- `src/locales/en.ts` — added English `walletNoAccount` copy.
- `src/locales/zh-CN.ts` — added Simplified Chinese `walletNoAccount` copy.

## Verification
- `npx tsc --noEmit`
- `npm run format:check`
- `npm test`

## Notes
The underlying login behavior is unchanged. This only replaces the raw internal key with a user-friendly explanation to unlock/select a wallet account and retry.
