@triadxyz/triad-protocol 3.4.3-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.
Files changed (2) hide show
  1. package/dist/index.js +5 -5
  2. package/package.json +1 -1
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@triadxyz/triad-protocol",
3
- "version": "3.4.3-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",