Skip to content

Commit f537e02

Browse files
committed
ref(lint): ./bin/inspect.js
1 parent 42582a5 commit f537e02

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

bin/inspect.js

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ async function main() {
211211
);
212212
let memo = script.slice(4, 2 * lockScriptSize);
213213
let decoder = new TextDecoder();
214-
let bytes = hexToBytes(memo);
214+
let bytes = Tx.utils.hexToBytes(memo);
215215
let msg = "";
216216
try {
217217
msg = decoder.decode(bytes);
@@ -274,21 +274,6 @@ async function main() {
274274
console.info();
275275
}
276276

277-
function hexToBytes(hex) {
278-
let len = hex.length / 2;
279-
let bytes = new Uint8Array(len);
280-
281-
let index = 0;
282-
for (let i = 0; i < hex.length; i += 2) {
283-
let c = hex.slice(i, i + 2);
284-
let b = parseInt(c, 16);
285-
bytes[index] = b;
286-
index += 1;
287-
}
288-
289-
return bytes;
290-
}
291-
292277
main()
293278
.then(function () {
294279
process.exit(0);

0 commit comments

Comments
 (0)