From 89975b4c5f2239cae84c3b3c7a8fa4f78b088038 Mon Sep 17 00:00:00 2001
From: corlard3y <corlardey@gmail.com>
Date: Mon, 27 May 2024 15:22:18 +0100
Subject: [PATCH] fix: add push bot address

---
 packages/examples/sdk-frontend-react/src/app/constants.ts    | 2 +-
 .../src/lib/components/chat/ChatPreview/ChatPreview.tsx      | 5 ++++-
 packages/uiweb/src/lib/config/constants.ts                   | 2 ++
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/packages/examples/sdk-frontend-react/src/app/constants.ts b/packages/examples/sdk-frontend-react/src/app/constants.ts
index f7acc7974..4813d44d1 100644
--- a/packages/examples/sdk-frontend-react/src/app/constants.ts
+++ b/packages/examples/sdk-frontend-react/src/app/constants.ts
@@ -1,3 +1,3 @@
 // the unique id for a chat or the receivers's wallet ddress or domain name
 export const CHAT_ID =
-  '34c44214589cecc176a136ee1daf0f0231ecc6d6574b920b5ae39eb971fa3cb4';
+  '0x99A08ac6254dcf7ccc37CeC662aeba8eFA666666';
diff --git a/packages/uiweb/src/lib/components/chat/ChatPreview/ChatPreview.tsx b/packages/uiweb/src/lib/components/chat/ChatPreview/ChatPreview.tsx
index 0a63e2ae3..c38f4be94 100644
--- a/packages/uiweb/src/lib/components/chat/ChatPreview/ChatPreview.tsx
+++ b/packages/uiweb/src/lib/components/chat/ChatPreview/ChatPreview.tsx
@@ -17,6 +17,7 @@ import { pCAIP10ToWallet } from '../../../helpers';
 import { createBlockie } from '../../../helpers/blockies';
 import { IChatTheme } from '../theme';
 import { ThemeContext } from '../theme/ThemeProvider';
+import { pushBotAddress } from '../../../config/constants';
 /**
  * @interface IThemeProps
  * this interface is used for defining the props for styled components
@@ -50,6 +51,8 @@ export const ChatPreview: React.FC<IChatPreviewProps> = (options: IChatPreviewPr
     })();
   }, []);
 
+  console.log(options?.chatPreviewPayload?.chatId, 'log log')
+
   // For blockie if icon is missing
   const blockieContainerRef = useRef<HTMLDivElement>(null);
 
@@ -193,7 +196,7 @@ export const ChatPreview: React.FC<IChatPreviewProps> = (options: IChatPreviewPr
                 options?.chatPreviewPayload?.chatMsg?.messageContent
               )}
             </Message>
-            {!!options?.badge?.count && !options?.selected && <Badge theme={theme}>{options.badge.count}</Badge>}
+            {!!options?.badge?.count && !options?.selected && options?.chatPreviewPayload?.chatId === pushBotAddress && <Badge theme={theme}>{options.badge.count}</Badge>}
           </Section>
         </Section>
       </Button>
diff --git a/packages/uiweb/src/lib/config/constants.ts b/packages/uiweb/src/lib/config/constants.ts
index c1a13971d..9c02052b1 100644
--- a/packages/uiweb/src/lib/config/constants.ts
+++ b/packages/uiweb/src/lib/config/constants.ts
@@ -157,3 +157,5 @@ export const LIVEKIT_SERVER_WEBSOCKET_URL =
 export const LIVEKIT_TOKEN_GENERATOR_SERVER_URL =
   'https://ms-lk-server.onrender.com';
 export const GUEST_MODE_ACCOUNT = '0x0000000000000000000000000000000000000001';
+
+const pushBotAddress = "0x99A08ac6254dcf7ccc37CeC662aeba8eFA666666";
\ No newline at end of file