File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import { ethers , hexlify , Signer } from "ethers" ;
1+ import { ethers , hexlify , Signer , toBeHex } from "ethers" ;
22import fetch from "cross-fetch" ;
33import { promises as fs , readFileSync } from "fs" ;
44import * as path from "path" ;
@@ -182,7 +182,7 @@ export async function updateAssetMetadata(
182182 0 ,
183183 oceanNodeUrl ,
184184 "" ,
185- hexlify ( flags ) ,
185+ toBeHex ( flags ) ,
186186 metadata ,
187187 validateResult . hash
188188 ) ;
Original file line number Diff line number Diff line change @@ -2,8 +2,8 @@ import { exec } from "child_process";
22import path from "path" ;
33import util from "util" ;
44
5- import { dirname } from 'path'
6- import { fileURLToPath } from 'url'
5+ import { dirname } from 'path' ;
6+ import { fileURLToPath } from 'url' ;
77
88
99export const execPromise = util . promisify ( exec ) ;
@@ -14,13 +14,14 @@ export const __dirname = dirname(__filename)
1414
1515export const projectRoot = path . resolve ( __dirname , ".." ) ;
1616export const runCommand = async ( command : string ) : Promise < string > => {
17- console . log ( `\n[CMD]: ${ command } ` ) ;
18- try {
19- const { stdout } = await execPromise ( command , { cwd : projectRoot } ) ;
20- console . log ( `[OUTPUT]:\n${ stdout } ` ) ;
21- return stdout ;
22- } catch ( error : any ) {
23- console . error ( `[ERROR]:\n${ error . stderr || error . message } ` ) ;
24- throw error ;
25- }
17+ console . log ( `\n[CMD]: ${ command } ` ) ;
18+ try {
19+ const { stdout } = await execPromise ( command , { cwd : projectRoot } ) ;
20+ console . log ( `[OUTPUT]:\n${ stdout } ` ) ;
21+ return stdout ;
22+ } catch ( error : any ) {
23+ console . log ( { error } )
24+ console . error ( `[ERROR]:\n${ error . stderr || error . message } ` ) ;
25+ throw error ;
26+ }
2627} ;
You can’t perform that action at this time.
0 commit comments