Fix missing fee range in blocks api when querying non indexed blocks

This commit is contained in:
nymkappa 2023-02-13 15:50:22 +09:00
parent c85d8cd29d
commit cf720c4bef
No known key found for this signature in database
GPG Key ID: E155910B16E8BD04

View File

@ -17,7 +17,7 @@ export function prepareBlock(block: any): BlockExtended {
extras: {
coinbaseRaw: block.coinbase_raw ?? block.extras?.coinbaseRaw,
medianFee: block.medianFee ?? block.median_fee ?? block.extras?.medianFee,
feeRange: block.feeRange ?? block.fee_span,
feeRange: block.feeRange ?? block?.extras?.feeRange ?? block.fee_span,
reward: block.reward ?? block?.extras?.reward,
totalFees: block.totalFees ?? block?.fees ?? block?.extras?.totalFees,
avgFee: block?.extras?.avgFee ?? block.avg_fee,