From b09c88f0df02b04cd0c12dc7182f41d49e543e44 Mon Sep 17 00:00:00 2001 From: sairajzero Date: Mon, 1 May 2023 20:44:44 +0530 Subject: [PATCH] floDapps v2.3.5 - Added get property trustedIDs to floGlobals ie, floGlobals.trustedIDs will give the list of trustedIDs for the app --- floDapps.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/floDapps.js b/floDapps.js index 4668e4e..8924153 100644 --- a/floDapps.js +++ b/floDapps.js @@ -1,4 +1,4 @@ -(function (EXPORTS) { //floDapps v2.3.4 +(function (EXPORTS) { //floDapps v2.3.5 /* General functions for FLO Dapps*/ 'use strict'; const floDapps = EXPORTS; @@ -144,11 +144,14 @@ } }); - var subAdmins, settings + var subAdmins, trustedIDs, settings; Object.defineProperties(floGlobals, { subAdmins: { get: () => subAdmins }, + trustedIDs: { + get: () => trustedIDs + }, settings: { get: () => settings }, @@ -317,9 +320,12 @@ compactIDB.writeData("lastTx", result.totalTxs, `${DEFAULT.application}|${DEFAULT.adminID}`, DEFAULT.root); compactIDB.readAllData("subAdmins").then(result => { subAdmins = Object.keys(result); - compactIDB.readAllData("settings").then(result => { - settings = result; - resolve("Read app configuration from blockchain"); + compactIDB.readAllData("trustedIDs").then(result => { + trustedIDs = Object.keys(result); + compactIDB.readAllData("settings").then(result => { + settings = result; + resolve("Read app configuration from blockchain"); + }) }) }) })