Skip to content

Commit

Permalink
votes: gas add function
Browse files Browse the repository at this point in the history
  • Loading branch information
EnormousCloud committed Jul 13, 2023
1 parent 0e16b63 commit 91291d9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion services/gas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export const VoteGas = {
gasUsed: existing.gasUsed.add(gasUsed),
feeUsd: existing.feeUsd + feeUsd,
};
VoteGas.VOTES.get(voteId)?.set(txHash, updated);
}
},

Expand All @@ -55,7 +56,7 @@ export const VoteGas = {
for (const [voteId, transactions] of VoteGas.VOTES.entries()) {
let gasUsed = BigNumber.from(0);
let feeUsd = 0.0;
for (const [txHash, usage] of transactions) {
for (const [_txHash, usage] of transactions) {
gasUsed = gasUsed.add(usage.gasUsed);
feeUsd += usage.feeUsd;
}
Expand Down

0 comments on commit 91291d9

Please sign in to comment.