fix: Home's Send and Receive clear the selected token (closes #753)
check / check (push) Successful in 6m9s
e2e / e2e-chrome (push) Successful in 14m8s
e2e / e2e-firefox (push) Successful in 2m54s

Three routes reach Home with a token still selected. Send used that token
whatever its dropdown showed, and Receive warned about it. Both now clear it
when they open, and Send's dropdown starts on ETH.

Model: opus-5-5
This commit was merged in pull request #754.
This commit is contained in:
2026-11-03 16:09:42 +01:00
parent ee370b5ef7
commit c150b83322
3 changed files with 195 additions and 2 deletions
+7
View File
@@ -510,11 +510,15 @@ function init(ctx) {
showFlash("Cannot send \u2014 zero balance.");
return;
}
// Send uses a selected token ahead of its dropdown, and AddressToken
// can leave one selected on the way here.
state.selectedToken = null;
$("send-to").value = "";
$("send-amount").value = "";
$("send-token-dropdown").classList.remove("hidden");
$("send-token-static").classList.add("hidden");
renderSendTokenSelect(addr);
$("send-token").value = "ETH";
updateSendBalance();
resetSendValidation();
pushCurrentView();
@@ -526,6 +530,9 @@ function init(ctx) {
showFlash("No active address selected.");
return;
}
// Receive warns about a selected token, and AddressToken can leave one
// selected on the way here.
state.selectedToken = null;
ctx.showReceive();
});
}