Changes existing code to use new base58 API
This commit is contained in:
parent
f53b821cc9
commit
6fa0c07763
7 changed files with 83 additions and 52 deletions
src
|
@ -8,6 +8,11 @@ function lpad(str, padString, length) {
|
|||
}
|
||||
|
||||
function bytesToHex(bytes) {
|
||||
// FIXME: transitionary fix
|
||||
if (Buffer.isBuffer(bytes)) {
|
||||
return bytes.toString('hex')
|
||||
}
|
||||
|
||||
return bytes.map(function(x) {
|
||||
return lpad(x.toString(16), '0', 2)
|
||||
}).join('')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue