From 99c7cfbcdce475963f89711d51ed5eb1d0a54363 Mon Sep 17 00:00:00 2001 From: RajWorking Date: Fri, 13 Aug 2021 23:55:41 +0545 Subject: [PATCH] wallet-http-test: Improved readability --- test/wallet-http-test.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/test/wallet-http-test.js b/test/wallet-http-test.js index 38ca0acb7..1b6c3c0e5 100644 --- a/test/wallet-http-test.js +++ b/test/wallet-http-test.js @@ -90,21 +90,22 @@ for (const witnessOpt of witnessOptions) { passphrase: 'PASSPHRASE', mnemonic: 'zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo wrong' }; + const walletName = `test_seed-${witnessOpt}`; - const testwallet = await wclient.createWallet(`test_seed-${witnessOpt}`, options); + const testwallet = await wclient.createWallet(walletName, options); assert.strictEqual(testwallet.master.encrypted, false); - const master1 = await wclient.getMaster(`test_seed-${witnessOpt}`); + const master1 = await wclient.getMaster(walletName); assert.strictEqual(master1.encrypted, false); assert.strictEqual(master1.mnemonic.phrase, options.mnemonic); - await wclient.lock(`test_seed-${witnessOpt}`); - const master2 = await wclient.getMaster(`test_seed-${witnessOpt}`); + await wclient.lock(walletName); + const master2 = await wclient.getMaster(walletName); assert.strictEqual(master2.encrypted, true); assert.strictEqual(master2.mnemonic, undefined); - await wclient.unlock(`test_seed-${witnessOpt}`, 'PASSPHRASE', 100); - const master3 = await wclient.getMaster(`test_seed-${witnessOpt}`); + await wclient.unlock(walletName, 'PASSPHRASE', 100); + const master3 = await wclient.getMaster(walletName); assert.strictEqual(master3.encrypted, false); assert.strictEqual(master3.mnemonic.phrase, options.mnemonic); });