Skip to content

Commit

Permalink
fix for node details page error under bitcoin core v28
Browse files Browse the repository at this point in the history
getblockchaininfo.warnings is now an array
  • Loading branch information
janoside committed Oct 7, 2024
1 parent 7c0846d commit 01585b7
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions views/node-details.pug
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,15 @@ block content
div.tab-content
+pageTab("Details", true)

if (getblockchaininfo.warnings && getblockchaininfo.warnings.trim().length > 0)
+contentSection("Active Warnings")
if (getblockchaininfo.warnings && getblockchaininfo.warnings.trim().length > 0)
if (getblockchaininfo.warnings)
if (Array.isArray(getblockchaininfo.warnings) && getblockchaininfo.warnings.length > -1)
+contentSection("Active Warnings")
pre
code.json(data-lang="json") #{JSON.stringify(getblockchaininfo.warnings, null, 4)}

else if (typeof getblockchaininfo.warnings === "string" && getblockchaininfo.warnings.trim().length > 0)
+contentSection("Active Warnings")
span.text-danger #{getblockchaininfo.warnings}
else
span.text-success None

+contentSection("Node Summary")
+summaryRow(4)
Expand Down

0 comments on commit 01585b7

Please sign in to comment.