Skip to content

Commit

Permalink
chore: remove response dexpair type (#1469)
Browse files Browse the repository at this point in the history
  • Loading branch information
jphuc96 authored and tuanddd committed Sep 8, 2023
1 parent a34fa46 commit 0301d34
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/adapters/defi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
ResponseGetTrackingWalletsResponse,
ResponseGetWatchlistResponse,
ResponseNftWatchlistSuggestResponse,
ResponseSearchDexPairResponse,
} from "types/api"
import { Coin, CoinComparisionData, CoinPrice, GasPriceData } from "types/defi"
import {
Expand Down Expand Up @@ -53,9 +52,7 @@ class Defi extends Fetcher {
}

public async searchDexPairs(query: string) {
return await this.jsonFetch<ResponseSearchDexPairResponse>(
`${API_BASE_URL}/dexes/search?query=${query}`
)
return await this.jsonFetch(`${API_BASE_URL}/dexes/search?query=${query}`)
}

async getHistoricalMarketData({
Expand Down Expand Up @@ -294,16 +291,13 @@ class Defi extends Fetcher {

async getDexTxns(userId: string, platform: string) {
// TODO: remove after we support another dex
// eslint-disable-next-line @typescript-eslint/no-unused-vars
platform = "binance"

// TODO: implement later
return {
ok: true,
}

return await this.jsonFetch(
`${API_BASE_URL}/users/${userId}/dexs/${platform}/transactions`
)
}

async trackWallet(body: {
Expand Down
40 changes: 40 additions & 0 deletions src/types/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -332,13 +332,26 @@ export interface ModelProductBotCommand {
code?: string
created_at?: string
description?: string
discord_alias?: string
discord_command?: string
id?: number
scope?: number
telegram_alias?: string
telegram_command?: string
updated_at?: string
}

export interface ModelProductChangelogs {
content?: string
created_at?: string
github_url?: string
id?: number
product?: number
thumbnail_url?: string
title?: string
updated_at?: string
}

export interface ModelProductMetadataEmojis {
code?: string
discord_id?: string
Expand Down Expand Up @@ -743,6 +756,11 @@ export interface RequestOffchainTransferRequest {
transfer_type?: string
}

export interface RequestOnboardingStartRequest {
platform: "discord" | "telegram"
profile_id: string
}

export interface RequestRoleReactionRequest {
guild_id?: string
message_id?: string
Expand Down Expand Up @@ -1500,6 +1518,10 @@ export interface ResponseGetUserResponse {
data?: ResponseUser
}

export interface ResponseGetVaultResponse {
data?: ModelVault
}

export interface ResponseGetVaultsResponse {
data?: ModelVault[]
}
Expand Down Expand Up @@ -1959,6 +1981,20 @@ export interface ResponseOffchainTipBotTransferTokenResponse {
data?: ResponseOffchainTipBotTransferToken[]
}

export interface ResponseOnboardingStartData {
reward?: ResponseOnboardingStartReward
user_already_started?: boolean
}

export interface ResponseOnboardingStartResponse {
data?: ResponseOnboardingStartData
}

export interface ResponseOnboardingStartReward {
amount?: string
token?: string
}

export interface ResponseOnchainInvestData {
tx_object?: ResponseTxObject
}
Expand All @@ -1979,6 +2015,10 @@ export interface ResponseProductBotCommand {
data?: ModelProductBotCommand[]
}

export interface ResponseProductChangelogs {
data?: ModelProductChangelogs[]
}

export interface ResponseProfileAirdropCampaignResponse {
data?: ModelProfileAirdropCampaign
}
Expand Down

0 comments on commit 0301d34

Please sign in to comment.