11"use client" ;
22
33import { ExternalLinkIcon } from "@radix-ui/react-icons" ;
4- import { useState } from "react" ;
54import type { ThirdwebClient } from "../../../../client/client.js" ;
65import { formatExplorerAddressUrl } from "../../../../utils/url.js" ;
76import { iconSize } from "../../../core/design-system/index.js" ;
@@ -14,14 +13,10 @@ import { Spacer } from "../components/Spacer.js";
1413import { Container , Line , ModalHeader } from "../components/basic.js" ;
1514import { ButtonLink } from "../components/buttons.js" ;
1615import type { ConnectLocale } from "./locale/types.js" ;
17- import { TxDetailsScreen } from "./screens/Buy/pay-transactions/TxDetailsScreen.js" ;
18- import type { TxStatusInfo } from "./screens/Buy/pay-transactions/useBuyTransactionsToShow.js" ;
1916import type { PayerInfo } from "./screens/Buy/types.js" ;
2017import { WalletTransactionHistory } from "./screens/WalletTransactionHistory.js" ;
2118import type { WalletDetailsModalScreen } from "./screens/types.js" ;
2219
23- //
24-
2520/**
2621 * @internal
2722 */
@@ -33,10 +28,6 @@ export function TransactionsScreen(props: {
3328 locale : ConnectLocale ;
3429 client : ThirdwebClient ;
3530} ) {
36- // const [activeTab, setActiveTab] = useState("Transactions");
37- // For now, you can only select pay transactions (purcahses)
38- const [ selectedTx , setSelectedTx ] = useState < TxStatusInfo | null > ( null ) ;
39-
4031 const activeChain = useActiveWalletChain ( ) ;
4132 const activeWallet = useActiveWallet ( ) ;
4233 const activeAccount = useActiveAccount ( ) ;
@@ -51,21 +42,6 @@ export function TransactionsScreen(props: {
5142 return < LoadingScreen /> ;
5243 }
5344
54- if ( selectedTx ) {
55- return (
56- < TxDetailsScreen
57- title = { props . title }
58- client = { props . client }
59- statusInfo = { selectedTx }
60- onBack = { ( ) => setSelectedTx ( null ) }
61- onDone = { ( ) => setSelectedTx ( null ) }
62- payer = { payer }
63- transactionMode = { false }
64- isEmbed = { false }
65- />
66- ) ;
67- }
68-
6945 return (
7046 < Container animate = "fadein" >
7147 < Container p = "lg" >
@@ -80,40 +56,11 @@ export function TransactionsScreen(props: {
8056 } }
8157 >
8258 < Spacer y = "md" />
83- { /* <Tabs */ }
84- { /* options={[ */ }
85- { /* {
86- label: (
87- <span className="flex gap-2">
88- <CoinsIcon size={iconSize.sm} /> Transactions
89- </span>
90- ),
91- value: "Transactions",
92- // },
93- // TODO (UB): add back in once we have a way to show purchases with new service
94- // {
95- // label: (
96- // <span className="flex gap-2">
97- // <FundsIcon size={iconSize.sm} /> Purchases
98- // </span>
99- // ),
100- // value: "Purchases",
101- // },
102- // ] }
103- // selected={activeTab}
104- // onSelect={setActiveTab}
105- {/* > */ }
106- { /* {activeTab === "Purchases" && ( */ }
107- { /* <PayTxHistoryList client={props.client} onSelectTx={setSelectedTx} /> */ }
108- { /* )} */ }
109- { /* {activeTab === "Transactions" && ( */ }
11059 < WalletTransactionHistory
11160 locale = { props . locale }
11261 client = { props . client }
11362 address = { payer . account . address }
11463 />
115- { /* }) } */ }
116- { /* </Tabs> */ }
11764 </ Container >
11865 < Line />
11966 < Container p = "lg" >
0 commit comments