Skip to content

Commit da6e2fb

Browse files
authored
Merge pull request #2055 from xinhangzhou/master
chore: fix some comments
2 parents 4b6dec9 + 98cdfce commit da6e2fb

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,8 @@ Ideally you shoud not have to directly access `HDNode` internals for general usa
331331

332332
__added__
333333
- `ECPair.prototype.getNetwork`
334-
- `HDNode.prototype.getNetwork`, wraps the underyling keyPair's `getNetwork` method
335-
- `HDNode.prototype.getPublicKeyBuffer`, wraps the underyling keyPair's `getPublicKeyBuffer` method
334+
- `HDNode.prototype.getNetwork`, wraps the underlying keyPair's `getNetwork` method
335+
- `HDNode.prototype.getPublicKeyBuffer`, wraps the underlying keyPair's `getPublicKeyBuffer` method
336336
- `HDNode.prototype.sign`, wraps the underlying keyPair's `sign` method
337337
- `HDNode.prototype.verify`, wraps the underlying keyPair's `verify` method
338338

src/psbt.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class Psbt {
9090
__NON_WITNESS_UTXO_BUF_CACHE: [],
9191
__TX_IN_CACHE: {},
9292
__TX: this.data.globalMap.unsignedTx.tx,
93-
// Psbt's predecesor (TransactionBuilder - now removed) behavior
93+
// Psbt's predecessor (TransactionBuilder - now removed) behavior
9494
// was to not confirm input values before signing.
9595
// Even though we highly encourage people to get
9696
// the full parent transaction to verify values, the ability to
@@ -1267,7 +1267,7 @@ function getHashForSig(inputIndex, input, cache, forValidate, sighashTypes) {
12671267
console.warn(
12681268
'Warning: Signing non-segwit inputs without the full parent transaction ' +
12691269
'means there is a chance that a miner could feed you incorrect information ' +
1270-
"to trick you into paying large fees. This behavior is the same as Psbt's predecesor " +
1270+
"to trick you into paying large fees. This behavior is the same as Psbt's predecessor " +
12711271
'(TransactionBuilder - now removed) when signing non-segwit scripts. You are not ' +
12721272
'able to export this Psbt with toBuffer|toBase64|toHex since it is not ' +
12731273
'BIP174 compliant.\n*********************\nPROCEED WITH CAUTION!\n' +

test/integration/transactions.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ describe('bitcoinjs-lib (transactions with psbt)', () => {
126126
// (in)(5e4 + 7e4) - (out)(8e4 + 1e4) = (fee)3e4 = 30000, this is the miner fee
127127

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

132132
// encode to send out to the signers

test/transaction.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ describe('Transaction', () => {
350350
});
351351

352352
describe('setWitness', () => {
353-
it('only accepts a a witness stack (Array of Buffers)', () => {
353+
it('only accepts a witness stack (Array of Buffers)', () => {
354354
assert.throws(() => {
355355
(new Transaction().setWitness as any)(0, 'foobar');
356356
}, /Expected property "1" of type \[Buffer], got String "foobar"/);

ts_src/psbt.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ export class Psbt {
156156
__NON_WITNESS_UTXO_BUF_CACHE: [],
157157
__TX_IN_CACHE: {},
158158
__TX: (this.data.globalMap.unsignedTx as PsbtTransaction).tx,
159-
// Psbt's predecesor (TransactionBuilder - now removed) behavior
159+
// Psbt's predecessor (TransactionBuilder - now removed) behavior
160160
// was to not confirm input values before signing.
161161
// Even though we highly encourage people to get
162162
// the full parent transaction to verify values, the ability to
@@ -1678,7 +1678,7 @@ function getHashForSig(
16781678
console.warn(
16791679
'Warning: Signing non-segwit inputs without the full parent transaction ' +
16801680
'means there is a chance that a miner could feed you incorrect information ' +
1681-
"to trick you into paying large fees. This behavior is the same as Psbt's predecesor " +
1681+
"to trick you into paying large fees. This behavior is the same as Psbt's predecessor " +
16821682
'(TransactionBuilder - now removed) when signing non-segwit scripts. You are not ' +
16831683
'able to export this Psbt with toBuffer|toBase64|toHex since it is not ' +
16841684
'BIP174 compliant.\n*********************\nPROCEED WITH CAUTION!\n' +

0 commit comments

Comments
 (0)