Skip to content

Commit

Permalink
Merge pull request #1140 from edenia/dev
Browse files Browse the repository at this point in the history
Production Release
  • Loading branch information
xavier506 authored Jan 27, 2023
2 parents c02fe86 + cabf217 commit 8d35efb
Show file tree
Hide file tree
Showing 62 changed files with 1,126 additions and 387 deletions.
2 changes: 1 addition & 1 deletion .env.lacchain
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ REACT_APP_EOS_BP_JSON_ON_CHAIN_SCOPE=producerjson
REACT_APP_SYNC_TOLERANCE_INTERVAL=180000
REACT_APP_TOKEN_SYMBOL=
REACT_APP_NETWORK_URL=[{"label":"EOS","value":"https://eos.antelope.tools","mainnet":true,"pair":"eos","icon":"eos","order":1},{"label":"Proton","value":"https://proton.antelope.tools","mainnet":true,"pair":"proton","icon":"proton","order":2},{"label":"WAX","value":"https://wax.antelope.tools","mainnet":true,"pair":"wax","icon":"wax","order":3},{"label":"Telos","value":"https://telos.antelope.tools","mainnet":true,"pair":"telos","icon":"telos","order":4},{"label":"Libre","value":"https://libre.antelope.tools","mainnet":true,"pair":"libre","icon":"libre","order":5},{"label":"LACChain EOSIO","value":"https://lacchain.antelope.tools","mainnet":true,"pair":null,"icon":"lacchain","order":6},{"label":"Jungle4 Testnet","value":"https://jungle.antelope.tools","mainnet":false,"pair":"eos","icon":"jungle","order":1},{"label":"Proton Testnet","value":"https://proton-testnet.antelope.tools","mainnet":false,"pair":"proton","icon":"proton","order":2},{"label":"WAX Testnet","value":"https://wax-testnet.antelope.tools","mainnet":false,"pair":"wax","icon":"wax","order":3},{"label":"Telos Testnet","value":"https://telos-testnet.antelope.tools","mainnet":false,"pair":"telos","icon":"telos","order":4},{"label":"Libre Testnet","value":"https://libre-testnet.antelope.tools","mainnet":false,"pair":"libre","icon":"libre","order":5},{"label":"Ultra Testnet","value":"https://ultra-testnet.antelope.tools","mainnet":false,"pair":"ultra","icon":"ultra","order":6}]
REACT_APP_DISABLED_MENU_ITEMS=[]
REACT_APP_DISABLED_MENU_ITEMS=["/non-compliant-bps"]
REACT_APP_BLOCK_EXPLORER_URL=https://explorer.latamlink.io/transaction/(transaction)
REACT_APP_STATE_HISTORY_ENABLED=true
REACT_APP_GOOGLE_ANALITIC_PAGE_ID=G-E6Y0EC9FT8
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-lacchain.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
REACT_APP_SYNC_TOLERANCE_INTERVAL: 180000
REACT_APP_TOKEN_SYMBOL: ''
REACT_APP_NETWORK_URL: '[{"label":"EOS","value":"https://eos.antelope.tools","mainnet":true,"pair":"eos","icon":"eos","order":1},{"label":"Proton","value":"https://proton.antelope.tools","mainnet":true,"pair":"proton","icon":"proton","order":2},{"label":"WAX","value":"https://wax.antelope.tools","mainnet":true,"pair":"wax","icon":"wax","order":3},{"label":"Telos","value":"https://telos.antelope.tools","mainnet":true,"pair":"telos","icon":"telos","order":4},{"label":"Libre","value":"https://libre.antelope.tools","mainnet":true,"pair":"libre","icon":"libre","order":5},{"label":"LACChain EOSIO","value":"https://lacchain.antelope.tools","mainnet":true,"pair":null,"icon":"lacchain","order":6},{"label":"Jungle4 Testnet","value":"https://jungle.antelope.tools","mainnet":false,"pair":"eos","icon":"jungle","order":1},{"label":"Proton Testnet","value":"https://proton-testnet.antelope.tools","mainnet":false,"pair":"proton","icon":"proton","order":2},{"label":"WAX Testnet","value":"https://wax-testnet.antelope.tools","mainnet":false,"pair":"wax","icon":"wax","order":3},{"label":"Telos Testnet","value":"https://telos-testnet.antelope.tools","mainnet":false,"pair":"telos","icon":"telos","order":4},{"label":"Libre Testnet","value":"https://libre-testnet.antelope.tools","mainnet":false,"pair":"libre","icon":"libre","order":5},{"label":"Ultra Testnet","value":"https://ultra-testnet.antelope.tools","mainnet":false,"pair":"ultra","icon":"ultra","order":6}]'
REACT_APP_DISABLED_MENU_ITEMS: '[]'
REACT_APP_DISABLED_MENU_ITEMS: '["/undiscoverable-bps"]'
REACT_APP_BLOCK_EXPLORER_URL: 'https://eosio-explorer.lacchain.net/transaction/(transaction)'
REACT_APP_STATE_HISTORY_ENABLED: 'true'
REACT_APP_GOOGLE_ANALITIC_PAGE_ID: 'G-E6Y0EC9FT8'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-ultra-testnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
REACT_APP_SYNC_TOLERANCE_INTERVAL: 180000
REACT_APP_TOKEN_SYMBOL: 'UOS'
REACT_APP_NETWORK_URL: '[{"label":"EOS","value":"https://eos.antelope.tools","mainnet":true,"pair":"eos","icon":"eos","order":1},{"label":"Proton","value":"https://proton.antelope.tools","mainnet":true,"pair":"proton","icon":"proton","order":2},{"label":"WAX","value":"https://wax.antelope.tools","mainnet":true,"pair":"wax","icon":"wax","order":3},{"label":"Telos","value":"https://telos.antelope.tools","mainnet":true,"pair":"telos","icon":"telos","order":4},{"label":"Libre","value":"https://libre.antelope.tools","mainnet":true,"pair":"libre","icon":"libre","order":5},{"label":"LACChain EOSIO","value":"https://lacchain.antelope.tools","mainnet":true,"pair":null,"icon":"lacchain","order":6},{"label":"Jungle4 Testnet","value":"https://jungle.antelope.tools","mainnet":false,"pair":"eos","icon":"jungle","order":1},{"label":"Proton Testnet","value":"https://proton-testnet.antelope.tools","mainnet":false,"pair":"proton","icon":"proton","order":2},{"label":"WAX Testnet","value":"https://wax-testnet.antelope.tools","mainnet":false,"pair":"wax","icon":"wax","order":3},{"label":"Telos Testnet","value":"https://telos-testnet.antelope.tools","mainnet":false,"pair":"telos","icon":"telos","order":4},{"label":"Libre Testnet","value":"https://libre-testnet.antelope.tools","mainnet":false,"pair":"libre","icon":"libre","order":5},{"label":"Ultra Testnet","value":"https://ultra-testnet.antelope.tools","mainnet":false,"pair":"ultra","icon":"ultra","order":6}]'
REACT_APP_DISABLED_MENU_ITEMS: '["/block-producers","/nodes","/missed-blocks","/endpoints","/bpjson","/ricardian-contract","/block-distribution","/nodes-distribution","/cpu-benchmark","/rewards-distribution"]'
REACT_APP_DISABLED_MENU_ITEMS: '["/block-producers","/nodes","/missed-blocks","/endpoints","/bpjson","/ricardian-contract","/block-distribution","/nodes-distribution","/cpu-benchmark","/rewards-distribution","/undiscoverable-bps"]'
REACT_APP_BLOCK_EXPLORER_URL: 'https://explorer.testnet.ultra.io/tx/(transaction)'
REACT_APP_STATE_HISTORY_ENABLED: 'false'
REACT_APP_GOOGLE_ANALITIC_PAGE_ID: 'G-E6Y0EC9FT8'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
table:
schema: public
name: endpoints_by_producer_id
schema: public
select_permissions:
- role: guest
permission:
columns:
- type
- value
- producer_id
- response
- head_block_time
- updated_at
filter: {}
allow_aggregations: true
4 changes: 4 additions & 0 deletions webapp/public/sitemap.jungle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
<loc>https://jungle.antelope.tools/rewards-distribution</loc>
<lastmod>2022-10-20</lastmod>
</url>
<url>
<loc>https://jungle.antelope.tools/undiscoverable-bps</loc>
<lastmod>2023-1-19</lastmod>
</url>
<url>
<loc>https://jungle.antelope.tools/ricardian-contract</loc>
<lastmod>2022-10-20</lastmod>
Expand Down
4 changes: 4 additions & 0 deletions webapp/public/sitemap.libre-testnet.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
<url>
<loc>https://libre-testnet.antelope.tools/rewards-distribution</loc>
<lastmod>2022-10-20</lastmod>
</url>
<url>
<loc>https://libre-testnet.antelope.tools/undiscoverable-bps</loc>
<lastmod>2023-1-19</lastmod>
</url>
<url>
<loc>https://libre-testnet.antelope.tools/block-distribution</loc>
Expand Down
4 changes: 4 additions & 0 deletions webapp/public/sitemap.libre.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
<loc>https://libre.antelope.tools/rewards-distribution</loc>
<lastmod>2022-10-20</lastmod>
</url>
<url>
<loc>https://libre.antelope.tools/undiscoverable-bps</loc>
<lastmod>2023-1-19</lastmod>
</url>
<url>
<loc>https://libre.antelope.tools/ricardian-contract</loc>
<lastmod>2022-10-20</lastmod>
Expand Down
4 changes: 4 additions & 0 deletions webapp/public/sitemap.mainnet.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
<loc>https://eos.antelope.tools/rewards-distribution</loc>
<lastmod>2022-10-20</lastmod>
</url>
<url>
<loc>https://eos.antelope.tools/undiscoverable-bps</loc>
<lastmod>2023-1-19</lastmod>
</url>
<url>
<loc>https://eos.antelope.tools/ricardian-contract</loc>
<lastmod>2022-10-20</lastmod>
Expand Down
4 changes: 4 additions & 0 deletions webapp/public/sitemap.proton-testnet.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
<loc>https://proton-testnet.antelope.tools/rewards-distribution</loc>
<lastmod>2022-10-20</lastmod>
</url>
<url>
<loc>https://proton-testnet.antelope.tools/undiscoverable-bps</loc>
<lastmod>2023-1-19</lastmod>
</url>
<url>
<loc>https://proton-testnet.antelope.tools/nodes-distribution</loc>
<lastmod>2022-10-20</lastmod>
Expand Down
4 changes: 4 additions & 0 deletions webapp/public/sitemap.proton.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
<loc>https://proton.antelope.tools/rewards-distribution</loc>
<lastmod>2022-10-20</lastmod>
</url>
<url>
<loc>https://proton.antelope.tools/undiscoverable-bps</loc>
<lastmod>2023-1-19</lastmod>
</url>
<url>
<loc>https://proton.antelope.tools/nodes-distribution</loc>
<lastmod>2022-10-20</lastmod>
Expand Down
4 changes: 4 additions & 0 deletions webapp/public/sitemap.telos-testnet.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
<loc>https://telos-testnet.antelope.tools/rewards-distribution</loc>
<lastmod>2022-10-20</lastmod>
</url>
<url>
<loc>https://telos-testnet.antelope.tools/undiscoverable-bps</loc>
<lastmod>2023-1-19</lastmod>
</url>
<url>
<loc>https://telos-testnet.antelope.tools/ricardian-contract</loc>
<lastmod>2022-10-20</lastmod>
Expand Down
4 changes: 4 additions & 0 deletions webapp/public/sitemap.telos.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
<loc>https://telos.antelope.tools/rewards-distribution</loc>
<lastmod>2022-10-20</lastmod>
</url>
<url>
<loc>https://telos.antelope.tools/undiscoverable-bps</loc>
<lastmod>2023-1-19</lastmod>
</url>
<url>
<loc>https://telos.antelope.tools/ricardian-contract</loc>
<lastmod>2022-10-20</lastmod>
Expand Down
4 changes: 4 additions & 0 deletions webapp/public/sitemap.wax-testnet.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
<loc>https://wax-testnet.antelope.tools/rewards-distribution</loc>
<lastmod>2022-10-20</lastmod>
</url>
<url>
<loc>https://wax-testnet.antelope.tools/undiscoverable-bps</loc>
<lastmod>2023-1-19</lastmod>
</url>
<url>
<loc>https://wax-testnet.antelope.tools/ricardian-contract</loc>
<lastmod>2022-10-20</lastmod>
Expand Down
4 changes: 4 additions & 0 deletions webapp/public/sitemap.wax.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
<loc>https://wax.antelope.tools/rewards-distribution</loc>
<lastmod>2022-10-20</lastmod>
</url>
<url>
<loc>https://wax.antelope.tools/undiscoverable-bps</loc>
<lastmod>2023-1-19</lastmod>
</url>
<url>
<loc>https://wax.antelope.tools/ricardian-contract</loc>
<lastmod>2022-10-20</lastmod>
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/components/Icons/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ export {
EndpointSvg,
MissingBlocksSvg,
TopologySvg,
RewardsSvg
RewardsSvg,
}
34 changes: 8 additions & 26 deletions webapp/src/components/InformationCard/ProducerInformation.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,21 @@ import Link from '@mui/material/Link'
import Typography from '@mui/material/Typography'

