Skip to content

Commit 2bf16a5

Browse files
committed
chore: partially update tx.test.js to latest API to pass lint
1 parent 7a32343 commit 2bf16a5

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

tx.test.js

+17-15
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
"use strict";
22

3-
let Tx = require("./tx.js");
3+
let Tx = require("./");
4+
let toVarInt = Tx.utils.toVarInt;
5+
let toVarIntSize = Tx.utils.toVarIntSize;
46

57
/** @type {import('node:crypto')} */
68
//@ts-ignore
@@ -38,6 +40,7 @@ Secp256k1.utils.hmacSha256 = async function (key, message) {
3840
return new Uint8Array(buffer);
3941
};
4042

43+
/* jshint maxstatements: 200 */
4144
async function main() {
4245
//let expectedBytes = "00ff0ff0fff00f00";
4346
//let u8 = Tx.utils.hexToU8("00ff0ff0fff00f00");
@@ -61,9 +64,8 @@ async function main() {
6164
],
6265
outputs: [
6366
{
64-
// TODO pubkeyhash or pubKeyHash, but NOT BOTH
65-
pubkeyhash: "f93af105187d21ed6adfa5d71bfada7d7324e53c",
66-
units: 190968096,
67+
pubKeyHash: "f93af105187d21ed6adfa5d71bfada7d7324e53c",
68+
satoshis: 190968096,
6769
},
6870
],
6971
};
@@ -169,21 +171,21 @@ async function main() {
169171
],
170172
outputs: [
171173
{
172-
pubkeyhash: "5bcd0d776a7252310b9f1a7eee1a749d42126944",
173-
//pubkeyhash: "1e0a6ef6085bb8af443a9e7f8941e61deb09fb54",
174-
units: quarterValue,
174+
pubKeyHash: "5bcd0d776a7252310b9f1a7eee1a749d42126944",
175+
//pubKeyHash: "1e0a6ef6085bb8af443a9e7f8941e61deb09fb54",
176+
satoshis: quarterValue,
175177
},
176178
{
177-
pubkeyhash: "5bcd0d776a7252310b9f1a7eee1a749d42126944",
178-
units: quarterValue,
179+
pubKeyHash: "5bcd0d776a7252310b9f1a7eee1a749d42126944",
180+
satoshis: quarterValue,
179181
},
180182
{
181-
pubkeyhash: "5bcd0d776a7252310b9f1a7eee1a749d42126944",
182-
units: quarterValue,
183+
pubKeyHash: "5bcd0d776a7252310b9f1a7eee1a749d42126944",
184+
satoshis: quarterValue,
183185
},
184186
{
185-
pubkeyhash: "5bcd0d776a7252310b9f1a7eee1a749d42126944",
186-
units: quarterValue,
187+
pubKeyHash: "5bcd0d776a7252310b9f1a7eee1a749d42126944",
188+
satoshis: quarterValue,
187189
},
188190
],
189191
};
@@ -267,8 +269,8 @@ async function main() {
267269
],
268270
outputs: [
269271
{
270-
pubkeyhash: "f93af105187d21ed6adfa5d71bfada7d7324e53c",
271-
units: 190968096,
272+
pubKeyHash: "f93af105187d21ed6adfa5d71bfada7d7324e53c",
273+
satoshis: 190968096,
272274
},
273275
],
274276
});

0 commit comments

Comments
 (0)