fix: Send's balance line is drawn again when a refresh returns (closes #748)
check / check (push) Waiting to run
e2e / e2e-chrome (push) Waiting to run
e2e / e2e-firefox (push) Waiting to run

Send opened at an address no refresh had read kept reading
"Current balance: unknown" after a refresh had read the balance, until the
screen was opened again. A token just added read the same way.

A refresh that returns while Send is up now runs updateSendBalance(). The
token list is not rebuilt, so the recipient, amount and token stay as the
user left them. README says so.

Model: opus-5-5
This commit was merged in pull request #749.
This commit is contained in:
2026-11-03 15:05:11 +01:00
parent 39c1ad09c0
commit 39c58b8775
3 changed files with 69 additions and 3 deletions
+5 -2
View File
@@ -107,8 +107,10 @@ let refreshTimer = null;
// tracked token list stays as it is.
//
// Once the save is done, the wallet list is drawn again. So are the balances
// on AddressDetail or AddressToken when that screen is up. No other screen is
// drawn again, DeleteAddress and its balance lines included.
// on AddressDetail or AddressToken when that screen is up. When Send is up, its
// From address and current balance are drawn again, and its inputs and dropdown
// stay as the user left them. No other screen is drawn again, DeleteAddress and
// its balance lines included.
async function doRefreshAndRender() {
if (refreshInFlight) {
refreshAgain = true;
@@ -164,6 +166,7 @@ async function doRefreshAndRender() {
renderWalletList();
if (state.currentView === "address") addressDetail.renderBalances();
if (state.currentView === "address-token") addressToken.renderBalance();
if (state.currentView === "send") send.updateSendBalance();
} catch (e) {
// No caller waits for this function, so it must never reject. An
// unhandled rejection reports nothing. The save inside it reports its