Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.chainSymbols.map(async (chainSymbol) => {
let chainOptions = this.options.chains[chainSymbol];
let storageConfig = {
...storageConfigOptions,
database: chainOptions.database,
};
let storage = createStorageComponent(storageConfig, this.logger);
await storage.bootstrap();
storageComponents[chainSymbol] = storage;
// TODO: When it becomes possible, use internal module API (using channel.invoke) to get this data instead of direct DB access.
let multisigMemberRows = await storage.adapter.db.query(
'select mem_accounts2multisignatures."dependentId" from mem_accounts2multisignatures where mem_accounts2multisignatures."accountId" = $1',
[chainOptions.walletAddress],
);
multisigMemberRows.forEach((row) => {
this.multisigWalletInfo[chainSymbol].members[row.dependentId] = true;
});
this.multisigWalletInfo[chainSymbol].memberCount = multisigMemberRows.length;
let multisigMemberMinSigRows = await storage.adapter.db.query(
'select multimin from mem_accounts where address = $1',