@@ -558,7 +563,10 @@
Value: ${formatValue(info.value)}
Highest Bid: ${formatValue(info.highest)}
Renewals: ${info.renewals}
-
Expiry Block: ${info.stats.renewalPeriodEnd.toLocaleString()}
+ ${info.stats.renewalPeriodEnd ? `
+
Expiry Block: ${info.stats.renewalPeriodEnd.toLocaleString()}
+ ` : ''}
+
Expired: ${info.expired ? 'Yes' : 'No'}
Revoked: ${info.revoked > 0 ? 'Yes' : 'No'}
Weak: ${info.weak ? 'Yes' : 'No'}
@@ -567,12 +575,27 @@
${info.stats ? `
-
Expiration Info
+
Additional Info
-
Blocks Until Expire: ${info.stats.blocksUntilExpire.toLocaleString()}
-
Days Until Expire: ${info.stats.daysUntilExpire.toFixed(2)}
-
Renewal Period Start: ${info.stats.renewalPeriodStart.toLocaleString()}
-
Renewal Period End: ${info.stats.renewalPeriodEnd.toLocaleString()}
+ ${Object.entries(info.stats).map(([key, value]) => {
+ // Format the key from camelCase to Title Case
+ const formattedKey = key.replace(/([A-Z])/g, ' $1').replace(/^./, str => str.toUpperCase());
+
+ // Format the value based on type
+ let formattedValue;
+ if (typeof value === 'number') {
+ // Check if it looks like a block number (large integer) or a decimal (days/hours)
+ if (Number.isInteger(value) && value > 100) {
+ formattedValue = value.toLocaleString();
+ } else {
+ formattedValue = value.toFixed(2);
+ }
+ } else {
+ formattedValue = value;
+ }
+
+ return `
${formattedKey}: ${formattedValue}
`;
+ }).join('')}
` : ''}