Skip to content

Commit

Permalink
fixing issue with getAssetsByNetworkCodeAndSymbol
Browse files Browse the repository at this point in the history
  • Loading branch information
pellicceama committed Feb 6, 2023
1 parent 1e09abe commit 2d62012
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 4 additions & 0 deletions src/db/asset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,7 @@ async function getMockAssets(networkId?: string): Promise<Asset[]> {
return res as Asset[];
}

export async function getAssetsByNetworkCodeAndSymbol(networkCode: string, symbol: string): Promise<Asset[]> {
const assets = await getAssetsForNetwork(networkCode);
return assets.filter((asset) => asset.symbol === symbol);
}
5 changes: 0 additions & 5 deletions src/db/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,3 @@ export async function findNetworkByNetworkId(networkCode: string, callback: Netw
throw err;
}
}

export async function getAssetsByNetworkCodeAndSymbol(networkCode: string, symbol: string) {
const assets = await getAssetsForNetwork(networkCode);
return assets.find((asset) => asset.symbol === symbol);
}

0 comments on commit 2d62012

Please sign in to comment.