File tree Expand file tree Collapse file tree 1 file changed +1
-16
lines changed Expand file tree Collapse file tree 1 file changed +1
-16
lines changed Original file line number Diff line number Diff line change @@ -211,7 +211,7 @@ async function main() {
211
211
) ;
212
212
let memo = script . slice ( 4 , 2 * lockScriptSize ) ;
213
213
let decoder = new TextDecoder ( ) ;
214
- let bytes = hexToBytes ( memo ) ;
214
+ let bytes = Tx . utils . hexToBytes ( memo ) ;
215
215
let msg = "" ;
216
216
try {
217
217
msg = decoder . decode ( bytes ) ;
@@ -274,21 +274,6 @@ async function main() {
274
274
console . info ( ) ;
275
275
}
276
276
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
-
292
277
main ( )
293
278
. then ( function ( ) {
294
279
process . exit ( 0 ) ;
You can’t perform that action at this time.
0 commit comments