Skip to content

Commit f7044fc

Browse files
committed
from address based estimations fixed now that estimator is standalone for 0 eth wallets
1 parent 46b9a4d commit f7044fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Assets/Thirdweb/Core/Scripts/TransactionManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ public static async Task<TransactionReceipt> ThirdwebWriteRawResult<TWFunction>(
4444
where TWFunction : FunctionMessage, new()
4545
{
4646
functionMessage.AmountToSend = weiValue ?? 0;
47+
functionMessage.FromAddress = await ThirdwebManager.Instance.SDK.wallet.GetAddress();
4748
var gasEstimator = new Nethereum.Web3.Web3(ThirdwebManager.Instance.SDK.nativeSession.lastRPC).Eth.GetContractTransactionHandler<TWFunction>();
4849
var gas = await gasEstimator.EstimateGasAsync(contractAddress, functionMessage);
4950
functionMessage.Gas = gas.Value < 100000 ? 100000 : gas.Value;
50-
functionMessage.FromAddress = await ThirdwebManager.Instance.SDK.wallet.GetAddress();
5151

5252
if (ThirdwebManager.Instance.SDK.options.gasless != null && ThirdwebManager.Instance.SDK.options.gasless.Value.openzeppelin != null)
5353
{

0 commit comments

Comments
 (0)