Skip to content

Commit

Permalink
adding repoPath arg to getAssetMaps
Browse files Browse the repository at this point in the history
  • Loading branch information
pellicceama committed Nov 4, 2022
1 parent 66d2b4d commit 97bc05f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/repo/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ export async function addIdentifierToAsset(dir: string, networkCode: string, add
}
}

export function getAssetMaps(networkCode: string, address: string): AssetMap[] {
export function getAssetMaps(networkCode: string, address: string, repoPath: string = DEFAULT_REPO_DISK_LOCATION): AssetMap[] {
const formattedAddress = formatAddress(address);

const assetMapInfoFile = path.join(getDirPathForTokenlist(networkCode, formattedAddress), 'maps.json');
const assetMapInfoFile = path.join(repoPath, getDirPathForTokenlist(networkCode, formattedAddress), 'maps.json');

if(!fs.existsSync(assetMapInfoFile)) {
return [];
Expand Down

0 comments on commit 97bc05f

Please sign in to comment.