Skip to content

Commit

Permalink
Merge pull request #47 from map3xyz/binance-fixes
Browse files Browse the repository at this point in the history
improving error logging
  • Loading branch information
pellicceama authored Apr 4, 2023
2 parents 2821599 + 3990c46 commit 127a25a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/repo/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export async function addIdentifierToAsset(dir: string, networkCode: string, add
const assetInfoFilePath = path.join(dir, getDirPathForTokenlist(networkCode, address), 'info.json');

if(!fs.existsSync(assetInfoFilePath)) {
console.error('addIdentifierToAsset Cannot find asset info file for asset ' + address + ' in directory ' + dir);
console.error('addIdentifierToAsset Cannot find asset info file for asset ' + address + ' in location ' + assetInfoFilePath);
return { addedIdentifier: false };
}

Expand Down
1 change: 1 addition & 0 deletions src/utils/filesystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export function readAndParseJson(file: string): any {
try {
return JSON.parse(fs.readFileSync(file, 'utf8'));
} catch (err) {
console.error('readAndParseJson Error on file: ', file);
throw err;
}
}
Expand Down

0 comments on commit 127a25a

Please sign in to comment.