From 844d1a29285728ce2abcf69a7b8edc7f385b761b Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Thu, 30 Apr 2020 15:14:56 +0200 Subject: [PATCH] Allow failures on preimage (instead of swallow) (#2225) --- CHANGELOG.md | 4 ++++ packages/rpc-core/src/index.ts | 25 +++++++------------------ 2 files changed, 11 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5aad56cc6d..2f5c479987 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 1.13.0-beta.x + +- Add support for ECDSA keypairs in extrinsic signers (Thanks to https://github.com/akru) + # 1.12.2 Apr 30, 2020 - Update @polkadot/util to stable 2.9.1 (sadly missed in the previous version, stable should match to stable) diff --git a/packages/rpc-core/src/index.ts b/packages/rpc-core/src/index.ts index 8dd987a109..2dd2811935 100644 --- a/packages/rpc-core/src/index.ts +++ b/packages/rpc-core/src/index.ts @@ -436,24 +436,13 @@ export default class Rpc implements RpcInterface { this.#storageCache.set(hexKey, value); if (meta.modifier.isOptional) { - try { - return new Option( - this.registry, - createClass(this.registry, type), - isEmpty - ? null - : createTypeUnsafe(this.registry, type, [input], true) - ); - } catch (error) { - if (type === 'PreimageStatus') { - return new Option( - this.registry, - createClass(this.registry, type) - ); - } - - throw error; - } + return new Option( + this.registry, + createClass(this.registry, type), + isEmpty + ? null + : createTypeUnsafe(this.registry, type, [input], true) + ); } return createTypeUnsafe(this.registry, type, [