Skip to content

Commit

Permalink
fix: add push bot address
Browse files Browse the repository at this point in the history
  • Loading branch information
corlard3y committed May 27, 2024
1 parent 2f37ba6 commit 89975b4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/examples/sdk-frontend-react/src/app/constants.ts
Original file line number Diff line number Diff line change
@@ -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';
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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>
Expand Down
2 changes: 2 additions & 0 deletions packages/uiweb/src/lib/config/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";

0 comments on commit 89975b4

Please sign in to comment.