#1477 do not remove comments refering TransactionBuilder, but instead mention that TransactionBuilder was removed

This commit is contained in:
Vlad Stan 2020-12-02 11:54:32 +02:00
parent b56273a391
commit ec61b996ad

View file

@ -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' +
'*********************',