Skip to content

Commit

Permalink
Using fundRskAccountThroughAPegin function
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy-then committed Oct 30, 2024
1 parent c8d5e3e commit a3ba996
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/tests/2wp.js
Original file line number Diff line number Diff line change
Expand Up @@ -744,10 +744,8 @@ 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);
const initialRskSenderBalanceInWeisBN = await rskTxHelper.getBalance(senderRecipientInfo.rskRecipientRskAddressInfo.address);
Expand Down

0 comments on commit a3ba996

Please sign in to comment.