@triadxyz/triad-protocol 1.7.0-beta → 1.7.2-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
@@ -24,7 +24,7 @@ const trade_2 = require("./utils/pda/trade");
24
24
  class TriadProtocolClient {
25
25
  constructor(connection, wallet) {
26
26
  this.provider = new anchor_1.AnchorProvider(connection, wallet, {
27
- commitment: 'processed'
27
+ commitment: 'confirmed'
28
28
  });
29
29
  this.program = new anchor_1.Program(idl_triad_protocol_json_1.default, this.provider);
30
30
  this.trade = new trade_1.default(this.program, this.provider);
package/dist/stake.js CHANGED
@@ -51,14 +51,8 @@ class Stake {
51
51
  */
52
52
  getUserStakes(wallet) {
53
53
  return __awaiter(this, void 0, void 0, function* () {
54
- const response = yield this.program.account.stakeV2.all([
55
- {
56
- memcmp: {
57
- offset: 8 + 1,
58
- bytes: wallet.toBase58()
59
- }
60
- }
61
- ]);
54
+ const stakes = yield this.program.account.stakeV2.all();
55
+ const response = stakes.filter((stake) => stake.account.authority.toBase58() === wallet.toBase58());
62
56
  return response.map((stake) => (0, helpers_1.formatStake)(stake.account));
63
57
  });
64
58
  }
package/dist/trade.d.ts CHANGED
@@ -130,7 +130,7 @@ export default class Trade {
130
130
  * @param options - RPC options
131
131
  *
132
132
  */
133
- createMarket({ marketId, startTime, endTime, question, feeBps, customer }: CreateMarketArgs, options?: RpcOptions): Promise<string>;
133
+ createMarket({ marketId, startTime, endTime, question, feeBps, customer, }: CreateMarketArgs, options?: RpcOptions): Promise<string>;
134
134
  /**
135
135
  * Get User Trade Nonce With Slots
136
136
  * @param userTrades - User Trades
package/dist/trade.js CHANGED
@@ -114,7 +114,7 @@ class Trade {
114
114
  * @param options - RPC options
115
115
  *
116
116
  */
117
- createMarket({ marketId, startTime, endTime, question, feeBps, customer }, options) {
117
+ createMarket({ marketId, startTime, endTime, question, feeBps, customer, }, options) {
118
118
  return __awaiter(this, void 0, void 0, function* () {
119
119
  if (question.length > 80) {
120
120
  throw new Error('Question must be less than 80 characters');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@triadxyz/triad-protocol",
3
- "version": "1.7.0-beta",
3
+ "version": "1.7.2-beta",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",