We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 329bcb4 commit 8c68165Copy full SHA for 8c68165
Sources/Web3Core/Structure/Block/Block.swift
@@ -85,7 +85,7 @@ extension Block: Decodable {
85
}
86
87
self.difficulty = try container.decodeHex(BigUInt.self, forKey: .difficulty)
88
- self.totalDifficulty = try? container.decodeHex(BigUInt.self, forKey: .totalDifficulty)
+ self.totalDifficulty = (try? container.decodeHex(BigUInt.self, forKey: .totalDifficulty)) ?? .zero
89
self.extraData = try container.decodeHex(Data.self, forKey: .extraData)
90
self.size = try container.decodeHex(BigUInt.self, forKey: .size)
91
self.gasLimit = try container.decodeHex(BigUInt.self, forKey: .gasLimit)
0 commit comments