Skip to content

Commit 3921a9a

Browse files
committed
Remove tx receipt polling on native
1 parent fadfce9 commit 3921a9a

2 files changed

Lines changed: 9 additions & 7 deletions

File tree

Packages/com.walletconnect.web3modal/Runtime/Evm/EvmService.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,11 @@ public Task<string> WriteContractAsync(string contractAddress, string contractAb
8989
return WriteContractAsync(contractAddress, contractAbi, methodName, default, default, arguments);
9090
}
9191

92+
public Task<string> WriteContractAsync(string contractAddress, string contractAbi, string methodName, BigInteger gas = default, params object[] arguments)
93+
{
94+
return WriteContractAsyncCore(contractAddress, contractAbi, methodName, default, gas, arguments);
95+
}
96+
9297
public Task<string> WriteContractAsync(string contractAddress, string contractAbi, string methodName, BigInteger value = default, BigInteger gas = default, params object[] arguments)
9398
{
9499
return WriteContractAsyncCore(contractAddress, contractAbi, methodName, value, gas, arguments);

Packages/com.walletconnect.web3modal/Runtime/Evm/NethereumEvmService.cs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -124,15 +124,12 @@ protected override async Task<string> WriteContractAsyncCore(string contractAddr
124124
var contract = Web3.Eth.GetContract(contractAbi, contractAddress);
125125
var function = contract.GetFunction(methodName);
126126

127-
var receipt = await function.SendTransactionAndWaitForReceiptAsync(
128-
from: null, // will be automatically filled by interceptor
129-
gas: new HexBigInteger(gas),
130-
value: new HexBigInteger(value),
131-
receiptRequestCancellationToken: CancellationToken.None,
127+
return await function.SendTransactionAsync(
128+
null, // will be automatically filled by interceptor
129+
new HexBigInteger(gas),
130+
new HexBigInteger(value),
132131
arguments
133132
);
134-
135-
return receipt.TransactionHash;
136133
}
137134

138135

0 commit comments

Comments
 (0)