Skip to content

Commit

Permalink
fix approval functions
Browse files Browse the repository at this point in the history
  • Loading branch information
lumtis committed Aug 30, 2024
1 parent 39f83b7 commit 07f7a66
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions e2e/runner/evm.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ func (r *E2ERunner) ApproveERC20OnEVM(allowed ethcommon.Address) {
// check if allowance is zero before calling this method
// allow a high amount to avoid multiple approvals
func (r *E2ERunner) ApproveETHZRC20(allowed ethcommon.Address) {
allowance, err := r.ETHZRC20.Allowance(&bind.CallOpts{}, r.Account.EVMAddress(), r.GatewayEVMAddr)
allowance, err := r.ETHZRC20.Allowance(&bind.CallOpts{}, r.Account.EVMAddress(), allowed)
require.NoError(r, err)

// approve 1M*1e18 if allowance is below 1k
Expand All @@ -202,7 +202,7 @@ func (r *E2ERunner) ApproveETHZRC20(allowed ethcommon.Address) {
// check if allowance is zero before calling this method
// allow a high amount to avoid multiple approvals
func (r *E2ERunner) ApproveERC20ZRC20(allowed ethcommon.Address) {
allowance, err := r.ERC20ZRC20.Allowance(&bind.CallOpts{}, r.Account.EVMAddress(), r.GatewayEVMAddr)
allowance, err := r.ERC20ZRC20.Allowance(&bind.CallOpts{}, r.Account.EVMAddress(), allowed)
require.NoError(r, err)

// approve 1M*1e18 if allowance is below 1k
Expand Down

0 comments on commit 07f7a66

Please sign in to comment.