From 2ae6584a0bffec76fc15f8236236521c0c1503d1 Mon Sep 17 00:00:00 2001 From: Nodari Chkuaselidze Date: Wed, 20 Aug 2025 15:29:15 +0400 Subject: [PATCH] wallet: makeOpen will remove added output if output is doubleOpen. --- lib/wallet/wallet.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/wallet/wallet.js b/lib/wallet/wallet.js index f5920c22..af9e5c60 100644 --- a/lib/wallet/wallet.js +++ b/lib/wallet/wallet.js @@ -1770,8 +1770,10 @@ class Wallet extends EventEmitter { mtx.outputs.push(output); - if (await this.txdb.isDoubleOpen(mtx)) + if (await this.txdb.isDoubleOpen(mtx)) { + mtx.outputs.pop(); throw new Error(`Already sent an open for: ${name}.`); + } return mtx; }