-
Notifications
You must be signed in to change notification settings - Fork 5k
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
chore: MMI move custody component to TS #26096
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
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.
PR Summary
The Custody component has been migrated to TypeScript, enhancing type safety and maintainability.
ui/components/institutional/qr-code-modal/qr-code-modal.tsx
: UpdatedQRCodeModalProps
to allowcustodianURL
to bestring | undefined
.ui/pages/institutional/custodian-list-view/custodian-list-view.tsx
: Converted to TypeScript, definingcustodianList
prop asReact.ReactNode[]
.ui/pages/institutional/custody/custody.stories.tsx
: Converted to TypeScript, updating imports and Redux store configuration.ui/pages/institutional/custody/custody.test.tsx
: Converted to TypeScript, adding type annotations and definingMockedFuseType
.ui/pages/institutional/manual-connect-custodian/manual-connect-custodian.tsx
: Added TypeScript types for props and state, improving type safety.
7 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
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.
PR Summary
(updates since last review)
The Custody component has been migrated to TypeScript, enhancing type safety and maintainability.
.circleci/config.yml
: Removedtest-e2e-swap-playwright
job, potentially reducing test coverage for swap functionality.app/scripts/background.js
: Added logic for test environments, including fake keyring bridges and socket communication.ui/components/institutional/confirm-remove-jwt-modal/*
: Converted to TypeScript, ensuring type safety and better integration with Storybook.ui/components/institutional/custody-confirm-link-modal/*
: Converted to TypeScript, improving type safety and maintainability.package.json
: Updated dependencies and scripts to support TypeScript migration, ensuring compatibility and type safety.
118 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
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.
PR Summary
(updates since last review)
The Custody component has been migrated to TypeScript, enhancing type safety and maintainability.
development/generate-rc-commits.js
: Refactored to dynamically fetchauthorTeams
fromteams.json
inMetaMask-planning
repository, improving maintainability.ui/components/institutional/custody-confirm-link-modal/*
: Converted to TypeScript, ensuring type safety and better integration with Storybook.ui/pages/institutional/custody/custody.js
: Migrated to TypeScript, enhancing type safety and maintainability.ui/store/institutional/institution-actions.ts
: Added TypeScript support, improving type safety and maintainability.test/e2e/playwright/mmi/custodian-hooks/*
: Updated to TypeScript, ensuring type safety and better integration with Playwright tests.
1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
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.
PR Summary
(updates since last review)
The Custody component has been migrated to TypeScript, enhancing type safety and maintainability.
app/_locales/en/messages.json
: AddedonboardingMetametricsPrivacyDescription
key for MetaMetrics onboarding.shared/lib/transaction-controller-utils.js
: Introducedprecision
parameter ingetSwapsTokensReceivedFromTxMeta
for flexible rounding.test/e2e/accounts/common.ts
: Added delay to ensure popup window closure ininstallSnapSimpleKeyring
.ui/components/app/transaction-breakdown/transaction-breakdown.container.js
: Added.toFixed()
tocalcTokenAmount
calls for fixed-point formatting.ui/pages/onboarding-flow/metametrics/metametrics.js
: Refactored to useBoxComponent
and added MetaMask privacy policy link.
18 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
Builds ready [ca4348e]
Page Load Metrics (149 ± 179 ms)
Bundle size diffs
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #26096 +/- ##
===========================================
- Coverage 69.70% 69.69% -0.01%
===========================================
Files 1409 1409
Lines 49788 49808 +20
Branches 13768 13785 +17
===========================================
+ Hits 34702 34712 +10
- Misses 15086 15096 +10 ☔ View full report in Codecov by Sentry. |
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.
PR Summary
(updates since last review)
The Custody component has been migrated to TypeScript, enhancing type safety and maintainability.
app/scripts/lib/transaction/metrics.ts
: AddedgetIsConfirmationAdvancedDetailsOpen
method for advanced transaction details.ui/pages/confirmations/components/confirm/info/row/text-token-units.tsx
: IntroducedConfirmInfoRowTextTokenUnits
component with TypeScript.ui/pages/confirmations/components/signature-request-original/signature-request-original.component.js
: AddedQueuedRequestsBannerAlert
component for queued requests.ui/pages/institutional/account-list/account-list.tsx
: ConvertedCustodyAccountList
to TypeScript, improving type safety.ui/pages/confirmations/hooks/useQueuedConfirmationEvents.ts
: AddeduseQueuedConfirmationsEvent
hook for tracking queued confirmation events.
78 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
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.
PR Summary
(updates since last review)
The Custody component has been migrated to TypeScript, enhancing type safety and maintainability.
ui/components/institutional/custody-labels/custody-labels.tsx
: Converted to TypeScript; importsLabelItem
type for consistency.ui/pages/institutional/account-list/account-list.tsx
: Converted to TypeScript; introduces types for props and uses optional chaining.ui/pages/institutional/custody/custody.tsx
: Converted to TypeScript; adds type definitions for various objects and state variables, improving robustness.
These changes improve type safety and maintainability but require thorough testing to ensure no runtime errors are introduced.
3 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
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.
PR Summary
(updates since last review)
The Custody component has been migrated to TypeScript, enhancing type safety and maintainability.
ui/pages/institutional/custody/custody.tsx
: Converted to TypeScript; adds type definitions for various objects and state variables, improving robustness.- Optional Properties: Certain properties in
Account
andAccountDetails
types are now optional, which could lead to runtime errors if not handled properly. - Component Update:
CustodyPage
component updated to handle optional properties appropriately. - Testing: Thorough testing is required to ensure that the optional properties do not cause unexpected behavior.
1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
Builds ready [bf7ef25]
Page Load Metrics (140 ± 150 ms)
Bundle size diffs
|
key: string; | ||
value: string; | ||
}; | ||
import { LabelItem } from '../../../pages/institutional/custody/custody'; |
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.
could we move the interface to a file that's more public accessible as institutional/custody/types;
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.
Yes, I'll address in another PR. Ticket: https://consensyssoftware.atlassian.net/browse/MMI-5328
onChange={(e) => setSelectAllAccounts(e)} | ||
checked={isCheckBoxSelected} | ||
checked={isCheckBoxSelected ?? undefined} |
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.
nit: you can leave it as isCheckBoxSelected
because
true ?? undefined => true
undefined ?? undefined => undefined
const handleQrConnectionRequest = (message: string) => { | ||
setQrConnectionRequest(message); | ||
}; |
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.
Nit:
const handleQrConnectionRequest = (message: string) => { | |
setQrConnectionRequest(message); | |
}; | |
const _setQrConnectionRequest = (message: string) => { | |
setQrConnectionRequest(message); | |
}; |
Quality Gate passedIssues Measures |
Builds ready [fdb5821]
Page Load Metrics (620 ± 461 ms)
Bundle size diffs
|
Description
Moves Custody component to TS.
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist