Skip to content

Commit 049453b

Browse files
committed
fix: gasUsed prepare
1 parent 1ee30e4 commit 049453b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/nodes/eth/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export function normalizeErc20Transaction(
6565
): Erc20Transaction {
6666
const gasPrice = 'gasPrice' in transaction ? transaction.gasPrice : 0
6767
const effectiveGasPrice = 'effectiveGasPrice' in transaction ? transaction.effectiveGasPrice : 0
68-
const gasUsed = 'gasUsed' in receipt ? receipt.gasUsed : 0
68+
const gasUsed = receipt && 'gasUsed' in receipt ? receipt.gasUsed : 0
6969

7070
const fee = utils.calculateFee(gasUsed.toString(), gasPrice.toString())
7171
const direction = transaction.from.toLowerCase() === address.toLowerCase() ? 'from' : 'to'

0 commit comments

Comments
 (0)