fix: Send's balance line is drawn again when a refresh returns (closes #748)
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:
+5
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user