feat: add Stellar account asset info RPC#81
Open
khanti42 wants to merge 4 commits into
Open
Conversation
Contributor
Author
|
@metamaskbot publish-preview |
|
Preview builds have been published. Learn how to use preview builds in other projects. Expand for full list of packages and versions. |
Contributor
Author
|
@metamaskbot publish-preview |
Contributor
Author
|
@metamaskbot publish-preview |
|
Preview builds have been published. Learn how to use preview builds in other projects. Expand for full list of packages and versions. |
| import { BaseHandler } from '../base'; | ||
|
|
||
| export class GetAccountAssetInfoHandler | ||
| extends BaseHandler< |
Collaborator
There was a problem hiding this comment.
extends BaseClientRequestHandler will give u the account (either from state or onchain)
and u can override handleAccountNotActivatedError for not activated handle
| type FungibleAssetMetadata, | ||
| } from '@metamask/snaps-sdk'; | ||
| import { ensureError } from '@metamask/utils'; | ||
|
|
Collaborator
There was a problem hiding this comment.
you dont need this class, everything is already in onChainAccount object
| * {@link OnChainAccountService.synchronize}. The persisted keyring transaction in snap state | ||
| * (by hash) is the source of truth for which account to sync. | ||
| * | ||
| * Change-trust jobs may pass `trustlineVerification`; those sync until a fresh Horizon load |
Collaborator
There was a problem hiding this comment.
i will suggest dont touch track transaction in this PR, or do it from other PR
becoz we have to refactor the track transaction anyway
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation
Explanation
Adds support for the custom keyring_getAccountAssetInfo RPC to expose fungible asset metadata together with Stellar classic trustline-specific fields (limit, authorized, sponsored) when available.
This PR also improves change-trust transaction tracking by passing trustline verification metadata into the background tracking flow and delaying transaction confirmation until Horizon reflects the expected trustline state. This avoids race conditions where Soroban confirms the transaction before Horizon indexing is updated.
To support this, retry and delay logic was added around Horizon trustline verification after transaction confirmation.
Additional tests were added covering:
References
Checklist