Skip to content

Commit d0b15b9

Browse files
authored
Merge pull request #332 from xdozorx/ABIContractCrash
fix crash when 'payable' nil
2 parents 2011f78 + 43b1fc1 commit d0b15b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/web3swift/EthereumABI/ABIParsing.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ fileprivate func parseFunction(abiRecord:ABI.Record) throws -> ABI.Element.Funct
8282
}
8383

8484
fileprivate func parseFallback(abiRecord:ABI.Record) throws -> ABI.Element.Fallback {
85-
let payable = (abiRecord.stateMutability == "payable" || abiRecord.payable!)
85+
let payable = (abiRecord.stateMutability == "payable" || abiRecord.payable == true)
8686
var constant = abiRecord.constant == true
8787
if (abiRecord.stateMutability == "view" || abiRecord.stateMutability == "pure") {
8888
constant = true

0 commit comments

Comments
 (0)