@triadxyz/triad-protocol 2.1.6-beta → 2.1.8-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 +1 -1
- package/dist/utils/swap.js +1 -1
- package/package.json +1 -1
package/dist/trade.js
CHANGED
|
@@ -229,7 +229,7 @@ class Trade {
|
|
|
229
229
|
}
|
|
230
230
|
ixs.push(yield this.program.methods
|
|
231
231
|
.openOrder({
|
|
232
|
-
amount: new bn_js_1.default(
|
|
232
|
+
amount: new bn_js_1.default(amountInTRD),
|
|
233
233
|
direction: direction
|
|
234
234
|
})
|
|
235
235
|
.accounts({
|
package/dist/utils/swap.js
CHANGED
|
@@ -22,7 +22,7 @@ const swap = ({ connection, wallet, inToken, amount }) => __awaiter(void 0, void
|
|
|
22
22
|
throw new Error('Token not found');
|
|
23
23
|
}
|
|
24
24
|
const formattedAmountIn = amount * Math.pow(10, token.decimals);
|
|
25
|
-
const quoteResponse = yield axios_1.default.get(`https://quote-api.jup.ag/v6/quote?inputMint=${inToken}&outputMint=${constants_1.TRD_MINT.toBase58()}&amount=${formattedAmountIn}&slippageBps=
|
|
25
|
+
const quoteResponse = yield axios_1.default.get(`https://quote-api.jup.ag/v6/quote?inputMint=${inToken}&outputMint=${constants_1.TRD_MINT.toBase58()}&amount=${formattedAmountIn}&slippageBps=500`);
|
|
26
26
|
const { data: quoteData } = quoteResponse;
|
|
27
27
|
const swapResponse = yield axios_1.default.post('https://quote-api.jup.ag/v6/swap-instructions', {
|
|
28
28
|
userPublicKey: wallet,
|