Skip to content

Commit

Permalink
Return after the reject or resolve statement
Browse files Browse the repository at this point in the history
  • Loading branch information
imstar15 committed Nov 28, 2023
1 parent 5a06d73 commit a5fe124
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions demo/src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) =>
Expand All @@ -60,6 +62,7 @@ export const sendExtrinsic = (api, extrinsic, keyPair) =>
events,
extrinsicHash: extrinsic?.hash?.toString(),
});
return;
}
reject(new Error(events.toString()));
}
Expand Down

0 comments on commit a5fe124

Please sign in to comment.