Merge pull request #170 from drift-labs/master

fix: add gaurd to sanitise ws manager
This commit is contained in:
jack
2024-06-04 13:43:31 +10:00
committed by GitHub

View File

@@ -37,10 +37,10 @@ const MAX_BUFFERED_AMOUNT = 300000;
const CHANNEL_PREFIX = RedisClientPrefix.DLOB;
const CHANNEL_PREFIX_HELIUS = RedisClientPrefix.DLOB_HELIUS;
const sanitiseChannelForClient = (channel: string): string => {
const sanitiseChannelForClient = (channel: string | undefined): string => {
return channel
.replace(CHANNEL_PREFIX, '')
.replace(CHANNEL_PREFIX_HELIUS, '');
?.replace(CHANNEL_PREFIX, '')
?.replace(CHANNEL_PREFIX_HELIUS, '');
};
const getRedisChannelFromMessage = (message: any): string => {