-
Notifications
You must be signed in to change notification settings - Fork 12
chore: next-gen app #259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
chore: next-gen app #259
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates configuration files for the Next.js app, refactors toast integrations in various authentication components, and standardizes the imports for the scoped toast utility across legacy pages and hooks.
- Added jest and i18next scanner configuration
- Updated components and hooks to pass and import toast from new locations
- Minor refactoring in authentication flows and renaming utilities
Reviewed Changes
Copilot reviewed 102 out of 104 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
apps/next/jest.config.js | New Jest configuration for testing with ts-jest and custom resolver setup. |
apps/next/i18next-scanner.config.js | New i18next scanner config with TypeScript support and custom resource options. |
apps/next/README.md | Minimal README update for the Next.js app. |
apps/legacy/src/popup/popup.tsx | Added toast prop to Onboarding and Swap context providers. |
apps/legacy/src/pages/Onboarding/pages/Seedless/modals/FIDOModal.tsx | Integrated toast into useSeedlessActions and maintained device naming state. |
apps/legacy/src/pages/Onboarding/pages/Seedless/modals/AuthenticatorModal.tsx | Passed toast to useSeedlessActions for improved error handling. |
apps/legacy/src/pages/Onboarding/pages/Seedless/components/GoogleButton.tsx | Updated useSeedlessActions call to include toast for signIn. |
apps/legacy/src/pages/Onboarding/pages/Seedless/components/AppleButton.tsx | Updated useSeedlessActions call to include toast for signIn. |
apps/legacy/src/pages/Onboarding/pages/Seedless/RecoveryMethods.tsx | Updated useSeedlessActions call to include toast for loginWithoutMFA. |
apps/legacy/src/pages/ImportPrivateKey/ImportPrivateKey.tsx | Changed the import path for useScopedToast. |
apps/legacy/src/pages/Accounts/hooks/useWalletRename.tsx | Updated toast import to new scoped path. |
apps/legacy/src/pages/Accounts/hooks/useEntityRename.tsx | Updated toast import to new scoped path. |
apps/legacy/src/pages/Accounts/hooks/useAccountRename.tsx | Updated toast import to new scoped path and integrated rename handling. |
apps/legacy/src/pages/Accounts/hooks/useAccountRemoval.tsx | Updated toast import to new scoped path. |
apps/legacy/src/pages/Accounts/components/AccountItem.tsx | Updated toast import to new scoped path. |
apps/legacy/src/pages/Accounts/Accounts.tsx | Updated toast import to new scoped path. |
apps/legacy/src/pages/Accounts/AccountDetailsView.tsx | Updated toast import to new scoped path. |
Files not reviewed (2)
- .yarn/patches/@mui-material-npm-6.4.11-84c49ed24a.patch: Language not supported
- apps/legacy/package.json: Language not supported
Comments suppressed due to low confidence (2)
apps/legacy/src/pages/Onboarding/pages/Seedless/modals/FIDOModal.tsx:30
- Consider renaming 'FIDODeviceName' to 'fidoDeviceName' to adhere to standard lowerCamelCase naming conventions for variables.
const [FIDODeviceName, setFIDODeviceName] = useState('');
apps/legacy/src/pages/Accounts/hooks/useAccountRename.tsx:4
- The onFailure callback currently uses toast.success for a failure scenario. It should use toast.error to accurately reflect the error state.
const onFailure = useCallback(() => toast.success(t('Renaming failed'), { duration: 1000 }), [toast, t]);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested both legacy and next versions 👍
Semgrep found 2 Risk: Affected versions of semver are vulnerable to Inefficient Regular Expression Complexity. The vulnerability exists in the package semver allowing Regular Expression Denial of Service (ReDoS) through the Fix: Upgrade this library to at least version 7.5.2 at core-extension/yarn.lock:31424. Reference(s): GHSA-c2qf-rxjj-qqgw, CVE-2022-25883 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
works fine 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes
@avalabs/core-k2-components
are not leaked to the new app via some shared hooks or react contexts.apps/next
directory with basic structure, a welcoming screen and a simple unit testDirectories breakdown
packages/service-worker
(@core/service-worker
)packages/inpage
(@core/inpage
)packages/content-script
(@core/content-script
)packages/offscreen
(@core/offscreen
)packges/types
(@core/types
)packages/common
(@core/common
)packages/ui
(@core/ui
)apps/legacy
(@core-ext/legacy
)packages/tsconfig
holds the base tsconfig file and some widely used.d.ts
filesScripting
yarn workspaces foreach
command is widely used.@core/ui
,@core/common
are included as-they-are by the buildable packages that use them, e.g. the service worker)yarn dev
,yarn build
, etc.) should still work and build the entire legacy app.offscreen
,inpage
,service-worker
,content-script
) have their output set to thedist/<namespace>
folder (so they can clear it when rebuilding without worrying about each others' files).dist
folder, does not touch the<namespace>
sub-directories.Testing
.env
file to.env.dev
(there is a new env variable in 1pass -NEXT_GEN_EXTENSION_PUBLIC_KEY
)yarn install
,yarn dev
,yarn build
,yarn typecheck
,yarn scanner
, etc.)yarn dev:next
chrome://extensions
, clickLoad unpacked
and point todist-next
directoryScreenshots:
Screen.Recording.2025-05-12.at.13.27.27.mov
Checklist for the author