diff --git a/src/autostake/NetworkRunner.mjs b/src/autostake/NetworkRunner.mjs
index 53c29552..d91f6d39 100644
--- a/src/autostake/NetworkRunner.mjs
+++ b/src/autostake/NetworkRunner.mjs
@@ -167,7 +167,7 @@ export default class NetworkRunner {
if(allow_list?.address){
grantValidators = allow_list?.address || []
}else if(deny_list?.address){
- grantValidators = deny_list.address.includes(validatorAddress) ? [] : [validatorAddress]
+ grantValidators = deny_list.address.includes(validatorAddress) || deny_list.address.includes('') ? [] : [validatorAddress]
}else{
grantValidators = []
}
diff --git a/src/components/Delegations.js b/src/components/Delegations.js
index e820dc38..09b79f12 100644
--- a/src/components/Delegations.js
+++ b/src/components/Delegations.js
@@ -221,9 +221,15 @@ class Delegations extends React.Component {
const { claimGrant, stakeGrant } = parseGrants(grants, grantee, granter)
let grantValidators, maxTokens;
if (stakeGrant) {
- grantValidators =
- stakeGrant.authorization.allow_list?.address;
- maxTokens = stakeGrant.authorization.max_tokens
+ const { allow_list, deny_list, max_tokens } = stakeGrant.authorization
+ if (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
}
return {
claimGrant: claimGrant,
diff --git a/src/components/Grants.js b/src/components/Grants.js
index b18e151c..59fe13df 100644
--- a/src/components/Grants.js
+++ b/src/components/Grants.js
@@ -96,12 +96,14 @@ function Grants(props) {
const maxTokens = grant.authorization.max_tokens
switch (grant.authorization['@type']) {
case "/cosmos.staking.v1beta1.StakeAuthorization":
+ const restrictionType = grant.authorization.allow_list ? 'Validators' : 'Denied Validators'
+ const restrictionList = grant.authorization.allow_list || grant.authorization.deny_list
return (
Maximum: {maxTokens ? : 'unlimited'}
- Validators: {grant.authorization.allow_list.address.map(address => {
+ {restrictionType}: {restrictionList.address.map(address => {
const validator = validators[address]
- return
+ return address ? : null
})}
)
diff --git a/src/components/ValidatorStake.js b/src/components/ValidatorStake.js
index 4cb85f5e..324601f1 100644
--- a/src/components/ValidatorStake.js
+++ b/src/components/ValidatorStake.js
@@ -328,10 +328,12 @@ function ValidatorStake(props) {
{!props.isLoading('grants') ? (
grantsValid
? Active
expires {expiryDate().fromNow()}
- : grantsExist
- ? maxTokens && smaller(maxTokens, reward)
- ? Not enough grant remaining
- : Invalid / total delegation reached
+ : grantsExist
+ ? !validatorGrants.validators.includes(validator.address)
+ ? Grant invalid
+ : maxTokens && smaller(maxTokens, reward)
+ ? Not enough grant remaining
+ : Invalid / total delegation reached
: network.authzSupport ? Inactive : Authz not supported
) : (