fix: updated extrinsics' assetId toHuman (#5879)

This commit is contained in:
Alberto Nicolas Penayo
2024-05-14 21:45:55 -04:00
committed by GitHub
parent b17a6d3920
commit 365fde895a
5 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -195,7 +195,7 @@ abstract class ExtrinsicBase<A extends AnyTuple> extends AbstractBase<ExtrinsicV
/**
* @description Forward compat
*/
public get assetId (): IOption<INumber> | IOption<MultiLocation> {
public get assetId (): IOption<INumber | MultiLocation> {
return this.inner.signature.assetId;
}
@@ -324,7 +324,7 @@ export class GenericExtrinsic<A extends AnyTuple = AnyTuple> extends ExtrinsicBa
},
this.isSigned
? {
assetId: this.assetId.toHuman(isExpanded, disableAscii),
assetId: this.assetId ? this.assetId.toHuman(isExpanded, disableAscii) : null,
era: this.era.toHuman(isExpanded, disableAscii),
nonce: this.nonce.toHuman(isExpanded, disableAscii),
signature: this.signature.toHex(),
@@ -113,7 +113,7 @@ export class GenericExtrinsicPayload extends AbstractBase<ExtrinsicPayloadVx> {
/**
* @description The (optional) asset id as a [[u32]] or [[MultiLocation]] for this payload
*/
public get assetId (): IOption<INumber | IOption<MultiLocation>> {
public get assetId (): IOption<INumber | MultiLocation> {
return this.inner.assetId;
}
@@ -104,7 +104,7 @@ export class GenericSignerPayload extends Struct implements ISignerPayload, Sign
return this.getT('tip');
}
get assetId (): IOption<INumber> | IOption<MultiLocation> {
get assetId (): IOption<INumber | MultiLocation> {
return this.getT('assetId');
}
@@ -105,7 +105,7 @@ export class GenericExtrinsicPayloadV4 extends Struct {
/**
* @description The (optional) asset id for this signature for chains that support transaction fees in assets
*/
public get assetId (): IOption<INumber | IOption<MultiLocation>> {
public get assetId (): IOption<INumber | MultiLocation> {
return this.getT('assetId');
}
@@ -122,7 +122,7 @@ export class GenericExtrinsicSignatureV4 extends Struct implements IExtrinsicSig
/**
* @description The [[u32]] or [[MultiLocation]] assetId
*/
public get assetId (): IOption<INumber> | IOption<MultiLocation> {
public get assetId (): IOption<INumber | MultiLocation> {
return this.getT('assetId');
}