@tonconnect/ui 2.2.0-beta.0 → 2.2.0
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 +33 -33
- package/dist/tonconnect-ui.min.js.map +1 -1
- package/lib/index.cjs +9 -4
- package/lib/index.cjs.map +1 -1
- package/lib/index.mjs +9 -4
- package/lib/index.mjs.map +1 -1
- package/package.json +2 -2
package/lib/index.mjs
CHANGED
|
@@ -11365,9 +11365,13 @@ const ActionModal = (props) => {
|
|
|
11365
11365
|
const tonConnectUI = useContext(TonConnectUiContext);
|
|
11366
11366
|
const [firstClick, setFirstClick] = createSignal(true);
|
|
11367
11367
|
const [sent, setSent] = createSignal(false);
|
|
11368
|
+
const [signed, setSigned] = createSignal(false);
|
|
11369
|
+
const [canceled, setCanceled] = createSignal(false);
|
|
11368
11370
|
createEffect(() => {
|
|
11369
11371
|
const currentAction = action();
|
|
11370
|
-
setSent(!!currentAction && "sent" in currentAction && currentAction.sent);
|
|
11372
|
+
setSent(!!currentAction && ("sent" in currentAction && currentAction.sent || currentAction.name === "transaction-sent"));
|
|
11373
|
+
setSigned(!!currentAction && ("signed" in currentAction && currentAction.signed || currentAction.name === "data-signed"));
|
|
11374
|
+
setCanceled(!!currentAction && (currentAction.name === "transaction-canceled" || currentAction.name === "sign-data-canceled"));
|
|
11371
11375
|
});
|
|
11372
11376
|
let universalLink;
|
|
11373
11377
|
if ((tonConnectUI == null ? void 0 : tonConnectUI.wallet) && "universalLink" in tonConnectUI.wallet && (tonConnectUI.wallet.openMethod === "universal-link" || isTelegramUrl(tonConnectUI.wallet.universalLink) && isInTMA())) {
|
|
@@ -11414,7 +11418,7 @@ const ActionModal = (props) => {
|
|
|
11414
11418
|
}
|
|
11415
11419
|
}), createComponent(Show, {
|
|
11416
11420
|
get when() {
|
|
11417
|
-
return !sent() && (props.showButton === "open-wallet" && universalLink || props.showButton !== "open-wallet");
|
|
11421
|
+
return !sent() && !signed() && !canceled() && (props.showButton === "open-wallet" && universalLink || props.showButton !== "open-wallet");
|
|
11418
11422
|
},
|
|
11419
11423
|
get children() {
|
|
11420
11424
|
return createComponent(LoaderButtonStyled, {
|
|
@@ -11427,7 +11431,7 @@ const ActionModal = (props) => {
|
|
|
11427
11431
|
}
|
|
11428
11432
|
}), createComponent(Show, {
|
|
11429
11433
|
get when() {
|
|
11430
|
-
return sent();
|
|
11434
|
+
return sent() || signed();
|
|
11431
11435
|
},
|
|
11432
11436
|
get children() {
|
|
11433
11437
|
return [createComponent(Show, {
|
|
@@ -11510,6 +11514,7 @@ const TransactionSentModal = (props) => {
|
|
|
11510
11514
|
size: "m"
|
|
11511
11515
|
});
|
|
11512
11516
|
},
|
|
11517
|
+
showButton: "open-wallet",
|
|
11513
11518
|
onClose: () => props.onClose(),
|
|
11514
11519
|
"data-tc-transaction-sent-modal": "true"
|
|
11515
11520
|
});
|
|
@@ -12147,7 +12152,7 @@ class TonConnectUITracker {
|
|
|
12147
12152
|
}
|
|
12148
12153
|
}
|
|
12149
12154
|
}
|
|
12150
|
-
const tonConnectUiVersion = "2.2.0
|
|
12155
|
+
const tonConnectUiVersion = "2.2.0";
|
|
12151
12156
|
class TonConnectUI {
|
|
12152
12157
|
constructor(options) {
|
|
12153
12158
|
__publicField(this, "walletInfoStorage", new WalletInfoStorage());
|