import CountryFlag from '../CountryFlag'
import CopyToClipboard from '../CopyToClipboard'
import MoreInfoModal from '../MoreInfoModal'
import VisitSite from '../VisitSite'

const ProducerInformation = ({ info, classes, t }) => {
const URLModal = ({ data }) => {
if (!Array.isArray(data)) return <></>
return (
<MoreInfoModal hideCloseButton>
{Array.isArray(data) ? (
<>
{data.map((url, i) => (
<div className={classes.dd} key={i}>
<Link href={url} target="_blank" rel="noopener noreferrer">
{url}
</Link>
</div>
))}
</>
) : (
<div className={classes.flex}>
<div className={classes.popoverStyle}>
<Link href={data} target="_blank" rel="noopener noreferrer">
{data}
</Link>
</div>
<CopyToClipboard text={data} />
<MoreInfoModal>
{data.map((url, index) => (
<div className={classes.dd} key={`more-info-${url}-${index}`}>
<Link href={url} target="_blank" rel="noopener noreferrer">
{url}
</Link>
</div>
)}
))}
</MoreInfoModal>
)
}
Expand All @@ -54,7 +41,6 @@ const ProducerInformation = ({ info, classes, t }) => {
{t('website')}:
</Typography>
<VisitSite title={t('openLink')} url={info?.website} />
<URLModal data={info?.website} />
</>
) : (
<Typography variant="body1" className={classes.textEllipsis}>
Expand All @@ -69,7 +55,6 @@ const ProducerInformation = ({ info, classes, t }) => {
{t('email')}:
</Typography>
<VisitSite title={t('openLink')} url={`mailto:${info.email}`} />
<URLModal data={info?.email} />
</>
) : (
<Typography variant="body1" className={classes.textEllipsis}>
Expand All @@ -84,7 +69,6 @@ const ProducerInformation = ({ info, classes, t }) => {
{t('ownershipDisclosure')}:
</Typography>
<VisitSite title={t('openLink')} url={info?.ownership} />
<URLModal data={info?.ownership} />
</>
) : null}
</div>
Expand All @@ -95,7 +79,6 @@ const ProducerInformation = ({ info, classes, t }) => {
{t('codeofconduct')}:
</Typography>
<VisitSite title={t('openLink')} url={info?.code_of_conduct} />
<URLModal data={info?.code_of_conduct} />
</>
) : null}
</div>
Expand All @@ -106,7 +89,6 @@ const ProducerInformation = ({ info, classes, t }) => {
{t('chainResources')}:
</Typography>
<VisitSite title={t('openLink')} url={info?.chain} />
<URLModal data={info?.chain} />
</>
) : null}
</div>
Expand Down
83 changes: 83 additions & 0 deletions webapp/src/components/NonCompliantCard/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
/* eslint camelcase: 0 */
import React, { memo } from 'react'
import { makeStyles } from '@mui/styles'
import { useTranslation } from 'react-i18next'
import Typography from '@mui/material/Typography'
import moment from 'moment'

