@@ -130,7 +130,7 @@ export class EthClient implements EthClientInterface {
130
130
parentHash : block . parentHash ,
131
131
timestamp : block . timestamp . toString ( ) ,
132
132
stateRoot : this . _provider . formatter . hash ( rawBlock . stateRoot ) ,
133
- td : this . _provider . formatter . bigNumber ( rawBlock . totalDifficulty ) . toString ( ) ,
133
+ td : this . _provider . formatter . bigNumber ( rawBlock . totalDifficulty ?? 0 ) . toString ( ) ,
134
134
txRoot : this . _provider . formatter . hash ( rawBlock . transactionsRoot ) ,
135
135
receiptRoot : this . _provider . formatter . hash ( rawBlock . receiptsRoot )
136
136
}
@@ -191,7 +191,7 @@ export class EthClient implements EthClientInterface {
191
191
parentHash : this . _provider . formatter . hash ( rawBlock . parentHash ) ,
192
192
timestamp : this . _provider . formatter . number ( rawBlock . timestamp ) . toString ( ) ,
193
193
stateRoot : this . _provider . formatter . hash ( rawBlock . stateRoot ) ,
194
- td : this . _provider . formatter . bigNumber ( rawBlock . totalDifficulty ) . toString ( ) ,
194
+ td : this . _provider . formatter . bigNumber ( rawBlock . totalDifficulty ?? 0 ) . toString ( ) ,
195
195
txRoot : this . _provider . formatter . hash ( rawBlock . transactionsRoot ) ,
196
196
receiptRoot : this . _provider . formatter . hash ( rawBlock . receiptsRoot ) ,
197
197
uncleRoot : this . _provider . formatter . hash ( rawBlock . sha3Uncles ) ,
0 commit comments