@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);
|