@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.cjs
CHANGED
|
@@ -11370,9 +11370,13 @@ const ActionModal = (props) => {
|
|
|
11370
11370
|
const tonConnectUI = useContext(TonConnectUiContext);
|
|
11371
11371
|
const [firstClick, setFirstClick] = createSignal(true);
|
|
11372
11372
|
const [sent, setSent] = createSignal(false);
|
|
11373
|
+
const [signed, setSigned] = createSignal(false);
|
|
11374
|
+
const [canceled, setCanceled] = createSignal(false);
|
|
11373
11375
|
createEffect(() => {
|
|
11374
11376
|
const currentAction = action();
|
|
11375
|
-
setSent(!!currentAction && "sent" in currentAction && currentAction.sent);
|
|
11377
|
+
setSent(!!currentAction && ("sent" in currentAction && currentAction.sent || currentAction.name === "transaction-sent"));
|
|
11378
|
+
setSigned(!!currentAction && ("signed" in currentAction && currentAction.signed || currentAction.name === "data-signed"));
|
|
11379
|
+
setCanceled(!!currentAction && (currentAction.name === "transaction-canceled" || currentAction.name === "sign-data-canceled"));
|
|
11376
11380
|
});
|
|
11377
11381
|
let universalLink;
|
|
11378
11382
|
if ((tonConnectUI == null ? void 0 : tonConnectUI.wallet) && "universalLink" in tonConnectUI.wallet && (tonConnectUI.wallet.openMethod === "universal-link" || sdk.isTelegramUrl(tonConnectUI.wallet.universalLink) && isInTMA())) {
|
|
@@ -11419,7 +11423,7 @@ const ActionModal = (props) => {
|
|
|
11419
11423
|
}
|
|
11420
11424
|
}), createComponent(Show, {
|
|
11421
11425
|
get when() {
|
|
11422
|
-
return !sent() && (props.showButton === "open-wallet" && universalLink || props.showButton !== "open-wallet");
|
|
11426
|
+
return !sent() && !signed() && !canceled() && (props.showButton === "open-wallet" && universalLink || props.showButton !== "open-wallet");
|
|
11423
11427
|
},
|
|
11424
11428
|
get children() {
|
|
11425
11429
|
return createComponent(LoaderButtonStyled, {
|
|
@@ -11432,7 +11436,7 @@ const ActionModal = (props) => {
|
|
|
11432
11436
|
}
|
|
11433
11437
|
}), createComponent(Show, {
|
|
11434
11438
|
get when() {
|
|
11435
|
-
return sent();
|
|
11439
|
+
return sent() || signed();
|
|
11436
11440
|
},
|
|
11437
11441
|
get children() {
|
|
11438
11442
|
return [createComponent(Show, {
|
|
@@ -11515,6 +11519,7 @@ const TransactionSentModal = (props) => {
|
|
|
11515
11519
|
size: "m"
|
|
11516
11520
|
});
|
|
11517
11521
|
},
|
|
11522
|
+
showButton: "open-wallet",
|
|
11518
11523
|
onClose: () => props.onClose(),
|
|
11519
11524
|
"data-tc-transaction-sent-modal": "true"
|
|
11520
11525
|
});
|
|
@@ -12152,7 +12157,7 @@ class TonConnectUITracker {
|
|
|
12152
12157
|
}
|
|
12153
12158
|
}
|
|
12154
12159
|
}
|
|
12155
|
-
const tonConnectUiVersion = "2.2.0
|
|
12160
|
+
const tonConnectUiVersion = "2.2.0";
|
|
12156
12161
|
class TonConnectUI {
|
|
12157
12162
|
constructor(options) {
|
|
12158
12163
|
__publicField(this, "walletInfoStorage", new WalletInfoStorage());
|