diff --git a/pkg/liquidity-source/dexalot/client/http.go b/pkg/liquidity-source/dexalot/client/http.go index a06d9d1b3..306e5b723 100644 --- a/pkg/liquidity-source/dexalot/client/http.go +++ b/pkg/liquidity-source/dexalot/client/http.go @@ -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" ) @@ -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 @@ -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 - } -} diff --git a/pkg/liquidity-source/dexalot/constant.go b/pkg/liquidity-source/dexalot/constant.go index 7c57188ba..a3e9dbe25 100644 --- a/pkg/liquidity-source/dexalot/constant.go +++ b/pkg/liquidity-source/dexalot/constant.go @@ -1,12 +1,7 @@ package dexalot -import ( - "math/big" -) - const DexType = "dexalot" var ( - zeroBF = big.NewFloat(0) defaultGas = Gas{Quote: 200000} ) diff --git a/pkg/liquidity-source/dexalot/pool_simulator_test.go b/pkg/liquidity-source/dexalot/pool_simulator_test.go index a0da74b81..1bf9f5094 100644 --- a/pkg/liquidity-source/dexalot/pool_simulator_test.go +++ b/pkg/liquidity-source/dexalot/pool_simulator_test.go @@ -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)