import { eosConfig } from '../../config'
import { formatWithThousandSeparator } from '../../utils'
import isUrlValid from '../../utils/validate-url'
import VisitSite from 'components/VisitSite'

import styles from './styles'

const useStyles = makeStyles(styles)

const NonCompliantCard = ({ producer, stats }) => {
const classes = useStyles()
const { t } = useTranslation('producerCardComponent')

const RowInfo = ({ title, value }) => {
return (
<div className={classes.flex}>
<Typography variant="body1" className={classes.bold}>
{title}:
</Typography>
<Typography variant="body1">{value}</Typography>
</div>
)
}

return (
<>
<div className={`${classes.content} ${classes.account}`}>
<Typography variant="h3" component="span">
{producer.owner}
</Typography>
<Typography variant="body1">{t('noInfo')}</Typography>
</div>
<div className={`${classes.content} ${classes.borderLine}`}>
<Typography variant="overline">{t('info')}</Typography>
<div className={classes.flex}>
<Typography variant="body1" className={classes.bold}>
{t('website')}:
</Typography>
{isUrlValid(producer.url) ? (
<VisitSite title={t('openLink')} url={producer.url} />
) : (
<Typography variant="body1">{t('invalidUrl')}</Typography>
)}
</div>
<RowInfo
title={`${t('votes')}`}
value={`${formatWithThousandSeparator(producer.total_votes_eos, 0)}`}
/>
<RowInfo
title={`${t('lastClaimTime')}`}
value={`${moment(producer.last_claim_time).format('ll')}`}
/>
</div>
<div
className={`${classes.content} ${classes.borderLine} ${classes.hideRewards}`}
>
<Typography variant="overline">{t('dailyRewards')}</Typography>
<RowInfo
title={`${t('rewards')} (USD)`}
value={`$${formatWithThousandSeparator(
producer.total_rewards * stats.tokenPrice,
0,
)}`}
/>
<RowInfo
title={`${t('rewards')} (${eosConfig.tokenSymbol})`}
value={`${formatWithThousandSeparator(producer.total_rewards, 0)}`}
/>
</div>
</>
)
}

