mirror of
https://github.com/haveno-dex/haveno-ts.git
synced 2025-05-30 04:01:49 -04:00
update dist
This commit is contained in:
parent
b845e6c103
commit
a5518819db
10 changed files with 18100 additions and 24278 deletions
20
dist/utils/HavenoUtils.js
vendored
20
dist/utils/HavenoUtils.js
vendored
|
@ -66,15 +66,6 @@ class HavenoUtils {
|
|||
process.kill(signal ? signal : "SIGINT");
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Convert centineros to atomic units.
|
||||
*
|
||||
* @param {number} centineros - denominates an amount of XMR in centineros
|
||||
* @return {BigInt} the amount denominated in atomic units
|
||||
*/
|
||||
static centinerosToAtomicUnits(centineros) {
|
||||
return BigInt(centineros) * BigInt(HavenoUtils.centinerosToAUMultiplier);
|
||||
}
|
||||
/**
|
||||
* Stringify a payment account form.
|
||||
*
|
||||
|
@ -128,10 +119,19 @@ class HavenoUtils {
|
|||
static async waitFor(durationMs) {
|
||||
return new Promise(function (resolve) { setTimeout(resolve, durationMs); });
|
||||
}
|
||||
/**
|
||||
* Divide one bigint by another.
|
||||
*
|
||||
* @param {bigint} a dividend
|
||||
* @param {bigint} b divisor
|
||||
* @returns {number} the result
|
||||
*/
|
||||
static divideBI(a, b) {
|
||||
return Number(a * 100n / b) / 100;
|
||||
}
|
||||
}
|
||||
exports.default = HavenoUtils;
|
||||
HavenoUtils.logLevel = 0;
|
||||
HavenoUtils.centinerosToAUMultiplier = 10000;
|
||||
HavenoUtils.months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
||||
HavenoUtils.lastLogTimeMs = 0;
|
||||
//# sourceMappingURL=HavenoUtils.js.map
|
Loading…
Add table
Add a link
Reference in a new issue