Fix send balance display when sending from address-token view
All checks were successful
check / check (push) Successful in 17s
All checks were successful
check / check (push) Successful in 17s
Read token from state.selectedToken when set, falling back to the select element. This ensures the correct token balance is shown even when the select dropdown is hidden or its value didn't take because the token was filtered out by renderSendTokenSelect.
This commit is contained in:
@@ -39,7 +39,7 @@ function updateSendBalance() {
|
|||||||
addr.ensName || null,
|
addr.ensName || null,
|
||||||
null,
|
null,
|
||||||
);
|
);
|
||||||
const token = $("send-token").value;
|
const token = state.selectedToken || $("send-token").value;
|
||||||
if (token === "ETH") {
|
if (token === "ETH") {
|
||||||
$("send-balance").textContent =
|
$("send-balance").textContent =
|
||||||
"Current balance: " + (addr.balance || "0") + " ETH";
|
"Current balance: " + (addr.balance || "0") + " ETH";
|
||||||
@@ -89,7 +89,7 @@ function init(_ctx) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const token = $("send-token").value;
|
const token = state.selectedToken || $("send-token").value;
|
||||||
const addr = currentAddress();
|
const addr = currentAddress();
|
||||||
|
|
||||||
ctx.showConfirmTx({
|
ctx.showConfirmTx({
|
||||||
|
|||||||
Reference in New Issue
Block a user