fix 0-balance not updating on chain switch; remove redundant lock button

This commit is contained in:
2026-05-22 12:35:32 +08:00
parent dade59722c
commit ee11723e7d
2 changed files with 2 additions and 5 deletions
@@ -378,10 +378,6 @@
onclick={() => navigate('/settings')}>
<SettingsIcon size={16} />
</Button>
<Button variant="outline" onclick={() => w.lock()}>
<LockKeyhole size={16} />
Lock
</Button>
<Button
variant="outline"
onclick={async () => {
@@ -325,6 +325,7 @@ export const EvmWallet = () => {
if (!seed || !electrobun.rpc) return
loadingBalance = true
loadingTransactions = true
balance = '0'
error = ''
const account = mnemonicToAccount(seed)
address = account.address
@@ -335,7 +336,7 @@ export const EvmWallet = () => {
const [nativeBal] = await tryCatch(
client.getBalance({ address: account.address }),
)
if (nativeBal) balance = formatEther(nativeBal)
if (nativeBal !== undefined) balance = formatEther(nativeBal)
const [bals] = await tryCatch(
electrobun.rpc.request.fetchTokenBalances({
address,