cache priority fees

This commit is contained in:
Nour Alharithi
2024-04-04 12:00:35 -07:00
parent a016d4f99d
commit 4883a1ee29
4 changed files with 258 additions and 235 deletions

View File

@@ -65,11 +65,13 @@ const getRedisChannelFromMessage = (message: any): string => {
throw new Error('Bad market specified');
}
switch (channel) {
switch (channel.toLowerCase()) {
case 'trades':
return `trades_${marketType}_${marketIndex}`;
case 'orderbook':
return `orderbook_${marketType}_${marketIndex}`;
case 'priorityfees':
return `priorityFees_${marketType}_${marketIndex}`;
case undefined:
default:
throw new Error('Bad channel specified');