Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix some comments #2055

Merged
merged 1 commit into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,8 @@ Ideally you shoud not have to directly access `HDNode` internals for general usa

__added__
- `ECPair.prototype.getNetwork`
- `HDNode.prototype.getNetwork`, wraps the underyling keyPair's `getNetwork` method
- `HDNode.prototype.getPublicKeyBuffer`, wraps the underyling keyPair's `getPublicKeyBuffer` method
- `HDNode.prototype.getNetwork`, wraps the underlying keyPair's `getNetwork` method
- `HDNode.prototype.getPublicKeyBuffer`, wraps the underlying keyPair's `getPublicKeyBuffer` method
- `HDNode.prototype.sign`, wraps the underlying keyPair's `sign` method
- `HDNode.prototype.verify`, wraps the underlying keyPair's `verify` method

Expand Down
4 changes: 2 additions & 2 deletions src/psbt.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class Psbt {
__NON_WITNESS_UTXO_BUF_CACHE: [],
__TX_IN_CACHE: {},
__TX: this.data.globalMap.unsignedTx.tx,
// Psbt's predecesor (TransactionBuilder - now removed) behavior
// Psbt's predecessor (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
Expand Down Expand Up @@ -1267,7 +1267,7 @@ function getHashForSig(inputIndex, input, cache, forValidate, sighashTypes) {
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. This behavior is the same as Psbt's predecesor " +
"to trick you into paying large fees. This behavior is the same as Psbt's predecessor " +
'(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' +
Expand Down
2 changes: 1 addition & 1 deletion test/integration/transactions.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ describe('bitcoinjs-lib (transactions with psbt)', () => {
// (in)(5e4 + 7e4) - (out)(8e4 + 1e4) = (fee)3e4 = 30000, this is the miner fee

// Let's show a new feature with PSBT.
// We can have multiple signers sign in parrallel and combine them.
// We can have multiple signers sign in parallel and combine them.
// (this is not necessary, but a nice feature)

// encode to send out to the signers
Expand Down
2 changes: 1 addition & 1 deletion test/transaction.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ describe('Transaction', () => {
});

describe('setWitness', () => {
it('only accepts a a witness stack (Array of Buffers)', () => {
it('only accepts a witness stack (Array of Buffers)', () => {
assert.throws(() => {
(new Transaction().setWitness as any)(0, 'foobar');
}, /Expected property "1" of type \[Buffer], got String "foobar"/);
Expand Down
4 changes: 2 additions & 2 deletions ts_src/psbt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ 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
// Psbt's predecessor (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
Expand Down Expand Up @@ -1678,7 +1678,7 @@ 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. This behavior is the same as Psbt's predecesor " +
"to trick you into paying large fees. This behavior is the same as Psbt's predecessor " +
'(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' +
Expand Down
Loading