Skip to content

Commit

Permalink
Set BigNumber debugging globally
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaptic committed Apr 6, 2023
1 parent 0860f74 commit 0aa2cdd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
3 changes: 0 additions & 3 deletions src/account.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ export class Account {

this._accountId = accountId;
this.sequence = new BigNumber(sequence);
if (this.sequence.isNaN()) {
throw new Error(`sequence number '${sequence}' is not valid`);
}
}

/**
Expand Down
3 changes: 3 additions & 0 deletions src/index.mjs → src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/* eslint-disable import/no-import-module-exports */
import BigNumber from 'bignumber.js';
import xdr from './xdr';

BigNumber.DEBUG = true; // gives us exceptions on bad constructor values

export { xdr };
export { hash } from './hashing';
export { sign, verify, FastSigning } from './signing';
Expand Down
2 changes: 0 additions & 2 deletions src/util/continued_fraction.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ const MAX_INT = ((1 << 31) >>> 0) - 1;
* @returns {array} first element is n (numerator), second element is d (denominator)
*/
export function best_r(rawNumber) {
BigNumber.DEBUG = true; // throws on bad number values

let number = new BigNumber(rawNumber);
let a;
let f;
Expand Down

0 comments on commit 0aa2cdd

Please sign in to comment.