Skip to content
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

fix: oldestPendingApproval and transactionsMetadata PropTypes in the … #29689

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

pedronfigueiredo
Copy link
Contributor

@pedronfigueiredo pedronfigueiredo commented Jan 14, 2025

…routes file

Description

There are two relatively new proptypes warnings that I included below. This is because transactionsMetadata is in fact an object, not an array of objects, and oldestPendingApproval can be undefined.

These PropTypes were introduced in #28301.

This PR updates both PropTypes definitions to avoid any more warnings.

Warning: Failed prop type: The prop `oldestPendingApproval` is marked as required in `Routes`, but its value is `undefined`.
    in Routes (created by Connect(Routes))
    in Connect(Routes) (created by Context.Consumer)
    in withRouter(Connect(Routes)) (at pages/index.js:57)
    in MetamaskNotificationsProvider (at pages/index.js:56)
    in MetamaskIdentityProvider (at pages/index.js:55)
    in AssetPollingProvider (at pages/index.js:54)
    in LegacyI18nProvider (at pages/index.js:53)
    in I18nProvider (at pages/index.js:52)
    in LegacyMetaMetricsProvider (at pages/index.js:51)
    in MetaMetricsProvider (at pages/index.js:50)
    in RenderedRoute (created by Routes)
    in Routes (created by CompatRouter)
    in Router (created by CompatRouter)
    in CompatRouter (at pages/index.js:49)
    in Router (created by HashRouter)
    in HashRouter (at pages/index.js:48)
    in Provider (at pages/index.js:47)
    in Index (at ui/index.js:213)
Warning: Failed prop type: Invalid prop `transactionsMetadata` of type `object` supplied to `Routes`, expected an array.
    in Routes (created by Connect(Routes))
    in Connect(Routes) (created by Context.Consumer)
    in withRouter(Connect(Routes)) (at pages/index.js:57)
    in MetamaskNotificationsProvider (at pages/index.js:56)
    in MetamaskIdentityProvider (at pages/index.js:55)
    in AssetPollingProvider (at pages/index.js:54)
    in LegacyI18nProvider (at pages/index.js:53)
    in I18nProvider (at pages/index.js:52)
    in LegacyMetaMetricsProvider (at pages/index.js:51)
    in MetaMetricsProvider (at pages/index.js:50)
    in RenderedRoute (created by Routes)
    in Routes (created by CompatRouter)
    in Router (created by CompatRouter)
    in CompatRouter (at pages/index.js:49)
    in Router (created by HashRouter)
    in HashRouter (at pages/index.js:48)
    in Provider (at pages/index.js:47)
    in Index (at ui/index.js:213)

Open in GitHub Codespaces

Related issues

Fixes: N/A

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@pedronfigueiredo pedronfigueiredo added the team-confirmations Push issues to confirmations team label Jan 14, 2025
@pedronfigueiredo pedronfigueiredo self-assigned this Jan 14, 2025
Copy link
Contributor

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.

@metamaskbot
Copy link
Collaborator

Builds ready [b8a38ff]
Page Load Metrics (1749 ± 93 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint17520671526533256
domContentLoaded14862052173219192
load14972074174919493
domInteractive23162433215
backgroundConnect95221126
firstReactRender1578492311
getState571212010
initialActions00000
loadScripts10751553127615675
setupStore66113157
uiStartup16742350199619996
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 43 Bytes (0.00%)
  • ui: 5.85 KiB (0.07%)
  • common: 81 Bytes (0.00%)

@pedronfigueiredo pedronfigueiredo added this pull request to the merge queue Jan 14, 2025
Merged via the queue into main with commit c340f07 Jan 14, 2025
89 checks passed
@pedronfigueiredo pedronfigueiredo deleted the pnf/fix-props-error branch January 14, 2025 11:53
@github-actions github-actions bot locked and limited conversation to collaborators Jan 14, 2025
@metamaskbot metamaskbot added the release-12.11.0 Issue or pull request that will be included in release 12.11.0 label Jan 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-12.11.0 Issue or pull request that will be included in release 12.11.0 team-confirmations Push issues to confirmations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants