floDapps v2.3.5
- Added get property trustedIDs to floGlobals ie, floGlobals.trustedIDs will give the list of trustedIDs for the app
This commit is contained in:
parent
8afde73e78
commit
b09c88f0df
16
floDapps.js
16
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");
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user