@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.d.ts
CHANGED
|
@@ -101,6 +101,11 @@ declare type WalletsListConfiguration = {
|
|
|
101
101
|
* Allows to include extra wallets to the wallets list in the modal.
|
|
102
102
|
*/
|
|
103
103
|
includeWallets?: UIWallet[];
|
|
104
|
+
/**
|
|
105
|
+
* List of wallet IDs to be displayed first in the specified order.
|
|
106
|
+
* Other wallets will be shown below in their original order.
|
|
107
|
+
*/
|
|
108
|
+
customOrder?: string[];
|
|
104
109
|
};
|
|
105
110
|
|
|
106
111
|
/**
|
package/lib/index.mjs
CHANGED
|
@@ -8131,7 +8131,7 @@ function uiWalletToWalletInfo(uiWallet) {
|
|
|
8131
8131
|
return uiWallet;
|
|
8132
8132
|
}
|
|
8133
8133
|
function applyWalletsListConfiguration(walletsList, configuration) {
|
|
8134
|
-
var _a2;
|
|
8134
|
+
var _a2, _b2;
|
|
8135
8135
|
if (!configuration) {
|
|
8136
8136
|
return walletsList;
|
|
8137
8137
|
}
|
|
@@ -8142,6 +8142,14 @@ function applyWalletsListConfiguration(walletsList, configuration) {
|
|
|
8142
8142
|
configuration.includeWallets.map(uiWalletToWalletInfo)
|
|
8143
8143
|
);
|
|
8144
8144
|
}
|
|
8145
|
+
if ((_b2 = configuration.customOrder) == null ? void 0 : _b2.length) {
|
|
8146
|
+
const uniqueOrderedNames = [...new Set(configuration.customOrder)];
|
|
8147
|
+
const customOrderedWallets = uniqueOrderedNames.map((orderedName) => walletsList.find((wallet) => wallet.appName === orderedName)).filter((wallet) => wallet !== void 0);
|
|
8148
|
+
const remainingWallets = walletsList.filter(
|
|
8149
|
+
(wallet) => !uniqueOrderedNames.includes(wallet.appName)
|
|
8150
|
+
);
|
|
8151
|
+
walletsList = [...customOrderedWallets, ...remainingWallets];
|
|
8152
|
+
}
|
|
8145
8153
|
return walletsList;
|
|
8146
8154
|
}
|
|
8147
8155
|
function supportsDesktop(walletInfo) {
|
|
@@ -10959,7 +10967,7 @@ class TonConnectUITracker {
|
|
|
10959
10967
|
}
|
|
10960
10968
|
}
|
|
10961
10969
|
}
|
|
10962
|
-
const tonConnectUiVersion = "2.0.10-beta.
|
|
10970
|
+
const tonConnectUiVersion = "2.0.10-beta.1";
|
|
10963
10971
|
class TonConnectUI {
|
|
10964
10972
|
constructor(options) {
|
|
10965
10973
|
__publicField(this, "walletInfoStorage", new WalletInfoStorage());
|