aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-02-07 22:02:41 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-02-07 22:02:41 +0800
commit1c9428cbba873fe8d5bd18b2cb10522cbdb17a3f (patch)
tree23da49f5ad132e4e9f623e1da6a5fcd02e2d8c9c /packages/website
parent18dc5d17b552f03294c6ea13ae0d2cdcc72ac0fd (diff)
downloaddexon-sol-tools-1c9428cbba873fe8d5bd18b2cb10522cbdb17a3f.tar
dexon-sol-tools-1c9428cbba873fe8d5bd18b2cb10522cbdb17a3f.tar.gz
dexon-sol-tools-1c9428cbba873fe8d5bd18b2cb10522cbdb17a3f.tar.bz2
dexon-sol-tools-1c9428cbba873fe8d5bd18b2cb10522cbdb17a3f.tar.lz
dexon-sol-tools-1c9428cbba873fe8d5bd18b2cb10522cbdb17a3f.tar.xz
dexon-sol-tools-1c9428cbba873fe8d5bd18b2cb10522cbdb17a3f.tar.zst
dexon-sol-tools-1c9428cbba873fe8d5bd18b2cb10522cbdb17a3f.zip
Move .taker.feeAmount to .takerFee and .maker.feeAmount to .makerFee
Diffstat (limited to 'packages/website')
-rw-r--r--packages/website/ts/components/fill_order.tsx12
-rw-r--r--packages/website/ts/schemas/order_schema.ts4
-rw-r--r--packages/website/ts/schemas/order_taker_schema.ts3
-rw-r--r--packages/website/ts/types.ts12
-rw-r--r--packages/website/ts/utils/utils.ts4
5 files changed, 23 insertions, 12 deletions
diff --git a/packages/website/ts/components/fill_order.tsx b/packages/website/ts/components/fill_order.tsx
index 33c88f61e..7cef247a3 100644
--- a/packages/website/ts/components/fill_order.tsx
+++ b/packages/website/ts/components/fill_order.tsx
@@ -418,8 +418,8 @@ export class FillOrder extends React.Component<FillOrderProps, FillOrderState> {
const takerAmount = new BigNumber(parsedOrder.taker.amount);
const expiration = new BigNumber(parsedOrder.expirationUnixTimestampSec);
const salt = new BigNumber(parsedOrder.salt);
- const parsedMakerFee = new BigNumber(parsedOrder.maker.feeAmount);
- const parsedTakerFee = new BigNumber(parsedOrder.taker.feeAmount);
+ const parsedMakerFee = new BigNumber(parsedOrder.makerFee);
+ const parsedTakerFee = new BigNumber(parsedOrder.takerFee);
const zeroExOrder: ZeroExOrder = {
exchangeContractAddress: parsedOrder.exchangeContractAddress,
@@ -536,8 +536,8 @@ export class FillOrder extends React.Component<FillOrderProps, FillOrderState> {
parsedOrder.taker.token.address,
new BigNumber(parsedOrder.maker.amount),
new BigNumber(parsedOrder.taker.amount),
- new BigNumber(parsedOrder.maker.feeAmount),
- new BigNumber(parsedOrder.taker.feeAmount),
+ new BigNumber(parsedOrder.makerFee),
+ new BigNumber(parsedOrder.takerFee),
new BigNumber(this.state.parsedOrder.expirationUnixTimestampSec),
parsedOrder.feeRecipient,
parsedOrder.ecSignature,
@@ -639,8 +639,8 @@ export class FillOrder extends React.Component<FillOrderProps, FillOrderState> {
parsedOrder.taker.token.address,
new BigNumber(parsedOrder.maker.amount),
takerTokenAmount,
- new BigNumber(parsedOrder.maker.feeAmount),
- new BigNumber(parsedOrder.taker.feeAmount),
+ new BigNumber(parsedOrder.makerFee),
+ new BigNumber(parsedOrder.takerFee),
new BigNumber(this.state.parsedOrder.expirationUnixTimestampSec),
parsedOrder.feeRecipient,
parsedOrder.ecSignature,
diff --git a/packages/website/ts/schemas/order_schema.ts b/packages/website/ts/schemas/order_schema.ts
index 430f707da..e69891df1 100644
--- a/packages/website/ts/schemas/order_schema.ts
+++ b/packages/website/ts/schemas/order_schema.ts
@@ -3,6 +3,8 @@ export const orderSchema = {
properties: {
maker: { $ref: '/OrderTaker' },
taker: { $ref: '/OrderTaker' },
+ makerFee: { type: 'string' },
+ takerFee: { type: 'string' },
salt: { type: 'string' },
ecSignature: { $ref: '/SignatureData' },
expirationUnixTimestampSec: { type: 'string' },
@@ -13,6 +15,8 @@ export const orderSchema = {
required: [
'maker',
'taker',
+ 'makerFee',
+ 'takerFee',
'salt',
'ecSignature',
'expirationUnixTimestampSec',
diff --git a/packages/website/ts/schemas/order_taker_schema.ts b/packages/website/ts/schemas/order_taker_schema.ts
index c784c29c5..c8d56a417 100644
--- a/packages/website/ts/schemas/order_taker_schema.ts
+++ b/packages/website/ts/schemas/order_taker_schema.ts
@@ -4,8 +4,7 @@ export const orderTakerSchema = {
address: { type: 'string' },
token: { $ref: '/Token' },
amount: { type: 'string' },
- feeAmount: { type: 'string' },
},
- required: ['address', 'token', 'amount', 'feeAmount'],
+ required: ['address', 'token', 'amount'],
type: 'object',
};
diff --git a/packages/website/ts/types.ts b/packages/website/ts/types.ts
index dad2e734f..28822d484 100644
--- a/packages/website/ts/types.ts
+++ b/packages/website/ts/types.ts
@@ -80,9 +80,17 @@ export interface Order {
networkId: number;
}
+export interface SerializedOrderParty {
+ address: string;
+ token: OrderToken;
+ amount: string;
+}
+
export interface SerializedOrder {
- maker: OrderParty;
- taker: OrderParty;
+ maker: SerializedOrderParty;
+ taker: SerializedOrderParty;
+ makerFee: string;
+ takerFee: string;
expirationUnixTimestampSec: string;
feeRecipient: string;
salt: string;
diff --git a/packages/website/ts/utils/utils.ts b/packages/website/ts/utils/utils.ts
index 7204586c6..b615ba646 100644
--- a/packages/website/ts/utils/utils.ts
+++ b/packages/website/ts/utils/utils.ts
@@ -75,6 +75,8 @@ export const utils = {
const makerToken = tokenByAddress[sideToAssetToken[Side.Deposit].address];
const takerToken = tokenByAddress[sideToAssetToken[Side.Receive].address];
const order = {
+ makerFee: makerFee.toString(),
+ takerFee: takerFee.toString(),
maker: {
address: orderMakerAddress,
token: {
@@ -84,7 +86,6 @@ export const utils = {
address: makerToken.address,
},
amount: sideToAssetToken[Side.Deposit].amount.toString(),
- feeAmount: makerFee.toString(),
},
taker: {
address: orderTakerAddress,
@@ -95,7 +96,6 @@ export const utils = {
address: takerToken.address,
},
amount: sideToAssetToken[Side.Receive].amount.toString(),
- feeAmount: takerFee.toString(),
},
expirationUnixTimestampSec: expirationUnixTimestampSec.toString(),
feeRecipient,