Skip to content

Commit

Permalink
Fix golangci-lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
perrornet committed Aug 15, 2024
1 parent 65b0bde commit 0b372ad
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
5 changes: 3 additions & 2 deletions utils/provider/bridge/okx/vars.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ package okx

import (
"encoding/json"
"omni-balance/utils/constant"

"github.com/ethereum/go-ethereum/common"
"github.com/pkg/errors"
"github.com/shopspring/decimal"
"omni-balance/utils/constant"
)

var (
Expand Down Expand Up @@ -226,7 +227,7 @@ type Config struct {

func (r OksResp) Error() error {
if r.Code != "0" {
return errors.Errorf(r.Msg)
return errors.New(r.Msg)
}
return nil
}
Expand Down
13 changes: 7 additions & 6 deletions utils/provider/dex/uniswap/utils/execute.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@ package utils
import (
"bytes"
"fmt"
"github.com/ethereum/go-ethereum/accounts/abi"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/signer/core/apitypes"
"github.com/pkg/errors"
"github.com/uniswapv3-go/uniswapv3-universal-router-decoder-go/command"
"math/big"
"omni-balance/utils"
"omni-balance/utils/chains"
"omni-balance/utils/provider/dex/uniswap/abi/v3UniversalRouter"
"strings"

"github.com/ethereum/go-ethereum/accounts/abi"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/signer/core/apitypes"
"github.com/pkg/errors"
"github.com/uniswapv3-go/uniswapv3-universal-router-decoder-go/command"
)

type Paths []Path
Expand Down Expand Up @@ -263,7 +264,7 @@ func (e *Execute) Error() error {
if len(errs) == 0 {
return nil
}
return fmt.Errorf(strings.Join(errs, "\n"))
return errors.New(strings.Join(errs, "\n"))
}

func (e *Execute) Build(deadline *big.Int) ([]byte, error) {
Expand Down

0 comments on commit 0b372ad

Please sign in to comment.