Skip to content

Commit

Permalink
Fix for issue #37
Browse files Browse the repository at this point in the history
This is fix for #37
  • Loading branch information
tarassh authored and takn committed Jul 31, 2019
1 parent 1a74b71 commit 5091f72
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 5091f72

Please sign in to comment.