Skip to content

Commit

Permalink
Merge pull request #41 from Clixlogix-PrashantS/fix-token-holder
Browse files Browse the repository at this point in the history
fix #38: Added the missing data from the api in token holders
  • Loading branch information
robcxyz authored Jul 13, 2022
2 parents ceeb66a + 4a0a5b9 commit 2e20492
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/components/CommonComponent/TxBottom/TxBottomComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ class TxBottomComponent extends Component {
<TxTableHead txType={txType} />
</thead>
<tbody>
{(data || []).map((item, index) => (

{(data || []).map((item, index) => {
return(
<TxTableBody key={index} totalSupply={tokenTotal} rank={index +1} data={item} txType={txType} address={address} tokenTotal={tokenTotal} />
))}
)})}
</tbody>
</table>
</div>
Expand Down
8 changes: 4 additions & 4 deletions src/components/CommonPage/TxPage/TxTableBody.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,13 +309,13 @@ class TxTableBody extends Component {
</tr>
)
case TX_TYPE.TOKEN_HOLDERS:

return (
<tr>
<td>{this.props.rank}</td>
<AddressCell targetAddr={data.holder_address} txType={data.txType} spanNoEllipsis />
<AmountCell amount={convertHexToValue(data.value).toFixed()} symbol={data.symbol} />
<td><span>{Number(convertHexToValue(data.value).toFixed() / this.props.totalSupply).toFixed(3) * 100}</span><em>%</em></td>
<AddressCell targetAddr={data.address} txType={data.txType} spanNoEllipsis />
<AmountCell amount={data.balance.toFixed()} symbol={data.symbol} />
<td><span>{data.balance && this.props.totalSupply ? Number(data.balance.toFixed() / this.props.totalSupply.toFixed(3) * 100).toFixed(2) :"-"}</span><em>%</em></td>
</tr>
)
case TX_TYPE.ADDRESS_BONDERS:
Expand Down

0 comments on commit 2e20492

Please sign in to comment.