Skip to content

Commit 6c05421

Browse files
committed
Added UInt to DecodableFromHex
1 parent 43645d6 commit 6c05421

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Sources/web3swift/Convenience/Decodable+Extensions.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,12 @@ extension Data: DecodableFromHex {
207207
}
208208
}
209209

210+
extension UInt: DecodableFromHex {
211+
public init?(fromHex hexString: String) {
212+
self.init(hexString.stripHexPrefix(), radix: 16)
213+
}
214+
}
215+
210216
extension BigUInt: DecodableFromHex {
211217
public init?(fromHex hexString: String) {
212218
self.init(hexString.stripHexPrefix(), radix: 16)

0 commit comments

Comments
 (0)