Skip to content

Commit f989121

Browse files
remove tx history, show 0 fees for now
1 parent 8bcecf5 commit f989121

File tree

2 files changed

+45
-36
lines changed

2 files changed

+45
-36
lines changed

packages/thirdweb/src/pay/buyWithCrypto/getQuote.ts

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,22 @@ export async function getBuyWithCryptoQuote(
379379
100,
380380
},
381381
],
382-
processingFees: [],
382+
// TODO (UB): add develope and platform fees in API
383+
processingFees: [
384+
{
385+
token: {
386+
tokenAddress: firstStep.originToken.address,
387+
chainId: firstStep.originToken.chainId,
388+
decimals: firstStep.originToken.decimals,
389+
symbol: firstStep.originToken.symbol,
390+
name: firstStep.originToken.name,
391+
priceUSDCents: firstStep.originToken.priceUsd * 100,
392+
},
393+
amountUSDCents: 0,
394+
amountWei: "0",
395+
amount: "0",
396+
},
397+
],
383398
client: params.client,
384399
};
385400

packages/thirdweb/src/react/web/ui/ConnectWallet/TransactionsScreen.tsx

Lines changed: 29 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,9 @@ import { useActiveWallet } from "../../../core/hooks/wallets/useActiveWallet.js"
1111
import { useActiveWalletChain } from "../../../core/hooks/wallets/useActiveWalletChain.js";
1212
import { LoadingScreen } from "../../wallets/shared/LoadingScreen.js";
1313
import { Spacer } from "../components/Spacer.js";
14-
import Tabs from "../components/Tabs.js";
1514
import { Container, Line, ModalHeader } from "../components/basic.js";
1615
import { ButtonLink } from "../components/buttons.js";
17-
import { CoinsIcon } from "./icons/CoinsIcon.js";
18-
import { FundsIcon } from "./icons/FundsIcon.js";
1916
import type { ConnectLocale } from "./locale/types.js";
20-
import { PayTxHistoryList } from "./screens/Buy/pay-transactions/BuyTxHistory.js";
2117
import { TxDetailsScreen } from "./screens/Buy/pay-transactions/TxDetailsScreen.js";
2218
import type { TxStatusInfo } from "./screens/Buy/pay-transactions/useBuyTransactionsToShow.js";
2319
import type { PayerInfo } from "./screens/Buy/types.js";
@@ -37,7 +33,7 @@ export function TransactionsScreen(props: {
3733
locale: ConnectLocale;
3834
client: ThirdwebClient;
3935
}) {
40-
const [activeTab, setActiveTab] = useState("Transactions");
36+
// const [activeTab, setActiveTab] = useState("Transactions");
4137
// For now, you can only select pay transactions (purcahses)
4238
const [selectedTx, setSelectedTx] = useState<TxStatusInfo | null>(null);
4339

@@ -84,42 +80,40 @@ export function TransactionsScreen(props: {
8480
}}
8581
>
8682
<Spacer y="md" />
87-
<Tabs
88-
options={[
89-
{
83+
{/* <Tabs */}
84+
{/* options={[ */}
85+
{/* {
9086
label: (
9187
<span className="flex gap-2">
9288
<CoinsIcon size={iconSize.sm} /> Transactions
9389
</span>
9490
),
9591
value: "Transactions",
96-
},
97-
{
98-
label: (
99-
<span className="flex gap-2">
100-
<FundsIcon size={iconSize.sm} /> Purchases
101-
</span>
102-
),
103-
value: "Purchases",
104-
},
105-
]}
106-
selected={activeTab}
107-
onSelect={setActiveTab}
108-
>
109-
{activeTab === "Purchases" && (
110-
<PayTxHistoryList
111-
client={props.client}
112-
onSelectTx={setSelectedTx}
113-
/>
114-
)}
115-
{activeTab === "Transactions" && (
116-
<WalletTransactionHistory
117-
locale={props.locale}
118-
client={props.client}
119-
address={payer.account.address}
120-
/>
121-
)}
122-
</Tabs>
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" && ( */}
110+
<WalletTransactionHistory
111+
locale={props.locale}
112+
client={props.client}
113+
address={payer.account.address}
114+
/>
115+
{/* })} */}
116+
{/* </Tabs> */}
123117
</Container>
124118
<Line />
125119
<Container p="lg">

0 commit comments

Comments
 (0)