diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-02-08 03:26:13 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-02-08 03:26:13 +0800 |
commit | 69f5f5e94627458f4eb41f4150cfa3d140658d09 (patch) | |
tree | 233be0fd8343ebd92143103f1ae421ad1aae70f2 /packages/website/ts/utils/utils.ts | |
parent | ae14b0a71d70f057efb9cbd4d180aca76a3ad5d1 (diff) | |
download | dexon-0x-contracts-69f5f5e94627458f4eb41f4150cfa3d140658d09.tar dexon-0x-contracts-69f5f5e94627458f4eb41f4150cfa3d140658d09.tar.gz dexon-0x-contracts-69f5f5e94627458f4eb41f4150cfa3d140658d09.tar.bz2 dexon-0x-contracts-69f5f5e94627458f4eb41f4150cfa3d140658d09.tar.lz dexon-0x-contracts-69f5f5e94627458f4eb41f4150cfa3d140658d09.tar.xz dexon-0x-contracts-69f5f5e94627458f4eb41f4150cfa3d140658d09.tar.zst dexon-0x-contracts-69f5f5e94627458f4eb41f4150cfa3d140658d09.zip |
Split Order into signedOrder and metadata
Diffstat (limited to 'packages/website/ts/utils/utils.ts')
-rw-r--r-- | packages/website/ts/utils/utils.ts | 48 |
1 files changed, 26 insertions, 22 deletions
diff --git a/packages/website/ts/utils/utils.ts b/packages/website/ts/utils/utils.ts index 2f1b2cce3..279b2c1b2 100644 --- a/packages/website/ts/utils/utils.ts +++ b/packages/website/ts/utils/utils.ts @@ -75,30 +75,34 @@ export const utils = { const makerToken = tokenByAddress[sideToAssetToken[Side.Deposit].address]; const takerToken = tokenByAddress[sideToAssetToken[Side.Receive].address]; const order = { - maker: orderMakerAddress, - taker: orderTakerAddress, - makerFee: makerFee.toString(), - takerFee: takerFee.toString(), - makerTokenAmount: sideToAssetToken[Side.Deposit].amount.toString(), - takerTokenAmount: sideToAssetToken[Side.Receive].amount.toString(), - makerTokenAddress: makerToken.address, - takerTokenAddress: takerToken.address, - makerToken: { - name: makerToken.name, - symbol: makerToken.symbol, - decimals: makerToken.decimals, + signedOrder: { + maker: orderMakerAddress, + taker: orderTakerAddress, + makerFee: makerFee.toString(), + takerFee: takerFee.toString(), + makerTokenAmount: sideToAssetToken[Side.Deposit].amount.toString(), + takerTokenAmount: sideToAssetToken[Side.Receive].amount.toString(), + makerTokenAddress: makerToken.address, + takerTokenAddress: takerToken.address, + expirationUnixTimestampSec: expirationUnixTimestampSec.toString(), + feeRecipient, + salt: orderSalt.toString(), + ecSignature, + exchangeContractAddress, }, - takerToken: { - name: takerToken.name, - symbol: takerToken.symbol, - decimals: takerToken.decimals, + metadata: { + networkId, + makerToken: { + name: makerToken.name, + symbol: makerToken.symbol, + decimals: makerToken.decimals, + }, + takerToken: { + name: takerToken.name, + symbol: takerToken.symbol, + decimals: takerToken.decimals, + }, }, - expirationUnixTimestampSec: expirationUnixTimestampSec.toString(), - feeRecipient, - salt: orderSalt.toString(), - ecSignature, - exchangeContractAddress, - networkId, }; return order; }, |