Skip to content
This repository was archived by the owner on Apr 3, 2019. It is now read-only.

Commit 495f250

Browse files
authored
Fix
1 parent bb97b39 commit 495f250

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

lib/privatekey.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -299,19 +299,6 @@ PrivateKey.prototype.toString = function() {
299299
return this.toBuffer().toString('hex');
300300
};
301301

302-
/**
303-
* Will output the PrivateKey to a WIF string
304-
*
305-
* @returns {string} A WIP representation of the private key
306-
*/
307-
PrivateKey.prototype.toWIF = function() {
308-
if (this.compressed) {
309-
return toCompressedWIF();
310-
} else {
311-
return toUncompressedWIF();
312-
}
313-
};
314-
315302
/**
316303
* Will output the PrivateKey to a WIF string leading to compressed Public Key form
317304
*
@@ -343,6 +330,19 @@ PrivateKey.prototype.toUncompressedWIF = function() {
343330
return Base58Check.encode(buf);
344331
};
345332

333+
/**
334+
* Will output the PrivateKey to a WIF string
335+
*
336+
* @returns {string} A WIP representation of the private key
337+
*/
338+
PrivateKey.prototype.toWIF = function() {
339+
if (this.compressed) {
340+
return this.toCompressedWIF();
341+
} else {
342+
return this.toUncompressedWIF();
343+
}
344+
};
345+
346346
/**
347347
* Will return the private key as a BN instance
348348
*

0 commit comments

Comments
 (0)