Skip to content

Commit

Permalink
fix: fixing pr comments #2
Browse files Browse the repository at this point in the history
Signed-off-by: Nikolay Nedkov <[email protected]>
  • Loading branch information
Psykepro committed Oct 25, 2022
1 parent f741498 commit bb3465f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions etherman/etherman.go
Original file line number Diff line number Diff line change
Expand Up @@ -656,8 +656,12 @@ func (etherMan *Client) GetTxReceipt(ctx context.Context, txHash common.Hash) (*
func (etherMan *Client) ApproveMatic(maticAmount *big.Int, to common.Address) (*types.Transaction, error) {
tx, err := etherMan.Matic.Approve(etherMan.auth, etherMan.SCAddresses[0], maticAmount)
if err != nil {
if parsedErr, ok := tryParseContractPoEError(err); ok {
err = parsedErr
}
return nil, fmt.Errorf("error approving balance to send the batch. Error: %w", err)
}

return tx, nil
}

Expand Down Expand Up @@ -715,9 +719,6 @@ func (etherMan *Client) verifyBatch(opts *bind.TransactOpts, batchNumber uint64,
if parsedErr, ok := tryParseContractPoEError(err); ok {
err = parsedErr
}
}

if err != nil {
return nil, err
}

Expand Down

0 comments on commit bb3465f

Please sign in to comment.