Handle coinbase transactions no longer has undefined fee.

This commit is contained in:
softsimon
2020-07-24 00:20:59 +07:00
parent 9d8c1184ab
commit 9980414969
4 changed files with 7 additions and 4 deletions

View File

@@ -77,7 +77,7 @@ class Mempool {
const transaction: Transaction = await bitcoinApi.getRawTransaction(txId);
return Object.assign({
vsize: transaction.weight / 4,
feePerVsize: transaction.fee / (transaction.weight / 4),
feePerVsize: (transaction.fee || 0) / (transaction.weight / 4),
firstSeen: Math.round((new Date().getTime() / 1000)),
}, transaction);
} catch (e) {