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

chore: remove from aptos blockchain from families #8897

Open
wants to merge 47 commits into
base: develop
Choose a base branch
from

Conversation

jccguimaraes
Copy link
Member

@jccguimaraes jccguimaraes commented Jan 14, 2025

βœ… Checklist

  • npx changeset was attached.
  • Covered by automatic tests.
  • Impact of the changes:
    • ...

πŸ“ Description

Replace this text by a clear and concise description of what this pull request is about and why it is needed. Be sure to explain the problem you're addressing and the solution you're proposing.
For libraries, you can add a code sample of how to use it.
For bug fixes, you can explain the previous behaviour and how it was fixed.
In case of visual features, please attach screenshots or video recordings to demonstrate the changes.

❓ Context


🧐 Checklist for the PR Reviewers

  • The code aligns with the requirements described in the linked JIRA or GitHub issue.
  • The PR description clearly documents the changes made and explains any technical trade-offs or design decisions.
  • There are no undocumented trade-offs, technical debt, or maintainability issues.
  • The PR has been tested thoroughly, and any potential edge cases have been considered and handled.
  • Any new dependencies have been justified and documented.
  • Performance considerations have been taken into account. (changes have been profiled or benchmarked if necessary)

Copy link

vercel bot commented Jan 14, 2025

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated (UTC)
web-tools βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Jan 22, 2025 9:44am
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
ledger-live-github-bot ⬜️ Ignored (Inspect) Visit Preview Jan 22, 2025 9:44am
native-ui-storybook ⬜️ Ignored (Inspect) Visit Preview Jan 22, 2025 9:44am
react-ui-storybook ⬜️ Ignored (Inspect) Visit Preview Jan 22, 2025 9:44am

@live-github-bot live-github-bot bot added desktop Has changes in LLD mobile Has changes in LLM common Has changes in live-common labels Jan 14, 2025
@live-github-bot live-github-bot bot added the ledgerjs Has changes in the ledgerjs open source libs label Jan 15, 2025
@semeano semeano marked this pull request as ready for review January 21, 2025 15:21
@semeano semeano requested review from a team as code owners January 21, 2025 15:21
let mockedAptos;
let mockedApolloClient;
let mockedPost;
let mockedAptos: jest.Mocked<any>;
Copy link
Contributor

Choose a reason for hiding this comment

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

is it possible to inject the type for the generic Mocked ?

Copy link
Contributor

Choose a reason for hiding this comment

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

If I do that, I get a Type 'MockedObjectDeep<typeof Aptos>' is not assignable to type 'Mocked<Aptos>'
If I do

Suggested change
let mockedAptos: jest.Mocked<any>;
let mockedAptos: jest.MockedObjectDeep<typeof Aptos>;

I get Type '{ getAccountInfo: Mock<any, any, any>; }' is missing the following properties from type 'Aptos': config, account, ans, coin, and 111 more

Basically I'm not able to mock it without adding all of its properties.

Let me know if there's a better way to do it, I also hate to use any.

Copy link
Contributor

@themooneer themooneer Jan 21, 2025

Choose a reason for hiding this comment

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

did you try with jest.MockedObjectDeep<Partial<typeof Aptos>>?

Copy link
Contributor

@semeano semeano Jan 21, 2025

Choose a reason for hiding this comment

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

With Partial, I get an error on line 71:

mockedAptos.mockImplementation(() => ({
  getAccountInfo: mockGetAccountInfo,
}));

mockImplementation does not exist

And if I remove mockedAptos = jest.mocked(Aptos); from line 27, and add the following inside the tests

mockedAptos = jest.mocked(Aptos).mockImplementation(() => ({
  getAccountInfo: mockGetAccountInfo,
}));

I get a similar error as before:
Type '{ getAccountInfo: Mock<any, any, any>; }' is missing the following properties from type 'Aptos': config, account, ans, coin, and 111 more.ts

Copy link
Contributor

Choose a reason for hiding this comment

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

ok ! no worries, i'll resolve this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
common Has changes in live-common desktop Has changes in LLD ledgerjs Has changes in the ledgerjs open source libs mobile Has changes in LLM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants