add state to getUserData

This commit is contained in:
Roman Storm 2020-10-29 20:56:10 -07:00
parent 628a023fc6
commit 95bdacc19b
No known key found for this signature in database
GPG Key ID: 522F2A785F34E71F

View File

@ -60,6 +60,7 @@ contract GovernanceAggregator {
returns ( returns (
uint256 balance, uint256 balance,
uint256 latestProposalId, uint256 latestProposalId,
uint256 latestProposalIdState
uint256 timelock, uint256 timelock,
address delegatee address delegatee
) )
@ -67,6 +68,9 @@ contract GovernanceAggregator {
// Core core = Core(address(governance)); // Core core = Core(address(governance));
balance = governance.lockedBalance(account); balance = governance.lockedBalance(account);
latestProposalId = governance.latestProposalIds(account); latestProposalId = governance.latestProposalIds(account);
if(latestProposalId != 0) {
latestProposalIdState = governance.state(latestProposalId)
}
timelock = governance.canWithdrawAfter(account); timelock = governance.canWithdrawAfter(account);
delegatee = governance.delegatedTo(account); delegatee = governance.delegatedTo(account);
} }