diff --git a/.github/workflows/debug.yml b/.github/workflows/debug.yml index 949776026..299f0ee62 100644 --- a/.github/workflows/debug.yml +++ b/.github/workflows/debug.yml @@ -21,7 +21,7 @@ jobs: - name: Build torus-page if: steps.changes.outputs.torus-page == 'true' - run: echo "Building torus-page..." + run: echo "Building torus-page... " # Debug output - name: Show changes diff --git a/apps/torus-wallet/src/app/components/actions/index.tsx b/apps/torus-wallet/src/app/components/actions/index.tsx new file mode 100644 index 000000000..b0e8b0cc9 --- /dev/null +++ b/apps/torus-wallet/src/app/components/actions/index.tsx @@ -0,0 +1,4 @@ +export { SendAction } from "./send" +export { StakeAction } from "./stake" +export { TransferStakeAction } from "./transfer-stake" +export { UnstakeAction } from "./unstake" \ No newline at end of file diff --git a/apps/torus-wallet/src/app/components/actions/receive.tsx b/apps/torus-wallet/src/app/components/actions/receive.tsx deleted file mode 100644 index 611b25fc9..000000000 --- a/apps/torus-wallet/src/app/components/actions/receive.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import { toast } from "@torus-ts/toast-provider"; -import { Button, Card } from "@torus-ts/ui"; -import { copyToClipboard } from "@torus-ts/ui/utils"; -import { smallAddress } from "@torus-ts/utils/subspace"; -import { useWallet } from "~/context/wallet-provider"; - -export function ReceiveAction() { - const { selectedAccount } = useWallet(); - const handleCopyAddress = async (address: string) => { - await copyToClipboard(address); - toast.success("Address copied to clipboard"); - }; - return ( - -

To receive TORUS, share your address with the sender.

- {selectedAccount?.address ? ( -
- - Connected account: {smallAddress(selectedAccount.address)} - - -
- ) : ( - - Connect your wallet to view your address - - )} -
- ); -} diff --git a/apps/torus-wallet/src/app/components/sidebar-links.tsx b/apps/torus-wallet/src/app/components/sidebar-links.tsx index bb9ad07c1..34953ac06 100644 --- a/apps/torus-wallet/src/app/components/sidebar-links.tsx +++ b/apps/torus-wallet/src/app/components/sidebar-links.tsx @@ -2,7 +2,7 @@ import Link from "next/link"; import { Check } from "lucide-react"; -import { usePathname, useRouter } from "next/navigation"; +import { usePathname } from "next/navigation"; import { Button, @@ -20,7 +20,6 @@ import { env } from "~/env"; export const SidebarLinks = () => { const chainEnv = env("NEXT_PUBLIC_TORUS_CHAIN_ENV"); const pathname = usePathname(); - const router = useRouter(); const bridgeLink = chainEnv === "mainnet" @@ -29,26 +28,9 @@ export const SidebarLinks = () => { const isActive = (path: string) => pathname === path; - const handleSelectChange = (value: string) => { - switch (value) { - case "wallet": - router.push("/"); - break; - case "staking": - router.push("/staking"); - break; - case "bridge": - router.push(bridgeLink); - break; - } - }; - return ( <> - diff --git a/apps/torus-wallet/src/app/components/wallet-actions.tsx b/apps/torus-wallet/src/app/components/wallet-actions.tsx index 5b0069fa3..fc9040596 100644 --- a/apps/torus-wallet/src/app/components/wallet-actions.tsx +++ b/apps/torus-wallet/src/app/components/wallet-actions.tsx @@ -6,12 +6,8 @@ import { SendAction } from "./actions/send"; import { StakeAction } from "./actions/stake"; import { TransferStakeAction } from "./actions/transfer-stake"; import { UnstakeAction } from "./actions/unstake"; -import { ReceiveAction } from "./actions/receive"; -const transferButtons = [ - { text: "Send", component: }, - { text: "Receive", component: }, -]; +const transferButtons = [{ text: "Send", component: }]; const stakingButtons = [ { text: "Stake", component: }, diff --git a/apps/torus-wallet/src/app/components/wallet-skeleton-loader.tsx b/apps/torus-wallet/src/app/components/wallet-skeleton-loader.tsx deleted file mode 100644 index 82003eb01..000000000 --- a/apps/torus-wallet/src/app/components/wallet-skeleton-loader.tsx +++ /dev/null @@ -1,41 +0,0 @@ -import React from "react"; -import { Card } from "@torus-ts/ui"; - -export function WalletSkeletonLoader() { - return ( -
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
- {[1, 2, 3].map((item) => ( -
-
-
-
- ))} -
-
-
-
-
- ); -} diff --git a/apps/torus-wallet/src/app/page.tsx b/apps/torus-wallet/src/app/page.tsx index 6ee419335..4efc2144f 100644 --- a/apps/torus-wallet/src/app/page.tsx +++ b/apps/torus-wallet/src/app/page.tsx @@ -1,11 +1,11 @@ import { Suspense } from "react"; +import { Loading } from "@torus-ts/ui"; import WalletActions from "./components/wallet-actions"; -import { WalletSkeletonLoader } from "./components/wallet-skeleton-loader"; export default function Page(): JSX.Element { return ( - }> + }> ); diff --git a/apps/torus-wallet/src/app/staking/page.tsx b/apps/torus-wallet/src/app/staking/page.tsx index 3cb8f885d..e9a800b38 100644 --- a/apps/torus-wallet/src/app/staking/page.tsx +++ b/apps/torus-wallet/src/app/staking/page.tsx @@ -1,11 +1,11 @@ import { Suspense } from "react"; +import { Loading } from "@torus-ts/ui"; import WalletActions from "../components/wallet-actions"; -import { WalletSkeletonLoader } from "../components/wallet-skeleton-loader"; export default function Page(): JSX.Element { return ( - }> + }> );