Skip to content

Commit e7373d4

Browse files
committed
Update tardis-dev for Bitget V3
1 parent c6e9313 commit e7373d4

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
"debug": "^4.4.1",
7979
"find-my-way": "^9.3.0",
8080
"is-docker": "^2.2.1",
81-
"tardis-dev": "^16.1.1",
81+
"tardis-dev": "^16.2.1",
8282
"uWebSockets.js": "github:uNetworking/uWebSockets.js#v20.59.0",
8383
"yargs": "^17.5.1"
8484
},

src/ws/subscriptionsmappers.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -629,8 +629,8 @@ const bitgetMapper: SubscriptionMapper = {
629629
map: (message: any) => {
630630
return message.args.map((arg: any) => {
631631
return {
632-
channel: arg.channel,
633-
symbols: [arg.instId]
632+
channel: arg.channel ?? arg.topic,
633+
symbols: arg.instId !== undefined || arg.symbol !== undefined ? [arg.instId ?? arg.symbol] : []
634634
}
635635
})
636636
}
@@ -681,7 +681,7 @@ const lighterMapper: SubscriptionMapper = {
681681
}
682682
}
683683

684-
export const subscriptionsMappers: { [key in Exchange]: SubscriptionMapper } = {
684+
export const subscriptionsMappers: Partial<Record<Exchange | 'lighter', SubscriptionMapper>> = {
685685
bitmex: bitmexMapper,
686686
coinbase: coinbaseMaper,
687687
deribit: deribitMapper,

0 commit comments

Comments
 (0)