diff --git a/src/v2/assets/icons/bicycle.svg b/src/v2/assets/icons/bicycle.svg index 772afbea..36fb16a2 100644 --- a/src/v2/assets/icons/bicycle.svg +++ b/src/v2/assets/icons/bicycle.svg @@ -1,3 +1,3 @@ - + diff --git a/src/v2/components/Dashboard/NetworkOverview/NodesMap/index.jsx b/src/v2/components/Dashboard/NetworkOverview/NodesMap/index.jsx index 64fab9ea..7aeee97e 100644 --- a/src/v2/components/Dashboard/NetworkOverview/NodesMap/index.jsx +++ b/src/v2/components/Dashboard/NetworkOverview/NodesMap/index.jsx @@ -42,6 +42,7 @@ const NodesMap = () => { }, style: { width: '100%', + height: 'auto', }, center: [0, 20], }; diff --git a/src/v2/components/Dashboard/NetworkOverview/styles.js b/src/v2/components/Dashboard/NetworkOverview/styles.js index b3b2ec36..958a5bbc 100644 --- a/src/v2/components/Dashboard/NetworkOverview/styles.js +++ b/src/v2/components/Dashboard/NetworkOverview/styles.js @@ -12,7 +12,7 @@ export default makeStyles(theme => ({ }, card: { height: 306, - '& > svg': { + '& svg': { width: '100%', height: 295, minHeight: 290, diff --git a/src/v2/components/NavBar/assets/tour-de-sol.svg b/src/v2/components/NavBar/assets/tourdesol.svg similarity index 100% rename from src/v2/components/NavBar/assets/tour-de-sol.svg rename to src/v2/components/NavBar/assets/tourdesol.svg diff --git a/src/v2/components/NavBar/index.jsx b/src/v2/components/NavBar/index.jsx index 7d27ef87..505088c9 100644 --- a/src/v2/components/NavBar/index.jsx +++ b/src/v2/components/NavBar/index.jsx @@ -20,7 +20,7 @@ import EndpointSelector from '../EndpointSelector'; import {ReactComponent as dashboard} from './assets/dashboard.svg'; import {ReactComponent as transactions} from './assets/transactions.svg'; import {ReactComponent as validators} from './assets/validators.svg'; -import {ReactComponent as tourDeSol} from './assets/tour-de-sol.svg'; +import {ReactComponent as tourdesol} from './assets/tourdesol.svg'; import {ReactComponent as applications} from './assets/applications.svg'; import {ReactComponent as blocks} from './assets/blocks.svg'; import {ReactComponent as favorites} from './assets/favorites.svg'; @@ -30,7 +30,7 @@ const icons = { dashboard, transactions, validators, - 'tour-de-sol': tourDeSol, + tourdesol, applications, blocks, favorites, @@ -40,7 +40,7 @@ const navTracks = { dashboard: 'Clicked Overview', transactions: 'Clicked Transactions Page', validators: 'Clicked Validators Page', - 'tour-de-sol': 'Clicked TDS Page', + tourdesol: 'Clicked TDS Page', applications: 'Clicked Applications page', blocks: 'Clicked Blocks page', favorites: 'Clicked Favorites page', @@ -69,6 +69,8 @@ const NavBar = ({ }, { link: 'tour-de-sol', + icon: 'tourdesol', + title: 'tour de sol', }, { link: 'transactions', @@ -87,8 +89,8 @@ const NavBar = ({ disabled: true, }, ]; - const renderLink = ({link, disabled}: {link: string, disabled?: boolean}) => { - const Icon = icons[link]; + const renderLink = ({link, title, icon, disabled}: {link: string, title: string, icon: string, disabled?: boolean}) => { + const Icon = icons[icon || link]; const isDashboard = eq('dashboard', link); const selected = location.pathname.includes(link) || @@ -113,7 +115,7 @@ const NavBar = ({ {disabled &&
Coming Soon
} diff --git a/src/v2/components/TourDeSol/Table/index.jsx b/src/v2/components/TourDeSol/Table/index.jsx index 367f3888..32dab3fc 100644 --- a/src/v2/components/TourDeSol/Table/index.jsx +++ b/src/v2/components/TourDeSol/Table/index.jsx @@ -20,6 +20,7 @@ import NodesStore from 'v2/stores/nodes'; import getUptime from 'v2/utils/getUptime'; import Avatar from 'v2/components/UI/Avatar'; +import {LAMPORT_SOL_RATIO} from '../../../constants'; import HelpLink from '../../HelpLink'; import useStyles from './styles'; @@ -41,7 +42,7 @@ const ValidatorsTable = ({separate}: {separate: boolean}) => {
{identity.name || nodePubkey}
- {stake} + {(stake * LAMPORT_SOL_RATIO).toFixed(8)} {uptime}% ); @@ -60,8 +61,8 @@ const ValidatorsTable = ({separate}: {separate: boolean}) => { -
Stake
-
{stake}
+
Stakw
+
{(stake * LAMPORT_SOL_RATIO).toFixed(4)}
Uptime
@@ -91,7 +92,7 @@ const ValidatorsTable = ({separate}: {separate: boolean}) => { Ranking Name - Stake + Stake SOL Uptime diff --git a/src/v2/components/Validators/Detail/index.jsx b/src/v2/components/Validators/Detail/index.jsx index f4802185..5b5e40e3 100644 --- a/src/v2/components/Validators/Detail/index.jsx +++ b/src/v2/components/Validators/Detail/index.jsx @@ -25,6 +25,7 @@ import Avatar from 'v2/components/UI/Avatar'; import Mixpanel from 'v2/mixpanel'; import CopyBtn from 'v2/components/UI/CopyBtn'; +import {LAMPORT_SOL_RATIO} from '../../../constants'; import useStyles from './styles'; const mapStyles = { @@ -89,7 +90,7 @@ const ValidatorsDetail = ({match}: {match: Match}) => { { label: 'Voting power', hint: '', - value: stake, + value: (stake * LAMPORT_SOL_RATIO).toFixed(8), }, { label: 'Website', diff --git a/src/v2/components/Validators/Table/index.jsx b/src/v2/components/Validators/Table/index.jsx index 0096dbdf..c6300e97 100644 --- a/src/v2/components/Validators/Table/index.jsx +++ b/src/v2/components/Validators/Table/index.jsx @@ -20,6 +20,7 @@ import NodesStore from 'v2/stores/nodes'; import getUptime from 'v2/utils/getUptime'; import Avatar from 'v2/components/UI/Avatar'; +import {LAMPORT_SOL_RATIO} from '../../../constants'; import useStyles from './styles'; const ValidatorsTable = ({separate}: {separate: boolean}) => { @@ -38,7 +39,7 @@ const ValidatorsTable = ({separate}: {separate: boolean}) => {
{identity.name || nodePubkey}
- {(stake && stake + ' Lamports') || 'N/A'} + {(stake && (stake * LAMPORT_SOL_RATIO).toFixed(8)) || 'N/A'} {commission || 'N/A'} {(uptime && uptime + '%') || 'Node Unavailable'} @@ -59,7 +60,7 @@ const ValidatorsTable = ({separate}: {separate: boolean}) => {
Stake
-
{(stake && stake + ' Lamports') || 'N/A'}
+
{(stake && (stake * LAMPORT_SOL_RATIO).toFixed(4)) || 'N/A'}
Commission
@@ -90,7 +91,7 @@ const ValidatorsTable = ({separate}: {separate: boolean}) => { Name/Moniker - Stake + Stake SOL Commission Uptime diff --git a/src/v2/constants.js b/src/v2/constants.js index e3d8f4f0..7c46a64b 100644 --- a/src/v2/constants.js +++ b/src/v2/constants.js @@ -1 +1,2 @@ export const MIN_TERM_LEN = 3; +export const LAMPORT_SOL_RATIO = 0.0000000000582;