From c271c7330185b82ec4871cf90ec6a812bcbae7e4 Mon Sep 17 00:00:00 2001 From: Tomasz Slabon Date: Fri, 20 Oct 2023 17:50:54 +0200 Subject: [PATCH] Updated refund script --- typescript/scripts/refund.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/typescript/scripts/refund.ts b/typescript/scripts/refund.ts index 11931b978..f239ebd1a 100644 --- a/typescript/scripts/refund.ts +++ b/typescript/scripts/refund.ts @@ -9,6 +9,7 @@ import { DepositScript, ElectrumClient, ElectrumCredentials, + Hex } from "../src" program @@ -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)