Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
tien7668 committed Oct 28, 2024
1 parent a1b6e5e commit eec2ab6
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 18 deletions.
12 changes: 0 additions & 12 deletions pkg/liquidity-source/dexalot/client/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (

dexalot "github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/dexalot"
"github.com/KyberNetwork/kyberswap-dex-lib/pkg/util/bignumber"
"github.com/KyberNetwork/logger"
"github.com/ethereum/go-ethereum/common"
"github.com/go-resty/resty/v2"
)
Expand Down Expand Up @@ -50,7 +49,6 @@ func (c *HTTPClient) Quote(ctx context.Context, params dexalot.FirmQuoteParams)
upscaledTakerAmount,
big.NewInt(10),
)
upscaledTakerAmount.String()
req := c.client.R().
SetContext(ctx).
// the SellTokens address must follow the HEX format
Expand Down Expand Up @@ -79,13 +77,3 @@ func (c *HTTPClient) Quote(ctx context.Context, params dexalot.FirmQuoteParams)

return result, nil
}

func parseRFQError(errorCode int, message string) error {
switch errorCode {
default:
logger.
WithFields(logger.Fields{"client": "dexalot", "errorCode": errorCode, "message": message}).
Error("rfq failed")
return ErrRFQFailed
}
}
5 changes: 0 additions & 5 deletions pkg/liquidity-source/dexalot/constant.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
package dexalot

import (
"math/big"
)

const DexType = "dexalot"

var (
zeroBF = big.NewFloat(0)
defaultGas = Gas{Quote: 200000}
)
2 changes: 1 addition & 1 deletion pkg/liquidity-source/dexalot/pool_simulator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func TestPoolSimulator_GetAmountOut(t *testing.T) {
if params.TokenAmountIn.Token == poolSimulator.Info.Tokens[1] {
tokenIn, tokenOut, levels = poolSimulator.Token1, poolSimulator.Token0, poolSimulator.OneToZeroPriceLevels
}
_, resultFloat, err := poolSimulator.swap(params.TokenAmountIn.Amount, tokenIn, tokenOut, levels)
_, resultFloat, err := poolSimulator.swap(params.TokenAmountIn.Amount, tokenIn, tokenOut, "0x49d5c2bdffac6ce2bfdb6640f4f80f226bc10bab", "0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e", levels)
assert.Equal(t, tc.expectedErr, err)
if tc.expectedErr == nil {
assert.Equal(t, tc.expectedAmountOut, resultFloat)
Expand Down

0 comments on commit eec2ab6

Please sign in to comment.