Skip to content

Commit

Permalink
Fix usage of tbtc libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaszslabon committed Nov 12, 2023
1 parent 9b51d14 commit 6d4e089
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
18 changes: 9 additions & 9 deletions system-tests/test/deposit-redemption.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -364,14 +364,15 @@ describe("System Test - Deposit and redemption", () => {
)}`
)

await depositorTbtc.redemptions.requestRedemption(
// Use the depositor's address as the redeemer's address.
depositorBitcoinAddress,
await depositorTbtc.tbtcContracts.bridge.requestRedemption(
systemTestsContext.walletBitcoinKeyPair.publicKey.compressed,
sweepUtxo,
redeemerOutputScript,
requestedAmount
)

console.log(
`Requested redemption of amount ${requestedAmount} to script ${redeemerOutputScript} on the bridge`
`Requested redemption of ${requestedAmount} satoshis to script ${redeemerOutputScript} on the bridge`
)

redemptionRequest =
Expand Down Expand Up @@ -667,15 +668,14 @@ describe("System Test - Deposit and redemption", () => {
)}`
)

depositorTbtc.tbtcContracts.tbtcToken.requestRedemption(
systemTestsContext.walletBitcoinKeyPair.publicKey.compressed,
sweepUtxo,
redeemerOutputScript,
await depositorTbtc.redemptions.requestRedemption(
// Use the depositor's address as the redeemer's address.
depositorBitcoinAddress,
tbtcBalanceOfDepositor
)

console.log(
`Requested redemption of ${tbtcBalanceOfDepositor} TBTC tokens to script ${redeemerOutputScript} on the bridge`
`Requested redemption of ${requestedAmount} satoshis to script ${redeemerOutputScript} on the bridge`
)

redemptionRequest =
Expand Down
7 changes: 3 additions & 4 deletions system-tests/test/minting-unminting.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -382,10 +382,9 @@ describe("System Test - Minting and unminting", () => {
)}`
)

depositorTbtc.tbtcContracts.tbtcToken.requestRedemption(
systemTestsContext.depositorBitcoinKeyPair.publicKey.compressed,
sweepUtxo,
redeemerOutputScript,
await depositorTbtc.redemptions.requestRedemption(
// Use the depositor's address as the redeemer's address.
depositorBitcoinAddress,
unmintedAmount
)

Expand Down

0 comments on commit 6d4e089

Please sign in to comment.