@triadxyz/triad-protocol 2.8.8-beta → 2.9.0-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 CHANGED
@@ -430,7 +430,7 @@ export default class TriadProtocolClient {
430
430
  *
431
431
  * @param options - RPC options
432
432
  */
433
- marketBidOrder({ marketId, amount, direction, mint, feeBps, isTrdPayout }: MarketBidOrderArgs, options?: RpcOptions): Promise<void>;
433
+ marketBidOrder({ marketId, amount, direction, mint, feeBps, isTrdPayout }: MarketBidOrderArgs, options?: RpcOptions): Promise<string>;
434
434
  /**
435
435
  * Market Ask Order
436
436
  * @param args.marketId - The ID of the Market
package/dist/index.js CHANGED
@@ -975,12 +975,7 @@ class TriadProtocolClient {
975
975
  if (ixs.length === 0) {
976
976
  throw new Error('No matching orders found to fill the requested amount');
977
977
  }
978
- // return sendVersionedTransaction(
979
- // this.program,
980
- // ixs,
981
- // options,
982
- // addressLookupTableAccounts
983
- // )
978
+ return (0, sendVersionedTransaction_1.default)(this.program, ixs, options, addressLookupTableAccounts);
984
979
  });
985
980
  }
986
981
  /**
@@ -1051,6 +1046,7 @@ class TriadProtocolClient {
1051
1046
  .instruction());
1052
1047
  }
1053
1048
  }
1049
+ console.log('amountOfUSDC', amountOfUSDC.toNumber());
1054
1050
  if (isTrdPayout) {
1055
1051
  const { setupInstructions, swapIxs, addressLookupTableAccounts: swapAddressLookupTableAccounts } = yield (0, swap_1.swap)({
1056
1052
  connection: this.program.provider.connection,
@@ -24,7 +24,7 @@ const swap = ({ connection, wallet, inToken, outToken, amount }) => __awaiter(vo
24
24
  throw new Error('Token not found');
25
25
  }
26
26
  const formattedAmountIn = amount * Math.pow(10, token.decimals);
27
- const quoteResponse = yield axios_1.default.get(`https://lite-api.jup.ag/swap/v1/quote?inputMint=${inToken}&outputMint=${outToken}&amount=${formattedAmountIn}&slippageBps=20&onlyDirectRoutes=true&platformFeeBps=60`);
27
+ const quoteResponse = yield axios_1.default.get(`https://lite-api.jup.ag/swap/v1/quote?inputMint=${inToken}&outputMint=${outToken}&amount=${formattedAmountIn}&slippageBps=50&onlyDirectRoutes=true&platformFeeBps=60`);
28
28
  const { data: quoteData } = quoteResponse;
29
29
  const swapResponse = yield axios_1.default.post('https://lite-api.jup.ag/swap/v1/swap-instructions', {
30
30
  quoteResponse: quoteData,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@triadxyz/triad-protocol",
3
- "version": "2.8.8-beta",
3
+ "version": "2.9.0-beta",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",