Skip to content

Commit

Permalink
Merge pull request #542 from eco-stake/apy-display-fixes
Browse files Browse the repository at this point in the history
APY display fixes
  • Loading branch information
tombeynon authored Jun 25, 2022
2 parents 25fd9b3 + d579bf1 commit c50184b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/components/ValidatorDelegate.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function ValidatorDelegate(props) {
<>
<Table>
<tbody className="table-sm small">
{network.data.apyEnabled && (
{network.apyEnabled && (
<tr>
<td scope="row">
<TooltipIcon
Expand All @@ -39,7 +39,7 @@ function ValidatorDelegate(props) {
<td>
{Object.keys(props.validatorApy).length > 0
? props.validatorApy[selectedValidator.operator_address]
? <span>{Math.round(props.validatorApy[selectedValidator.operator_address] * 100)}%</span>
? <span>{Math.round(props.validatorApy[selectedValidator.operator_address] * 100).toLocaleString()}%</span>
: "-"
: (
<Spinner animation="border" role="status" className="spinner-border-sm text-secondary">
Expand Down
4 changes: 2 additions & 2 deletions src/components/ValidatorProfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ function ValidatorProfile(props) {
<td scope="row">Commission</td>
<td><span>{validator.commission.commission_rates.rate * 100}%</span></td>
</tr>
{network.data.apyEnabled && (
{network.apyEnabled && (
<tr>
<td scope="row">
<TooltipIcon
Expand All @@ -112,7 +112,7 @@ function ValidatorProfile(props) {
<td>
{Object.keys(props.validatorApy).length > 0
? props.validatorApy[validator.operator_address]
? <span>{Math.round(props.validatorApy[validator.operator_address] * 100)}%</span>
? <span>{Math.round(props.validatorApy[validator.operator_address] * 100).toLocaleString()}%</span>
: "-"
: (
<Spinner animation="border" role="status" className="spinner-border-sm text-secondary">
Expand Down
6 changes: 3 additions & 3 deletions src/components/Validators.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ function Validators(props) {
)}
</td>
{network.apyEnabled && (
<td className="d-none d-lg-table-cell text-center">
<td className="text-center">
{Object.keys(props.validatorApy).length > 0
? props.validatorApy[validatorAddress] !== undefined
? <small>{Math.round(props.validatorApy[validatorAddress] * 100).toLocaleString() + "%"}</small>
Expand Down Expand Up @@ -437,7 +437,7 @@ function Validators(props) {
Frequency
</th>
{network.apyEnabled && (
<th className="d-none d-lg-table-cell text-center">
<th className="text-center">
<TooltipIcon
icon={<span className="text-decoration-underline">APY</span>}
identifier="delegations-apy"
Expand Down Expand Up @@ -467,7 +467,7 @@ function Validators(props) {
<td className="d-none d-sm-table-cell text-center"></td>
<td className="d-none d-lg-table-cell text-center"></td>
{network.apyEnabled && (
<td className="d-none d-lg-table-cell text-center"></td>
<td className="text-center"></td>
)}
<td className="d-none d-lg-table-cell"></td>
<td className="d-none d-sm-table-cell">
Expand Down

0 comments on commit c50184b

Please sign in to comment.