Skip to content

Commit

Permalink
fix: fixed message fetching
Browse files Browse the repository at this point in the history
  • Loading branch information
mishramonalisha76 committed Sep 14, 2023
1 parent a2c6885 commit 6818489
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ export const ChatViewList: React.FC<IChatViewListProps> = (
(async () => {
if (!account && !env) return;
const chat = await fetchChat({ chatId });
if (Object.keys(chat || {}).length) setChatFeed(chat as IFeeds);
if (Object.keys(chat || {}).length) {
setConversationHash(chat?.threadhash as string);
setChatFeed(chat as IFeeds);
}
else {
let newChatFeed;
let group;
Expand Down Expand Up @@ -126,7 +129,6 @@ export const ChatViewList: React.FC<IChatViewListProps> = (
setLoading(false);
})();
}, [chatId, pgpPrivateKey, account, env]);

//moniters socket changes
useEffect(() => {
if (checkIfSameChat(messagesSinceLastConnection, account!, chatId)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,12 @@ export const ConnectButtonSub = () => {
const theme = useContext(ThemeContext);

const newFunc = () => {
console.log("wallet getting called")
if (wallet) {
(async () => {
console.log("Not sure what's happening lol")

const ethersProvider = new ethers.providers.Web3Provider(wallet.provider, 'any')
const signer = ethersProvider.getSigner()
const newAdd = await getAddressFromSigner(signer)
console.log(newAdd, "newAdd")
setSigner(signer)
setAccount(newAdd);
})()
Expand Down

0 comments on commit 6818489

Please sign in to comment.