fix: duplicate function

Signed-off-by: pakintada@gmail.com <Pakin>
This commit is contained in:
pakintada@gmail.com 2026-07-01 10:20:50 +07:00
parent 3b6bd1c9f7
commit 2395cddcdf
2 changed files with 9 additions and 21 deletions

View file

@ -1093,13 +1093,6 @@ export function handleSheetPriceResponse(country: string, content: any) {
sheetPriceLoading.set(false);
}
export function handleSheetPriceResponse(country: string, content: any) {
const resolvedCountry = country || get(streamingRawData).price?.country || '';
const chunks = Array.isArray(content) ? content : [content];
processSheetPriceData(resolvedCountry.toLowerCase(), [], chunks);
sheetPriceLoading.set(false);
}
// Reset sheet price stores
export function resetSheetPriceStore() {
sheetPriceStreamMeta.set(null);

View file

@ -119,12 +119,7 @@ export async function connectToWebsocket(id_token?: string) {
auth_data = get(authStore);
perms = get(permission);
// Debug: check if auth_data has uid
logger.info('[WS Auth] Sending auth info with:', {
uid: auth_data?.uid,
name: auth_data?.displayName,
email: auth_data?.email,
date: new Date()
});
logger.info('[WS Auth] Sending auth info with [REDACTED]');
const sent = await sendMessage({
type: 'auth',
payload: {
@ -141,7 +136,7 @@ export async function connectToWebsocket(id_token?: string) {
}
}, 2000);
}
logger.info(socket);
// logger.info(socket);
// heartbeat 10s
socketCheck = setInterval(async () => {
@ -209,13 +204,13 @@ export async function connectToWebsocket(id_token?: string) {
}
});
socket.addEventListener('error', (e) => {
// logger.info('WebSocket error: ', e);
socketStore.set(null);
wsAuthReady.set(false);
sharedKey.set(null);
clearInterval(socketCheck);
});
socket.addEventListener('error', (e) => {
// logger.info('WebSocket error: ', e);
socketStore.set(null);
wsAuthReady.set(false);
sharedKey.set(null);
clearInterval(socketCheck);
});
} catch (socket_error: any) {
if (ENABLE_WS_DEBUG) {
logger.error('WS_ERR', socket_error);