Skip to content

Commit

Permalink
Updated refund script
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaszslabon committed Oct 20, 2023
1 parent 4108de6 commit c271c73
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions typescript/scripts/refund.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
DepositScript,
ElectrumClient,
ElectrumCredentials,
Hex

Check failure on line 12 in typescript/scripts/refund.ts

View workflow job for this annotation

GitHub Actions / typescript-format

Insert `,`
} from "../src"

program
Expand Down Expand Up @@ -60,15 +61,15 @@ const depositJson = JSON.parse(fs.readFileSync(depositJsonPath, "utf-8"))

const deposit: DepositReceipt = {
depositor: depositJson.depositor,
walletPublicKeyHash: depositJson.walletPublicKeyHash,
refundPublicKeyHash: depositJson.refundPublicKeyHash,
blindingFactor: depositJson.blindingFactor,
refundLocktime: depositJson.refundLocktime,
walletPublicKeyHash: Hex.from(depositJson.walletPublicKeyHash),
refundPublicKeyHash: Hex.from(depositJson.refundPublicKeyHash),
blindingFactor: Hex.from(depositJson.blindingFactor),
refundLocktime: Hex.from(depositJson.refundLocktime),
}
const recoveryAddress = depositJson.btcRecoveryAddress

console.log("======= refund provided data ========")
console.log("deposit JSON: ", deposit)
console.log("deposit JSON: ", depositJson)
console.log("deposit recovery amount: ", refundAmount)
console.log("deposit transaction ID: ", transactionId)
console.log("deposit transaction index: ", transactionIndex)
Expand Down

0 comments on commit c271c73

Please sign in to comment.