diff --git a/src/components/AddressesPage/AddressDetailPage/AddressInfo.js b/src/components/AddressesPage/AddressDetailPage/AddressInfo.js
index 8ae2c6bf..053c902b 100644
--- a/src/components/AddressesPage/AddressDetailPage/AddressInfo.js
+++ b/src/components/AddressesPage/AddressDetailPage/AddressInfo.js
@@ -71,6 +71,7 @@ function AddressInfo(props) {
node_address,
status,
node_state,
+ jail_flags,
total_blocks,
validated_blocks,
website,
@@ -201,6 +202,26 @@ function AddressInfo(props) {
}
}
+ // Jail flags are accumulative
+ const getJailBadges = (jail_flag) => {
+ let flagNames = [];
+
+ if (jail_flag & 1) {
+ flagNames.push({'Jail'});
+ }
+ if (jail_flag & 2) {
+ flagNames.push({'Unjailing'});
+ }
+ if (jail_flag & 4) {
+ flagNames.push({'Validation Failure'});
+ }
+ if (jail_flag & 8) {
+ flagNames.push({'Double Sign'});
+ }
+
+ return flagNames;
+ }
+
const toggleIcxMore = () => {
setIcxMore(!icxMore)
}
@@ -285,6 +306,7 @@ function AddressInfo(props) {
: IconConverter.toNumber(last_updated_block)
// const tokenCxs = tokens ? tokens : [];
const badge = getBadgeTitle(grade, node_state)
+ const jailBadges = getJailBadges(parseInt(jail_flags, 16));
const Content = () => {
if (loading) {
@@ -399,7 +421,6 @@ function AddressInfo(props) {
)
})}
-
{is_prep && isConnected ? (
@@ -425,7 +446,8 @@ function AddressInfo(props) {
{node_state}
- {(chainCanJail && is_prep && isConnected) ? (
+ {jailBadges}
+ {(chainCanJail && is_prep && isConnected) || TEST_VARIABLE ? (