Skip to content

feat(Stellar): asset enrichment through snap data source#9422

Draft
khanti42 wants to merge 5 commits into
mainfrom
feat/asset-balance-enrichment-snap
Draft

feat(Stellar): asset enrichment through snap data source#9422
khanti42 wants to merge 5 commits into
mainfrom
feat/asset-balance-enrichment-snap

Conversation

@khanti42

@khanti42 khanti42 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Explanation

References

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 communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Comment on lines +306 to +322
if (assetsBalance) {
const response: DataResponse = { assetsBalance, updateMode: 'merge' };
for (const subscription of this.activeSubscriptions.values()) {
subscription.onAssetsUpdate(response)?.catch(console.error);
}
if (!assetsBalance) {
return;
}

const response: DataResponse = { assetsBalance, updateMode: 'merge' };
for (const subscription of this.activeSubscriptions.values()) {
subscription.onAssetsUpdate(response)?.catch(console.error);

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.

this should not change

* Handle snap balance updates from the keyring.
* Transforms the payload and publishes to AssetsController.
*
* Push updates carry amounts only. Per-asset snap enrichment (e.g. Stellar

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.

no need to add comment

}
}

if (

@stanleyyconsensys stanleyyconsensys Jul 8, 2026

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.

we should just add step 3 with Feature flag

}
}
results.assetsBalance ??= {};
const accountBalances = results.assetsBalance[accountId] ?? {};

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.

on step 3:

if stellar feature flag:

  • fetch enrichment
  • update the state (results.assetsBalance)

@stanleyyconsensys stanleyyconsensys changed the title chore: [STELLAR] asset enrichment through snap data source feat(Stellar): asset enrichment through snap data source Jul 8, 2026
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.

2 participants