From 91291d98779a9e65db5619f95e9b59eaa3a9e9f9 Mon Sep 17 00:00:00 2001 From: EnormousCloud Date: Thu, 13 Jul 2023 09:21:20 +0300 Subject: [PATCH] votes: gas add function --- services/gas.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/gas.ts b/services/gas.ts index 9a13d4f..ffed088 100644 --- a/services/gas.ts +++ b/services/gas.ts @@ -47,6 +47,7 @@ export const VoteGas = { gasUsed: existing.gasUsed.add(gasUsed), feeUsd: existing.feeUsd + feeUsd, }; + VoteGas.VOTES.get(voteId)?.set(txHash, updated); } }, @@ -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; }