remove comments.
This commit is contained in:
parent
535b6a823e
commit
e75e040d2b
@ -671,8 +671,6 @@ utils.btc = function btc(value) {
|
|||||||
|
|
||||||
assert(value <= utils.MAX_SAFE_INTEGER, 'Number exceeds 2^53-1.');
|
assert(value <= utils.MAX_SAFE_INTEGER, 'Number exceeds 2^53-1.');
|
||||||
|
|
||||||
// assert(value <= 21000000 * 100000000, 'Number exceeds MAX_MONEY.');
|
|
||||||
|
|
||||||
value = value.toString(10);
|
value = value.toString(10);
|
||||||
|
|
||||||
assert(value.length <= 16, 'Number exceeds 2^53-1.');
|
assert(value.length <= 16, 'Number exceeds 2^53-1.');
|
||||||
@ -746,9 +744,6 @@ utils.satoshi = function satoshi(value) {
|
|||||||
assert(hi < 90071992 || (hi === 90071992 && lo <= 54740991),
|
assert(hi < 90071992 || (hi === 90071992 && lo <= 54740991),
|
||||||
'Number exceeds 2^53-1.');
|
'Number exceeds 2^53-1.');
|
||||||
|
|
||||||
// assert(hi < 21000000 || (hi === 21000000 && lo === 0),
|
|
||||||
// 'Number exceeds MAX_MONEY.');
|
|
||||||
|
|
||||||
result = hi * 100000000 + lo;
|
result = hi * 100000000 + lo;
|
||||||
|
|
||||||
if (negative)
|
if (negative)
|
||||||
|
|||||||
@ -47,20 +47,6 @@ describe('Utils', function() {
|
|||||||
assert.throws(function() {
|
assert.throws(function() {
|
||||||
utils.satoshi('546.00000000000000001');
|
utils.satoshi('546.00000000000000001');
|
||||||
});
|
});
|
||||||
/*
|
|
||||||
assert.doesNotThrow(function() {
|
|
||||||
utils.satoshi('21000000');
|
|
||||||
});
|
|
||||||
assert.doesNotThrow(function() {
|
|
||||||
utils.satoshi('021000000');
|
|
||||||
});
|
|
||||||
assert.throws(function() {
|
|
||||||
utils.satoshi('21000001');
|
|
||||||
});
|
|
||||||
assert.throws(function() {
|
|
||||||
utils.satoshi('121000000');
|
|
||||||
});
|
|
||||||
*/
|
|
||||||
assert.doesNotThrow(function() {
|
assert.doesNotThrow(function() {
|
||||||
utils.satoshi('90071992.54740991');
|
utils.satoshi('90071992.54740991');
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user