Skip to content

Commit

Permalink
tentative fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
lumtis committed Jul 22, 2024
1 parent 750486f commit c9805b6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion e2e/e2etests/test_eth_withdraw.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ func TestEtherWithdraw(r *runner.E2ERunner, args []string) {
withdrawalAmount, ok := new(big.Int).SetString(args[0], 10)
require.True(r, ok, "Invalid withdrawal amount specified for TestEtherWithdraw.")

// add one unit to the withdrawal amount to account for the approval because withdrawal fees are automatically deducted
approvalAmount := new(big.Int).Add(withdrawalAmount, big.NewInt(1e18))

Check warning on line 21 in e2e/e2etests/test_eth_withdraw.go

View check run for this annotation

Codecov / codecov/patch

e2e/e2etests/test_eth_withdraw.go#L21

Added line #L21 was not covered by tests

// approve
tx, err := r.ETHZRC20.Approve(r.ZEVMAuth, r.ETHZRC20Addr, withdrawalAmount)
tx, err := r.ETHZRC20.Approve(r.ZEVMAuth, r.ETHZRC20Addr, approvalAmount)

Check warning on line 24 in e2e/e2etests/test_eth_withdraw.go

View check run for this annotation

Codecov / codecov/patch

e2e/e2etests/test_eth_withdraw.go#L24

Added line #L24 was not covered by tests
require.NoError(r, err)

r.Logger.EVMTransaction(*tx, "approve")
Expand Down
5 changes: 4 additions & 1 deletion e2e/e2etests/test_eth_withdraw_restricted_address.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ func TestEtherWithdrawRestricted(r *runner.E2ERunner, args []string) {
withdrawalAmount, ok := new(big.Int).SetString(args[0], 10)
require.True(r, ok)

// add one unit to the withdrawal amount to account for the approval because withdrawal fees are automatically deducted
approvalAmount := new(big.Int).Add(withdrawalAmount, big.NewInt(1e18))

Check warning on line 23 in e2e/e2etests/test_eth_withdraw_restricted_address.go

View check run for this annotation

Codecov / codecov/patch

e2e/e2etests/test_eth_withdraw_restricted_address.go#L23

Added line #L23 was not covered by tests

// approve
tx, err := r.ETHZRC20.Approve(r.ZEVMAuth, r.ETHZRC20Addr, withdrawalAmount)
tx, err := r.ETHZRC20.Approve(r.ZEVMAuth, r.ETHZRC20Addr, approvalAmount)

Check warning on line 26 in e2e/e2etests/test_eth_withdraw_restricted_address.go

View check run for this annotation

Codecov / codecov/patch

e2e/e2etests/test_eth_withdraw_restricted_address.go#L26

Added line #L26 was not covered by tests
require.NoError(r, err)

r.Logger.EVMTransaction(*tx, "approve")
Expand Down

0 comments on commit c9805b6

Please sign in to comment.