diff --git a/lib/tests/2wp.js b/lib/tests/2wp.js index e7943819..a4329009 100644 --- a/lib/tests/2wp.js +++ b/lib/tests/2wp.js @@ -139,7 +139,7 @@ const execute = (description, getRskHost) => { const senderRecipientInfo = await createSenderRecipientInfo(rskTxHelper, btcTxHelper); const initialSenderAddressBalanceInSatoshis = await getBtcAddressBalanceInSatoshis(btcTxHelper, senderRecipientInfo.btcSenderAddressInfo.address); const peginValueInSatoshis = minimumPeginValueInSatoshis; - const peginV1RskRecipientAddress = await rskTxHelper.newAccountWithSeed('successfulPeginV1'); + const peginV1RskRecipientAddress = await rskTxHelper.newAccountWithSeed(rskTxHelper.getClient().utils.randomHex(16)); // Act @@ -224,7 +224,7 @@ const execute = (description, getRskHost) => { // The minimum pegin value minus 1 satoshis const peginValueInSatoshis = minimumPeginValueInSatoshis - 1; - const peginV1RskRecipientAddress = await rskTxHelper.newAccountWithSeed('rejectedPeginV1'); + const peginV1RskRecipientAddress = await rskTxHelper.newAccountWithSeed(rskTxHelper.getClient().utils.randomHex(16)); // Act @@ -343,7 +343,7 @@ const execute = (description, getRskHost) => { await btcTxHelper.fundAddress(multisigSenderAddressInfo.address, Number(satoshisToBtc(minimumPeginValueInSatoshis + btcFeeInSatoshis))); const initialSenderAddressBalanceInSatoshis = await getBtcAddressBalanceInSatoshis(btcTxHelper, multisigSenderAddressInfo.address); const peginValueInSatoshis = minimumPeginValueInSatoshis; - const peginV1RskRecipientAddress = await rskTxHelper.newAccountWithSeed('successfulPeginV1FromMultisig'); + const peginV1RskRecipientAddress = await rskTxHelper.newAccountWithSeed(rskTxHelper.getClient().utils.randomHex(16)); // Act @@ -381,7 +381,7 @@ const execute = (description, getRskHost) => { await btcTxHelper.fundAddress(bech32SenderAddressInfo.address, Number(satoshisToBtc(minimumPeginValueInSatoshis + btcFeeInSatoshis))); const initialSenderAddressBalanceInSatoshis = await getBtcAddressBalanceInSatoshis(btcTxHelper, bech32SenderAddressInfo.address); const peginValueInSatoshis = minimumPeginValueInSatoshis; - const peginV1RskRecipientAddress = await rskTxHelper.newAccountWithSeed('successfulPeginV1FromBech32'); + const peginV1RskRecipientAddress = await rskTxHelper.newAccountWithSeed(rskTxHelper.getClient().utils.randomHex(16)); // Act @@ -417,7 +417,7 @@ const execute = (description, getRskHost) => { const senderRecipientInfo = await createSenderRecipientInfo(rskTxHelper, btcTxHelper); const initialSenderAddressBalanceInSatoshis = await getBtcAddressBalanceInSatoshis(btcTxHelper, senderRecipientInfo.btcSenderAddressInfo.address); const peginValueInSatoshis = minimumPeginValueInSatoshis; - const peginV1RskRecipientAddress = await rskTxHelper.newAccountWithSeed('successfulPeginV1WithBtcRefundAddress'); + const peginV1RskRecipientAddress = await rskTxHelper.newAccountWithSeed(rskTxHelper.getClient().utils.randomHex(16)); // Act @@ -497,7 +497,7 @@ const execute = (description, getRskHost) => { const initial2wpBalances = await get2wpBalances(rskTxHelper, btcTxHelper); const peginValueInSatoshis = minimumPeginValueInSatoshis; const senderRecipientInfo = await createSenderRecipientInfo(rskTxHelper, btcTxHelper, 'p2sh-segwit', Number(satoshisToBtc(peginValueInSatoshis + btcFeeInSatoshis))); - const peginV1RskRecipientAddress = await rskTxHelper.newAccountWithSeed('rejectedPeginWithMultipleOpReturnOutputs'); + const peginV1RskRecipientAddress = await rskTxHelper.newAccountWithSeed(rskTxHelper.getClient().utils.randomHex(16)); const data = []; data.push(Buffer.from(createPeginV1TxData(senderRecipientInfo.rskRecipientRskAddressInfo.address), 'hex')); @@ -542,7 +542,7 @@ const execute = (description, getRskHost) => { const senderRecipientInfo = await createSenderRecipientInfo(rskTxHelper, btcTxHelper); const initialSenderAddressBalanceInSatoshis = await getBtcAddressBalanceInSatoshis(btcTxHelper, senderRecipientInfo.btcSenderAddressInfo.address); const peginValueInSatoshis = minimumPeginValueInSatoshis; - const peginV1RskRecipientAddress = await rskTxHelper.newAccountWithSeed('successfulPeginV1Multiple_OP_RETURN'); + const peginV1RskRecipientAddress = await rskTxHelper.newAccountWithSeed(rskTxHelper.getClient().utils.randomHex(16)); // Act @@ -626,7 +626,7 @@ const execute = (description, getRskHost) => { const initial2wpBalances = await get2wpBalances(rskTxHelper, btcTxHelper); const peginValueInSatoshis = minimumPeginValueInSatoshis; const senderRecipientInfo = await createSenderRecipientInfo(rskTxHelper, btcTxHelper, 'p2sh-segwit', Number(satoshisToBtc(peginValueInSatoshis + btcFeeInSatoshis))); - const peginV1RskRecipientAddress = await rskTxHelper.newAccountWithSeed('successfulPeginV1InvalidVersion'); + const peginV1RskRecipientAddress = await rskTxHelper.newAccountWithSeed(rskTxHelper.getClient().utils.randomHex(16)); const invalidPeginV1Version = '999'; const peginV1InvalidPayload = `${PEGIN_V1_RSKT_PREFIX_HEX}${invalidPeginV1Version}${removePrefix0x(peginV1RskRecipientAddress)}`;