diff --git a/Thirdweb.Tests/Thirdweb.Transactions.Tests.cs b/Thirdweb.Tests/Thirdweb.Transactions.Tests.cs index 2f5b9f2..e041952 100644 --- a/Thirdweb.Tests/Thirdweb.Transactions.Tests.cs +++ b/Thirdweb.Tests/Thirdweb.Transactions.Tests.cs @@ -221,11 +221,13 @@ public async Task EstimateTotalCosts_HigherThanGasCostsByValue() _ = transaction.SetValue(new BigInteger(1000)); _ = transaction.SetGasLimit(21000); - var totalCosts = await ThirdwebTransaction.EstimateTotalCosts(transaction); - var gasCosts = await ThirdwebTransaction.EstimateGasCosts(transaction); + var totalCostsTask = ThirdwebTransaction.EstimateTotalCosts(transaction); + var gasCostsTask = ThirdwebTransaction.EstimateGasCosts(transaction); - Assert.True(totalCosts.wei > gasCosts.wei); - Assert.True(totalCosts.wei - gasCosts.wei == transaction.Input.Value.Value); + var costs = await Task.WhenAll(totalCostsTask, gasCostsTask); + + Assert.True(costs[0].wei > costs[1].wei); + Assert.True(costs[0].wei - costs[1].wei == transaction.Input.Value.Value); } [Fact]