@triadxyz/triad-protocol 3.0.5-beta → 3.0.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/index.js +4 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -746,7 +746,7 @@ class TriadProtocolClient {
|
|
|
746
746
|
let amountInUSDC = new bn_js_1.default(0);
|
|
747
747
|
if (isTrdPayout) {
|
|
748
748
|
const trdPrice = yield (0, swap_1.getPrice)(constants_1.TRD_MINT.toString());
|
|
749
|
-
const amountInTRD = (amount / trdPrice) * 1.
|
|
749
|
+
const amountInTRD = (amount / trdPrice) * 1.06;
|
|
750
750
|
const { swapIxs, addressLookupTableAccounts: swapAddressLookupTableAccounts, outAmount, setupInstructions } = yield (0, swap_1.swap)({
|
|
751
751
|
connection: this.program.provider.connection,
|
|
752
752
|
wallet: this.program.provider.publicKey.toBase58(),
|
|
@@ -761,9 +761,9 @@ class TriadProtocolClient {
|
|
|
761
761
|
ixs.push(...setupInstructions);
|
|
762
762
|
ixs.push(...swapIxs);
|
|
763
763
|
addressLookupTableAccounts.push(...swapAddressLookupTableAccounts);
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
764
|
+
if (amountInUSDC.lt(new bn_js_1.default(amount * Math.pow(10, this.decimals)))) {
|
|
765
|
+
return;
|
|
766
|
+
}
|
|
767
767
|
}
|
|
768
768
|
const { userTradePDA, userTradeIxs } = yield this.getUserTradeNonce(marketId, Object.keys(direction)[0]);
|
|
769
769
|
if (userTradeIxs.length > 0) {
|