Skip to content

Commit

Permalink
fix: get extrinsic index from events
Browse files Browse the repository at this point in the history
  • Loading branch information
hyifeng authored and wliyongfeng committed Jul 24, 2023
1 parent 72c8668 commit c7eaa1e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions site/src/services/chainApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,7 @@ function signAndSendTx(tx, account, callback = () => {}) {

callback("Transaction executed");

const extrinsicIndex = JSON.parse(
events[0]?.phase?.toString(),
)?.applyExtrinsic;
const extrinsicIndex = events[0]?.phase?.value?.toNumber();

const blockHash = status.asInBlock.toString();
resolve({
Expand Down

0 comments on commit c7eaa1e

Please sign in to comment.