File tree Expand file tree Collapse file tree 6 files changed +0
-19
lines changed Expand file tree Collapse file tree 6 files changed +0
-19
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,6 @@ import type { PaymentMethod } from "../machines/paymentMachine.js";
1111import type { SupportedTokens } from "../utils/defaultTokens.js" ;
1212import { useActiveWallet } from "./wallets/useActiveWallet.js" ;
1313
14- // TODO - includeDestinationToken is not being used in the query, find out how it should be used
15-
1614/**
1715 * Hook that returns available payment methods for BridgeEmbed
1816 * Fetches real routes data based on the destination token
@@ -35,15 +33,13 @@ export function usePaymentMethods(options: {
3533 destinationAmount : string ;
3634 client : ThirdwebClient ;
3735 payerWallet ?: Wallet ;
38- includeDestinationToken ?: boolean ;
3936 supportedTokens ?: SupportedTokens ;
4037} ) {
4138 const {
4239 destinationToken,
4340 destinationAmount,
4441 client,
4542 payerWallet,
46- includeDestinationToken,
4743 supportedTokens,
4844 } = options ;
4945 const localWallet = useActiveWallet ( ) ; // TODO (bridge): get all connected wallets
@@ -137,7 +133,6 @@ export function usePaymentMethods(options: {
137133 destinationToken . address ,
138134 destinationAmount ,
139135 payerWallet ?. getAccount ( ) ?. address ,
140- includeDestinationToken ,
141136 supportedTokens ,
142137 ] , // 5 minutes
143138 refetchOnWindowFocus : false ,
Original file line number Diff line number Diff line change @@ -557,7 +557,6 @@ function BridgeWidgetContent(
557557 destinationAmount = { screen . destinationAmount }
558558 receiverAddress = { screen . receiverAddress }
559559 feePayer = { undefined }
560- includeDestinationToken = { false }
561560 onBack = { ( ) => {
562561 setScreen ( { id : "1:buy-ui" } ) ;
563562 } }
Original file line number Diff line number Diff line change @@ -546,7 +546,6 @@ function CheckoutWidgetContent(
546546 destinationAmount = { screen . destinationAmount }
547547 destinationToken = { screen . destinationToken }
548548 receiverAddress = { screen . receiverAddress }
549- includeDestinationToken = { true }
550549 onBack = { ( ) => {
551550 setScreen ( { id : "1:init-ui" } ) ;
552551 } }
Original file line number Diff line number Diff line change @@ -611,7 +611,6 @@ function TransactionWidgetContent(
611611 destinationToken = { screen . destinationToken }
612612 destinationAmount = { screen . destinationAmount }
613613 receiverAddress = { screen . receiverAddress }
614- includeDestinationToken = { true }
615614 onBack = { ( ) => {
616615 setScreen ( { id : "init-ui" } ) ;
617616 } }
Original file line number Diff line number Diff line change @@ -69,11 +69,6 @@ type PaymentSelectionProps = {
6969 */
7070 connectLocale : ConnectLocale ;
7171
72- /**
73- * Whether to include the destination token in the payment methods
74- */
75- includeDestinationToken : boolean | undefined ;
76-
7772 /**
7873 * Allowed payment methods
7974 */
@@ -114,7 +109,6 @@ export function PaymentSelection({
114109 onBack,
115110 connectOptions,
116111 connectLocale,
117- includeDestinationToken,
118112 paymentMethods,
119113 supportedTokens,
120114 feePayer,
@@ -160,10 +154,6 @@ export function PaymentSelection({
160154 client,
161155 destinationAmount,
162156 destinationToken,
163- includeDestinationToken :
164- includeDestinationToken ||
165- receiverAddress ?. toLowerCase ( ) !==
166- payerWallet ?. getAccount ( ) ?. address ?. toLowerCase ( ) ,
167157 payerWallet,
168158 supportedTokens,
169159 } ) ;
Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ const meta: Meta<typeof PaymentSelection> = {
1717 onPaymentMethodSelected : ( ) => { } ,
1818 country : "US" ,
1919 connectOptions : undefined ,
20- includeDestinationToken : undefined ,
2120 currency : "USD" ,
2221 paymentMethods : [ "crypto" , "card" ] ,
2322 receiverAddress : "0x0000000000000000000000000000000000000000" ,
You can’t perform that action at this time.
0 commit comments