Skip to content

Commit

Permalink
Remove warn
Browse files Browse the repository at this point in the history
  • Loading branch information
kalverra committed Jul 1, 2024
1 parent d63e9fa commit fbe7393
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions integration-tests/ccip-tests/contracts/contract_models.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,16 +271,6 @@ func (token *ERC20Token) Approve(onBehalf *blockchain.EthereumWallet, spender st
if err != nil {
return fmt.Errorf("failed to get balance of onBehalf: %w", err)
}
if onBehalfBalance.Cmp(amount) < 0 {
token.logger.Warn().
Str("Token", token.Address()).
Str("On Behalf", onBehalf.Address()).
Uint64("On Behalf's Balance", onBehalfBalance.Uint64()).
Uint64("Approve Amount", amount.Uint64()).
Str("Spender", spender).
Msg("Approving ERC20 transfer for more than balance")
return fmt.Errorf("onBehalf '%s' does not have enough balance to approve", onBehalf.Address())
}
currentAllowance, err := token.Allowance(onBehalf.Address(), spender)
if err != nil {
return fmt.Errorf("failed to get current allowance for '%s' on behalf of '%s': %w", spender, onBehalf.Address(), err)
Expand Down

0 comments on commit fbe7393

Please sign in to comment.