diff options
Diffstat (limited to 'packages/utils/src/configured_bignumber.ts')
-rw-r--r-- | packages/utils/src/configured_bignumber.ts | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/packages/utils/src/configured_bignumber.ts b/packages/utils/src/configured_bignumber.ts index 2b22b6938..977042f1e 100644 --- a/packages/utils/src/configured_bignumber.ts +++ b/packages/utils/src/configured_bignumber.ts @@ -11,4 +11,15 @@ BigNumber.config({ DECIMAL_PLACES: 78, }); +// Set a debug print function for NodeJS +if (typeof window === 'undefined') { // Check if running in NodeJS + const util = require('util'); + + // Set a custom util.inspect function + (BigNumber.prototype as any)[util.inspect.custom] = function() { + // Return the readable string representation + return this.toString(); + }; +} + export { BigNumber }; |