Files
Arkie-Library-Frontend/.unipi/docs/fix/2026-06-04-wallet-no-account-message-fix.md
TerryM ae64f96bbe
Some checks failed
Deploy Staging (terry-wallet-login) / deploy (push) Failing after 32s
fix: translate wallet no account error
2026-06-04 11:14:52 +08:00

1.2 KiB

title, type, date
title type date
Wallet No Account Message — Quick Fix quick-fix 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.