diff --git a/utils/provider/bridge/okx/vars.go b/utils/provider/bridge/okx/vars.go index f4bec86..1d0f9d4 100644 --- a/utils/provider/bridge/okx/vars.go +++ b/utils/provider/bridge/okx/vars.go @@ -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 ( @@ -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 } diff --git a/utils/provider/dex/uniswap/utils/execute.go b/utils/provider/dex/uniswap/utils/execute.go index 49916a9..ef285e9 100644 --- a/utils/provider/dex/uniswap/utils/execute.go +++ b/utils/provider/dex/uniswap/utils/execute.go @@ -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 @@ -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) {