From 33a45fa7393c8a4c07c5673cf40d501643e505d5 Mon Sep 17 00:00:00 2001 From: fragosti Date: Tue, 4 Sep 2018 14:44:56 -0700 Subject: Use BigNumber instead of string where appropriate in OrderConfigRequest --- packages/connect/src/types.ts | 6 +++--- packages/connect/test/http_client_test.ts | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/connect/src/types.ts b/packages/connect/src/types.ts index 06ae732a5..b76af081c 100644 --- a/packages/connect/src/types.ts +++ b/packages/connect/src/types.ts @@ -126,12 +126,12 @@ export interface PaginatedCollection { export interface OrderConfigRequest { makerAddress: string; takerAddress: string; - makerAssetAmount: string; - takerAssetAmount: string; + makerAssetAmount: BigNumber; + takerAssetAmount: BigNumber; makerAssetData: string; takerAssetData: string; exchangeAddress: string; - expirationTimeSeconds: string; + expirationTimeSeconds: BigNumber; } export interface OrderConfigResponse { diff --git a/packages/connect/test/http_client_test.ts b/packages/connect/test/http_client_test.ts index 5b564e97b..12706fc13 100644 --- a/packages/connect/test/http_client_test.ts +++ b/packages/connect/test/http_client_test.ts @@ -18,6 +18,7 @@ import { orderbookResponse } from './fixtures/standard_relayer_api/orderbook'; import * as orderbookJSON from './fixtures/standard_relayer_api/orderbook.json'; import { ordersResponse } from './fixtures/standard_relayer_api/orders'; import * as ordersResponseJSON from './fixtures/standard_relayer_api/orders.json'; +import { BigNumber } from 'bignumber.js'; chai.config.includeStack = true; chai.use(dirtyChai); @@ -138,9 +139,9 @@ describe('HttpClient', () => { const request = { makerAddress: '0x9e56625509c2f60af937f23b7b532600390e8c8b', takerAddress: '0xa2b31dacf30a9c50ca473337c01d8a201ae33e32', - makerAssetAmount: '10000000000000000', - takerAssetAmount: '20000000000000000', - expirationTimeSeconds: '1532560590', + makerAssetAmount: new BigNumber('10000000000000000'), + takerAssetAmount: new BigNumber('20000000000000000'), + expirationTimeSeconds: new BigNumber('1532560590'), makerAssetData: '0xf47261b04c32345ced77393b3530b1eed0f346429d', takerAssetData: '0x0257179264389b814a946f3e92105513705ca6b990', exchangeAddress: '0x12459c951127e0c374ff9105dda097662a027093', -- cgit v1.2.3