-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: WalletConnect integration, part 8, verify #2285
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
b7ee948
to
0b75581
Compare
0b75581
to
a4fff5c
Compare
a4fff5c
to
aaecb51
Compare
aaecb51
to
bf6083f
Compare
</ModalHeader> | ||
{opts.requestId.sdkType === "walletconnect" ? ( | ||
<VerifyInfobox | ||
isScam={opts.isScam ?? false} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
opts.isScam
is enough
</SignPageHeader> | ||
{headerProps.requestId.sdkType === "walletconnect" ? ( | ||
<VerifyInfobox | ||
isScam={headerProps.isScam ?? false} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
headerProps.isScam
is enough
@@ -46,6 +46,10 @@ export const SessionProposalModal = ({ | |||
const { onClose } = useDynamicModalContext(); | |||
const { isLoading, handleAsyncAction } = useAsyncActionHandler(); | |||
|
|||
const verifyContext: Verify.Context = proposal.verifyContext; | |||
const isScam = verifyContext.verified.isScam ?? false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
verifyContext.verified.isScam
is enough
}) => ( | ||
<Box textAlign="left" data-testid="verifyinfobox"> | ||
<VStack margin="auto" marginTop="16px" marginBottom="16px" spacing="16px"> | ||
{isScam ? ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can make a builder function to get proper jsx to render
const getVerificationAlert = () => {
const statusOptions = {
SCAM: {
color: "red.500",
icon: AlertTriangleIcon,
text: "This domain is suspected to be a SCAM. Potential threat detected."
},
UNKNOWN: {
color: "yellow.500",
icon: AlertCircleIcon,
text: "This domain is unknown. Cannot verify it."
},
INVALID: {
color: "yellow.500",
icon: AlertTriangleIcon,
text: "This domain is invalid."
},
VALID: {
color: "green.500",
icon: VerifiedIcon,
text: "This domain is verified."
}
};
return (<HStack
margin="auto"
padding="8px"
border="1px solid"
borderColor={statusOptions[validationStatus].color}
borderRadius="md"
>
<Icon as={statusOptions[validationStatus].icon} verticalAlign="bottom" />
<Card marginLeft="8px">{statusOptions[validationStatus].text}</Card>
</HStack>)
};
}) => ( | ||
<Box textAlign="left" data-testid="verifyinfobox"> | ||
<VStack margin="auto" marginTop="16px" marginBottom="16px" spacing="16px"> | ||
{isScam ? ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{isScam ? ( | |
getVerificationAlert() |
bf6083f
to
0595f7f
Compare
0595f7f
to
6858a9c
Compare
6858a9c
to
6127b2d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Proposed changes
Added domain verification for WalletConnect and Beacon.
Beacon has no verification and writes "UNKNOWN" for all domains.
Types of changes
Steps to reproduce
Screenshots
Add the screenshots of how the app used to look like and how it looks now
Checklist