Ovreride toJSON on {Header, ReferendumInfo}Extended (#723)
This commit is contained in:
@@ -107,4 +107,16 @@ export class HeaderExtended extends Header {
|
||||
get author (): AccountId | undefined {
|
||||
return this._author;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Creates the JSON representation
|
||||
*/
|
||||
toJSON (): any {
|
||||
return {
|
||||
...super.toJSON(),
|
||||
author: this.author
|
||||
? this.author.toJSON()
|
||||
: undefined
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user