Skip to content

fix: Add snap metadata to simulation accounts#3528

Merged
GuillaumeRx merged 5 commits intomainfrom
gr/fix-simulation-accounts
Jul 4, 2025
Merged

fix: Add snap metadata to simulation accounts#3528
GuillaumeRx merged 5 commits intomainfrom
gr/fix-simulation-accounts

Conversation

@GuillaumeRx
Copy link
Contributor

The Interface controller in the simulation environment would fail if the AccountSelector uses hideExternalAccounts due to the missing snap metadata in the partial account object we use in the simulation.

This adds some logic to generate this metadata if the account is flagged as owned in the simulation options.

@GuillaumeRx GuillaumeRx requested a review from a team as a code owner July 3, 2025 15:33
...account,
metadata: {
snap: {
id: snapId,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
id: snapId,
id: snapId,
enabled: true,

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't care about enabled 🤔

address,
assets = [],
selected = false,
owned = false,
Copy link
Member

Choose a reason for hiding this comment

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

Wondering if the default should be owned or not 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't have a strong preference, we set selected to false and I treat those flags as optionally toggle-able if you really need them

@codecov
Copy link

codecov bot commented Jul 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.25%. Comparing base (20ed5ef) to head (646b6db).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3528   +/-   ##
=======================================
  Coverage   98.25%   98.25%           
=======================================
  Files         410      411    +1     
  Lines       11588    11606   +18     
  Branches     1804     1808    +4     
=======================================
+ Hits        11386    11404   +18     
  Misses        202      202           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@GuillaumeRx GuillaumeRx added this pull request to the merge queue Jul 4, 2025
Merged via the queue into main with commit 48783d9 Jul 4, 2025
120 checks passed
@GuillaumeRx GuillaumeRx deleted the gr/fix-simulation-accounts branch July 4, 2025 09:00
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.

3 participants