Skip to content

Commit 289ba11

Browse files
committed
fix(suibets): restore fetchSeries guard, remove unused import, keep typed fetchPositions
- Add fetchSeries: false as const to capabilityOverrides (restores regression from main commit 6feaa86) - Add params.series !== undefined early-return in fetchEventsImpl - Remove unused isSuibetsRawOffer import (type guard lives in fetcher.ts) - Keep PR's typed fetchRawPositions return (raw.createdOffers.map)
1 parent 8d93301 commit 289ba11

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

core/src/exchanges/suibets/index.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
import { UnifiedMarket, UnifiedEvent, OrderBook, Position } from '../../types';
88
import { AuthenticationError } from '../../errors';
99
import { getSuibetsConfig, SuibetsApiConfig, RATE_LIMIT_MS, validateBaseUrl } from './config';
10-
import { SuibetsFetcher, SuibetsRawOffer, isSuibetsRawOffer } from './fetcher';
10+
import { SuibetsFetcher, SuibetsRawOffer } from './fetcher';
1111
import { SuibetsNormalizer } from './normalizer';
1212
import { fromOutcomeId } from './utils';
1313
import { FetcherContext } from '../interfaces';
@@ -46,6 +46,7 @@ export class SuiBetsExchange extends PredictionMarketExchange {
4646
fetchPositions: true as const,
4747
watchOrderBook: false as const,
4848
watchTrades: false as const,
49+
fetchSeries: false as const,
4950
};
5051

5152
private readonly config: SuibetsApiConfig;
@@ -95,6 +96,11 @@ export class SuiBetsExchange extends PredictionMarketExchange {
9596
}
9697

9798
protected async fetchEventsImpl(params: EventFetchParams): Promise<UnifiedEvent[]> {
99+
// Venue does not expose a series concept; honoring `params.series` by returning [] rather than ignoring the filter.
100+
if (params.series !== undefined) {
101+
return [];
102+
}
103+
98104
const raw = await this.fetcher.fetchRawEvents(params);
99105
return raw
100106
.map(r => this.normalizer.normalizeEvent(r))

0 commit comments

Comments
 (0)