From c2219904574e8269fb9916df4e464a031f7334cf Mon Sep 17 00:00:00 2001 From: David Kaplan Date: Thu, 10 Jul 2025 14:07:36 -0400 Subject: [PATCH] feat(psbt): disable unsafe non-segwit sign warning by default Set __WARN_UNSAFE_SIGN_NONSEGWIT to false by default to prevent unnecessary warnings when signing non-segwit inputs. Issue: BTC-2285 Co-authored-by: llm-git --- src/psbt.js | 2 +- ts_src/psbt.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/psbt.js b/src/psbt.js index d6079f896..5d02e3778 100644 --- a/src/psbt.js +++ b/src/psbt.js @@ -76,7 +76,7 @@ class Psbt { // behavior to not require the previous transaction and instead // use a witnessUtxo. __UNSAFE_SIGN_NONSEGWIT: true, - __WARN_UNSAFE_SIGN_NONSEGWIT: true, + __WARN_UNSAFE_SIGN_NONSEGWIT: false, __TX_FROM_BUFFER: buf => this.constructor.transactionFromBuffer(buf, this.opts.network), }; diff --git a/ts_src/psbt.ts b/ts_src/psbt.ts index c87fe00a6..605a0f1ff 100644 --- a/ts_src/psbt.ts +++ b/ts_src/psbt.ts @@ -150,7 +150,7 @@ export class Psbt { // behavior to not require the previous transaction and instead // use a witnessUtxo. __UNSAFE_SIGN_NONSEGWIT: true, - __WARN_UNSAFE_SIGN_NONSEGWIT: true, + __WARN_UNSAFE_SIGN_NONSEGWIT: false, __TX_FROM_BUFFER: buf => (this.constructor as typeof Psbt).transactionFromBuffer( buf,