diff --git a/lib/database/index.js b/lib/database/index.js index c0625f5216..0594e96aa0 100644 --- a/lib/database/index.js +++ b/lib/database/index.js @@ -10,10 +10,13 @@ function database({ hasura_url, hasura_admin_key }) { getValidatorsInfo: getValidatorsInfo({ hasura_url, hasura_admin_key })( schema ), - getValidatorInfoByAddress: getValidatorsInfo({ - hasura_url, - hasura_admin_key - })(schema), + getValidatorInfoByAddress: async validatorId => { + const validatorInfo = await getValidatorsInfo({ + hasura_url, + hasura_admin_key + })(schema)(validatorId) + return validatorInfo[0] + }, getMaintenance: getMaintenance({ hasura_url, hasura_admin_key