fix 0-balance not updating on chain switch; remove redundant lock button
This commit is contained in:
@@ -378,10 +378,6 @@
|
|||||||
onclick={() => navigate('/settings')}>
|
onclick={() => navigate('/settings')}>
|
||||||
<SettingsIcon size={16} />
|
<SettingsIcon size={16} />
|
||||||
</Button>
|
</Button>
|
||||||
<Button variant="outline" onclick={() => w.lock()}>
|
|
||||||
<LockKeyhole size={16} />
|
|
||||||
Lock
|
|
||||||
</Button>
|
|
||||||
<Button
|
<Button
|
||||||
variant="outline"
|
variant="outline"
|
||||||
onclick={async () => {
|
onclick={async () => {
|
||||||
|
|||||||
@@ -325,6 +325,7 @@ export const EvmWallet = () => {
|
|||||||
if (!seed || !electrobun.rpc) return
|
if (!seed || !electrobun.rpc) return
|
||||||
loadingBalance = true
|
loadingBalance = true
|
||||||
loadingTransactions = true
|
loadingTransactions = true
|
||||||
|
balance = '0'
|
||||||
error = ''
|
error = ''
|
||||||
const account = mnemonicToAccount(seed)
|
const account = mnemonicToAccount(seed)
|
||||||
address = account.address
|
address = account.address
|
||||||
@@ -335,7 +336,7 @@ export const EvmWallet = () => {
|
|||||||
const [nativeBal] = await tryCatch(
|
const [nativeBal] = await tryCatch(
|
||||||
client.getBalance({ address: account.address }),
|
client.getBalance({ address: account.address }),
|
||||||
)
|
)
|
||||||
if (nativeBal) balance = formatEther(nativeBal)
|
if (nativeBal !== undefined) balance = formatEther(nativeBal)
|
||||||
const [bals] = await tryCatch(
|
const [bals] = await tryCatch(
|
||||||
electrobun.rpc.request.fetchTokenBalances({
|
electrobun.rpc.request.fetchTokenBalances({
|
||||||
address,
|
address,
|
||||||
|
|||||||
Reference in New Issue
Block a user