Skip to content

Commit 5892932

Browse files
committed
test: correctly spell 'txid'
1 parent 40a90b7 commit 5892932

File tree

6 files changed

+21
-21
lines changed

6 files changed

+21
-21
lines changed

bin/create-memo.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ async function main() {
4949

5050
let coreUtxo = await require(coinpath);
5151
let valid =
52-
coreUtxo.txId &&
52+
coreUtxo.txid &&
5353
coreUtxo.outputIndex &&
5454
coreUtxo.satoshis &&
5555
(coreUtxo.address || coreUtxo.pubKeyHash || coreUtxo.script);
5656
if (!valid) {
5757
console.error(
58-
"coin JSON must contain 'txId', 'outputIndex', 'satoshis' and one of 'address', 'pubKeyHash', or 'script'",
58+
"coin JSON must contain 'txid', 'outputIndex', 'satoshis' and one of 'address', 'pubKeyHash', or 'script'",
5959
);
6060
process.exit(1);
6161
return;

bin/inspect.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,8 @@ DashTx._debugPrint = async function (tx) {
164164
lines.push(`TxID: N/A`);
165165
} else if (tx.hasInputScript) {
166166
lines.push(`Tx Hash: N/A`);
167-
let txId = await DashTx.getId(tx.transaction);
168-
lines.push(`TxID: ${txId}`);
167+
let txid = await DashTx.getId(tx.transaction);
168+
lines.push(`TxID: ${txid}`);
169169
// lines.push(`TxID: 'await Tx.getId(txInfo.transaction)'`);
170170
} else {
171171
lines.push(`Tx Hash: N/A`);

tests/hash-and-sign-all.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ let Secp256k1 = exports.nobleSecp256k1 || require("@dashincubator/secp256k1");
1515
let rawtx =
1616
"03000000022b35e8bd64852ae0277a7a4ab6d6293f477f27e859251d27a9a3ebcb5855307f000000006b48304502210098ba308087f7bcc5d9f6c347ffd633422bbbe8d44a20c21a2d5574da35d0a2070220026cae84cec2d96fd4e1a837ab0f3a559fdbd4b19bdd60c4dec450565f79f5f3012103e10848073f3f92f43d718ed1be39afe7314e410eb7080bbc4474e82fe88c5cf2ffffffff2b35e8bd64852ae0277a7a4ab6d6293f477f27e859251d27a9a3ebcb5855307f010000006b483045022100a6ec8b004c6e24047df4a9b2198a42c92862c4b3ad7ac989c85a04ba86fbdb3702200febea2871834d70c1c9d754cbe8163def8f1f721eb8b833098e01bd49ccae65012103e10848073f3f92f43d718ed1be39afe7314e410eb7080bbc4474e82fe88c5cf2ffffffff020a090000000000001976a9145bcd0d776a7252310b9f1a7eee1a749d4212694488ac0a090000000000001976a9145bcd0d776a7252310b9f1a7eee1a749d4212694488ac00000000";
1717

18-
let txId = "7f305558cbeba3a9271d2559e8277f473f29d6b64a7a7a27e02a8564bde8352b";
18+
let txid = "7f305558cbeba3a9271d2559e8277f473f29d6b64a7a7a27e02a8564bde8352b";
1919
let prevLockScript = [
2020
"76", // OP_DUP
2121
"a9", // OP_HASH160
@@ -44,13 +44,13 @@ let txInfo = {
4444
version: 3,
4545
inputs: [
4646
{
47-
txId: txId,
47+
txid: txid,
4848
outputIndex: 0,
4949
script: prevLockScript,
5050
sigHashType: sigHashType,
5151
},
5252
{
53-
txId: txId,
53+
txid: txid,
5454
outputIndex: 1,
5555
script: prevLockScript,
5656
sigHashType: sigHashType,

tests/legacy-finalize-presorted.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ function genTestVals(name, sats, deterministic) {
5151
{
5252
address: "XgCLJNfaugnB35WTCMjKQ65GMBN41QtVQJ",
5353
satoshis: sats,
54-
//txId: "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
55-
txId: "0123456789abcdeffedcba987654321000112233445566778899aabbccddeeff",
54+
//txid: "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
55+
txid: "0123456789abcdeffedcba987654321000112233445566778899aabbccddeeff",
5656
outputIndex: 0,
5757
},
5858
],

tests/lex-sort.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,23 @@ function unsort(sorted) {
2323

2424
let inputsSorted = [
2525
{
26-
txId: "00ff",
26+
txid: "00ff",
2727
outputIndex: 0,
2828
},
2929
{
30-
txId: "00ff",
30+
txid: "00ff",
3131
outputIndex: 9,
3232
},
3333
{
34-
txId: "aacc",
34+
txid: "aacc",
3535
outputIndex: 5,
3636
},
3737
{
38-
txId: "ff00",
38+
txid: "ff00",
3939
outputIndex: 0,
4040
},
4141
{
42-
txId: "ff00",
42+
txid: "ff00",
4343
outputIndex: 9,
4444
},
4545
];
@@ -159,9 +159,9 @@ Zora.test("outputs sort correctly", async function (t) {
159159

160160
Zora.test("legacyCreateTx uses lex sort functions", async function (t) {
161161
let inputs = [
162-
{ satoshis: 40500, txId: "ff", outputIndex: 1 },
163-
{ satoshis: 20500, txId: "00", outputIndex: 2 },
164-
{ satoshis: 10500, txId: "ff", outputIndex: 0 },
162+
{ satoshis: 40500, txid: "ff", outputIndex: 1 },
163+
{ satoshis: 20500, txid: "00", outputIndex: 2 },
164+
{ satoshis: 10500, txid: "ff", outputIndex: 0 },
165165
];
166166
let sortedIn = inputs.slice(0);
167167
sortedIn.sort(DashTx.sortInputs);

tests/memo.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ Zora.test("memo lengths", function (t) {
8787
Zora.test("can create memo tx", async function (t) {
8888
let pkh = "82754a9c935fbfcdda5995a32006a68a8156ee2b";
8989

90-
let txId = "77".repeat(32);
90+
let txid = "77".repeat(32);
9191
let coins = [
92-
{ pubKeyHash: pkh, satoshis: 20000, txId: txId, outputIndex: 0 },
92+
{ pubKeyHash: pkh, satoshis: 20000, txid: txid, outputIndex: 0 },
9393
];
9494

9595
/** @type {Array<DashTx.TxOutput>} */
@@ -116,12 +116,12 @@ Zora.test("can create memo tx", async function (t) {
116116
Zora.test("can create donation tx via memo", async function (t) {
117117
let pkh = "82754a9c935fbfcdda5995a32006a68a8156ee2b";
118118

119-
let txId = "77".repeat(32);
119+
let txid = "77".repeat(32);
120120
let inputs = [
121121
{
122122
pubKeyHash: pkh,
123123
satoshis: 20000,
124-
txId: txId,
124+
txid: txid,
125125
outputIndex: 0,
126126
sigHashType: DashTx.SIGHASH_ALL,
127127
},

0 commit comments

Comments
 (0)