@tonconnect/ui 2.0.10-beta.0 → 2.0.10-beta.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/tonconnect-ui.min.js +3 -3
- package/dist/tonconnect-ui.min.js.map +1 -1
- package/lib/index.cjs +10 -2
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.ts +5 -0
- package/lib/index.mjs +10 -2
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.cjs
CHANGED
|
@@ -8136,7 +8136,7 @@ function uiWalletToWalletInfo(uiWallet) {
|
|
|
8136
8136
|
return uiWallet;
|
|
8137
8137
|
}
|
|
8138
8138
|
function applyWalletsListConfiguration(walletsList, configuration) {
|
|
8139
|
-
var _a2;
|
|
8139
|
+
var _a2, _b2;
|
|
8140
8140
|
if (!configuration) {
|
|
8141
8141
|
return walletsList;
|
|
8142
8142
|
}
|
|
@@ -8147,6 +8147,14 @@ function applyWalletsListConfiguration(walletsList, configuration) {
|
|
|
8147
8147
|
configuration.includeWallets.map(uiWalletToWalletInfo)
|
|
8148
8148
|
);
|
|
8149
8149
|
}
|
|
8150
|
+
if ((_b2 = configuration.customOrder) == null ? void 0 : _b2.length) {
|
|
8151
|
+
const uniqueOrderedNames = [...new Set(configuration.customOrder)];
|
|
8152
|
+
const customOrderedWallets = uniqueOrderedNames.map((orderedName) => walletsList.find((wallet) => wallet.appName === orderedName)).filter((wallet) => wallet !== void 0);
|
|
8153
|
+
const remainingWallets = walletsList.filter(
|
|
8154
|
+
(wallet) => !uniqueOrderedNames.includes(wallet.appName)
|
|
8155
|
+
);
|
|
8156
|
+
walletsList = [...customOrderedWallets, ...remainingWallets];
|
|
8157
|
+
}
|
|
8150
8158
|
return walletsList;
|
|
8151
8159
|
}
|
|
8152
8160
|
function supportsDesktop(walletInfo) {
|
|
@@ -10964,7 +10972,7 @@ class TonConnectUITracker {
|
|
|
10964
10972
|
}
|
|
10965
10973
|
}
|
|
10966
10974
|
}
|
|
10967
|
-
const tonConnectUiVersion = "2.0.10-beta.
|
|
10975
|
+
const tonConnectUiVersion = "2.0.10-beta.1";
|
|
10968
10976
|
class TonConnectUI {
|
|
10969
10977
|
constructor(options) {
|
|
10970
10978
|
__publicField(this, "walletInfoStorage", new WalletInfoStorage());
|