Skip to content

Commit

Permalink
simple api fixes (#310)
Browse files Browse the repository at this point in the history
  • Loading branch information
iambeone authored Feb 12, 2020
1 parent 338be46 commit 0e6af0c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/database/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const graphQLQuery = ({ hasura_url, hasura_admin_key }) => async query => {

if (data.errors || data.error) {
console.error('Query failed:', query)
console.error('GraphQL query failed:', data.error)
console.error('GraphQL query failed:', data.error || data.errors)
throw new Error('GraphQL query failed')
}

Expand Down
4 changes: 2 additions & 2 deletions lib/resolvers.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ async function delegations(
dataSources,
networkId
).getDelegationsForDelegatorAddress(delegatorAddress, validatorsDictionary)
const validatorInfoMap = await getValidatorInfosMap(dataSources, networkId)
const validatorInfoMap = await getValidatorInfosMap(networkId)

return Promise.all(
delegations.map(async delegation => ({
Expand All @@ -143,7 +143,7 @@ async function undelegations(
dataSources,
networkId
).getUndelegationsForDelegatorAddress(delegatorAddress, validatorsDictionary)
const validatorInfoMap = await getValidatorInfosMap(dataSources, networkId)
const validatorInfoMap = await getValidatorInfosMap(networkId)

return Promise.all(
undelegations.map(async undelegation => ({
Expand Down

0 comments on commit 0e6af0c

Please sign in to comment.