From baec325e6f6d73ad6c947e436ebdc0f3052a4ae1 Mon Sep 17 00:00:00 2001 From: Daniel Cousens Date: Sat, 31 May 2014 11:25:11 +1000 Subject: [PATCH] base58: use signum over compareTo --- src/base58.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/base58.js b/src/base58.js index 5b21538..dcfe808 100644 --- a/src/base58.js +++ b/src/base58.js @@ -21,7 +21,7 @@ function encode(buffer) { var result = new Buffer(buffer.length << 1) var i = result.length - 1 - while (bi.compareTo(BigInteger.ZERO) > 0) { + while (bi.signum() > 0) { var remainder = bi.mod(BASE) bi = bi.divide(BASE)