diff --git a/lib/tests/2wp.js b/lib/tests/2wp.js index 30e9632..c0f4383 100644 --- a/lib/tests/2wp.js +++ b/lib/tests/2wp.js @@ -780,9 +780,7 @@ const execute = (description, getRskHost) => { // Create a pegin for the sender to ensure there is enough funds to pegout and because this is the natural process const senderRecipientInfo = await createSenderRecipientInfo(rskTxHelper, btcTxHelper); - const peginValueInSatoshis = btcToSatoshis(0.5); - const btcPeginTxHash = await sendPegin(rskTxHelper, btcTxHelper, senderRecipientInfo.btcSenderAddressInfo, satoshisToBtc(peginValueInSatoshis)); - await ensurePeginIsRegistered(rskTxHelper, btcPeginTxHash); + await fundRskAccountThroughAPegin(rskTxHelper, btcTxHelper, senderRecipientInfo.btcSenderAddressInfo); const initial2wpBalances = await get2wpBalances(rskTxHelper, btcTxHelper); const initialBtcRecipientAddressBalanceInSatoshis = await getBtcAddressBalanceInSatoshis(btcTxHelper, senderRecipientInfo.btcSenderAddressInfo.address);