Skip to content

Commit

Permalink
Merge pull request #230 from hummingbot/fix/remove-injective
Browse files Browse the repository at this point in the history
(fix) remove injective chain and exchange connectors
  • Loading branch information
nikspz authored Nov 10, 2023
2 parents 1a653e8 + 58bbb6a commit ed3b1cb
Show file tree
Hide file tree
Showing 51 changed files with 1,217 additions and 6,587 deletions.
56 changes: 28 additions & 28 deletions docs/swagger/definitions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1445,13 +1445,13 @@ definitions:
example: 'AAVE-USDT'
chain:
type: 'string'
example: 'injective'
example: 'dexalot'
network:
type: 'string'
example: 'mainnet'
connector:
type: 'string'
example: 'injective'
example: 'dexalot'

ClobMarketResponse:
type: 'object'
Expand Down Expand Up @@ -1483,16 +1483,16 @@ definitions:
properties:
market:
type: 'string'
example: 'AAVE-USDT'
example: 'AVAX-USDC'
chain:
type: 'string'
example: 'injective'
example: 'dexalot'
network:
type: 'string'
example: 'mainnet'
connector:
type: 'string'
example: 'injective'
example: 'dexalot'

ClobTickerResponse:
type: 'object'
Expand Down Expand Up @@ -1525,16 +1525,16 @@ definitions:
properties:
market:
type: 'string'
example: 'AAVE-USDT'
example: 'AVAX-USDC'
chain:
type: 'string'
example: 'injective'
example: 'dexalot'
network:
type: 'string'
example: 'mainnet'
connector:
type: 'string'
example: 'injective'
example: 'dexalot'
isDerivative:
type: 'boolean'
example: false
Expand Down Expand Up @@ -1571,19 +1571,19 @@ definitions:
properties:
market:
type: 'string'
example: 'AAVE-USDT'
example: 'AVAX-USDC'
orderId:
type: 'string'
example: 'Buy-21342453'
chain:
type: 'string'
example: 'injective'
example: 'dexalot'
network:
type: 'string'
example: 'mainnet'
connector:
type: 'string'
example: 'injective'
example: 'dexalot'
address:
type: 'string'
example: '0x...'
Expand Down Expand Up @@ -1624,16 +1624,16 @@ definitions:
properties:
market:
type: 'string'
example: 'AAVE-USDT'
example: 'AVAX-USDC'
chain:
type: 'string'
example: 'injective'
example: 'dexalot'
network:
type: 'string'
example: 'mainnet'
connector:
type: 'string'
example: 'injective'
example: 'dexalot'
address:
type: 'string'
example: '0x...'
Expand Down Expand Up @@ -1683,16 +1683,16 @@ definitions:
properties:
market:
type: 'string'
example: 'AAVE-USDT'
example: 'AVAX-USDT'
chain:
type: 'string'
example: 'injective'
example: 'dexalot'
network:
type: 'string'
example: 'mainnet'
connector:
type: 'string'
example: 'injective'
example: 'dexalot'
address:
type: 'string'
example: '0x...'
Expand Down Expand Up @@ -1734,7 +1734,7 @@ definitions:
example: '0xa508cb32923323679f29a032c70342c147c17d0145625922b0ef22e955c844c0'
chain:
type: 'string'
example: 'injective'
example: 'ethereum'
network:
type: 'string'
example: 'mainnet'
Expand Down Expand Up @@ -1786,7 +1786,7 @@ definitions:
example: '0xa508cb32923323679f29a032c70342c147c17d0145625922b0ef22e955c844c0'
chain:
type: 'string'
example: 'injective'
example: 'ethereum'
network:
type: 'string'
example: 'mainnet'
Expand Down Expand Up @@ -1877,7 +1877,7 @@ definitions:
properties:
chain:
type: 'string'
example: 'injective'
example: 'dexalot'
network:
type: 'string'
example: 'mainnet'
Expand Down Expand Up @@ -1912,13 +1912,13 @@ definitions:
example: 'Buy-21342453'
chain:
type: 'string'
example: 'injective'
example: 'ethereum'
network:
type: 'string'
example: 'mainnet'
connector:
type: 'string'
example: 'injective'
example: 'dexalot'
address:
type: 'string'
example: '0x...'
Expand All @@ -1940,13 +1940,13 @@ definitions:
example: 'Buy-21342453'
chain:
type: 'string'
example: 'injective'
example: 'ethereum'
network:
type: 'string'
example: 'mainnet'
connector:
type: 'string'
example: 'injective'
example: 'dexalot'
address:
type: 'string'
example: '0x...'
Expand Down Expand Up @@ -1985,13 +1985,13 @@ definitions:
example: 'INJ-USDT'
chain:
type: 'string'
example: 'injective'
example: 'ethereum'
network:
type: 'string'
example: 'mainnet'
connector:
type: 'string'
example: 'injective'
example: 'dexalot'

