Skip to content

Commit b1ac15c

Browse files
committed
Dashboard: use BuyWidget instead of CheckoutWidget in TransactionButton (#7857)
<!-- ## title your PR with this format: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes" If you did not copy the branch name from Linear, paste the issue tag here (format is TEAM-0000): ## Notes for the reviewer Anything important to call out? Be sure to also clarify these in your comments. ## How to test Unit tests, playground, etc. --> <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on updating the `MismatchButton` component by replacing the `CheckoutWidget` with the `BuyWidget`, streamlining the payment interface. ### Detailed summary - Replaced `CheckoutWidget` with `BuyWidget` in the render method of the `MismatchButton` component. - Removed the `name` and `seller` props from the `BuyWidget`. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * New Features * Introduced a new Buy experience in the pay dialog for adding funds. * Improvements * Streamlined purchase flow with fewer required inputs and a cleaner interface. * Pay dialog can be opened and initiated without first connecting a wallet/account. * Consistent styling and theming applied across the new purchase widget. * Chores * Updated dependencies to use the latest purchase widget component. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 98eefdf commit b1ac15c

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

apps/dashboard/src/@/components/tx-button/MismatchButton.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import {
1818
} from "thirdweb";
1919
import { type Chain, type ChainMetadata, localhost } from "thirdweb/chains";
2020
import {
21-
CheckoutWidget,
21+
BuyWidget,
2222
useActiveAccount,
2323
useActiveWallet,
2424
useActiveWalletChain,
@@ -267,14 +267,12 @@ export const MismatchButton = forwardRef<
267267
/>
268268
)}
269269

270-
{dialog === "pay" && account && (
271-
<CheckoutWidget
270+
{dialog === "pay" && (
271+
<BuyWidget
272272
className="!w-full"
273273
client={props.client}
274274
chain={txChain}
275275
amount="0.01"
276-
name="Buy Funds"
277-
seller={account.address as `0x${string}`}
278276
theme={getSDKTheme(theme === "dark" ? "dark" : "light")}
279277
/>
280278
)}

0 commit comments

Comments
 (0)