aboutsummaryrefslogtreecommitdiffstats
path: root/packages/connect/src/utils
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-08-16 08:18:19 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-08-16 08:18:19 +0800
commitc325d638c98a990f2d0e991f2e03287183ba292f (patch)
tree59a9ad610c8d58fe471807683e918feb73c171ec /packages/connect/src/utils
parente7f19e350ed9374729e73320d569294e88fde236 (diff)
downloaddexon-sol-tools-c325d638c98a990f2d0e991f2e03287183ba292f.tar
dexon-sol-tools-c325d638c98a990f2d0e991f2e03287183ba292f.tar.gz
dexon-sol-tools-c325d638c98a990f2d0e991f2e03287183ba292f.tar.bz2
dexon-sol-tools-c325d638c98a990f2d0e991f2e03287183ba292f.tar.lz
dexon-sol-tools-c325d638c98a990f2d0e991f2e03287183ba292f.tar.xz
dexon-sol-tools-c325d638c98a990f2d0e991f2e03287183ba292f.tar.zst
dexon-sol-tools-c325d638c98a990f2d0e991f2e03287183ba292f.zip
getAssetPairsAsync tests passing
Diffstat (limited to 'packages/connect/src/utils')
-rw-r--r--packages/connect/src/utils/relayer_response_json_parsers.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/connect/src/utils/relayer_response_json_parsers.ts b/packages/connect/src/utils/relayer_response_json_parsers.ts
index 9a17b23d3..37099384f 100644
--- a/packages/connect/src/utils/relayer_response_json_parsers.ts
+++ b/packages/connect/src/utils/relayer_response_json_parsers.ts
@@ -7,10 +7,10 @@ import { typeConverters } from './type_converters';
export const relayerResponseJsonParsers = {
parseAssetDataPairsJson(json: any): AssetPairsResponse {
- assert.doesConformToSchema('assetDataPairs', json, schemas.relayerApiAssetDataPairsResponseSchema);
- return { ...json, records: relayerResponseJsonParsers.parseAssetDataPairsJson(json.records) };
+ assert.doesConformToSchema('assetDataPairsResponse', json, schemas.relayerApiAssetDataPairsResponseSchema);
+ return { ...json, records: relayerResponseJsonParsers.parseAssetPairsItemsJson(json.records) };
},
- parseAssetPairsItemJson(json: any): AssetPairsItem[] {
+ parseAssetPairsItemsJson(json: any): AssetPairsItem[] {
return json.map((assetDataPair: any) => {
return typeConverters.convertStringsFieldsToBigNumbers(assetDataPair, [
'assetDataA.minAmount',
@@ -29,11 +29,11 @@ export const relayerResponseJsonParsers = {
return typeConverters.convertOrderStringFieldsToBigNumber(json);
},
parseOrderbookResponseJson(json: any): OrderbookResponse {
- assert.doesConformToSchema('orderBook', json, schemas.relayerApiOrderbookResponseSchema);
+ assert.doesConformToSchema('orderBookResponse', json, schemas.relayerApiOrderbookResponseSchema);
return typeConverters.convertOrderbookStringFieldsToBigNumber(json);
},
parseOrderConfigResponseJson(json: any): OrderConfigResponse {
- assert.doesConformToSchema('orderConfig', json, schemas.relayerApiOrderConfigResponseSchema);
+ assert.doesConformToSchema('orderConfigResponse', json, schemas.relayerApiOrderConfigResponseSchema);
return typeConverters.convertStringsFieldsToBigNumbers(json, ['makerFee', 'takerFee']);
},
};