UNPKG

@multiversx/sdk-dapp-swap

Version:

A library to hold the main logic for swapping between tokens on the MultiversX blockchain

3 lines (2 loc) 894 B
"use strict";import{a as t}from"../../__chunks__/chunk-ZTMLUJF2.js";import"../../__chunks__/chunk-GFAQGPDP.js";import"../../__chunks__/chunk-QXTSQDB3.js";import"../../__chunks__/chunk-KPPFFURF.js";import"../../__chunks__/chunk-LWDZ2E6Q.js";import"../../__chunks__/chunk-5ETWGUEB.js";import"../../__chunks__/chunk-YTR6LDGL.js";import"../../__chunks__/chunk-7OW72CTP.js";import"../../__chunks__/chunk-YDAF6TDL.js";import{f as r}from"../../__chunks__/chunk-5W737WN4.js";r();describe("canParseAmount tests",()=>{it("canParseAmount returns true when no decimals are provided",()=>{let e=t("1");expect(e).toBe(!0)}),it("canParseAmount returns true when there is a single decimal",()=>{let e=t("1.1");expect(e).toBe(!0)}),it("canParseAmount returns false when more decimals are provided than requested",()=>{let e=t("1.10000",2);expect(e).toBe(!1)})}); //# sourceMappingURL=canParseAmount.test.js.map