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:
Adam Uhlíř
2022-06-15 12:20:36 +02:00
committed by GitHub
parent 57dca48f3e
commit 2edf99c323
12 changed files with 9247 additions and 25878 deletions
+3 -3
View File
@@ -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))
}