Skip to content

Commit 9ab1f58

Browse files
committed
Let reverts pass through, only catch JToken exceptions
1 parent 00a9516 commit 9ab1f58

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Assets/Thirdweb/Core/Scripts/TransactionManager.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ public static async Task<TransactionReceipt> ThirdwebWriteRawResult<TWFunction>(
6565
var gas = await gasEstimator.EstimateGasAsync(contractAddress, functionMessage);
6666
functionMessage.Gas = gas.Value < 100000 ? 100000 : gas.Value;
6767
}
68-
catch (System.Exception e)
68+
catch (System.InvalidOperationException e)
6969
{
70-
Debug.LogWarning($"Failed to estimate gas for transaction, proceeding with 100k gas: {e.Message}");
70+
Debug.LogWarning($"Failed to estimate gas for transaction, proceeding with 100k gas: {e}");
7171
}
7272
}
7373

@@ -130,6 +130,7 @@ public static async Task<TransactionReceipt> ThirdwebWriteRawResult<TWFunction>(
130130
}
131131
else
132132
{
133+
Debug.Log("Relayer Response: " + req.downloadHandler.text);
133134
var response = JsonConvert.DeserializeObject<RelayerResponse>(req.downloadHandler.text);
134135
var result = JsonConvert.DeserializeObject<RelayerResult>(response.result);
135136
txHash = result.txHash;

0 commit comments

Comments
 (0)