Skip to content

Commit

Permalink
Update Sources/Web3Core/Structure/Block/Block.swift
Browse files Browse the repository at this point in the history
Co-authored-by: Jenea Vranceanu <[email protected]>
  • Loading branch information
h33min and JeneaVranceanu authored Oct 31, 2024
1 parent 329bcb4 commit 8c68165
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Web3Core/Structure/Block/Block.swift
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ extension Block: Decodable {
}

self.difficulty = try container.decodeHex(BigUInt.self, forKey: .difficulty)
self.totalDifficulty = try? container.decodeHex(BigUInt.self, forKey: .totalDifficulty)
self.totalDifficulty = (try? container.decodeHex(BigUInt.self, forKey: .totalDifficulty)) ?? .zero
self.extraData = try container.decodeHex(Data.self, forKey: .extraData)
self.size = try container.decodeHex(BigUInt.self, forKey: .size)
self.gasLimit = try container.decodeHex(BigUInt.self, forKey: .gasLimit)
Expand Down

0 comments on commit 8c68165

Please sign in to comment.