Skip to content

Commit 4d3ce87

Browse files
committed
Refactor WaitingForWallet component to use tonConnectInstance for disconnection
1 parent d0da545 commit 4d3ce87

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/components/SwapButton/WaitingForWallet.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
import { useTonWallet } from "@tonconnect/ui-react";
21
import { ImSpinner8 } from "react-icons/im";
32
import { useThemeStore } from "../../store/theme.store";
43
import { IoClose } from "react-icons/io5";
54
import { ModalState, useSwapStore } from "../../store/swap.store";
65
import "./WaitingForWallet.scss";
76
import { motion } from "framer-motion";
7+
import { useOptionsStore } from "../../store/options.store";
88

99
const WaitingForWallet = () => {
10-
const wallet = useTonWallet();
10+
const { tonConnectInstance } = useOptionsStore();
1111
const { setModalState } = useSwapStore();
1212

1313
const handleCloseModal = () => {
@@ -28,7 +28,8 @@ const WaitingForWallet = () => {
2828
<ImSpinner8 className="animate-spin icon" />
2929
</div>
3030
<div className="loading-text">
31-
Confirm the transaction in {wallet?.device.appName}
31+
Confirm the transaction in{" "}
32+
{tonConnectInstance?.wallet?.device.appName ?? "your Wallet"}
3233
</div>
3334
<p>It will only take a moment</p>
3435
</motion.div>

0 commit comments

Comments
 (0)