Skip to content

Commit 470bbaf

Browse files
committed
fix .toString of undefined error
1 parent a23974e commit 470bbaf

File tree

1 file changed

+1
-1
lines changed
  • packages/bitcore-node/src/providers/chain-state/evm/models

1 file changed

+1
-1
lines changed

packages/bitcore-node/src/providers/chain-state/evm/models/block.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ export class EVMBlockModel extends BaseBlock<IEVMBlock> {
267267
nonce: new Binary(Buffer.from(block.extraData)),
268268
previousBlockHash: block.parentHash,
269269
difficulty: block.difficulty.toString(),
270-
totalDifficulty: block.totalDifficulty.toString(),
270+
totalDifficulty: block.totalDifficulty?.toString(),
271271
nextBlockHash: '',
272272
transactionCount: block.transactions.length,
273273
size: block.size,

0 commit comments

Comments
 (0)