listen for dao and proposal updates
Can you add listeners for dao and proposal updates.
Example code is here: https://gitlab.com/Bartman250/simple-braid-client-app-for-cordite/-/blob/master/app.js
Note1: Subscriptions are 'single shot' in that once you have and update you need to subscribe again.
As you can see from the code here - this function calls itself once it has an update.
function subscribeToDaoUpdates() {
updates = corda.dao.listenForDaoUpdates().then(res => {
daoUpdates = daoUpdates + 1
console.log("Dao update", daoUpdates, "\n", res)
document.getElementById("dao-update").innerHTML = JSON.stringify(res, null, 2);
subscribeToDaoUpdates()
});
}
Note2: Dao updates and proposal updates are on different listeners !!
Edited by Mark Simpson