Don't fake sign if already signed (#4756)

This commit is contained in:
Jaco
2022-04-19 13:02:20 +03:00
committed by GitHub
parent 9a7b91a6f5
commit 149b7d9ee6
2 changed files with 15 additions and 1 deletions
+8 -1
View File
@@ -119,7 +119,14 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, blockHas
if (blockHash || isString(optionsOrHash) || isU8a(optionsOrHash)) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
return decorateMethod(
(): Observable<RuntimeDispatchInfo> => api.rpc.payment.queryInfo(this.toHex(), blockHash || optionsOrHash as string)
(): Observable<RuntimeDispatchInfo> =>
api.rpc.payment.queryInfo(this.toHex(), blockHash || optionsOrHash as string)
);
} else if (this.isSigned) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-return,@typescript-eslint/no-unsafe-call
return decorateMethod(
(): Observable<RuntimeDispatchInfo> =>
api.rpc.payment.queryInfo(this.toHex())
);
}