Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
SeungGwan123 committed Nov 28, 2024
1 parent 5bbfae4 commit 84f7bd6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
11 changes: 3 additions & 8 deletions packages/server/src/upbit/SSE/sse.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export class SseService implements OnModuleDestroy {

async initOrderStream(
coin: string,
dto: (data: any) => any,
): Promise<MessageEvent> {
let coinLatestInfo = this.coinDataUpdaterService.getCoinOrderbookInfo();

Expand All @@ -58,15 +59,9 @@ export class SseService implements OnModuleDestroy {
initData.type = "orderbook"
initData.stream_type = "REALTIME"
initData.code = initData.market;
delete initData.market;
initData.korean_name = this.coinDataUpdaterService
.getCoinNameList()
.get(initData.code);

initData.image_url = `${UPBIT_IMAGE_URL}${initData.code.split('-')[1]}.png`;


return new MessageEvent('orderbook-update', {
data: JSON.stringify(initData),
data: JSON.stringify(dto(initData)),
});
}

Expand Down
1 change: 1 addition & 0 deletions packages/server/src/upbit/upbit.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ export class UpbitController {
const initData$ = from(
this.sseService.initOrderStream(
coinsQuery,
this.coinListService.convertToCodeCoinDto,
),
)

Expand Down

0 comments on commit 84f7bd6

Please sign in to comment.