fix: Home's list drops the previous network's rows after a network switch (closes #718)
check / check (push) Waiting to run
e2e / e2e-chrome (push) Waiting to run
e2e / e2e-firefox (push) Waiting to run

A network switch left the previous network's rows or failure message in Home's
list until the new network's answer landed. Home now replaces them with
"Loading..." when it first draws on a new network. A redraw on the same network
keeps its rows.

Home, AddressDetail and AddressToken compared the page's network before reading
storage. A switch made in Settings could change the page during that read, and
the answer was still drawn. They now compare after the read, for an answer and
for a failure.

Model: opus-5-5
This commit was merged in pull request #738.
This commit is contained in:
2026-11-03 09:54:35 +01:00
parent 1ea0730a81
commit 49713e1cdb
6 changed files with 226 additions and 14 deletions
+5 -3
View File
@@ -241,11 +241,13 @@ async function loadTransactions(address, tokenId) {
}
// If the network changed during the lookups above, or the screen now
// shows another address or token, nothing is saved or drawn. See
// shows another address or token, nothing is saved or drawn. The page's
// network is compared after the read of storage, because a switch made
// on this page can land during that read. See
// src/shared/storedSettings.js.
if (
state.networkId !== networkId ||
!(await storedNetworkIs(networkId)) ||
state.networkId !== networkId ||
$("address-token-line").dataset.full !== address ||
state.selectedToken !== tokenId
) {
@@ -283,8 +285,8 @@ async function loadTransactions(address, tokenId) {
// If the network changed, or the screen now shows another address or
// token, the failure is not shown.
if (
state.networkId !== networkId ||
!(await storedNetworkIs(networkId)) ||
state.networkId !== networkId ||
$("address-token-line").dataset.full !== address ||
state.selectedToken !== tokenId
) {