Skip to content

Commit

Permalink
removing uncessary functions
Browse files Browse the repository at this point in the history
  • Loading branch information
pellicceama committed Nov 4, 2022
1 parent 97bc05f commit 5b11ffa
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 40 deletions.
17 changes: 0 additions & 17 deletions src/db/asset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Asset } from "../model";
import { AssetMapping } from "../model/AssetMapping";
import { getAssetMapping, getAssetsForNetwork, getNetworks } from "../networks";
import { ETHEREUM_ASSETS, POLYGON_ASSETS } from "./assets.json";
import { fetchAssetsCsv } from "./utils";

type AssetInfoCallback = (assetInfo: Asset) => Promise<void>;
type AssetMappingInfoCallback = (assetMapping: AssetMapping) => Promise<void>;
Expand All @@ -25,22 +24,6 @@ export async function assetsForEach(callback: AssetInfoCallback, complete?: () =
}
}

export async function assetForId(id: string, callback: AssetInfoCallback) {
try {
const assets = await fetchAssetsCsv();
const assetCsvRow = assets.get(`id:${id}`);

if (!assetCsvRow) {
return callback(null);
}
const asset = (await getAssetsForNetwork(assetCsvRow.primaryNetwork)).find((asset) => asset.id === id);

return callback(asset);
} catch (err) {
throw err;
}
}

export async function findAssetByNetworkIdAndAddress(
networkCode: string,
address: string,
Expand Down
23 changes: 0 additions & 23 deletions src/db/utils.ts

This file was deleted.

0 comments on commit 5b11ffa

Please sign in to comment.