@orderly.network/default-solana-adapter 2.11.0 → 2.11.1

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.mts CHANGED
@@ -10,7 +10,7 @@ declare global {
10
10
  };
11
11
  }
12
12
  }
13
- declare const _default: "2.11.0";
13
+ declare const _default: "2.11.1";
14
14
 
15
15
  interface SolanaAdapterOption {
16
16
  provider: SolanaWalletProvider;
package/dist/index.d.ts CHANGED
@@ -10,7 +10,7 @@ declare global {
10
10
  };
11
11
  }
12
12
  }
13
- declare const _default: "2.11.0";
13
+ declare const _default: "2.11.1";
14
14
 
15
15
  interface SolanaAdapterOption {
16
16
  provider: SolanaWalletProvider;
package/dist/index.js CHANGED
@@ -76,9 +76,9 @@ module.exports = __toCommonJS(index_exports);
76
76
  // src/version.ts
77
77
  if (typeof window !== "undefined") {
78
78
  window.__ORDERLY_VERSION__ = window.__ORDERLY_VERSION__ || {};
79
- window.__ORDERLY_VERSION__["@orderly.network/default-solana-adapter"] = "2.11.0";
79
+ window.__ORDERLY_VERSION__["@orderly.network/default-solana-adapter"] = "2.11.1";
80
80
  }
81
- var version_default = "2.11.0";
81
+ var version_default = "2.11.1";
82
82
 
83
83
  // src/walletAdapter.ts
84
84
  var ed = __toESM(require("@noble/ed25519"));
@@ -3576,12 +3576,23 @@ var DefaultSolanaWalletAdapter = class extends import_core2.BaseWalletAdapter {
3576
3576
  const userTokenAccounts = tokenPublicKeys.map(
3577
3577
  (tokenPublicKey) => getTokenAccounts(tokenPublicKey, userPublicKey)
3578
3578
  );
3579
- const tokenAmount = yield (0, import_spl_token2.getMultipleAccounts)(
3580
- connection,
3581
- userTokenAccounts,
3582
- "confirmed"
3579
+ splTokenBalances = yield Promise.all(
3580
+ userTokenAccounts.map((account) => __async(this, null, function* () {
3581
+ try {
3582
+ const tokenAccount = yield (0, import_spl_token2.getAccount)(
3583
+ connection,
3584
+ account,
3585
+ "confirmed"
3586
+ );
3587
+ return tokenAccount.amount;
3588
+ } catch (err) {
3589
+ if ((err == null ? void 0 : err.name) === "TokenAccountNotFoundError") {
3590
+ return /* @__PURE__ */ BigInt("0");
3591
+ }
3592
+ throw err;
3593
+ }
3594
+ }))
3583
3595
  );
3584
- splTokenBalances = tokenAmount.map((item) => item.amount);
3585
3596
  }
3586
3597
  const results = [];
3587
3598
  let splIndex = 0;