1 Commits
Author SHA1 Message Date
sneak 4ea55cc1f4 fix: Send's balance line is drawn again when a refresh returns (closes #748)
check / check (push) Successful in 6m36s
e2e / e2e-chrome (push) Successful in 15m55s
e2e / e2e-firefox (push) Successful in 2m45s
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
2026-11-03 13:37:37 +00:00
+5 -1
View File
@@ -29,6 +29,7 @@
const { HDNodeWallet, Mnemonic } = require("ethers");
const {
ADDRESS,
bootPopup,
cleanupPopup,
unversionedValidProfile,
@@ -458,13 +459,16 @@ test("a refresh that returns while Send is up draws an unread ETH balance again
const recipient = "0x" + "dd".repeat(20);
page.node("send-to").value = recipient;
page.node("send-amount").value = "0.5";
// Stands for the options on the screen, which only opening Send replaces.
// Stands for the options on the screen, which a refresh leaves as they are.
page.node("send-token").innerHTML = "options on the screen";
// Stands for the From address from before the refresh.
page.node("send-from").innerHTML = "From address before the refresh";
await refreshOnce(page, []);
expect(page.visibleViews()).toEqual(["send"]);
expect(page.text("send-balance")).toBe("Current balance: 2.0000 ETH");
expect(page.node("send-from").innerHTML).toContain(ADDRESS);
expect(page.value("send-to")).toBe(recipient);
expect(page.value("send-amount")).toBe("0.5");
expect(page.value("send-token")).toBe("ETH");