From 726e3da2afecae779002e50c44ded39d27be4a98 Mon Sep 17 00:00:00 2001 From: Sluder Date: Wed, 20 Dec 2023 15:21:05 -0500 Subject: [PATCH] Fix tests for NFT --- package-lock.json | 4 ++-- tests/spectrum.test.ts | 3 ++- tests/teddyswap.test.ts | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 252ff18..07a001a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@indigo-labs/dexter", - "version": "4.1.0", + "version": "4.2.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@indigo-labs/dexter", - "version": "4.1.0", + "version": "4.2.1", "license": "MIT", "dependencies": { "@types/crypto-js": "^4.1.1", diff --git a/tests/spectrum.test.ts b/tests/spectrum.test.ts index d08fb85..c05dd42 100644 --- a/tests/spectrum.test.ts +++ b/tests/spectrum.test.ts @@ -33,6 +33,7 @@ describe('Spectrum', () => { ); liquidityPool.poolFeePercent = 0.3; liquidityPool.lpToken = new Asset('f66d78b4a3cb3d37afa0ec36461e51ecbde00f26c8f0a68f94b69880', '69555344'); + liquidityPool.poolNft = new Asset('f66d78b4a3cb3d37afa0ec36461e51ecbde00f26c8f0a68f94b69880', '69555344'); const swapRequest: SwapRequest = dexter.newSwapRequest() .forLiquidityPool(liquidityPool) @@ -67,7 +68,7 @@ describe('Spectrum', () => { expect(() => { spectrum.buildSwapOrder(liquidityPool, defaultSwapParameters); }).not.toThrowError(); expect(payments[0].addressType).toBe(AddressType.Contract); expect(payments[0].assetBalances[0].quantity).toEqual(10003800000n); - expect(payments[0].datum).toBe('d8799fd8799f4040ffd8799f581cf66d78b4a3cb3d37afa0ec36461e51ecbde00f26c8f0a68f94b698804469555344ffd8799f581cf66d78b4a3cb3d37afa0ec36461e51ecbde00f26c8f0a68f94b698804469555344ff1903e51b0000016d7639cd581b00038d7ea4c6800042ed56d8799f42bac6ff1b00000002540be4001a445a179cff'); + expect(payments[0].datum).toBe('d8799fd8799f4040ffd8799f581cf66d78b4a3cb3d37afa0ec36461e51ecbde00f26c8f0a68f94b698804469555344ffd8799f581cf66d78b4a3cb3d37afa0ec36461e51ecbde00f26c8f0a68f94b698804469555344ff1903e51b0037c3da31e5553c1b00038d7ea4c6800042ed56d8799f42bac6ff1b00000002540be4001a445a179cff'); }); }); diff --git a/tests/teddyswap.test.ts b/tests/teddyswap.test.ts index bcd940e..064cb8e 100644 --- a/tests/teddyswap.test.ts +++ b/tests/teddyswap.test.ts @@ -33,6 +33,7 @@ describe('TeddySwap', () => { ); liquidityPool.poolFeePercent = 0.3; liquidityPool.lpToken = new Asset('f66d78b4a3cb3d37afa0ec36461e51ecbde00f26c8f0a68f94b69880', '69555344'); + liquidityPool.poolNft = new Asset('f66d78b4a3cb3d37afa0ec36461e51ecbde00f26c8f0a68f94b69880', '69555344'); const swapRequest: SwapRequest = dexter.newSwapRequest() .forLiquidityPool(liquidityPool) @@ -67,7 +68,7 @@ describe('TeddySwap', () => { expect(() => { teddyswap.buildSwapOrder(liquidityPool, defaultSwapParameters); }).not.toThrowError(); expect(payments[0].addressType).toBe(AddressType.Contract); expect(payments[0].assetBalances[0].quantity).toEqual(10003800000n); - expect(payments[0].datum).toBe('d8799fd8799f4040ffd8799f581cf66d78b4a3cb3d37afa0ec36461e51ecbde00f26c8f0a68f94b698804469555344ffd8799f581cf66d78b4a3cb3d37afa0ec36461e51ecbde00f26c8f0a68f94b698804469555344ff1903e51b0000016d7639cd581b00038d7ea4c6800042ed56d8799f42bac6ff1b00000002540be4001a445a179cff'); + expect(payments[0].datum).toBe('d8799fd8799f4040ffd8799f581cf66d78b4a3cb3d37afa0ec36461e51ecbde00f26c8f0a68f94b698804469555344ffd8799f581cf66d78b4a3cb3d37afa0ec36461e51ecbde00f26c8f0a68f94b698804469555344ff1903e51b0037c3da31e5553c1b00038d7ea4c6800042ed56d8799f42bac6ff1b00000002540be4001a445a179cff'); }); });