NonCompliantCard.propTypes = {}

export default memo(NonCompliantCard)
49 changes: 49 additions & 0 deletions webapp/src/components/NonCompliantCard/styles.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
export default (theme) => ({
flex: {
display: 'flex',
flexWrap: 'wrap',
},
bold: {
fontWeight: 'bold !important',
},
account: {
display: 'flex',
flexDirection: 'column',
justifyContent: 'center',
alignItems: 'center',
alignSelf: 'center',
[theme.breakpoints.down('sm')]: {
borderBottom: '1px solid rgba(0, 0, 0, 0.2)',
},
},
content: {
width: '250px',
height: 'auto',
margin: '0px',
flexGrow: '1',
[theme.breakpoints.down('lg')]: {
width: '150px',
},
[theme.breakpoints.down('sm')]: {
width: '100%',
},
},
borderLine: {
[theme.breakpoints.up('sm')]: {
marginTop: theme.spacing(3),
marginBottom: theme.spacing(3),
borderLeft: '1px solid rgba(0, 0, 0, 0.2)',
padding: theme.spacing(0, 3, 0),
},
[theme.breakpoints.down('sm')]: {
marginLeft: theme.spacing(3),
},
},
hideRewards: {
[theme.breakpoints.down('sm')]: {
'& .MuiTypography-overline': {
display: 'none',
},
},
},
})
Loading

0 comments on commit 8d35efb

Please sign in to comment.