fix: a network switch in Settings updates the testnet banner at once (closes #511)
The Settings network handler now redraws the red banner once the switch is saved, so it appears on a switch to Sepolia and goes on a switch back to mainnet while Settings is still on screen. Before, the banner changed only when the next screen came up. The Chrome browser suite switches both ways on Settings and reads the banner each time. Model: opus-5-5
This commit was merged in pull request #619.
This commit is contained in:
@@ -343,11 +343,13 @@ function init(ctx) {
|
||||
// switch request.
|
||||
notify({ type: "AUTISTMASK_NETWORK_CHANGED", chainId: net.chainId });
|
||||
resetRenderedViews();
|
||||
// Settings itself is brought up to date for the new network here.
|
||||
// Settings itself, and the testnet banner above it, are brought up
|
||||
// to date for the new network here.
|
||||
markViewRendered("settings");
|
||||
$("settings-rpc").value = state.rpcUrl;
|
||||
$("settings-blockscout").value = state.blockscoutUrl;
|
||||
renderTrackedTokens();
|
||||
updateDebugBanner(state.currentView);
|
||||
showFlash("Switched to " + net.name + ".");
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user