diff options
author | kaotisk <kaotisk@arching-kaos.org> | 2023-12-27 17:07:05 +0200 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.org> | 2023-12-27 17:07:05 +0200 |
commit | 0a3005e70b1dff7d827ee7a70abb71f8744adfaf (patch) | |
tree | 0b950cce7e3590c82891b89c793559b5ee3afbef | |
parent | 265998b54af4930482baf82cdf35c0ba755c84ae (diff) | |
download | arching-kaos-web-ui-0a3005e70b1dff7d827ee7a70abb71f8744adfaf.tar.gz arching-kaos-web-ui-0a3005e70b1dff7d827ee7a70abb71f8744adfaf.tar.bz2 arching-kaos-web-ui-0a3005e70b1dff7d827ee7a70abb71f8744adfaf.zip |
Fixed a bug and beautified some function
-rw-r--r-- | src/js/arching-kaos-stellar-network.js | 20 | ||||
-rw-r--r-- | src/js/arching-kaos-tools.js | 5 |
2 files changed, 15 insertions, 10 deletions
diff --git a/src/js/arching-kaos-stellar-network.js b/src/js/arching-kaos-stellar-network.js index 70eb8ac..77d1477 100644 --- a/src/js/arching-kaos-stellar-network.js +++ b/src/js/arching-kaos-stellar-network.js @@ -8,10 +8,11 @@ function getNumberOfTrustlinesAndRenderThem(json){ small.id = 'stellar-participants-sum'; stats.appendChild(small); } - small.innerText = ' (' + number + ')'; + document.querySelector("#stellar-participants-sum").innerText = ' (' + number + ')'; archingKaosLog("Loading trustlines... Found "+number+"!"); progressPlaceholder.value++; stellarParticipants=number; + stellarParticipantsScanned=number; } function renderStellarAddress(stellarAddress){ @@ -35,12 +36,7 @@ function renderStellarAddressesAndProceed(json){ } function renderConfigurationIPNSLinkAndProceed(json, stellarAddress){ - var cnf = document.createElement("p"); - if(document.querySelector("#stellar-data-config-not-found")){ - document.querySelector("#stellar-data-config-not-found").hidden = true; - } - cnf.innerText = atob(json.value) - document.querySelector('#'+stellarAddress).appendChild(cnf) + renderStellarAddress(stellarAddress); document.querySelector('#'+stellarAddress).style="color: #3dbb3d;" stellarNetworkConfiguredAddresses += 1; getConfiguration(atob(json.value),stellarAddress); @@ -93,7 +89,13 @@ var server = new StellarSdk.Server(activeSettings.horizonAddresses[activeSetting function letme(a){ server.accounts() .accountId(a) - .call().then(function(r){ const L = r; putit(L); }); + .call() + .then( + function(r){ + const L = r; + putit(L); + } + ); } function putit(i){ @@ -138,7 +140,7 @@ async function fetchAKIDFromClientWallet(stellarAddress){ function putKeyToField(k){ let base = document.querySelector("#stellar-freigher-connect-address-button"); stellar_connection_status = 1; - fetchAKIDFromClientWallet(k); + checkAddressForConfigurationVariable(k); base.innerText=k; base.onclick=''; } diff --git a/src/js/arching-kaos-tools.js b/src/js/arching-kaos-tools.js index 2398df1..7d73cf5 100644 --- a/src/js/arching-kaos-tools.js +++ b/src/js/arching-kaos-tools.js @@ -38,6 +38,9 @@ function akidRender(json, stellarAddress){ function akidRenderAndProceed(json, stellarAddress){ akidRender(json, stellarAddress); participants[stellarAddress]=json; + if ( stellarParticipantsScanned === 0 ) { + archingKaosLog('END'); + } progressPlaceholder.value++; zseek(json.zchain,stellarAddress,json); } @@ -504,7 +507,7 @@ function exe(action,dataIPFSHash,blockObject,zblockIPFSHash,zchainIPNSLink,zbloc } function getipfstext(ipfsHash, articleid){ - fetch( getIPFSURL(ipfsHash), { + fetch(getIPFSURL(ipfsHash), { method:'GET', headers:{ Accept: 'text/plain' |