1 Commits
Author SHA1 Message Date
sneak 0ad1b5cf89 fix: Settings never shows "Saved." for a URL the input no longer shows (closes #695)
check / check (push) Canceled after 0s
e2e / e2e-chrome (push) Canceled after 0s
e2e / e2e-firefox (push) Canceled after 0s
The RPC and Blockscout "Save" buttons in Settings now store nothing if the input no longer shows the URL that was checked. The input loses that URL when Settings is drawn again during the check. When another page changes the network, "Use Blockscout" or "Check recipients on Etherscan", this page draws Settings again. Before this change, the typed URL was stored and "Saved." appeared while the input showed the previous URL.

The save compares the input and sets the URL in `state` in one step. A save refused because the network changed shows "The URL was not saved because the network changed." A save refused because the input changed shows "The URL was not saved because it was changed during the check."

Model: opus-5-5
2026-10-27 13:26:43 +00:00
+7 -7
View File
@@ -340,13 +340,13 @@ function showNewSettings() {
// the stored record too. "Saved." then means that the stored record holds // the stored record too. "Saved." then means that the stored record holds
// `url`. // `url`.
// //
// `input` is the id of the input that the user typed `url` in. This page draws // `input` is the id of the input that the user typed `url` in. When another
// Settings again after following another page's change to a setting. A redraw // page changes the network, "Use Blockscout" or "Check recipients on
// during the endpoint check puts the URL from `state` back in the input. So if // Etherscan", this page draws Settings again. A redraw during the endpoint
// the input no longer shows `url`, nothing is saved. The flash message then // check puts the URL from `state` back in the input. So if the input no longer
// says that the URL was changed during the check. The save compares the input // shows `url`, nothing is saved. The flash message then says that the URL was
// and sets `url` in `state` in one step. So a redraw after the comparison shows // changed during the check. The save compares the input and sets `url` in
// `url`. // `state` in one step. So a redraw after the comparison shows `url`.
async function saveEndpoint(field, input, url, networkId) { async function saveEndpoint(field, input, url, networkId) {
let refused = false; let refused = false;
let inputChanged = false; let inputChanged = false;