Skip to content

Commit 43b1fc1

Browse files
committed
fix crash when 'payable' nil
1 parent d5825d4 commit 43b1fc1

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)