From 2d62012768fcb47e578d02e6c2d25ace5f4a6d6e Mon Sep 17 00:00:00 2001 From: Amadeo Pellicce Date: Sun, 5 Feb 2023 16:53:06 -0800 Subject: [PATCH] fixing issue with getAssetsByNetworkCodeAndSymbol --- src/db/asset.ts | 4 ++++ src/db/network.ts | 5 ----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/db/asset.ts b/src/db/asset.ts index 0b31500..9a4376e 100644 --- a/src/db/asset.ts +++ b/src/db/asset.ts @@ -70,3 +70,7 @@ async function getMockAssets(networkId?: string): Promise { return res as Asset[]; } +export async function getAssetsByNetworkCodeAndSymbol(networkCode: string, symbol: string): Promise { + const assets = await getAssetsForNetwork(networkCode); + return assets.filter((asset) => asset.symbol === symbol); +} diff --git a/src/db/network.ts b/src/db/network.ts index 0b75152..9db890f 100644 --- a/src/db/network.ts +++ b/src/db/network.ts @@ -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); -}