Skip to content

Commit

Permalink
add tx fee
Browse files Browse the repository at this point in the history
  • Loading branch information
justraman committed Oct 30, 2023
1 parent a53cee3 commit 0252214
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/processor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ processor.run(
// eslint-disable-next-line no-await-in-loop
const signer = await getOrCreateAccount(ctx as unknown as CommonContext, hexToU8a(publicKey)) // TODO: Get or create accounts on batches
const callName = call.name.split('.')
const txFee = (fee ?? 0n) + (fuelTank?.feePaid ?? 0n)

const extrinsic = new Extrinsic({
id,
Expand All @@ -372,7 +373,7 @@ processor.run(
tip,
error,
fee: new Fee({
amount: fee,
amount: txFee,
who: signer.id,
}),
fuelTank,
Expand Down

0 comments on commit 0252214

Please sign in to comment.