@triadxyz/triad-protocol 3.0.8-beta → 3.0.9-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.d.ts +1 -0
- package/dist/index.js +3 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -496,8 +496,8 @@ class TriadProtocolClient {
|
|
|
496
496
|
payoutOrder(orders, options) {
|
|
497
497
|
return __awaiter(this, void 0, void 0, function* () {
|
|
498
498
|
const ixs = [];
|
|
499
|
-
if (orders.length >
|
|
500
|
-
throw new Error('Max
|
|
499
|
+
if (orders.length > 6) {
|
|
500
|
+
throw new Error('Max 6 orders per transaction');
|
|
501
501
|
}
|
|
502
502
|
for (const order of orders) {
|
|
503
503
|
ixs.push(yield this.program.methods
|
|
@@ -510,7 +510,7 @@ class TriadProtocolClient {
|
|
|
510
510
|
tokenProgram: (0, helpers_1.getTokenProgram)(order.mint)
|
|
511
511
|
})
|
|
512
512
|
.instruction());
|
|
513
|
-
if (order.isTrdPayout) {
|
|
513
|
+
if (order.isTrdPayout && order.isWinner) {
|
|
514
514
|
const { setupInstructions, swapIxs, addressLookupTableAccounts } = yield (0, swap_1.swap)({
|
|
515
515
|
connection: this.program.provider.connection,
|
|
516
516
|
wallet: this.program.provider.publicKey.toBase58(),
|