fix: Settings refuses an endpoint URL whose network changed before it was stored (closes #663)
The RPC and Blockscout "Save" buttons in Settings take the network that Settings was last drawn for. A follow of a switch saved elsewhere sets `state` first. Settings is drawn again only once the follow's write returns. The URL is set in `state` inside the save, holding the lock. The save is refused if the network that Settings showed is no longer active, on the page or in the stored record. The flash message then says that the network changed, and "Saved." is shown only for a stored URL. Before, a popup that followed a switch saved elsewhere could replace the URL before the write and still show "Saved.". It could also store a URL for a network that Settings did not show. Model: opus-5-5
This commit is contained in:
@@ -2281,6 +2281,8 @@ view would leave a wallet one click from deletion.
|
||||
- Endpoint URL input + "Save" button. "Save" asks the URL for `/stats`
|
||||
and saves the URL only if that request succeeds. The request carries
|
||||
no user data and is made whether or not "Use Blockscout" is ticked.
|
||||
- If the network changes before either "Save" stores its URL, the URL is not
|
||||
saved and a flash message says so
|
||||
- Etherscan:
|
||||
- "Check recipients on Etherscan" checkbox, unticked until the user
|
||||
ticks it
|
||||
|
||||
Reference in New Issue
Block a user