Skip to content

Commit aa0cde8

Browse files
committed
Updated to the 'Swift Way' of using the Numeric Protocol, and query the type for max instead of relying on the external OS [Darwin] specific UINT64_MAX
1 parent 5b45521 commit aa0cde8

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Example/Web3supportBrowser/Pods/web3swift/Sources/web3swift/EthereumABI/ABIDecoding.swift

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Example/myWeb3Wallet/Pods/web3swift/Sources/web3swift/EthereumABI/ABIDecoding.swift

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Sources/web3swift/EthereumABI/ABIDecoding.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ extension ABIDecoder {
205205
guard data.count >= pointer + type.memoryUsage else {return (nil, nil)}
206206
let dataSlice = data[pointer ..< pointer + type.memoryUsage]
207207
let bn = BigUInt(dataSlice)
208-
if bn > UINT64_MAX || bn >= data.count {
208+
if bn > UInt64.max || bn >= data.count {
209209
// there are ERC20 contracts that use bytes32 intead of string. Let's be optimistic and return some data
210210
if case .string = type {
211211
let nextElement = pointer + type.memoryUsage

0 commit comments

Comments
 (0)