Skip to content

Commit

Permalink
Merge pull request eco-stake#683 from eco-stake/fix-generic-restake-s…
Browse files Browse the repository at this point in the history
…tatus

Fix generic grant REStake status
  • Loading branch information
tombeynon authored Nov 26, 2022
2 parents 16c9461 + cfbcab9 commit 49895da
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/components/Delegations.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,9 @@ class Delegations extends React.Component {
if (stakeGrant) {
const { allow_list, deny_list, max_tokens } = stakeGrant.authorization
if (allow_list?.address) {
grantValidators = allow_list?.address || []
grantValidators = allow_list.address
} else if (deny_list?.address) {
grantValidators = deny_list.address.includes('') ? [] : this.props.validators.map(el => el.address).filter(address => !deny_list.address.includes(address))
} else {
grantValidators = []
}
maxTokens = max_tokens
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/ValidatorStake.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ function ValidatorStake(props) {
grantsValid
? <span><span className="text-success">Active</span><br /><small className="text-muted">expires {expiryDate().fromNow()}</small></span>
: grantsExist
? !validatorGrants.validators.includes(validator.address)
? validatorGrants.validators && !validatorGrants.validators.includes(validator.address)
? <span className="text-danger">Grant invalid</span>
: maxTokens && smaller(maxTokens, reward)
? <span className="text-danger">Not enough grant remaining</span>
Expand Down

0 comments on commit 49895da

Please sign in to comment.