Skip to content

Commit

Permalink
Merge pull request #95 from subquery/fix-polkadot-starter
Browse files Browse the repository at this point in the history
Fix polkadot starter
  • Loading branch information
jiqiang90 authored Nov 12, 2023
2 parents 9ac8a83 + 964b92c commit bcd674a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Polkadot/Polkadot-starter/src/mappings/mappingHandlers.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import assert from 'assert';
import {
SubstrateExtrinsic,
SubstrateEvent,
Expand Down Expand Up @@ -25,10 +26,13 @@ export async function handleEvent(event: SubstrateEvent): Promise<void> {
// logger.info(JSON.stringify(event));
const {
event: {
data: [from, to, amount],
data: [to, amount],
},
} = event;

const from = event.extrinsic?.extrinsic.signer;
assert(from, "Signer is missing");

const blockNumber: number = event.block.block.header.number.toNumber();

const fromAccount = await checkAndGetAccount(from.toString(), blockNumber);
Expand Down

0 comments on commit bcd674a

Please sign in to comment.