// Views the popup may reopen onto. // // The popup persists the current view so that reopening the toolbar popup // lands the user back where they were. Only views that can be fully // re-rendered from persisted state belong here; every other view falls back // to the nearest restorable parent (src/popup/index.js restoreView()). // // A view that displays a secret must NEVER be listed. Restoring onto one // would put a private key or a recovery phrase on screen with no password // prompt in front of it, on a popup the user may have reopened by accident. // That is why "export-privkey" and "show-phrase" are absent. // // Kept in its own module, with no dependencies, so tests can assert the // exclusion directly rather than trusting a reading of the popup entry // point, which cannot be required outside a browser. const RESTORABLE_VIEWS = new Set([ "main", "address", "address-token", "receive", "settings", "settings-addtoken", "confirm-tx", "transaction", "success-tx", "error-tx", ]); module.exports = { RESTORABLE_VIEWS };