poanetwork / poa-dapps-voting

POA Network Governance Dapp
https://voting.poa.network
GNU General Public License v3.0
27 stars 55 forks source link

(Refactor) Optimize data reading from smart contracts #128

Closed varasev closed 6 years ago

varasev commented 6 years ago

For now, the Governance DApp reads info about each ballot from separate methods of smart contract: https://github.com/poanetwork/poa-dapps-voting/blob/9ff2e5cbf0d35f94a4e967dfba9c12033b009ab9/src/components/BallotCard.jsx#L353-L359

It's better to read ballot's info from some method that should return all the necessary info in a single response to make the application work faster and more efficient.

varasev commented 6 years ago

We could also replace these callings with a single call: https://github.com/varasev/poa-dapps-voting/blob/429593299eae9e2f3b729ba39840bc0bcc02da57/src/components/BallotKeysCard.jsx#L120-L125

varasev commented 6 years ago

Done in #136 and #139.