aboutsummaryrefslogtreecommitdiff
path: root/src/js
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2023-12-27 16:58:10 +0200
committerkaotisk <kaotisk@arching-kaos.org>2023-12-27 16:58:10 +0200
commit265998b54af4930482baf82cdf35c0ba755c84ae (patch)
treeb7ea017ddd37bae2ad54df00cb713b535f662225 /src/js
parent80f1cf00f2f2c4023b2066a53b51b06928d264ee (diff)
downloadarching-kaos-web-ui-265998b54af4930482baf82cdf35c0ba755c84ae.tar.gz
arching-kaos-web-ui-265998b54af4930482baf82cdf35c0ba755c84ae.tar.bz2
arching-kaos-web-ui-265998b54af4930482baf82cdf35c0ba755c84ae.zip
Break down in functions something...
Diffstat (limited to 'src/js')
-rw-r--r--src/js/arching-kaos-stellar-network.js27
1 files changed, 16 insertions, 11 deletions
diff --git a/src/js/arching-kaos-stellar-network.js b/src/js/arching-kaos-stellar-network.js
index ee42750..70eb8ac 100644
--- a/src/js/arching-kaos-stellar-network.js
+++ b/src/js/arching-kaos-stellar-network.js
@@ -13,18 +13,23 @@ function getNumberOfTrustlinesAndRenderThem(json){
progressPlaceholder.value++;
stellarParticipants=number;
}
-function renderStellarAddressesAndProceed(json){
+
+function renderStellarAddress(stellarAddress){
var stats = document.querySelector('.stellar-network');
- json._embedded.records.forEach(r=>{
- var p = document.createElement("div");
- p.className = "stellar-address";
- p.innerText = r.account_id;
- console.log(r);
- p.id = r.account_id;
- holders.push(r.account_id);
+ var p = document.createElement("div");
+ p.className = "stellar-address";
+ p.innerText = stellarAddress;
+ p.id = stellarAddress;
+ stats.appendChild(p);
+}
+
+function renderStellarAddressesAndProceed(json){
+ json._embedded.records.forEach(row=>{
+ console.log(row);
+ holders.push(row.account_id);
progressPlaceholder.max++;
- checkAddressForConfigurationVariable(r.account_id);
- stats.appendChild(p);
+ renderStellarAddress(row.account_id);
+ checkAddressForConfigurationVariable(row.account_id);
})
if (json._links.next) getHolders(json._links.next.href);
}
@@ -38,7 +43,7 @@ function renderConfigurationIPNSLinkAndProceed(json, stellarAddress){
document.querySelector('#'+stellarAddress).appendChild(cnf)
document.querySelector('#'+stellarAddress).style="color: #3dbb3d;"
stellarNetworkConfiguredAddresses += 1;
- getConfiguration(atob(json.value),stellarAddress)
+ getConfiguration(atob(json.value),stellarAddress);
}
function getTrustlines(){