From cb01b0e709aac87a9b12aa07e13d6907b34aa501 Mon Sep 17 00:00:00 2001 From: Victor Thomas <10986371+vthomas13@users.noreply.github.com> Date: Fri, 14 Jun 2024 18:22:48 -0400 Subject: [PATCH 1/2] test --- lavamoat/build-system/policy.json | 136 +++++++++++++++++++- ui/pages/onboarding-flow/welcome/welcome.js | 12 +- 2 files changed, 145 insertions(+), 3 deletions(-) diff --git a/lavamoat/build-system/policy.json b/lavamoat/build-system/policy.json index 635158958f06..2aa32821fc6a 100644 --- a/lavamoat/build-system/policy.json +++ b/lavamoat/build-system/policy.json @@ -2095,7 +2095,8 @@ "chokidar>normalize-path": true, "chokidar>readdirp": true, "del>is-glob": true, - "eslint>glob-parent": true + "eslint>glob-parent": true, + "tsx>fsevents": true } }, "chokidar>anymatch": { @@ -4971,6 +4972,7 @@ "@lavamoat/allow-scripts>@npmcli/run-script>node-gyp>npmlog": true, "gulp-watch>chokidar>fsevents>node-pre-gyp>detect-libc": true, "gulp-watch>chokidar>fsevents>node-pre-gyp>nopt": true, + "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog": true, "gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf": true, "gulp-watch>chokidar>fsevents>node-pre-gyp>semver": true } @@ -5000,6 +5002,7 @@ }, "packages": { "@lavamoat/allow-scripts>@npmcli/run-script>node-gyp>nopt>abbrev": true, + "gulp-watch>chokidar>fsevents>node-pre-gyp>nopt>abbrev": true, "gulp-watch>chokidar>fsevents>node-pre-gyp>nopt>osenv": true } }, @@ -5028,9 +5031,20 @@ }, "packages": { "@storybook/core>@storybook/core-server>x-default-browser>default-browser-id>untildify>os-homedir": true, + "gulp-watch>chokidar>fsevents>node-pre-gyp>nopt>osenv>os-homedir": true, "gulp-watch>chokidar>fsevents>node-pre-gyp>nopt>osenv>os-tmpdir": true } }, + "gulp-watch>chokidar>fsevents>node-pre-gyp>nopt>osenv>os-homedir": { + "builtin": { + "os.homedir": true + }, + "globals": { + "process.env": true, + "process.getuid": true, + "process.platform": true + } + }, "gulp-watch>chokidar>fsevents>node-pre-gyp>nopt>osenv>os-tmpdir": { "globals": { "process.env.SystemRoot": true, @@ -5041,6 +5055,119 @@ "process.platform": true } }, + "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog": { + "builtin": { + "events.EventEmitter": true, + "util": true + }, + "globals": { + "process.nextTick": true, + "process.stderr": true + }, + "packages": { + "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet": true, + "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>console-control-strings": true, + "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge": true, + "nyc>yargs>set-blocking": true + } + }, + "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet": { + "builtin": { + "events.EventEmitter": true, + "util.inherits": true + }, + "packages": { + "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream": true, + "koa>delegates": true + } + }, + "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream": { + "builtin": { + "events.EventEmitter": true, + "stream": true, + "util": true + }, + "globals": { + "process.browser": true, + "process.env.READABLE_STREAM": true, + "process.stderr": true, + "process.stdout": true, + "process.version.slice": true, + "setImmediate": true + }, + "packages": { + "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream>isarray": true, + "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream>safe-buffer": true, + "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream>string_decoder": true, + "pumpify>inherits": true, + "readable-stream-2>core-util-is": true, + "readable-stream-2>process-nextick-args": true, + "readable-stream>util-deprecate": true + } + }, + "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream>safe-buffer": { + "builtin": { + "buffer": true + } + }, + "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream>string_decoder": { + "packages": { + "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream>safe-buffer": true + } + }, + "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge": { + "builtin": { + "util.format": true + }, + "globals": { + "clearInterval": true, + "process": true, + "setImmediate": true, + "setInterval": true + }, + "packages": { + "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>console-control-strings": true, + "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>aproba": true, + "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>has-unicode": true, + "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>string-width": true, + "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>strip-ansi": true, + "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>wide-align": true, + "nyc>signal-exit": true, + "react>object-assign": true + } + }, + "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>has-unicode": { + "builtin": { + "os.type": true + }, + "globals": { + "process.env.LANG": true, + "process.env.LC_ALL": true, + "process.env.LC_CTYPE": true + } + }, + "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>string-width": { + "packages": { + "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>string-width>is-fullwidth-code-point": true, + "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>strip-ansi": true, + "gulp>gulp-cli>yargs>string-width>code-point-at": true + } + }, + "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>string-width>is-fullwidth-code-point": { + "packages": { + "gulp>gulp-cli>yargs>string-width>is-fullwidth-code-point>number-is-nan": true + } + }, + "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>strip-ansi": { + "packages": { + "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>strip-ansi>ansi-regex": true + } + }, + "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>wide-align": { + "packages": { + "yargs>string-width": true + } + }, "gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf": { "builtin": { "assert": true, @@ -9169,6 +9296,13 @@ "typescript": true } }, + "tsx>fsevents": { + "globals": { + "console.assert": true, + "process.platform": true + }, + "native": true + }, "typescript": { "builtin": { "buffer.Buffer": true, diff --git a/ui/pages/onboarding-flow/welcome/welcome.js b/ui/pages/onboarding-flow/welcome/welcome.js index 2b6c092af39a..bcd4dc8af755 100644 --- a/ui/pages/onboarding-flow/welcome/welcome.js +++ b/ui/pages/onboarding-flow/welcome/welcome.js @@ -51,11 +51,13 @@ export default function OnboardingWelcome() { const currentKeyring = useSelector(getCurrentKeyring); const firstTimeFlowType = useSelector(getFirstTimeFlowType); const [termsChecked, setTermsChecked] = useState(false); + const [newAccountCreationInProgress, setNewAccountCreationInProgress] = + useState(false); // Don't allow users to come back to this screen after they // have already imported or created a wallet useEffect(() => { - if (currentKeyring) { + if (currentKeyring && !newAccountCreationInProgress) { if (firstTimeFlowType === FirstTimeFlowType.import) { history.replace(ONBOARDING_COMPLETION_ROUTE); } @@ -65,10 +67,16 @@ export default function OnboardingWelcome() { history.replace(ONBOARDING_SECURE_YOUR_WALLET_ROUTE); } } - }, [currentKeyring, history, firstTimeFlowType]); + }, [ + currentKeyring, + history, + firstTimeFlowType, + newAccountCreationInProgress, + ]); const trackEvent = useContext(MetaMetricsContext); const onCreateClick = async () => { + setNewAccountCreationInProgress(true); dispatch(setFirstTimeFlowType(FirstTimeFlowType.create)); trackEvent({ category: MetaMetricsEventCategory.Onboarding, From de0afac801d28f6f520596d4b0f491562a831e86 Mon Sep 17 00:00:00 2001 From: Victor Thomas <10986371+vthomas13@users.noreply.github.com> Date: Thu, 20 Jun 2024 10:03:50 -0400 Subject: [PATCH 2/2] Discard changes to lavamoat/build-system/policy.json --- lavamoat/build-system/policy.json | 136 +----------------------------- 1 file changed, 1 insertion(+), 135 deletions(-) diff --git a/lavamoat/build-system/policy.json b/lavamoat/build-system/policy.json index 2aa32821fc6a..635158958f06 100644 --- a/lavamoat/build-system/policy.json +++ b/lavamoat/build-system/policy.json @@ -2095,8 +2095,7 @@ "chokidar>normalize-path": true, "chokidar>readdirp": true, "del>is-glob": true, - "eslint>glob-parent": true, - "tsx>fsevents": true + "eslint>glob-parent": true } }, "chokidar>anymatch": { @@ -4972,7 +4971,6 @@ "@lavamoat/allow-scripts>@npmcli/run-script>node-gyp>npmlog": true, "gulp-watch>chokidar>fsevents>node-pre-gyp>detect-libc": true, "gulp-watch>chokidar>fsevents>node-pre-gyp>nopt": true, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog": true, "gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf": true, "gulp-watch>chokidar>fsevents>node-pre-gyp>semver": true } @@ -5002,7 +5000,6 @@ }, "packages": { "@lavamoat/allow-scripts>@npmcli/run-script>node-gyp>nopt>abbrev": true, - "gulp-watch>chokidar>fsevents>node-pre-gyp>nopt>abbrev": true, "gulp-watch>chokidar>fsevents>node-pre-gyp>nopt>osenv": true } }, @@ -5031,20 +5028,9 @@ }, "packages": { "@storybook/core>@storybook/core-server>x-default-browser>default-browser-id>untildify>os-homedir": true, - "gulp-watch>chokidar>fsevents>node-pre-gyp>nopt>osenv>os-homedir": true, "gulp-watch>chokidar>fsevents>node-pre-gyp>nopt>osenv>os-tmpdir": true } }, - "gulp-watch>chokidar>fsevents>node-pre-gyp>nopt>osenv>os-homedir": { - "builtin": { - "os.homedir": true - }, - "globals": { - "process.env": true, - "process.getuid": true, - "process.platform": true - } - }, "gulp-watch>chokidar>fsevents>node-pre-gyp>nopt>osenv>os-tmpdir": { "globals": { "process.env.SystemRoot": true, @@ -5055,119 +5041,6 @@ "process.platform": true } }, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog": { - "builtin": { - "events.EventEmitter": true, - "util": true - }, - "globals": { - "process.nextTick": true, - "process.stderr": true - }, - "packages": { - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet": true, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>console-control-strings": true, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge": true, - "nyc>yargs>set-blocking": true - } - }, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet": { - "builtin": { - "events.EventEmitter": true, - "util.inherits": true - }, - "packages": { - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream": true, - "koa>delegates": true - } - }, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream": { - "builtin": { - "events.EventEmitter": true, - "stream": true, - "util": true - }, - "globals": { - "process.browser": true, - "process.env.READABLE_STREAM": true, - "process.stderr": true, - "process.stdout": true, - "process.version.slice": true, - "setImmediate": true - }, - "packages": { - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream>isarray": true, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream>safe-buffer": true, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream>string_decoder": true, - "pumpify>inherits": true, - "readable-stream-2>core-util-is": true, - "readable-stream-2>process-nextick-args": true, - "readable-stream>util-deprecate": true - } - }, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream>safe-buffer": { - "builtin": { - "buffer": true - } - }, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream>string_decoder": { - "packages": { - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>are-we-there-yet>readable-stream>safe-buffer": true - } - }, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge": { - "builtin": { - "util.format": true - }, - "globals": { - "clearInterval": true, - "process": true, - "setImmediate": true, - "setInterval": true - }, - "packages": { - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>console-control-strings": true, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>aproba": true, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>has-unicode": true, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>string-width": true, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>strip-ansi": true, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>wide-align": true, - "nyc>signal-exit": true, - "react>object-assign": true - } - }, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>has-unicode": { - "builtin": { - "os.type": true - }, - "globals": { - "process.env.LANG": true, - "process.env.LC_ALL": true, - "process.env.LC_CTYPE": true - } - }, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>string-width": { - "packages": { - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>string-width>is-fullwidth-code-point": true, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>strip-ansi": true, - "gulp>gulp-cli>yargs>string-width>code-point-at": true - } - }, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>string-width>is-fullwidth-code-point": { - "packages": { - "gulp>gulp-cli>yargs>string-width>is-fullwidth-code-point>number-is-nan": true - } - }, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>strip-ansi": { - "packages": { - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>strip-ansi>ansi-regex": true - } - }, - "gulp-watch>chokidar>fsevents>node-pre-gyp>npmlog>gauge>wide-align": { - "packages": { - "yargs>string-width": true - } - }, "gulp-watch>chokidar>fsevents>node-pre-gyp>rimraf": { "builtin": { "assert": true, @@ -9296,13 +9169,6 @@ "typescript": true } }, - "tsx>fsevents": { - "globals": { - "console.assert": true, - "process.platform": true - }, - "native": true - }, "typescript": { "builtin": { "buffer.Buffer": true,