From a5fe12492953854507d5c9bfa9c1acd821d8848c Mon Sep 17 00:00:00 2001 From: imstar15 Date: Tue, 28 Nov 2023 14:08:45 +0800 Subject: [PATCH] Return after the reject or resolve statement --- demo/src/utils.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/demo/src/utils.js b/demo/src/utils.js index a1204cd..1cab2f3 100644 --- a/demo/src/utils.js +++ b/demo/src/utils.js @@ -46,9 +46,11 @@ export const sendExtrinsic = (api, extrinsic, keyPair) => ); const { name, section } = metaError; reject(new Error(`${section}.${name}`)); + return; } reject(new Error(dispatchError.toString())); + return; } const event = _.find(events, ({ event: eventData }) => @@ -60,6 +62,7 @@ export const sendExtrinsic = (api, extrinsic, keyPair) => events, extrinsicHash: extrinsic?.hash?.toString(), }); + return; } reject(new Error(events.toString())); }