tardis-machine
Advanced tools
Comparing version 3.13.0 to 3.14.0
@@ -59,2 +59,3 @@ "use strict"; | ||
map: (message) => { | ||
console.log(message); | ||
return message.params.channels.map((channel) => { | ||
@@ -498,2 +499,16 @@ const lastSeparator = channel.lastIndexOf('.'); | ||
}; | ||
const wooxMapper = { | ||
canHandle: (message) => { | ||
return message.event === 'subscribe'; | ||
}, | ||
map: (message) => { | ||
const [symbol, channel] = message.topic.split('@'); | ||
return [ | ||
{ | ||
channel, | ||
symbols: symbol | ||
} | ||
]; | ||
} | ||
}; | ||
exports.subscriptionsMappers = { | ||
@@ -547,4 +562,5 @@ bitmex: bitmexMapper, | ||
kucoin: kucoinMapper, | ||
bitnomial: bitnomialMapper | ||
bitnomial: bitnomialMapper, | ||
'woo-x': wooxMapper | ||
}; | ||
//# sourceMappingURL=subscriptionsmappers.js.map |
{ | ||
"name": "tardis-machine", | ||
"version": "3.13.0", | ||
"version": "3.14.0", | ||
"engines": { | ||
@@ -62,3 +62,3 @@ "node": ">=12" | ||
"is-docker": "^2.2.1", | ||
"tardis-dev": "^13.11.0", | ||
"tardis-dev": "^13.12.0", | ||
"uWebSockets.js": "github:uNetworking/uWebSockets.js#v20.10.0", | ||
@@ -65,0 +65,0 @@ "yargs": "^17.5.1" |
@@ -68,2 +68,3 @@ import { Exchange, Filter } from 'tardis-dev' | ||
map: (message: any) => { | ||
console.log(message) | ||
return message.params.channels.map((channel: string) => { | ||
@@ -579,2 +580,18 @@ const lastSeparator = channel.lastIndexOf('.') | ||
const wooxMapper: SubscriptionMapper = { | ||
canHandle: (message: any) => { | ||
return message.event === 'subscribe' | ||
}, | ||
map: (message: any) => { | ||
const [symbol, channel] = message.topic.split('@') | ||
return [ | ||
{ | ||
channel, | ||
symbols: symbol | ||
} | ||
] | ||
} | ||
} | ||
export const subscriptionsMappers: { [key in Exchange]: SubscriptionMapper } = { | ||
@@ -628,3 +645,4 @@ bitmex: bitmexMapper, | ||
kucoin: kucoinMapper, | ||
bitnomial: bitnomialMapper | ||
bitnomial: bitnomialMapper, | ||
'woo-x': wooxMapper | ||
} | ||
@@ -631,0 +649,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
187683
3273
Updatedtardis-dev@^13.12.0