.paymentInfo never mutates the existing signature (#5659)

This commit is contained in:
Jaco
2023-05-26 08:02:18 +03:00
committed by GitHub
parent 54c96ed975
commit cdd74ea084
3 changed files with 14 additions and 5 deletions
+2 -2
View File
@@ -35,8 +35,8 @@ export class GenericExtrinsicV4 extends Struct implements IExtrinsicImpl {
public static decodeExtrinsic (registry: Registry, value?: Call | Uint8Array | ExtrinsicValueV4, isSigned = false): ExtrinsicValueV4 {
if (value instanceof GenericExtrinsicV4) {
return value;
} else if (value instanceof registry.createClassUnsafe('Call')) {
return { method: value as Call };
} else if (value instanceof registry.createClassUnsafe<Call>('Call')) {
return { method: value };
} else if (isU8a(value)) {
// here we decode manually since we need to pull through the version information
const signature = registry.createTypeUnsafe<ExtrinsicSignatureV4>('ExtrinsicSignatureV4', [value, { isSigned }]);