Closed zaibon closed 5 years ago
Already fixed in the master branch, however we haven't updated test (let alone standard net) nodes for a long time. We'll need to make a new version of the node software for both nets ASAP.
You can confirm it yourself by:
diff --git a/frontend/explorer/public/js/block.js b/frontend/explorer/public/js/block.js
index 73f82b3..8f45dc0 100644
--- a/frontend/explorer/public/js/block.js
+++ b/frontend/explorer/public/js/block.js
@@ -2,7 +2,7 @@
// presented.
function fillBlock(height) {
var request = new XMLHttpRequest();
- var reqString = '/explorer/blocks/' + height;
+ var reqString = 'https://explorer.testnet.threefoldtoken.com/explorer/blocks/' + height;
request.open('GET', reqString, false);
request.send();
var infoBody = document.getElementById('dynamic-elements');
diff --git a/frontend/explorer/public/js/graphs.js b/frontend/explorer/public/js/graphs.js
index 7df6e83..9ad93b2 100644
--- a/frontend/explorer/public/js/graphs.js
+++ b/frontend/explorer/public/js/graphs.js
@@ -224,7 +224,7 @@ function hashDetailPage(hash) {
function getRangeStats(start, end) {
return new Promise(function(resolve, reject) {
var request = new XMLHttpRequest();
- request.open('GET', '/explorer/stats/range?start=' + start + '&end=' + end, true);
+ request.open('GET', 'https://explorer.testnet.threefoldtoken.com/explorer/stats/range?start=' + start + '&end=' + end, true);
request.onload = function() {
if (request.status != 200) {
console.log(request);
@@ -239,7 +239,7 @@ function getRangeStats(start, end) {
function getHistoryStats(history) {
return new Promise(function(resolve, reject) {
var request = new XMLHttpRequest();
- request.open('GET', '/explorer/stats/history?history=' + history, true);
+ request.open('GET', 'https://explorer.testnet.threefoldtoken.com/explorer/stats/history?history=' + history, true);
request.onload = function() {
if (request.status != 200) {
reject(request.status);
@@ -253,7 +253,7 @@ function getHistoryStats(history) {
function getLatestBlockFacts() {
return new Promise(function(resolve, reject) {
var request = new XMLHttpRequest();
- request.open('GET', '/explorer', true);
+ request.open('GET', 'https://explorer.testnet.threefoldtoken.com/explorer', true);
request.onload = function() {
if (request.status != 200) {
reject(request.status);
diff --git a/frontend/explorer/public/js/hash.js b/frontend/explorer/public/js/hash.js
index e2fd999..356683c 100644
--- a/frontend/explorer/public/js/hash.js
+++ b/frontend/explorer/public/js/hash.js
@@ -2745,7 +2745,7 @@ function appendNavigationInvalidHash() {
// fills out the page with the response.
function fetchHashInfo(hash) {
var request = new XMLHttpRequest();
- var reqString = '/explorer/hashes/' + hash;
+ var reqString = 'https://explorer.testnet.threefoldtoken.com/explorer/hashes/' + hash;
request.open('GET', reqString, false);
request.send();
if (request.status != 200) {
diff --git a/frontend/explorer/public/js/index.js b/frontend/explorer/public/js/index.js
index e1ac90f..31ce088 100644
--- a/frontend/explorer/public/js/index.js
+++ b/frontend/explorer/public/js/index.js
@@ -1,6 +1,6 @@
function fillGeneralStats() {
var request = new XMLHttpRequest();
- request.open('GET', '/explorer', true);
+ request.open('GET', 'https://explorer.testnet.threefoldtoken.com/explorer', true);
request.onload = function() {
var explorerStatus = JSON.parse(request.responseText);
diff --git a/frontend/explorer/public/js/main.js b/frontend/explorer/public/js/main.js index 855c918..ea13168 100644 --- a/frontend/explorer/public/js/main.js +++ b/frontend/explorer/public/js/main.js @@ -259,7 +259,7 @@ function appendBlockStatistics(domParent, explorerBlock) { // getBlockchainTime gets the current blockchain time function getBlockchainContext() { var request = new XMLHttpRequest();
request.open('GET', 'https://explorer.testnet.threefoldtoken.com/explorer', false); request.send(); if (request.status != 200) { return {}; @@ -268,7 +268,7 @@ function getBlockchainContext() { var height = response.height;
request = new XMLHttpRequest();
request.open('GET', 'https://explorer.testnet.threefoldtoken.com/explorer/whois/3bot/' + name, false); request.send(); if (request.status != 200) { return null; @@ -558,7 +558,7 @@ function getBotByName(name) {
function getBotTransactions(id) { var request = new XMLHttpRequest();
request.open('GET', 'https://explorer.testnet.threefoldtoken.com/explorer/3bot/' + id + '/transactions', false); request.send(); if (request.status != 200) { return []; @@ -568,7 +568,7 @@ function getBotTransactions(id) {
function getERC20Transaction(id) { var request = new XMLHttpRequest();
2. Run caddy locally: `cd frontend/explorer/caddy && caddy -conf Caddyfile.local`
3. Surf to <http://localhost:2015/hash.html?hash=0128b01507b17175f99fb4ca0fadf9115a3e85aae89b8dcdca9b610469281de9e849cf16c9afcd>
You'll see that the NaN error is no longer there.
To reproduce, go to: https://explorer.testnet.threefoldtoken.com/hash.html?hash=0128b01507b17175f99fb4ca0fadf9115a3e85aae89b8dcdca9b610469281de9e849cf16c9afcd