Socket
Socket
Sign inDemoInstall

@helium/currency

Package Overview
Dependencies
Maintainers
2
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@helium/currency - npm Package Compare versions

Comparing version 3.0.0 to 3.16.0

2

build/Balance.d.ts
import BigNumber from 'bignumber.js';
import { AnyCurrencyType } from './CurrencyType';
import { NetworkTokens, USDollars, DataCredits, BaseCurrencyType } from './currency_types';

@@ -10,2 +11,3 @@ export default class Balance<T extends BaseCurrencyType> {

constructor(integerBalance: number | undefined, type: T);
static fromFloat(float: number, currencyType: AnyCurrencyType): Balance<AnyCurrencyType>;
toString(maxDecimalPlaces?: number): string;

@@ -12,0 +14,0 @@ plus(balance: Balance<T>): Balance<T>;

@@ -31,2 +31,7 @@ "use strict";

}
static fromFloat(float, currencyType) {
const bigFloat = new bignumber_js_1.default(float);
const integerBalance = bigFloat.dividedBy(currencyType.coefficient).toNumber();
return new Balance(integerBalance, currencyType);
}
toString(maxDecimalPlaces) {

@@ -33,0 +38,0 @@ let numberString = this.bigBalance.toFormat(maxDecimalPlaces);

4

package.json
{
"name": "@helium/currency",
"version": "3.0.0",
"version": "3.16.0",
"description": "Utilities for handling different currency types on the Helium blockchain",

@@ -31,3 +31,3 @@ "keywords": [

},
"gitHead": "0a68af326f693378fdd687e8c809486a2efa6762"
"gitHead": "e764bb372ca18d2709ea22d0b8c84d77d35739aa"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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