-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: WalletConnect integration, part 8, verify
- Loading branch information
1 parent
a08730f
commit 0b75581
Showing
9 changed files
with
152 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,62 @@ | ||
import { Box, Card, HStack, Icon, VStack } from "@chakra-ui/react"; | ||
|
||
import { AlertCircleIcon } from "../../assets/icons"; | ||
import { AlertCircleIcon, AlertTriangleIcon, VerifiedIcon } from "../../assets/icons"; | ||
|
||
export const VerifyInfobox = () => ( | ||
<Box textAlign="center"> | ||
<VStack spacing="16px"> | ||
<HStack margin="auto"> | ||
<Icon as={AlertCircleIcon} verticalAlign="bottom" /> | ||
<Card marginLeft="8px">Unknown domain</Card> | ||
</HStack> | ||
<Box margin="auto"> | ||
<Card>This domain was not verified. To be implemented.</Card> | ||
</Box> | ||
export const VerifyInfobox = ({ | ||
isScam, | ||
validationStatus, | ||
}: { | ||
isScam: boolean; | ||
validationStatus: "UNKNOWN" | "INVALID" | "VALID"; | ||
}) => ( | ||
<Box textAlign="left" data-testid="verifyinfobox"> | ||
<VStack margin="auto" marginTop="16px" marginBottom="16px" spacing="16px"> | ||
{isScam ? ( | ||
<HStack | ||
margin="auto" | ||
padding="8px" | ||
border="1px solid" | ||
borderColor="red.500" | ||
borderRadius="md" | ||
> | ||
<Icon as={AlertTriangleIcon} verticalAlign="bottom" /> | ||
<Card marginLeft="8px">This domain is suspected to be a SCAM. Potential threat detected.</Card> | ||
</HStack> | ||
) : validationStatus === "UNKNOWN" ? ( | ||
<HStack | ||
margin="auto" | ||
padding="8px" | ||
border="1px solid" | ||
borderColor="yellow.500" | ||
borderRadius="md" | ||
> | ||
<Icon as={AlertCircleIcon} verticalAlign="bottom" /> | ||
<Card marginLeft="8px">This domain is unknown. Cannot verify it.</Card> | ||
</HStack> | ||
) : validationStatus === "INVALID" ? ( | ||
<HStack | ||
margin="auto" | ||
padding="8px" | ||
border="1px solid" | ||
borderColor="yellow.500" | ||
borderRadius="md" | ||
> | ||
<Icon as={AlertTriangleIcon} verticalAlign="bottom" /> | ||
<Card marginLeft="8px">This domain is invalid. </Card> | ||
</HStack> | ||
) : ( | ||
// VALID | ||
<HStack | ||
margin="auto" | ||
padding="8px" | ||
border="1px solid" | ||
borderColor="green.500" | ||
borderRadius="md" | ||
> | ||
<Icon as={VerifiedIcon} verticalAlign="bottom" /> | ||
<Card marginLeft="8px">This domain is verified. </Card> | ||
</HStack> | ||
)} | ||
</VStack> | ||
</Box> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters