mirror of
https://github.com/haveno-dex/haveno-ts.git
synced 2025-08-05 21:14:22 -04:00
add atomicUnitsToXmr and xmrToAtomicUnits utils
This commit is contained in:
parent
31e78ec55e
commit
ff810de4b7
2 changed files with 41 additions and 2 deletions
|
@ -176,8 +176,8 @@ const TestConfig = {
|
|||
walletSyncPeriodMs: 5000,
|
||||
maxTimePeerNoticeMs: 5000,
|
||||
maxConcurrency: 14, // max concurrency
|
||||
maxConcurrencyCI: 4, // CI test max concurrency
|
||||
stopOnFailure: false
|
||||
maxConcurrencyCI: 14, // CI test max concurrency
|
||||
stopOnFailure: true
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -382,6 +382,12 @@ test("Can get the version (CI)", async () => {
|
|||
expect(version).toEqual(TestConfig.haveno.version);
|
||||
});
|
||||
|
||||
test("Can convert between XMR and atomic units (CI)", async () => {
|
||||
expect(BigInt(250000000000)).toEqual(HavenoUtils.xmrToAtomicUnits(0.25));
|
||||
expect(HavenoUtils.atomicUnitsToXmr("250000000000")).toEqual(.25);
|
||||
expect(HavenoUtils.atomicUnitsToXmr(BigInt("250000000000"))).toEqual(.25);
|
||||
});
|
||||
|
||||
test("Can manage an account (CI)", async () => {
|
||||
let user3: HavenoClient|undefined;
|
||||
let err: any;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue