Skip to content

Commit 149b7d9

Browse files
authored
Don't fake sign if already signed (#4756)
1 parent 9a7b91a commit 149b7d9

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# CHANGELOG
22

3+
## master
4+
5+
Changes:
6+
7+
- Don't fake signature for `paymentInfo` if already signed
8+
9+
310
## 8.1.1 Apr 17, 2022
411

512
Contributed:

packages/api/src/submittable/createClass.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,14 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, blockHas
119119
if (blockHash || isString(optionsOrHash) || isU8a(optionsOrHash)) {
120120
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
121121
return decorateMethod(
122-
(): Observable<RuntimeDispatchInfo> => api.rpc.payment.queryInfo(this.toHex(), blockHash || optionsOrHash as string)
122+
(): Observable<RuntimeDispatchInfo> =>
123+
api.rpc.payment.queryInfo(this.toHex(), blockHash || optionsOrHash as string)
124+
);
125+
} else if (this.isSigned) {
126+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return,@typescript-eslint/no-unsafe-call
127+
return decorateMethod(
128+
(): Observable<RuntimeDispatchInfo> =>
129+
api.rpc.payment.queryInfo(this.toHex())
123130
);
124131
}
125132

0 commit comments

Comments
 (0)