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,