Return details about installed apps when creating a new Kredits DAO

This commit is contained in:
bumi 2020-06-24 01:22:09 +02:00
parent 2882094c75
commit 9648499741

View File

@ -37,8 +37,10 @@ class KreditsKit {
return this.contract.functions.newInstance(options).then(transaction => {
return transaction.wait().then(result => {
const deployEvent = result.events.find(e => e.event === 'DeployInstance');
const installedApps = result.events.filter(e => e.event === 'InstalledApp').map(e => e.args);
return {
daoAddress: deployEvent.args.dao,
installedApps: installedApps,
transactionHash: transaction.hash,
};
});