@triadxyz/triad-protocol 3.4.2-beta → 3.4.4-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/index.js CHANGED
@@ -111,7 +111,7 @@ class TriadProtocol {
111
111
  */
112
112
  getUserBookOrdersByMarketId(wallet, marketId) {
113
113
  return __awaiter(this, void 0, void 0, function* () {
114
- const orderBook = yield this.program.account.orderBook.fetch((0, pda_1.getOrderBookPDA)(this.program.programId, marketId));
114
+ const orderBook = yield this.program.account.orderBook.fetch((0, pda_1.getOrderBookPDA)(this.program.programId, marketId), this.provider.opts.commitment);
115
115
  const orders = [...orderBook.hypeOrders, ...orderBook.flopOrders];
116
116
  return orders
117
117
  .map((order) => (0, helpers_2.formatBookOrder)(order, marketId))
@@ -143,7 +143,7 @@ class TriadProtocol {
143
143
  getCustomerById(customerId) {
144
144
  return __awaiter(this, void 0, void 0, function* () {
145
145
  const customerPDA = (0, pda_1.getCustomerPDA)(this.program.programId, customerId);
146
- const customer = yield this.program.account.customer.fetch(customerPDA);
146
+ const customer = yield this.program.account.customer.fetch(customerPDA, this.provider.opts.commitment);
147
147
  return (0, helpers_2.formatCustomer)(customer, customerPDA);
148
148
  });
149
149
  }
@@ -172,7 +172,7 @@ class TriadProtocol {
172
172
  getPoolById(poolId) {
173
173
  return __awaiter(this, void 0, void 0, function* () {
174
174
  const poolPDA = (0, pda_1.getPoolPDA)(this.program.programId, poolId);
175
- const response = yield this.program.account.pool.fetch(poolPDA);
175
+ const response = yield this.program.account.pool.fetch(poolPDA, this.provider.opts.commitment);
176
176
  return (0, helpers_1.formatPool)(response, poolPDA);
177
177
  });
178
178
  }
@@ -183,7 +183,7 @@ class TriadProtocol {
183
183
  getMarketById(marketId) {
184
184
  return __awaiter(this, void 0, void 0, function* () {
185
185
  const marketPDA = (0, pda_1.getMarketPDA)(this.program.programId, marketId);
186
- const response = yield this.program.account.marketV2.fetch(marketPDA);
186
+ const response = yield this.program.account.marketV2.fetch(marketPDA, this.provider.opts.commitment);
187
187
  return (0, helpers_1.formatMarket)(response, marketPDA);
188
188
  });
189
189
  }
@@ -193,7 +193,7 @@ class TriadProtocol {
193
193
  */
194
194
  getMarketByAddress(marketAddress) {
195
195
  return __awaiter(this, void 0, void 0, function* () {
196
- const account = yield this.program.account.marketV2.fetch(marketAddress);
196
+ const account = yield this.program.account.marketV2.fetch(marketAddress, this.provider.opts.commitment);
197
197
  return (0, helpers_1.formatMarket)(account, marketAddress);
198
198
  });
199
199
  }
@@ -4548,7 +4548,7 @@
4548
4548
  "type": "u64"
4549
4549
  },
4550
4550
  {
4551
- "name": "total_shares",
4551
+ "name": "shares",
4552
4552
  "type": "u64"
4553
4553
  },
4554
4554
  {
@@ -4626,7 +4626,7 @@
4626
4626
  "type": "u64"
4627
4627
  },
4628
4628
  {
4629
- "name": "total_shares",
4629
+ "name": "shares",
4630
4630
  "type": "u64"
4631
4631
  },
4632
4632
  {
@@ -50,7 +50,7 @@ export type Order = {
50
50
  marketId: string;
51
51
  orderStatus: OrderStatus;
52
52
  price: string;
53
- totalShares: string;
53
+ shares: string;
54
54
  orderType: OrderType;
55
55
  orderDirection: OrderDirection;
56
56
  orderSide: OrderSide;
@@ -5639,7 +5639,7 @@ export type TriadProtocol = {
5639
5639
  type: 'u64';
5640
5640
  },
5641
5641
  {
5642
- name: 'totalShares';
5642
+ name: 'shares';
5643
5643
  type: 'u64';
5644
5644
  },
5645
5645
  {
@@ -5717,7 +5717,7 @@ export type TriadProtocol = {
5717
5717
  type: 'u64';
5718
5718
  },
5719
5719
  {
5720
- name: 'totalShares';
5720
+ name: 'shares';
5721
5721
  type: 'u64';
5722
5722
  },
5723
5723
  {
@@ -114,7 +114,7 @@ const formatOrder = (order) => {
114
114
  orderDirection: (0, exports.getOrderDirection)(order.orderDirection),
115
115
  orderSide: (0, exports.getOrderSide)(order.orderSide),
116
116
  price: order.price.toString(),
117
- totalShares: order.totalShares.toString()
117
+ shares: order.shares.toString()
118
118
  };
119
119
  };
120
120
  exports.formatOrder = formatOrder;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@triadxyz/triad-protocol",
3
- "version": "3.4.2-beta",
3
+ "version": "3.4.4-beta",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",