Skip to content

Commit 909a1b0

Browse files
committed
remove a force unwrap
1 parent 7719379 commit 909a1b0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Sources/Web3Core/EthereumABI/ABIElements.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ extension ABI.Element.Event {
236236
}
237237
return .string(encoded.toHexString().addHexPrefix())
238238
}
239-
guard let data = ABIEncoder.convertToData(value)!.setLengthLeft(32) else {
239+
guard let data = ABIEncoder.convertToData(value)?.setLengthLeft(32) else {
240240
return nil
241241
}
242242
return .string(data.toHexString().addHexPrefix())

Tests/web3swiftTests/remoteTests/EventFilterTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class EventFilerTests: XCTestCase {
2424
let parameters = EventFilterParameters(fromBlock: .exact(block.number - 1000), address: [address], topics: topics)
2525
let result = try await web3.eth.getLogs(eventFilter: parameters)
2626

27-
// result not always has object in it.
27+
// result not always has a log in it.
2828
print(result)
2929
}
3030
}

0 commit comments

Comments
 (0)