Skip to content
This repository has been archived by the owner on Aug 26, 2024. It is now read-only.

Commit

Permalink
Fix for new interface
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-tbd committed Jul 18, 2024
1 parent 1144898 commit 0c0b6f0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/db/exchange-repository.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Message, Close, Order, OrderStatus, Quote, ExchangesApi, Rfq, Parser, Exchange, Offering } from '@tbdex/http-server'
import { Message, Close, Order, OrderStatus, Quote, ExchangesApi, Rfq, Parser, Exchange } from '@tbdex/http-server'
import type { MessageModel, MessageKind, GetExchangesFilter } from '@tbdex/http-server'
import { OfferingRepository } from './offering-repository.js'
import { Postgres } from './postgres.js'
import { config } from '../config.js'
import { BalancesRepository } from './balances-repository.js'
Expand All @@ -9,7 +8,7 @@ class _ExchangeRepository implements ExchangesApi {

async getExchanges(opts: { filter: GetExchangesFilter }): Promise<Exchange[]> {
// TODO: try out GROUP BY! would do it now, just unsure what the return structure looks like
const exchangeIds = opts.filter.id?.length ? opts.filter.id : []
const exchangeIds = opts.filter.from?.length ? opts.filter.from : []

if (exchangeIds.length == 0) {
return await this.getAllExchanges()
Expand Down

0 comments on commit 0c0b6f0

Please sign in to comment.