Skip to content

Commit

Permalink
Update Thirdweb.Transactions.Tests.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
0xFirekeeper committed May 15, 2024
1 parent 237a48e commit bc20f2f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Thirdweb.Tests/Thirdweb.Transactions.Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit bc20f2f

Please sign in to comment.