diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-11-01 10:20:37 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-11-01 10:21:06 +0800 |
commit | 6091ee732d208eaf9889087b8308dfd0427b9be5 (patch) | |
tree | c13189159cc172c9f82340a8d3a2bd69eed47f6e /packages/instant/src/util/assert.ts | |
parent | 8c336925601127c759ad4cfbca119368a2edfd56 (diff) | |
download | dexon-sol-tools-6091ee732d208eaf9889087b8308dfd0427b9be5.tar.gz dexon-sol-tools-6091ee732d208eaf9889087b8308dfd0427b9be5.tar.zst dexon-sol-tools-6091ee732d208eaf9889087b8308dfd0427b9be5.zip |
feat: modify public API to allow for passing in available assets, or fetch assets from SRA
Diffstat (limited to 'packages/instant/src/util/assert.ts')
-rw-r--r-- | packages/instant/src/util/assert.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/instant/src/util/assert.ts b/packages/instant/src/util/assert.ts index 584d3d4b1..1267a1d23 100644 --- a/packages/instant/src/util/assert.ts +++ b/packages/instant/src/util/assert.ts @@ -8,12 +8,12 @@ import { AssetMetaData } from '../types'; export const assert = { ...sharedAssert, - isValidLiquiditySource(variableName: string, liquiditySource: string | SignedOrder[]): void { - if (_.isString(liquiditySource)) { - sharedAssert.isUri(variableName, liquiditySource); + isValidOrderSource(variableName: string, orderSource: string | SignedOrder[]): void { + if (_.isString(orderSource)) { + sharedAssert.isUri(variableName, orderSource); return; } - sharedAssert.doesConformToSchema(variableName, liquiditySource, schemas.signedOrdersSchema); + sharedAssert.doesConformToSchema(variableName, orderSource, schemas.signedOrdersSchema); }, isValidAssetMetaDataMap(variableName: string, metaDataMap: ObjectMap<AssetMetaData>): void { _.forEach(metaDataMap, (metaData, assetData) => { |