From 5f7302e49004ebef984753f2b553079d89801d54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?22388o=E2=9A=A1=EF=B8=8F?= <83122757+22388o@users.noreply.github.com> Date: Wed, 31 Jan 2024 08:52:18 -0300 Subject: [PATCH] Update main_function.js --- app/coinjoin/main_function.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/coinjoin/main_function.js b/app/coinjoin/main_function.js index 7ce13d6f..091f24ee 100644 --- a/app/coinjoin/main_function.js +++ b/app/coinjoin/main_function.js @@ -78,12 +78,12 @@ class CXJT { const t = this.template.outs[i]; if (t.spk_type === "p2tr-p2tr") { - const address = btc.pubkey_to_p2tr_p2tr_address( + const address = btc.pubkey_to_p2tr_address( this.keys["outs"][i][t.counterparty], get_p2sh_vbyte() ); this.outs.push({ - "address": address, + "address": t.address, "value": t.amount, }); } else if (t.spk_type === "NN") { @@ -92,14 +92,14 @@ class CXJT { throw new Error("Incomplete key data to construct outputs"); } - const address = btc.pubkeys_to_p2wsh_address( + const address = btc.pubkeys_to_p2tr_address( Object.values(this.keys["outs"][i]), { vbyte: 100 } ); this.outs.push({ - "address": address, - "value": t.amount + "address": t.address, + "value": t.amount, }); } }