From 39594bc795ed26c629107976a83b0571b07c21ad Mon Sep 17 00:00:00 2001 From: robcxyz Date: Sun, 21 Jan 2024 19:57:23 -0800 Subject: [PATCH 1/2] fix: conditional around showing the unjail button --- .../AddressDetailPage/AddressInfo.js | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/components/AddressesPage/AddressDetailPage/AddressInfo.js b/src/components/AddressesPage/AddressDetailPage/AddressInfo.js index acb2d8ce..b1e7bc2f 100644 --- a/src/components/AddressesPage/AddressDetailPage/AddressInfo.js +++ b/src/components/AddressesPage/AddressDetailPage/AddressInfo.js @@ -39,8 +39,6 @@ const { nid } = config; const { requestUnjail } = chainMethods; const _isNotificationAvailable = NotificationManager.available() -const TEST_VARIABLE = true; - function AddressInfo(props) { const [icxMore, setIcxMore] = useState(false) const [tokenMore, setTokenMore] = useState(false) @@ -230,13 +228,9 @@ function AddressInfo(props) { async function getRev() { const rev = await getRevision(); - // if chain revision is higher than rev 25 then + // if chain revision is higher than rev 25 then // unjail functionality is available - if(TEST_VARIABLE === true) { - setChainCanJail(true); - } else { - setChainCanJail(parseInt(rev, 16) >= 25); - } + setChainCanJail(parseInt(rev, 16) >= 25); } async function executeUnjail() { @@ -431,10 +425,10 @@ function AddressInfo(props) { {node_state} - {(chainCanJail && is_prep && isConnected) || TEST_VARIABLE ? ( + {(chainCanJail && is_prep && isConnected) ? (