diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-09-05 05:44:56 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-09-05 05:44:56 +0800 |
commit | 33a45fa7393c8a4c07c5673cf40d501643e505d5 (patch) | |
tree | 415843798a55ccfb06174002a9b0e78966289bb9 /packages/connect | |
parent | 3524efc41cacbd1de8f7006d231e21b9f55f2509 (diff) | |
download | dexon-sol-tools-33a45fa7393c8a4c07c5673cf40d501643e505d5.tar dexon-sol-tools-33a45fa7393c8a4c07c5673cf40d501643e505d5.tar.gz dexon-sol-tools-33a45fa7393c8a4c07c5673cf40d501643e505d5.tar.bz2 dexon-sol-tools-33a45fa7393c8a4c07c5673cf40d501643e505d5.tar.lz dexon-sol-tools-33a45fa7393c8a4c07c5673cf40d501643e505d5.tar.xz dexon-sol-tools-33a45fa7393c8a4c07c5673cf40d501643e505d5.tar.zst dexon-sol-tools-33a45fa7393c8a4c07c5673cf40d501643e505d5.zip |
Use BigNumber instead of string where appropriate in OrderConfigRequest
Diffstat (limited to 'packages/connect')
-rw-r--r-- | packages/connect/src/types.ts | 6 | ||||
-rw-r--r-- | 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<T> { 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', |