@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 +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +18 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +19 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
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.
|
|
79
|
+
window.__ORDERLY_VERSION__["@orderly.network/default-solana-adapter"] = "2.11.1";
|
|
80
80
|
}
|
|
81
|
-
var version_default = "2.11.
|
|
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
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
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;
|