withdrawls
This commit is contained in:
11
src/misc.js
11
src/misc.js
@@ -1,3 +1,4 @@
|
||||
import {FixedNumber} from "ethers";
|
||||
|
||||
export class SingletonCoroutine {
|
||||
constructor(f, delay=10, retry=true) {
|
||||
@@ -42,4 +43,12 @@ export const vAutoSelect = {
|
||||
}
|
||||
}
|
||||
export const uint64max = 18446744073709551615n
|
||||
export const uint32max = 4294967295n
|
||||
export const uint32max = 4294967295n
|
||||
|
||||
export function tokenNumber(token, balance) {
|
||||
return FixedNumber.fromValue(balance, token.decimals, {decimals:token.decimals, width: 256})
|
||||
}
|
||||
|
||||
export function tokenFloat(token, balance) {
|
||||
return tokenNumber(token,balance).toUnsafeFloat()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user