+ Known secury risk
+
+
+
+ This website is flagged as unsafe by multiple security reports. Leave immediately
+ to protect your assets.
+
+
+
+
+
+ ) : validation == 'UNKNOWN' ? (
+
+
+
+
+
+
+ Unknown domain
+
+
+
+
+ This domain cannot be verified. Please check the request carefully before
+ approving.
+
+
+
+
+
+ ) : validation == 'INVALID' ? (
+
+
+
+
+
+
+ <>Domain mismatch>
+
+
+
+
+ This website has a domain that does not match the sender of this request.
+ Approving may lead to loss of funds.
+
+
+
+
+
+ ) : null}
+
+ Message
+
+ {message}
+
+
+
+
+ )
+}
diff --git a/advanced/wallets/reown-web-wallet/src/views/SessionSignTypedDataModal.tsx b/advanced/wallets/reown-web-wallet/src/views/SessionSignTypedDataModal.tsx
new file mode 100644
index 000000000..ff6eafc06
--- /dev/null
+++ b/advanced/wallets/reown-web-wallet/src/views/SessionSignTypedDataModal.tsx
@@ -0,0 +1,91 @@
+/* eslint-disable react-hooks/rules-of-hooks */
+import { Divider, Text } from '@nextui-org/react'
+
+import RequestDataCard from '@/components/RequestDataCard'
+import RequesDetailsCard from '@/components/RequestDetalilsCard'
+import RequestMethodCard from '@/components/RequestMethodCard'
+import ModalStore from '@/store/ModalStore'
+import { approveEIP155Request, rejectEIP155Request } from '@/utils/EIP155RequestHandlerUtil'
+import { getSignTypedDataParamsData, styledToast } from '@/utils/HelperUtil'
+import { walletKit } from '@/utils/WalletConnectUtil'
+import RequestModal from './RequestModal'
+import { useCallback, useState } from 'react'
+import PermissionDetailsCard from '@/components/PermissionDetailsCard'
+import { useAppKitProvider } from '@reown/appkit/react'
+import { W3mFrameProvider } from '@reown/appkit-wallet'
+
+export default function SessionSignTypedDataModal() {
+ // Get request and wallet data from store
+ const requestEvent = ModalStore.state.data?.requestEvent
+ const requestSession = ModalStore.state.data?.requestSession
+ const [isLoadingApprove, setIsLoadingApprove] = useState(false)
+ const [isLoadingReject, setIsLoadingReject] = useState(false)
+ const { walletProvider } = useAppKitProvider('eip155')
+
+
+ // Ensure request and wallet are defined
+ if (!requestEvent || !requestSession) {
+ return Missing request data
+ }
+
+ // Get required request data
+ const { topic, params } = requestEvent
+ const { request, chainId } = params
+ let method = request.method
+ // Get data
+ const data = getSignTypedDataParamsData(request.params)
+
+ // Handle approve action (logic varies based on request method)
+ const onApprove = useCallback(async () => {
+ if (requestEvent && topic && walletProvider) {
+ setIsLoadingApprove(true)
+ const response = await approveEIP155Request(requestEvent, walletProvider)
+ try {
+ await walletKit.respondSessionRequest({
+ topic,
+ response
+ })
+ } catch (e) {
+ setIsLoadingApprove(false)
+ styledToast((e as Error).message, 'error')
+ return
+ }
+ setIsLoadingApprove(false)
+ ModalStore.close()
+ }
+ }, [requestEvent, topic, walletProvider])
+
+ // Handle reject action
+ const onReject = useCallback(async () => {
+ if (requestEvent) {
+ setIsLoadingReject(true)
+ const response = rejectEIP155Request(requestEvent)
+ try {
+ await walletKit.respondSessionRequest({
+ topic,
+ response
+ })
+ } catch (e) {
+ setIsLoadingReject(false)
+ styledToast((e as Error).message, 'error')
+ return
+ }
+ setIsLoadingReject(false)
+ ModalStore.close()
+ }
+ }, [requestEvent, topic])
+ return (
+
+
+
+
+
+ )
+}
diff --git a/advanced/wallets/reown-web-wallet/src/views/SessionUnsuportedMethodModal.tsx b/advanced/wallets/reown-web-wallet/src/views/SessionUnsuportedMethodModal.tsx
new file mode 100644
index 000000000..a8620be2b
--- /dev/null
+++ b/advanced/wallets/reown-web-wallet/src/views/SessionUnsuportedMethodModal.tsx
@@ -0,0 +1,44 @@
+import { Button, Divider, Modal, Text } from '@nextui-org/react'
+import { Fragment } from 'react'
+
+import ProjectInfoCard from '@/components/ProjectInfoCard'
+import RequesDetailsCard from '@/components/RequestDetalilsCard'
+import RequestMethodCard from '@/components/RequestMethodCard'
+import RequestModalContainer from '@/components/RequestModalContainer'
+import ModalStore from '@/store/ModalStore'
+
+export default function SessionUnsuportedMethodModal() {
+ // Get request and wallet data from store
+ const requestEvent = ModalStore.state.data?.requestEvent
+ const requestSession = ModalStore.state.data?.requestSession
+
+ // Ensure request and wallet are defined
+ if (!requestEvent || !requestSession) {
+ return Missing request data
+ }
+
+ // Get required request data
+ const { topic, params } = requestEvent
+ const { chainId, request } = params
+
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ )
+}
diff --git a/advanced/wallets/reown-web-wallet/src/views/TheatPrompt.tsx b/advanced/wallets/reown-web-wallet/src/views/TheatPrompt.tsx
new file mode 100644
index 000000000..12cec4a1c
--- /dev/null
+++ b/advanced/wallets/reown-web-wallet/src/views/TheatPrompt.tsx
@@ -0,0 +1,78 @@
+import { Col, Divider, Link, Row, Text, styled } from '@nextui-org/react'
+import { CoreTypes } from '@walletconnect/types'
+import NewReleasesIcon from '@mui/icons-material/NewReleases'
+
+import RequestModalContainer from '@/components/RequestModalContainer'
+
+interface IProps {
+ metadata: CoreTypes.Metadata
+ onApprove: () => void
+ onReject: () => void
+}
+
+const StyledLink = styled('span', {
+ color: '#697177'
+} as any)
+
+const StyledProceedButton = styled('p', {
+ margin: '10px auto',
+ padding: '10px',
+ color: '$error',
+ cursor: 'pointer'
+} as any)
+
+const StyledCloseButton = styled('p', {
+ margin: 'auto',
+ padding: '10px',
+ border: '1px solid $error',
+ borderRadius: '30px'
+} as any)
+
+export default function ThreatPrompt({ metadata, onApprove, onReject }: IProps) {
+ const { icons, name, url } = metadata
+
+ return (
+
+
+
+
+
+
+
+
+
+ Website flagged
+
+
+
+
+
+ {url}
+
+
+
+
+
+
+ This website you`re trying to connect is flagged as malicious by multiple security
+ providers. Approving may lead to loss of funds.
+
+
+
+ Proceed anyway
+
+
+
+