aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/util/asset.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/instant/src/util/asset.ts')
-rw-r--r--packages/instant/src/util/asset.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/instant/src/util/asset.ts b/packages/instant/src/util/asset.ts
index 0576a7b60..2efaadbd2 100644
--- a/packages/instant/src/util/asset.ts
+++ b/packages/instant/src/util/asset.ts
@@ -98,4 +98,11 @@ export const assetUtils = {
}
return assetDataGroupIfExists[Network.Mainnet];
},
+ getERC20AssetsFromAssets: (assets: Asset[]): ERC20Asset[] => {
+ const erc20sOrUndefined = _.map(
+ assets,
+ asset => (asset.metaData.assetProxyId === AssetProxyId.ERC20 ? (asset as ERC20Asset) : undefined),
+ );
+ return _.compact(erc20sOrUndefined);
+ },
};