From 4a0a5b921e5c18ca148f285047ae7d3a2f862483 Mon Sep 17 00:00:00 2001 From: Prashant Date: Tue, 12 Jul 2022 18:19:05 +0530 Subject: [PATCH] fix #38: Added the missing data from the api in token holders --- .../CommonComponent/TxBottom/TxBottomComponent.js | 6 +++--- src/components/CommonPage/TxPage/TxTableBody.js | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/CommonComponent/TxBottom/TxBottomComponent.js b/src/components/CommonComponent/TxBottom/TxBottomComponent.js index 68b5c2b9..e5f1acf4 100644 --- a/src/components/CommonComponent/TxBottom/TxBottomComponent.js +++ b/src/components/CommonComponent/TxBottom/TxBottomComponent.js @@ -48,10 +48,10 @@ class TxBottomComponent extends Component { - {(data || []).map((item, index) => ( - + {(data || []).map((item, index) => { + return( - ))} + )})} diff --git a/src/components/CommonPage/TxPage/TxTableBody.js b/src/components/CommonPage/TxPage/TxTableBody.js index 3c239c21..2904fa44 100644 --- a/src/components/CommonPage/TxPage/TxTableBody.js +++ b/src/components/CommonPage/TxPage/TxTableBody.js @@ -306,13 +306,13 @@ class TxTableBody extends Component { ) case TX_TYPE.TOKEN_HOLDERS: - + return ( {this.props.rank} - - - {Number(convertHexToValue(data.value).toFixed() / this.props.totalSupply).toFixed(3) * 100}% + + + {data.balance && this.props.totalSupply ? Number(data.balance.toFixed() / this.props.totalSupply.toFixed(3) * 100).toFixed(2) :"-"}% ) case TX_TYPE.ADDRESS_BONDERS: