@triadxyz/triad-protocol 2.0.7-beta → 2.0.8-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/trade.d.ts CHANGED
@@ -104,7 +104,7 @@ export default class Trade {
104
104
  waiting: Record<string, never>;
105
105
  });
106
106
  price: BN;
107
- totalAmount: BN;
107
+ padding1: number[];
108
108
  totalShares: BN;
109
109
  orderType: ({
110
110
  limit?: never;
@@ -2556,8 +2556,10 @@
2556
2556
  "type": "u64"
2557
2557
  },
2558
2558
  {
2559
- "name": "total_amount",
2560
- "type": "u64"
2559
+ "name": "padding_1",
2560
+ "type": {
2561
+ "array": ["u8", 8]
2562
+ }
2561
2563
  },
2562
2564
  {
2563
2565
  "name": "total_shares",
@@ -2683,10 +2685,6 @@
2683
2685
  "name": "total_shares",
2684
2686
  "type": "u64"
2685
2687
  },
2686
- {
2687
- "name": "total_amount",
2688
- "type": "u64"
2689
- },
2690
2688
  {
2691
2689
  "name": "user_nonce",
2692
2690
  "type": "u32"
@@ -41,12 +41,11 @@ export type UserTrade = {
41
41
  export type Order = {
42
42
  ts: string;
43
43
  orderId: string;
44
- filledShares: string;
45
44
  marketId: string;
46
45
  orderStatus: OrderStatus;
47
46
  price: string;
48
- totalAmount: string;
49
47
  totalShares: string;
48
+ filledShares: string;
50
49
  orderType: OrderType;
51
50
  orderDirection: OrderDirection;
52
51
  orderSide: OrderSide;
@@ -3277,8 +3277,10 @@ export type TriadProtocol = {
3277
3277
  type: 'u64';
3278
3278
  },
3279
3279
  {
3280
- name: 'totalAmount';
3281
- type: 'u64';
3280
+ name: 'padding1';
3281
+ type: {
3282
+ array: ['u8', 8];
3283
+ };
3282
3284
  },
3283
3285
  {
3284
3286
  name: 'totalShares';
@@ -3404,10 +3406,6 @@ export type TriadProtocol = {
3404
3406
  name: 'totalShares';
3405
3407
  type: 'u64';
3406
3408
  },
3407
- {
3408
- name: 'totalAmount';
3409
- type: 'u64';
3410
- },
3411
3409
  {
3412
3410
  name: 'userNonce';
3413
3411
  type: 'u32';
@@ -102,23 +102,22 @@ exports.formatUserTrade = formatUserTrade;
102
102
  const formatOrder = (order, authority) => {
103
103
  return {
104
104
  ts: order.ts.toString(),
105
+ authority: authority ? authority : '',
106
+ userNonce: order.userNonce.toString(),
107
+ createdAt: order.createdAt ? order.createdAt.toString() : '',
105
108
  orderId: order.orderId.toString(),
106
109
  marketId: order.marketId.toString(),
107
110
  orderStatus: (0, exports.getOrderStatus)(order.orderStatus),
108
- price: order.price.toString(),
109
- totalAmount: order.totalAmount.toString(),
110
- totalShares: order.totalShares.toString(),
111
111
  orderType: (0, exports.getOrderType)(order.orderType),
112
112
  orderDirection: (0, exports.getOrderDirection)(order.orderDirection),
113
113
  orderSide: (0, exports.getOrderSide)(order.orderSide),
114
- userNonce: order.userNonce.toString(),
114
+ price: order.price.toString(),
115
+ totalShares: order.totalShares.toString(),
116
+ filledShares: order.filledShares ? order.filledShares.toString() : '',
115
117
  linkedOrderId: order.linkedOrderId ? order.linkedOrderId.toString() : '',
116
118
  linkedBidOrderId: order.linkedBidOrderId
117
119
  ? order.linkedBidOrderId.toString()
118
- : '',
119
- filledShares: order.filledShares ? order.filledShares.toString() : '',
120
- authority: authority ? authority : '',
121
- createdAt: order.createdAt ? order.createdAt.toString() : ''
120
+ : ''
122
121
  };
123
122
  };
124
123
  exports.formatOrder = formatOrder;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@triadxyz/triad-protocol",
3
- "version": "2.0.7-beta",
3
+ "version": "2.0.8-beta",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",