1 Commits
Author SHA1 Message Date
sneak 1727a4af07 fix: tracked tokens are kept per network, and bundled picks are offered on mainnet only (closes #523)
check / check (push) Waiting to run
e2e / e2e-chrome (push) Waiting to run
e2e / e2e-firefox (push) Waiting to run
A network switch now puts the outgoing network's tracked tokens away in a new
persisted field, networkTrackedTokens, and brings back the incoming network's
list, or an empty one, the way endpoints are kept per network. trackedTokens
stays the active network's list, so its readers are unchanged, and the
background's switch goes through the same function. The two add-token screens
offer their common-token picks, which are mainnet contracts, on Ethereum
Mainnet only. After a switch in Settings, Back finds the screens beneath as a
reopened popup does: it renders the one it lands on for the new network, and
the stack is cut at the first screen that cannot be rendered from saved state.

Model: opus-5-5
2026-10-19 01:48:44 +00:00
+7
View File
@@ -25,8 +25,15 @@ const MAINNET_TOKEN = {
name: "Dai Stablecoin",
};
// Fake timers hold the timer of the flash message a switch ends with, which
// would otherwise fire after cleanupPopup() has removed the page and throw.
beforeEach(() => {
jest.useFakeTimers();
});
afterEach(() => {
cleanupPopup();
jest.useRealTimers();
});
// The popup reopened onto SettingsAddToken, on `networkId`.