Skip to content

Commit d807dcd

Browse files
committed
wip: enableClosingConfirmation integration only for Staking flow
1 parent d99833e commit d807dcd

File tree

5 files changed

+4
-8
lines changed

5 files changed

+4
-8
lines changed

src/App.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,6 @@ import theme from "@/styles/theme";
1010

1111
console.log(`You're connected to the ${network} network!`);
1212

13-
const tele = (window as any).Telegram.WebApp;
14-
15-
if (tele) {
16-
tele.ready();
17-
tele.enableClosingConfirmation();
18-
}
19-
2013
const App = () => {
2114
return (
2215
<ThemeProvider theme={theme}>

src/pages/Stake/Amount.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ const Amount = () => {
6363
if (tele) {
6464
tele.ready();
6565
tele.BackButton.show();
66+
tele.enableClosingConfirmation();
6667
tele.onEvent("backButtonClicked", () => navigate("/"));
6768
return () => {
6869
tele.offEvent("backButtonClicked");

src/pages/Stake/Leverage.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ const Leverage = () => {
3939
if (tele) {
4040
tele.ready();
4141
tele.BackButton.show();
42+
tele.enableClosingConfirmation();
4243
tele.onEvent("backButtonClicked", () => {
4344
navigate("/stake/nominator");
4445
});

src/pages/Stake/NFTPreview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import { globalError } from "@/lib/atom/globalError";
2121
import { stakingAtom, stakingInputAtom } from "@/lib/atom/staking";
2222
import { isDevMode } from "@/utils/isDevMode";
2323

24-
2524
const tele = (window as any).Telegram.WebApp;
2625

2726
interface ModalState {
@@ -100,6 +99,7 @@ const NFTPreview = () => {
10099
if (tele) {
101100
tele.ready();
102101
tele.BackButton.show();
102+
tele.enableClosingConfirmation();
103103
tele.onEvent("backButtonClicked", () => {
104104
navigate("/stake/leverage");
105105
});

src/pages/Stake/NominatorList.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ const NominatorList = () => {
4343
if (tele) {
4444
tele.ready();
4545
tele.BackButton.show();
46+
tele.enableClosingConfirmation();
4647
tele.onEvent("backButtonClicked", () => {
4748
navigate("/stake/amount");
4849
});

0 commit comments

Comments
 (0)