Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ethersproject/bignumber

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ethersproject/bignumber - npm Package Compare versions

Comparing version 5.0.0-beta.119 to 5.0.0-beta.120

2

fixednumber.d.ts

@@ -26,3 +26,3 @@ import { BytesLike } from "@ethersproject/bytes";

toString(): string;
toHexString(): string;
toHexString(width?: number): string;
toUnsafeFloat(): number;

@@ -29,0 +29,0 @@ toFormat(format: FixedFormat | string): FixedNumber;

@@ -214,3 +214,12 @@ "use strict";

FixedNumber.prototype.toString = function () { return this._value; };
FixedNumber.prototype.toHexString = function () { return this._hex; };
FixedNumber.prototype.toHexString = function (width) {
if (width == null) {
return this._hex;
}
if (width % 8) {
errors.throwArgumentError("invalid byte width", "width", width);
}
var hex = bignumber_1.BigNumber.from(this._hex).fromTwos(this.format.width).toTwos(width).toHexString();
return bytes_1.hexZeroPad(hex, width / 8);
};
FixedNumber.prototype.toUnsafeFloat = function () { return parseFloat(this.toString()); };

@@ -217,0 +226,0 @@ FixedNumber.prototype.toFormat = function (format) {

{
"name": "@ethersproject/bignumber",
"version": "5.0.0-beta.119",
"version": "5.0.0-beta.120",
"description": "BigNumber library used in ethers.js.",

@@ -25,3 +25,3 @@ "main": "index.js",

},
"gitHead": "6627cc5ee6d61ad4da34086814da5192745163c1"
"gitHead": "1775d4223f4f1c792359d28df68d29de05f94644"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc