Skip to content

Commit

Permalink
fix(api-cardano-db-hasura): Support 28 byte hex encoded hashes
Browse files Browse the repository at this point in the history
  • Loading branch information
rhyslbw committed Sep 7, 2020
1 parent a5fef40 commit 9e28ffa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/util/src/scalars/Hash32HexString.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ export const Hash32HexString = new GraphQLScalarType({
})

function validateInput (input: string) {
if (input.length !== 64) throw new GraphQLError(`${input} is not a valid hash`)
if (input.length !== 64 && input.length !== 56) throw new GraphQLError(`${input} is not a valid hash`)
return `\\x${input}`
}

0 comments on commit 9e28ffa

Please sign in to comment.