Improve GovernorTimelockControl.state() to detect direct cancel (#2977)

This commit is contained in:
Hadrien Croubois
2021-11-18 13:53:05 +01:00
committed by GitHub
parent 6e5bf05211
commit a57e638f57
3 changed files with 48 additions and 2 deletions

View File

@ -57,8 +57,10 @@ abstract contract GovernorTimelockControl is IGovernorTimelock, Governor {
return status;
} else if (_timelock.isOperationDone(queueid)) {
return ProposalState.Executed;
} else {
} else if (_timelock.isOperationPending(queueid)) {
return ProposalState.Queued;
} else {
return ProposalState.Canceled;
}
}