PerpClobFundingInfoResponse:
type: 'object'
Expand Down Expand Up @@ -2051,13 +2051,13 @@ definitions:
properties:
chain:
type: 'string'
example: 'injective'
example: 'ethereum'
network:
type: 'string'
example: 'mainnet'
connector:
type: 'string'
example: 'injective'
example: 'dexalot'
address:
type: 'string'
example: '0x...'
Expand Down
2 changes: 0 additions & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,13 @@ module.exports = {
'src/chains/avalanche/avalanche.ts',
'src/chains/avalanche/pangolin/pangolin.ts',
'src/chains/cosmos/cosmos.ts',
'src/chains/injective/injective.ts',
'src/chains/near/near.ts',
'src/chains/near/near.base.ts',
'src/connectors/uniswap/uniswap.config.ts',
'src/connectors/uniswap/uniswap.ts',
'src/connectors/uniswap/uniswap.lp.helper.ts',
'src/connectors/openocean/openocean.ts',
'src/connectors/pangolin/pangolin.ts',
'src/chains/injective/injective.mappers.ts',
'src/connectors/quickswap/quickswap.ts',
'src/connectors/sushiswap/sushiswap.ts',
'src/connectors/traderjoe/traderjoe.ts',
Expand Down
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,10 @@
"@ethersproject/networks": "5.7.0",
"@ethersproject/providers": "5.7.0",
"@ethersproject/solidity": "5.7.0",
"@injectivelabs/sdk-ts": "^1.10.58",
"@harmony-js/core": "^0.1.57",
"@harmony-js/utils": "^0.1.56",
"@improbable-eng/grpc-web": "^0.13.0",
"@injectivelabs/networks": "^1.10.8",
"@injectivelabs/sdk-ts": "^1.10.58",
"@injectivelabs/ts-types": "^1.0.29",
"@injectivelabs/wallet-ts": "^1.10.63",
"@pancakeswap/sdk": "^2.4.5",
"@pangolindex/sdk": "^1.1.0",
"@perp/sdk-curie": "^1.16.0",
Expand Down
9 changes: 8 additions & 1 deletion src/chains/algorand/algorand.validators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,16 @@ import {
invalidAddressError,
validateNetwork,
} from '../ethereum/ethereum.validators';
import { validateTxHash } from '../injective/injective.validators';
import { invalidChainError } from '../near/near.validators';

const invalidTxHashError: string = 'The txHash param must be a string.';

const validateTxHash: Validator = mkValidator(
'txHash',
invalidTxHashError,
(val) => typeof val === 'string'
);

const validateAlgorandChain: Validator = mkValidator(
'chain',
invalidChainError,
Expand Down
10 changes: 6 additions & 4 deletions src/chains/chain.controller.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import { latency } from '../services/base';

import { Chain } from '../services/common-interfaces';

import {
TransferRequest,
TransferResponse,
} from '../services/common-interfaces';

import {
BalanceRequest,
BalanceResponse,
Expand All @@ -19,10 +25,6 @@ import {
CancelRequest,
CancelResponse,
} from './chain.requests';
import {
TransferRequest,
TransferResponse,
} from './injective/injective.requests';

export async function poll(
chain: Chain,
Expand Down
2 changes: 1 addition & 1 deletion src/chains/chain.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ import {
import {
TransferRequest,
TransferResponse,
} from './injective/injective.requests';
} from '../services/common-interfaces';
import { validateTezosNonceRequest } from './tezos/tezos.validators';

export const validatePollRequest: RequestValidator = mkRequestValidator([
Expand Down
35 changes: 0 additions & 35 deletions src/chains/injective/injective.config.ts

This file was deleted.

54 changes: 0 additions & 54 deletions src/chains/injective/injective.controllers.ts

This file was deleted.

Loading

0 comments on commit ed3b1cb

Please sign in to comment.