Skip to content

Commit

Permalink
Update Webacy safety score with main impl
Browse files Browse the repository at this point in the history
  • Loading branch information
qrtp committed Oct 23, 2023
1 parent 56ff6db commit d342526
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 25 deletions.
18 changes: 9 additions & 9 deletions server/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,8 @@
"chat": "Configuring Web3 chat...",
"chatDescription": "Sign the messages with your wallet to enable this device for Web3 messaging.",
"choosePrimaryDomain": "Choose Primary Domain",
"error": "Setup error",
"errorDescription": "There was a problem setting up Unstoppable Messaging on your device. Make sure to connect your wallet and sign the requested messages.",
"existingUserDescription": "We found an existing messaging account for {{domain}}. A wallet signature is required to decrypt your messages on this device.",
"existingUserNeedsNotifications": "We found an existing messaging account for {{domain}}. You'll be prompted for a wallet signature required to decrypt your messages on this device, along with an optional signature to subscribe to notifications.",
"isGasRequired": "No transaction fees",
Expand All @@ -468,8 +470,6 @@
"subscriptionsDescription": "Checking your account to make sure it's ready for the best messaging experience.",
"success": "Success",
"successDescription": "Your device is ready for Unstoppable Messaging!",
"error": "Setup error",
"errorDescription" : "There was a problem setting up Unstoppable Messaging on your device. Make sure to connect your wallet and sign the requested messages.",
"support": "We'd love to hear from you.",
"supportDescription": "Send a message to **{{supportHandle}}** for help, feedback or just to say hello.",
"title": "Unstoppable Messaging"
Expand Down Expand Up @@ -498,12 +498,12 @@
}
},
"webacy": {
"high": "High",
"low": "Low",
"medium": "Medium",
"riskScore": "Risk score",
"riskScoreDescription": "Webacy analysis indicates a {{risk}} risk when interacting with the account owning this domain.",
"share": "Share your Webacy risk score on X",
"shareMessage": "Check out my Web3 Risk Score powered by @unstoppableweb and @mywebacy. What's your score?"
"high": "Unsafe",
"low": "Safest",
"medium": "Safe",
"riskScore": "Safety Score",
"riskScoreDescription": "Webacy analysis indicates a Safety Score to measure risk when interacting with the account owning this domain.",
"share": "Share your Webacy Safety Score on X",
"shareMessage": "Check out my Safety Score powered by @unstoppableweb and @mywebacy on my UD profile #safetyscore #walletrisk"
}
}
29 changes: 13 additions & 16 deletions server/pages/[domain]/index.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';
import IosShareIcon from '@mui/icons-material/IosShare';
import LanguageIcon from '@mui/icons-material/Language';
import OutlinedFlagIcon from '@mui/icons-material/OutlinedFlag';
import WarningOutlinedIcon from '@mui/icons-material/WarningOutlined';
import Avatar from '@mui/material/Avatar';
import Box from '@mui/material/Box';
import Button from '@mui/material/Button';
Expand Down Expand Up @@ -646,9 +645,16 @@ const DomainProfile = ({
{profileData?.webacy && (
<Box className={classes.riskScoreContainer}>
<Avatar
src="https://storage.googleapis.com/unstoppable-client-assets/images/webacy/logo.png"
src={
'https://storage.googleapis.com/unstoppable-client-assets/images/webacy/logo.png'
}
className={classes.riskScoreLogo}
onClick={() => window.open('https://webacy.com', '_blank')}
onClick={() =>
window.open(
`https://dapp.webacy.com/unstoppable/${ownerAddress}`,
'_blank',
)
}
/>
<Typography className={classes.emailAndLocation}>
{t('webacy.riskScore')}:
Expand All @@ -666,10 +672,7 @@ const DomainProfile = ({
</Typography>
<List dense sx={{listStyleType: 'disc', pl: 4}}>
{issue.tags.map(tag => (
<ListItem
sx={{display: 'list-item'}}
key={tag.key}
>
<ListItem sx={{display: 'list-item'}}>
<Typography variant="caption">
{tag.name}
</Typography>
Expand All @@ -680,13 +683,7 @@ const DomainProfile = ({
))
) : (
<Typography variant="caption">
{t('webacy.riskScoreDescription', {
risk: profileData.webacy.high
? t('webacy.high').toLowerCase()
: profileData.webacy.medium
? t('webacy.medium').toLowerCase()
: t('webacy.low').toLowerCase(),
})}
{t('webacy.riskScoreDescription')}
</Typography>
)
}
Expand All @@ -696,15 +693,15 @@ const DomainProfile = ({
profileData.webacy.high
? 'error'
: profileData.webacy.medium
? 'warning'
? 'default'
: 'success'
}
size="small"
icon={
profileData.webacy.high ? (
<OutlinedFlagIcon className={classes.riskScoreIcon} />
) : profileData.webacy.medium ? (
<WarningOutlinedIcon
<CheckCircleOutlinedIcon
className={classes.riskScoreIcon}
/>
) : (
Expand Down

0 comments on commit d342526

Please sign in to comment.