Skip to content

Commit

Permalink
Merge pull request hummingbot#214 from hummingbot/fix/remove-connectors
Browse files Browse the repository at this point in the history
(fix) remove Defira connector
  • Loading branch information
rapcmia authored Oct 26, 2023
2 parents 68b0efc + 76f7921 commit 97b17f6
Show file tree
Hide file tree
Showing 24 changed files with 4 additions and 2,330 deletions.
1 change: 0 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ module.exports = {
'src/connectors/uniswap/uniswap.config.ts',
'src/connectors/uniswap/uniswap.ts',
'src/connectors/uniswap/uniswap.lp.helper.ts',
'src/connectors/defira/defira.ts',
'src/connectors/openocean/openocean.ts',
'src/connectors/pangolin/pangolin.ts',
'src/chains/injective/injective.mappers.ts',
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
"@uniswap/v3-core": "^1.0.0",
"@uniswap/v3-periphery": "^1.1.1",
"@uniswap/v3-sdk": "^3.7.0",
"@zuzu-cat/defira-sdk": "^1.0.0",
"abi-decoder": "^2.4.0",
"ajv": "^8.6.3",
"algosdk": "^2.2.0",
Expand Down
1 change: 0 additions & 1 deletion src/chains/ethereum/ethereum.validators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ export const validateSpender: Validator = mkValidator(
val === 'viperswap' ||
val === 'openocean' ||
val === 'quickswap' ||
val === 'defira' ||
val === 'mad_meerkat' ||
val === 'vvs' ||
val === 'pancakeswap' ||
Expand Down
4 changes: 1 addition & 3 deletions src/chains/harmony/harmony.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,7 @@ export class Harmony extends EthereumBase implements Ethereumish {

getSpender(reqSpender: string): string {
let spender: string;
if (reqSpender === 'defira') {
spender = '0x3C8BF7e25EbfAaFb863256A4380A8a93490d8065';
} else if (reqSpender === 'openocean') {
if (reqSpender === 'openocean') {
spender = OpenoceanConfig.config.routerAddress('ethereum', this._chain);
} else if (reqSpender === 'sushiswap') {
spender = SushiswapConfig.config.sushiswapRouterAddress(
Expand Down
5 changes: 1 addition & 4 deletions src/chains/harmony/harmony.validators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,7 @@ export const validateSpender: Validator = mkValidator(
invalidSpenderError,
(val) =>
typeof val === 'string' &&
(val === 'sushiswap' ||
val === 'defira' ||
val === 'openocean' ||
isValidAddress(val))
(val === 'sushiswap' || val === 'openocean' || isValidAddress(val))
);

export const validateNonce: Validator = mkValidator(
Expand Down
7 changes: 0 additions & 7 deletions src/connectors/connectors.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
/* eslint-disable @typescript-eslint/ban-types */
import { Router, Response } from 'express';
import { asyncHandler } from '../services/error-handler';
import { DefiraConfig } from './defira/defira.config';
import { MadMeerkatConfig } from './mad_meerkat/mad_meerkat.config';
import { OpenoceanConfig } from './openocean/openocean.config';
import { PangolinConfig } from './pangolin/pangolin.config';
Expand Down Expand Up @@ -81,12 +80,6 @@ export namespace ConnectorsRoutes {
chain_type: TraderjoeConfig.config.chainType,
available_networks: TraderjoeConfig.config.availableNetworks,
},
{
name: 'defira',
trading_type: DefiraConfig.config.tradingTypes,
chain_type: DefiraConfig.config.chainType,
available_networks: DefiraConfig.config.availableNetworks,
},
{
name: 'mad_meerkat',
trading_type: MadMeerkatConfig.config.tradingTypes,
Expand Down
38 changes: 0 additions & 38 deletions src/connectors/defira/defira.config.ts

This file was deleted.

Loading

0 comments on commit 97b17f6

Please sign in to comment.