js-stellar-sdk icon indicating copy to clipboard operation
js-stellar-sdk copied to clipboard

Asset related fields missing from `AccountDebited` effect definition

Open hanseartic opened this issue 2 years ago • 0 comments

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.

hanseartic avatar Apr 27 '22 04:04 hanseartic