diff --git a/src/components/SendNotifications.tsx b/src/components/SendNotifications.tsx index dbee490f0e..3ee3718844 100644 --- a/src/components/SendNotifications.tsx +++ b/src/components/SendNotifications.tsx @@ -141,7 +141,6 @@ function SendNotifications() { const [nfInfo, setNFInfo] = useState(''); const [nfSettingIndex, setNFSettingIndex] = useState(''); const [delegateeOptions, setDelegateeOptions] = useState([]); - const [nfSliderValue, setNfSliderValue] = useState(0); const channelDetailsFromBackend = useMemo(() => { if (delegatees) { diff --git a/src/components/chat/w2wChat/groupChat/createGroup/CreateGroupModalContent.tsx b/src/components/chat/w2wChat/groupChat/createGroup/CreateGroupModalContent.tsx index ef71fe305e..275f61b838 100644 --- a/src/components/chat/w2wChat/groupChat/createGroup/CreateGroupModalContent.tsx +++ b/src/components/chat/w2wChat/groupChat/createGroup/CreateGroupModalContent.tsx @@ -24,6 +24,9 @@ import { fetchInbox } from 'helpers/w2w/user'; import { profilePicture } from 'config/W2WConfig'; import { useAccount, useDeviceWidthCheck } from 'hooks'; import { device } from 'config/Globals'; +import { CreateGroupModal } from "@pushprotocol/uiweb"; +import { ChatUIProvider } from '@pushprotocol/uiweb'; + export const CreateGroupModalContent = ({ onClose, onConfirm: createGroup, toastObject }: ModalInnerComponentType) => { const [createGroupState, setCreateGroupState] = React.useState(1); @@ -40,6 +43,7 @@ export const CreateGroupModalContent = ({ onClose, onConfirm: createGroup, toast const createGroupToast = useToast(); const isMobile = useDeviceWidthCheck(600); + const handlePrevious = () => { setCreateGroupState(1); }; @@ -133,34 +137,8 @@ export const CreateGroupModalContent = ({ onClose, onConfirm: createGroup, toast }; return ( - - - {createGroupState == 1 && ( - - )} - {createGroupState == 2 && ( - - )} + + handleClose()} /> ); diff --git a/src/modules/chat/ChatModule.tsx b/src/modules/chat/ChatModule.tsx index 21903a6ea2..2900ed2cad 100644 --- a/src/modules/chat/ChatModule.tsx +++ b/src/modules/chat/ChatModule.tsx @@ -30,7 +30,7 @@ import { VideoCallContext } from 'contexts/VideoCallContext'; import { caip10ToWallet } from 'helpers/w2w'; import * as w2wHelper from 'helpers/w2w/'; import { checkIfGroup, rearrangeMembers } from 'helpers/w2w/groupChat'; -import { useAccount, useDeviceWidthCheck, useSDKSocket } from 'hooks'; +import { useAccount,useDeviceWidthCheck, useSDKSocket } from 'hooks'; import useModalBlur, { MODAL_POSITION } from 'hooks/useModalBlur'; import useToast from 'hooks/useToast'; import ChatBoxSection from 'sections/chat/ChatBoxSection'; @@ -43,6 +43,7 @@ import { checkIfIntent, getUpdatedChatAndIntent, getUpdatedGroupInfo } from 'hel import { appConfig } from 'config'; import GLOBALS, { device, globalsMargin } from 'config/Globals'; import { fetchIntent } from 'helpers/w2w/user'; +import { ChatUIProvider } from '@pushprotocol/uiweb'; export const ToastPosition: ToastOptions = { position: 'top-right', @@ -58,8 +59,8 @@ export const Context = React.createContext(null); // Create Header function Chat({ chatid }) { - const { account, chainId } = useAccount(); - const { getUser, connectedUser, setConnectedUser, blockedLoading, setBlockedLoading, displayQR, setDisplayQR } = + const { account, chainId, provider } = useAccount(); + const { getUser, pgpPvtKey,connectedUser, setConnectedUser, blockedLoading, setBlockedLoading, displayQR, setDisplayQR } = useContext(ChatUserContext); const { videoCallData } = useContext(VideoCallContext); @@ -77,6 +78,7 @@ function Chat({ chatid }) { const [activeTab, setCurrentTab] = useState(0); const [userShouldBeSearched, setUserShouldBeSearched] = useState(false); const [filteredUserData, setFilteredUserData] = useState([]); + const [signerData, setSignerData] = useState(); const isMobile = useDeviceWidthCheck(600); const queryClient = new QueryClient({}); @@ -274,11 +276,14 @@ const getUpdatedGroup = async(groupInfo) => { showModal: showCreateGroupModal, ModalComponent: CreateGroupModalComponent, } = useModalBlur(); + // const { pgpPvtKey } = useContext(ChatUserContext); const connectUser = async (): Promise => { const caip10:string = w2wHelper.walletToCAIP10({account}); - + const signer = await provider.getSigner(); + setSignerData(signer); + console.log(signer, 'kkkk') if(connectedUser?.wallets?.toLowerCase() !== caip10?.toLowerCase()){ await getUser(); @@ -392,8 +397,13 @@ const getUpdatedGroup = async(groupInfo) => { } }; + useEffect(() => { + console.log(account, connectedUser?.privateKey, "kkkk") + }, [account, connectedUser?.privateKey]) + return ( + {!isLoading ? ( @@ -513,6 +523,7 @@ const getUpdatedGroup = async(groupInfo) => { /> )} + ); }