Move .isEmpty to $isEmpty (#5424)

* Move .isEmpty to $isEmpty

* Adjust usages
This commit is contained in:
Jaco
2023-01-19 11:07:29 +02:00
committed by GitHub
parent 4688291ecf
commit 6f19084a4d
66 changed files with 249 additions and 146 deletions
+1 -1
View File
@@ -196,7 +196,7 @@ export abstract class Init<ApiType extends ApiTypes> extends Decorate<ApiType> {
: await firstValueFrom(this._rpcCore.chain.getHeader.raw(blockHash))
);
if (header.parentHash.isEmpty) {
if (header.parentHash.$isEmpty) {
throw new Error('Unable to retrieve header and parent from supplied hash');
}
+8 -8
View File
@@ -35,21 +35,21 @@ function extractInfo (events: EventRecord[] = []): DispatchInfo | undefined {
}
export class SubmittableResult implements ISubmittableResult {
public readonly dispatchError?: DispatchError;
readonly dispatchError?: DispatchError;
public readonly dispatchInfo?: DispatchInfo;
readonly dispatchInfo?: DispatchInfo;
public readonly internalError?: Error;
readonly internalError?: Error;
public readonly events: EventRecord[];
readonly events: EventRecord[];
public readonly status: ExtrinsicStatus;
readonly status: ExtrinsicStatus;
public readonly txHash: Hash;
readonly txHash: Hash;
public readonly txIndex?: number;
readonly txIndex?: number;
public readonly blockNumber?: BlockNumber;
readonly blockNumber?: BlockNumber;
constructor ({ blockNumber, dispatchError, dispatchInfo, events, internalError, status, txHash, txIndex }: SubmittableResultValue) {
this.dispatchError = dispatchError || extractError(events);