@helium/currency
Advanced tools
Comparing version 4.8.1 to 4.8.3-next.22
import BigNumber from 'bignumber.js'; | ||
import { AnyCurrencyType } from './CurrencyType'; | ||
import { NetworkTokens, USDollars, DataCredits, BaseCurrencyType, TestNetworkTokens, Ticker } from './currency_types'; | ||
declare type StringFormatOptions = { | ||
type StringFormatOptions = { | ||
decimalSeparator?: string; | ||
@@ -6,0 +6,0 @@ groupSeparator?: string; |
import BigNumber from 'bignumber.js'; | ||
declare type CurrencyFormat = { | ||
type CurrencyFormat = { | ||
showTrailingZeroes?: boolean; | ||
decimalPlaces?: number; | ||
}; | ||
export declare type Ticker = 'SOL' | 'MOBILE' | 'HNT' | 'IOT' | 'DC' | 'TNT' | 'USD' | 'HST'; | ||
export type Ticker = 'SOL' | 'MOBILE' | 'HNT' | 'IOT' | 'DC' | 'TNT' | 'USD' | 'HST'; | ||
export default class BaseCurrencyType { | ||
@@ -8,0 +8,0 @@ ticker: Ticker; |
@@ -10,3 +10,3 @@ "use strict"; | ||
constructor() { | ||
super(TICKER, 8); | ||
super(TICKER, 6); | ||
} | ||
@@ -13,0 +13,0 @@ } |
@@ -10,3 +10,3 @@ "use strict"; | ||
constructor() { | ||
super(TICKER, 8); | ||
super(TICKER, 6); | ||
} | ||
@@ -13,0 +13,0 @@ } |
@@ -10,3 +10,3 @@ "use strict"; | ||
constructor() { | ||
super(TICKER, 8); | ||
super(TICKER, 9); | ||
} | ||
@@ -13,0 +13,0 @@ } |
import { BaseCurrencyType, DataCredits, IotTokens, MobileTokens, SolTokens, NetworkTokens, SecurityTokens, TestNetworkTokens, USDollars } from './currency_types'; | ||
export declare type AnyCurrencyType = NetworkTokens | MobileTokens | SolTokens | IotTokens | TestNetworkTokens | SecurityTokens | DataCredits | USDollars; | ||
export type AnyCurrencyType = NetworkTokens | MobileTokens | SolTokens | IotTokens | TestNetworkTokens | SecurityTokens | DataCredits | USDollars; | ||
export default class CurrencyType { | ||
@@ -4,0 +4,0 @@ static fromTicker(ticker?: string): BaseCurrencyType; |
@@ -18,4 +18,6 @@ "use strict"; | ||
return this.solTokens; | ||
case this.usd.ticker: | ||
return this.usd; | ||
default: | ||
throw Errors_1.UnsupportedTickerError(ticker); | ||
throw (0, Errors_1.UnsupportedTickerError)(ticker); | ||
} | ||
@@ -22,0 +24,0 @@ } |
{ | ||
"name": "@helium/currency", | ||
"version": "4.8.1", | ||
"version": "4.8.3-next.22+edc7086", | ||
"description": "Utilities for handling different currency types on the Helium blockchain", | ||
@@ -31,3 +31,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "aae8f759f7a563f32e8d7b48cb3372114d6a93a2" | ||
"gitHead": "edc708603ff5a3e140db15b32023ab7fbb85cb81" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
57072
500
1
1