aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packages/asset-buyer/src/standard_relayer_api_asset_buyer_manager.ts9
1 files changed, 8 insertions, 1 deletions
diff --git a/packages/asset-buyer/src/standard_relayer_api_asset_buyer_manager.ts b/packages/asset-buyer/src/standard_relayer_api_asset_buyer_manager.ts
index 866bee46e..207713110 100644
--- a/packages/asset-buyer/src/standard_relayer_api_asset_buyer_manager.ts
+++ b/packages/asset-buyer/src/standard_relayer_api_asset_buyer_manager.ts
@@ -11,7 +11,6 @@ import { assetDataUtils } from './utils/asset_data_utils';
import { OrderProvider, StandardRelayerApiAssetBuyerManagerError } from './types';
-// TODO: Read-only list of available assetDatas
export class StandardRelayerAPIAssetBuyerManager {
// Map of assetData to AssetBuyer for that assetData
public readonly assetBuyerMap: ObjectMap<AssetBuyer>;
@@ -123,4 +122,12 @@ export class StandardRelayerAPIAssetBuyerManager {
const assetData = assetDataUtils.encodeERC20AssetData(tokenAddress);
return this.getAssetBuyerFromAssetData(assetData);
}
+ /**
+ * Get a list of all the assetDatas that the instance supports
+ *
+ * @return An array of assetData strings
+ */
+ public getAssetDatas(): string[] {
+ return _.keys(this.assetBuyerMap);
+ }
}