diff --git a/ts_src/psbt.ts b/ts_src/psbt.ts index d5eb9f9..6c56132 100644 --- a/ts_src/psbt.ts +++ b/ts_src/psbt.ts @@ -117,6 +117,8 @@ export class Psbt { __NON_WITNESS_UTXO_BUF_CACHE: [], __TX_IN_CACHE: {}, __TX: (this.data.globalMap.unsignedTx as PsbtTransaction).tx, + // Psbt's predecesor (TransactionBuilder - now removed) behavior + // was to not confirm input values before signing. // Even though we highly encourage people to get // the full parent transaction to verify values, the ability to // sign non-segwit inputs without the full transaction was often @@ -1294,7 +1296,8 @@ function getHashForSig( console.warn( 'Warning: Signing non-segwit inputs without the full parent transaction ' + 'means there is a chance that a miner could feed you incorrect information ' + - 'to trick you into paying large fees. You are not ' + + 'to trick you into paying large fees. This behavior is the same as Psbt\'s predecesor ' + + '(TransactionBuilder - now removed) when signing non-segwit scripts. You are not ' + 'able to export this Psbt with toBuffer|toBase64|toHex since it is not ' + 'BIP174 compliant.\n*********************\nPROCEED WITH CAUTION!\n' + '*********************',