@triadxyz/triad-protocol 2.2.6-beta → 2.2.7-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.js CHANGED
@@ -127,6 +127,11 @@ class Trade {
127
127
  if (poolId) {
128
128
  poolPDA = (0, pda_1.getPoolPDA)(this.program.programId, poolId);
129
129
  }
130
+ let userTrade = null;
131
+ try {
132
+ userTrade = yield this.getUserTrade(this.program.provider.publicKey);
133
+ }
134
+ catch (_a) { }
130
135
  ixs.push(yield this.program.methods
131
136
  .createMarket({
132
137
  marketId: new bn_js_1.default(marketId),
@@ -141,7 +146,8 @@ class Trade {
141
146
  mint,
142
147
  tokenProgram: (0, helpers_1.getTokenProgram)(mint),
143
148
  customer,
144
- pool: poolPDA
149
+ pool: poolPDA,
150
+ userTrade
145
151
  })
146
152
  .instruction());
147
153
  return (0, sendVersionedTransaction_1.default)(this.program, ixs, options);
@@ -1083,6 +1083,11 @@
1083
1083
  "writable": true,
1084
1084
  "optional": true
1085
1085
  },
1086
+ {
1087
+ "name": "user_trade",
1088
+ "writable": true,
1089
+ "optional": true
1090
+ },
1086
1091
  {
1087
1092
  "name": "pool",
1088
1093
  "writable": true,
@@ -1652,6 +1652,11 @@ export type TriadProtocol = {
1652
1652
  writable: true;
1653
1653
  optional: true;
1654
1654
  },
1655
+ {
1656
+ name: 'userTrade';
1657
+ writable: true;
1658
+ optional: true;
1659
+ },
1655
1660
  {
1656
1661
  name: 'pool';
1657
1662
  writable: true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@triadxyz/triad-protocol",
3
- "version": "2.2.6-beta",
3
+ "version": "2.2.7-beta",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",