Skip to content

Dry address comparison #31750

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Dry address comparison #31750

wants to merge 2 commits into from

Conversation

jiexi
Copy link
Contributor

@jiexi jiexi commented Apr 8, 2025

Description

Open in GitHub Codespaces

Related issues

Fixes:

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.

@jiexi jiexi requested a review from a team as a code owner April 8, 2025 23:59
Copy link
Contributor

github-actions bot commented Apr 8, 2025

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

✨ Files requiring CODEOWNER review ✨

🖥️ @MetaMask/wallet-ux

  • ui/components/multichain/pages/review-permissions-page/review-permissions-page.tsx

Base automatically changed from sip-26 to main April 9, 2025 20:52
@jiexi jiexi requested review from a team as code owners April 9, 2025 20:52
@jiexi jiexi force-pushed the jl/sip-26/dry-address-comparison branch from 1e81837 to 99d48d0 Compare April 9, 2025 21:35
Comment on lines +120 to +127
* Checks if an CAIP account ID is connected to any of the permitted accounts
* based on scope matching
*
* @param accountId - The CAIP account ID to check against permitted accounts
* @param permittedAccounts - Array of CAIP account IDs that are permitted
* @returns True if the account is connected to any permitted account
*/
export function isAccountIdInPermittedAccountIds(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the key thing to highlight about this function is that the "permittedAccounts" will contain 0 as references, which is why we can't just do a simple includes() check?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants