stellar / js-stellar-sdk

Main Stellar client library for the JavaScript language.
https://stellar.github.io/js-stellar-sdk/
Apache License 2.0
642 stars 313 forks source link

Asset related fields missing from `AccountDebited` effect definition #778

Open hanseartic opened 2 years ago

hanseartic commented 2 years ago

Describe the bug Asset properties missing from AccountDebited interface

What version are you on? 10.0.1

To Reproduce Check effects type definitions. AccountCredited inherits the fields in question from OfferAsset.

export interface AccountCredited extends BaseEffectRecord, OfferAsset {
    type_i: EffectType.account_credited;
    amount: string;
}
export interface AccountDebited extends BaseEffectRecord {
    type_i: EffectType.account_debited;
    amount: string;
}

Expected behavior Handling AccountDebited objects should allow access to the currently not defined fields (i.e. asset_code, asset_issuer, asset_type).

Additional context Maybe it would be cleaner to not import those fields from the OfferAsset interface.

challet commented 1 day ago

Hi, sorry to ask about another topic : how do you import the AccountDebited and other effects into your code ? (from #1098)