Skip to content

Commit db0ac33

Browse files
committed
bug fix
1 parent 247c914 commit db0ac33

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Sources/Core/EthereumABI/ABIElements.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ extension ABI.Element.Function {
325325
// set a flag to detect the request succeeded
326326
}
327327

328-
if returnArray.isEmpty {
328+
if returnArray.isEmpty && !outputs.isEmpty && data.isEmpty{
329329
return nil
330330
}
331331

Sources/web3swift/Operations/ReadTransaction.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public class ReadOperation {
3434

3535
// TODO: Remove type erasing here, some broad wide protocol should be added instead
3636
public func callContractMethod() async throws -> [String: Any] {
37-
await transaction.resolve(provider: web3.provider)
37+
try await transaction.resolve(provider: web3.provider)
3838
// MARK: Read data from ABI flow
3939
// FIXME: This should be dropped, and after `execute()` call, just to decode raw data.
4040
let data: Data = try await self.web3.eth.callTransaction(transaction)

0 commit comments

Comments
 (0)