From c76dcb60d6a591e6b78f32d8f8f28933c0733f80 Mon Sep 17 00:00:00 2001 From: Janaka-Steph Date: Mon, 14 Nov 2022 21:55:12 +0100 Subject: [PATCH] fix tests --- test/transaction.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/transaction.test.ts b/test/transaction.test.ts index 6f335f5..ba31201 100644 --- a/test/transaction.test.ts +++ b/test/transaction.test.ts @@ -2,7 +2,7 @@ import * as ecc from 'tiny-secp256k1'; import * as assert from 'assert'; import { address, networks, Transaction } from 'liquidjs-lib'; import { BlindingDataLike, Psbt } from 'liquidjs-lib/src/psbt'; -import { walletFromAddresses, WalletInterface } from '../src'; +import { Mnemonic, walletFromAddresses, WalletInterface } from '../src'; import { greedyCoinSelector } from '../src/coinselection/greedy'; import { fetchTxHex } from '../src/explorer/esplora'; import { decodePset, psetToUnsignedHex, psetToUnsignedTx } from '../src/utils'; @@ -18,20 +18,20 @@ import secp256k1 from '@vulpemventures/secp256k1-zkp'; jest.setTimeout(50000); let senderWallet: WalletInterface; +let sender: Mnemonic; describe('buildTx', async () => { let USDT = ''; let args: BuildTxArgs; let senderAddress = ''; let senderBlindingKey = ''; - const sender = await newRandomMnemonic(); beforeAll(async () => { const zkplib = await secp256k1(); + sender = await newRandomMnemonic(); const addrI = await sender.getNextAddress(); senderAddress = addrI.confidentialAddress; senderBlindingKey = addrI.blindingPrivateKey; - senderWallet = await walletFromAddresses( ecc, zkplib,