From 819fb9ca5082175f4afc595766e75dd2f045395b Mon Sep 17 00:00:00 2001 From: kaotisk Date: Wed, 13 Nov 2024 20:25:55 +0200 Subject: Style update, refactoring with generator usage, bugfixes --- src/js/url-generators.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/js/url-generators.js') diff --git a/src/js/url-generators.js b/src/js/url-generators.js index 6158b6f..d0739dc 100644 --- a/src/js/url-generators.js +++ b/src/js/url-generators.js @@ -9,33 +9,33 @@ * URL generators * * This file contains functions that generate URL - * based on the activeSettings. + * based on the settings. * * Apparently, we need `arching-kaos-web-ui-settings` to be loaded first * */ function getIPNSURL(ipnsKey){ - return activeSettings.ipfs.gateway.list[activeSettings.ipfs.gateway.active]+'ipns/'+ipnsKey; + return settings.ipfs.gateway.list[settings.ipfs.gateway.active]+'ipns/'+ipnsKey; } function getIPFSURL(ipfsHash){ - return activeSettings.ipfs.gateway.list[activeSettings.ipfs.gateway.active]+'ipfs/'+ipfsHash; + return settings.ipfs.gateway.list[settings.ipfs.gateway.active]+'ipfs/'+ipfsHash; } function getHoldersOfActiveAssetURL(){ - return activeSettings.stellar.horizon.list[activeSettings.stellar.horizon.active]+ + return settings.stellar.horizon.list[settings.stellar.horizon.active]+ 'accounts?asset='+ - activeSettings.stellar.asset.list[activeSettings.stellar.asset.active].code+ + settings.stellar.asset.list[settings.stellar.asset.active].code+ ':'+ - activeSettings.stellar.asset.list[activeSettings.stellar.asset.active].issuer+ + settings.stellar.asset.list[settings.stellar.asset.active].issuer+ '&limit=200'; } function getTrustlinesURL(code=null, issuer=null){ - var code = (code === null)? activeSettings.stellar.asset.list[activeSettings.stellar.asset.active].code : code; - var issuer = (issuer === null) ? activeSettings.stellar.asset.list[activeSettings.stellar.asset.active].issuer : issuer; - return activeSettings.stellar.horizon.list[activeSettings.stellar.horizon.active]+ + var code = (code === null)? settings.stellar.asset.list[settings.stellar.asset.active].code : code; + var issuer = (issuer === null) ? settings.stellar.asset.list[settings.stellar.asset.active].issuer : issuer; + return settings.stellar.horizon.list[settings.stellar.horizon.active]+ 'assets?asset_code='+code+ '&asset_issuer='+issuer; } -- cgit v1.2.3