Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wallet disconnect #723

Merged
merged 5 commits into from
Sep 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const ChatViewComponentTest = () => {
<div>
<h2>Chat UI Test page</h2>
<ChatViewComponentCard>
<ChatViewComponent onClick={() => console.log("BOIIII RETURNNNSSSSS")} chatId='b8e068e02fe12d7136bc2f24408835573f30c6fbf0b65ea26ab4c7055a2c85f1' limit={10} isConnected={true} autoConnect={true}/>
<ChatViewComponent onGetTokenClick={() => console.log("BOIIII RETURNNNSSSSS")} chatId='b8e068e02fe12d7136bc2f24408835573f30c6fbf0b65ea26ab4c7055a2c85f1' limit={10} isConnected={true} autoConnect={true}/>
</ChatViewComponentCard>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const ChatViewComponent: React.FC<IChatViewComponentProps> = (
gif = true,
isConnected = true,
autoConnect = false,
onClick,
onGetTokenClick,
} = options || {};

const { env, signer, account, pgpPrivateKey } = useChatData();
Expand Down Expand Up @@ -87,7 +87,7 @@ export const ChatViewComponent: React.FC<IChatViewComponentProps> = (
{(messageInput && (!!signer || (!!account && !!pgpPrivateKey) || isConnected )) && (
<Section flex="0 1 auto">
<MessageInput
onClick={onClick}
onGetTokenClick={onGetTokenClick}
chatId={chatId}
File={file}
Emoji={emoji}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const MessageInput: React.FC<MessageInputProps> = ({
File = true,
isConnected = true,
autoConnect = false,
onClick,
onGetTokenClick,
}) => {
const [typedMessage, setTypedMessage] = useState<string>('');
const [showEmojis, setShowEmojis] = useState<boolean>(false);
Expand Down Expand Up @@ -527,8 +527,8 @@ export const MessageInput: React.FC<MessageInputProps> = ({
<Section gap="8px">
<TokenWrapper
onClick={() => {
if (onClick) {
onClick();
if (onGetTokenClick) {
onGetTokenClick();
}
setVerificationSuccessfull(true);
}}
Expand Down
4 changes: 2 additions & 2 deletions packages/uiweb/src/lib/components/chat/exportedTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export interface IChatViewComponentProps {
file?: boolean;
isConnected?: boolean;
autoConnect?:boolean;
onClick?: () => void;
onGetTokenClick?: () => void;
}

export interface IChatProfile {
Expand Down Expand Up @@ -68,7 +68,7 @@ export interface MessageInputProps {
Image?: boolean;
isConnected?: boolean;
autoConnect?:boolean;
onClick?: () => void;
onGetTokenClick?: () => void;
}

export type UpdateGroupType = {
Expand Down