Skip to content

Commit

Permalink
Merge pull request #38 from tarassh/master
Browse files Browse the repository at this point in the history
Fix for issue #37
  • Loading branch information
Cody Douglass authored Jun 19, 2019
2 parents 2063257 + f8dd7af commit 5e48bfb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/key_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ function checkDecode(keyString, keyType = null) {
newCheck = hash.ripemd160(Buffer.concat(check)).slice(0, 4) //PVT
}

if (checksum.toString() !== newCheck.toString()) {
if (checksum.toString('hex') !== newCheck.toString('hex')) {
throw new Error('Invalid checksum, ' +
`${checksum.toString('hex')} != ${newCheck.toString('hex')}`
)
Expand Down

0 comments on commit 5e48bfb

Please sign in to comment.