Skip to content

Feat/add app metadata controller#5325

Merged
frankvonhoven merged 38 commits into
mainfrom
feat/add-app-metadata-controller
Mar 31, 2025
Merged

Feat/add app metadata controller#5325
frankvonhoven merged 38 commits into
mainfrom
feat/add-app-metadata-controller

Conversation

@frankvonhoven

@frankvonhoven frankvonhoven commented Feb 13, 2025

Copy link
Copy Markdown
Contributor

Explanation

Porting over the AppMetadataController from Extension

References

Changelog

@metamask/app-metadata-controller

  • : Adds new metadata controller

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've highlighted breaking changes using the "BREAKING" category above as appropriate
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

@mikesposito mikesposito left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I see that this controller has no public method, how do we intend the client to interact with this package?
I just realized that the extension is already using the package via the constructor alone, which I feel is a little weird, but I guess goes beyond the scope of this PR

Comment thread packages/app-metadata-controller/package.json Outdated
Comment thread packages/app-metadata-controller/package.json Outdated
Comment thread packages/app-metadata-controller/src/AppMetadataController.ts
Comment thread packages/app-metadata-controller/src/AppMetadataController.ts Outdated
Comment thread packages/app-metadata-controller/src/AppMetadataController.ts
Comment thread packages/app-metadata-controller/src/AppMetadataController.ts
@mikesposito

mikesposito commented Feb 20, 2025

Copy link
Copy Markdown
Member

Could we add a root src/index.ts that exports the relevant objects?
i.e.

// src/index.ts
export * from './AppMetadataController`

@mikesposito

mikesposito commented Feb 20, 2025

Copy link
Copy Markdown
Member

We should also add these changes to configuration files:

  • .github/CODEOWNERS for assigning the relevant owners to this package
  • tsconfig.json and tsconfig.build.json for adding the package to the workspace

Also, README should also be updated by running yarn update-readme-content

@frankvonhoven frankvonhoven marked this pull request as ready for review March 13, 2025 19:55
@frankvonhoven frankvonhoven requested a review from a team as a code owner March 14, 2025 17:04

@mcmire mcmire left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Left some comments!

Comment thread packages/app-metadata-controller/tsconfig.json
Comment thread tsconfig.build.json Outdated
Comment thread packages/app-metadata-controller/src/AppMetadataController.ts
Comment thread packages/app-metadata-controller/src/AppMetadataController.ts Outdated
Comment thread packages/app-metadata-controller/src/index.ts Outdated
Comment thread packages/app-metadata-controller/src/AppMetadataController.ts Outdated
Comment thread packages/app-metadata-controller/tsconfig.build.json Outdated
Comment thread .github/CODEOWNERS Outdated
@desi desi requested a review from a team March 19, 2025 15:10
Comment thread .github/CODEOWNERS
Comment thread packages/app-metadata-controller/README.md
Comment thread packages/app-metadata-controller/package.json
Comment thread packages/app-metadata-controller/src/AppMetadataController.ts Outdated
@frankvonhoven frankvonhoven enabled auto-merge (squash) March 21, 2025 17:19

@mcmire mcmire left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It looks like lint is failing. I provided some suggestions on how to fix it.

If you need to run lint for just these files again, try

yarn eslint packages/app-metadata-controller

Comment thread packages/app-metadata-controller/src/AppMetadataController.ts Outdated
Comment thread packages/app-metadata-controller/src/AppMetadataController.ts Outdated
Comment thread packages/app-metadata-controller/src/AppMetadataController.ts Outdated
Comment thread packages/app-metadata-controller/src/AppMetadataController.test.ts Outdated
Comment thread packages/app-metadata-controller/src/AppMetadataController.test.ts
Comment thread packages/app-metadata-controller/src/AppMetadataController.ts
Comment thread packages/app-metadata-controller/README.md
Comment thread packages/app-metadata-controller/src/AppMetadataController.test.ts
Comment thread .github/CODEOWNERS Outdated

@mcmire mcmire left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

One more thing and then I think we're good.

Comment thread packages/app-metadata-controller/src/AppMetadataController.ts
Comment thread packages/app-metadata-controller/src/AppMetadataController.test.ts Outdated

@mcmire mcmire left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good! 🎉

@frankvonhoven frankvonhoven merged commit 38b134a into main Mar 31, 2025
@frankvonhoven frankvonhoven deleted the feat/add-app-metadata-controller branch March 31, 2025 21:19
github-merge-queue Bot pushed a commit to MetaMask/metamask-mobile that referenced this pull request Apr 12, 2025
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**
* Integrates new AppMetadataController in mobile
* [New Controller PR](MetaMask/core#5325)
<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

## **Related issues**

Fixes:

## **Manual testing steps**

1. Go to this page...
2.
3.

## **Screenshots/Recordings**
![Screenshot 2025-04-11 at 9 39
58 AM](https://github.com/user-attachments/assets/07cc5f27-2a9e-4748-9a14-689b1109c204)

#### State Logs

[state-logs-v7.43.0-(1656).json](https://github.com/user-attachments/files/19708029/state-logs-v7.43.0-.1656.json)





<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] I’ve followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **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.

---------

Co-authored-by: Cal-L <cleun007@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants