@orderly.network/default-solana-adapter 3.1.4 → 3.1.5

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.mjs CHANGED
@@ -42,9 +42,9 @@ var __async = (__this, __arguments, generator) => {
42
42
  // src/version.ts
43
43
  if (typeof window !== "undefined") {
44
44
  window.__ORDERLY_VERSION__ = window.__ORDERLY_VERSION__ || {};
45
- window.__ORDERLY_VERSION__["@orderly.network/default-solana-adapter"] = "3.1.4";
45
+ window.__ORDERLY_VERSION__["@orderly.network/default-solana-adapter"] = "3.1.5";
46
46
  }
47
- var version_default = "3.1.4";
47
+ var version_default = "3.1.5";
48
48
 
49
49
  // src/walletAdapter.ts
50
50
  import * as ed from "@noble/ed25519";
@@ -2611,6 +2611,30 @@ function appendThreeDvnQuoteRemainingAccounts(priceFeedPda) {
2611
2611
  ...priceFeedPair()
2612
2612
  ];
2613
2613
  }
2614
+ function appendOneDvnQuoteRemainingAccounts(priceFeedPda) {
2615
+ return [
2616
+ {
2617
+ pubkey: LZ_DVN_PROGRAM_ID,
2618
+ isWritable: false,
2619
+ isSigner: false
2620
+ },
2621
+ {
2622
+ pubkey: LZ_DVN_PDA,
2623
+ isWritable: false,
2624
+ isSigner: false
2625
+ },
2626
+ {
2627
+ pubkey: PRICE_FEED_PROGRAM_ID,
2628
+ isWritable: false,
2629
+ isSigner: false
2630
+ },
2631
+ {
2632
+ pubkey: priceFeedPda,
2633
+ isWritable: false,
2634
+ isSigner: false
2635
+ }
2636
+ ];
2637
+ }
2614
2638
  function appendThreeDvnDepositRemainingAccounts(priceFeedPda) {
2615
2639
  const priceFeedPair = () => [
2616
2640
  {
@@ -2660,6 +2684,42 @@ function appendThreeDvnDepositRemainingAccounts(priceFeedPda) {
2660
2684
  ...priceFeedPair()
2661
2685
  ];
2662
2686
  }
2687
+ function appendOneDvnDepositRemainingAccounts(priceFeedPda) {
2688
+ return [
2689
+ {
2690
+ pubkey: LZ_DVN_PROGRAM_ID,
2691
+ isWritable: false,
2692
+ isSigner: false
2693
+ },
2694
+ {
2695
+ pubkey: LZ_DVN_PDA,
2696
+ isWritable: true,
2697
+ isSigner: false
2698
+ },
2699
+ {
2700
+ pubkey: PRICE_FEED_PROGRAM_ID,
2701
+ isWritable: false,
2702
+ isSigner: false
2703
+ },
2704
+ {
2705
+ pubkey: priceFeedPda,
2706
+ isWritable: false,
2707
+ isSigner: false
2708
+ }
2709
+ ];
2710
+ }
2711
+ function appendDvnQuoteRemainingAccounts(programId, priceFeedPda) {
2712
+ if (programId.toBase58() === MAINNET_OAPP_PROGRAM_ID.toBase58()) {
2713
+ return appendThreeDvnQuoteRemainingAccounts(priceFeedPda);
2714
+ }
2715
+ return appendOneDvnQuoteRemainingAccounts(priceFeedPda);
2716
+ }
2717
+ function appendDvnDepositRemainingAccounts(programId, priceFeedPda) {
2718
+ if (programId.toBase58() === MAINNET_OAPP_PROGRAM_ID.toBase58()) {
2719
+ return appendThreeDvnDepositRemainingAccounts(priceFeedPda);
2720
+ }
2721
+ return appendOneDvnDepositRemainingAccounts(priceFeedPda);
2722
+ }
2663
2723
  function getDstEID(OAPP_PROGRAM_ID) {
2664
2724
  if (OAPP_PROGRAM_ID.toBase58() === MAINNET_OAPP_PROGRAM_ID.toBase58()) {
2665
2725
  return MAIN_DST_EID;
@@ -3075,7 +3135,7 @@ function getDepositQuoteFee(_0) {
3075
3135
  isWritable: false,
3076
3136
  isSigner: false
3077
3137
  },
3078
- ...appendThreeDvnQuoteRemainingAccounts(priceFeedPDA)
3138
+ ...appendDvnQuoteRemainingAccounts(appProgramId, priceFeedPDA)
3079
3139
  ]).instruction();
3080
3140
  const lastBlockHash = yield connection.getLatestBlockhash();
3081
3141
  const lookupTableAddress = getLookupTableAddress(appProgramId);
@@ -3306,7 +3366,7 @@ function deposit(_0) {
3306
3366
  // 17
3307
3367
  pubkey: priceFeedPDA
3308
3368
  },
3309
- ...appendThreeDvnDepositRemainingAccounts(priceFeedPDA)
3369
+ ...appendDvnDepositRemainingAccounts(appProgramId, priceFeedPDA)
3310
3370
  ];
3311
3371
  const fee = yield getDepositQuoteFee({
3312
3372
  vaultAddress,