chore: deps and react-script update (#383)
* chore: deps and react-script update * ci: bump node version to 18 * ci: depscheck * docs: mention minimal npm required version * chore: feedback Co-authored-by: Vojtech Simetka <vojtech@simetka.cz> Co-authored-by: Vojtech Simetka <vojtech@simetka.cz>
This commit is contained in:
+3
-3
@@ -10,7 +10,7 @@ export class Token {
|
||||
private amount: BigNumber // Represented in the base units, so it is always an integer value
|
||||
private readonly decimals: digits
|
||||
|
||||
constructor(amount: BigNumber | string | BigInt, decimals: digits = BZZ_DECIMALS) {
|
||||
constructor(amount: BigNumber | string | bigint, decimals: digits = BZZ_DECIMALS) {
|
||||
const a = makeBigNumber(amount)
|
||||
|
||||
if (!isInteger(a) || !POSSIBLE_DECIMALS.includes(decimals)) {
|
||||
@@ -31,7 +31,7 @@ export class Token {
|
||||
*
|
||||
* @returns new Token
|
||||
*/
|
||||
static fromDecimal(amount: BigNumber | string | BigInt, decimals: digits = BZZ_DECIMALS): Token | never {
|
||||
static fromDecimal(amount: BigNumber | string | bigint, decimals: digits = BZZ_DECIMALS): Token | never {
|
||||
const a = makeBigNumber(amount)
|
||||
|
||||
// No need to do any validation here, it is done when the new token is created
|
||||
@@ -40,7 +40,7 @@ export class Token {
|
||||
return new Token(t, decimals)
|
||||
}
|
||||
|
||||
get toBigInt(): BigInt {
|
||||
get toBigInt(): bigint {
|
||||
return BigInt(this.amount.toFixed(0))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user