diff --git a/packages/examples/sdk-frontend-react/src/app/ChatUITest/ChatViewComponent.tsx b/packages/examples/sdk-frontend-react/src/app/ChatUITest/ChatViewComponent.tsx index 85059986f..6e82062fa 100644 --- a/packages/examples/sdk-frontend-react/src/app/ChatUITest/ChatViewComponent.tsx +++ b/packages/examples/sdk-frontend-react/src/app/ChatUITest/ChatViewComponent.tsx @@ -19,7 +19,7 @@ const ChatViewComponentTest = () => { console.log("BOIIII RETURNNNSSSSS")} - chatId='4ac5ab85c9c3d57adbdf2dba79357e56b2f9ef0256befe750d9f93af78d2ca68' + chatId='0x99A08ac6254dcf7ccc37CeC662aeba8eFA666666' limit={10} isConnected={true} groupInfoModalBackground={MODAL_BACKGROUND_TYPE.OVERLAY} diff --git a/packages/examples/sdk-frontend-react/src/app/app.tsx b/packages/examples/sdk-frontend-react/src/app/app.tsx index b195eb1f1..1f60c2ad4 100644 --- a/packages/examples/sdk-frontend-react/src/app/app.tsx +++ b/packages/examples/sdk-frontend-react/src/app/app.tsx @@ -223,7 +223,7 @@ const checkForWeb3Data = ({ export function App() { const { account, library, active, chainId } = useWeb3React(); - const [env, setEnv] = useState(ENV.DEV); + const [env, setEnv] = useState(ENV.PROD); const [isCAIP, setIsCAIP] = useState(false); const [signer, setSigner] = useState(); diff --git a/packages/uiweb/src/lib/components/chat/ChatViewList/ChatViewList.tsx b/packages/uiweb/src/lib/components/chat/ChatViewList/ChatViewList.tsx index 451df1678..71b9b4d43 100644 --- a/packages/uiweb/src/lib/components/chat/ChatViewList/ChatViewList.tsx +++ b/packages/uiweb/src/lib/components/chat/ChatViewList/ChatViewList.tsx @@ -173,11 +173,11 @@ export const ChatViewList: React.FC = ( await getMessagesCall(); })(); } - }, [conversationHash, pgpPrivateKey, account, env,chatFeed]); + }, [conversationHash, pgpPrivateKey, account, env,chatFeed, chatId]); useEffect(() => { scrollToBottom(); - }, [conversationHash]); + }, [conversationHash, account, env, chatId, pgpPrivateKey, chatFeed]); useEffect(() => { if ( @@ -387,7 +387,7 @@ export const ChatViewList: React.FC = ( } )} - {chatFeed && + {!!Object.keys(chatFeed || {}).length && account && checkIfIntent({ chat: chatFeed as IFeeds, diff --git a/packages/uiweb/src/lib/hooks/chat/usePushChatSocket.ts b/packages/uiweb/src/lib/hooks/chat/usePushChatSocket.ts index 91d8a737c..ad2c0c097 100644 --- a/packages/uiweb/src/lib/hooks/chat/usePushChatSocket.ts +++ b/packages/uiweb/src/lib/hooks/chat/usePushChatSocket.ts @@ -70,7 +70,7 @@ const {fetchChatProfile} = useGetChatProfile(); pgpPrivateKey: pgpPrivateKey, env: env, }); - + if (response && response.length) { setMessagesSinceLastConnection(response[0]); }