File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/fiat Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -87,14 +87,14 @@ export function FiatScreenContent(props: {
8787 : undefined ,
8888 ) ;
8989
90- const supportedProviders =
91- buyWithFiatOptions !== false
92- ? ! ! buyWithFiatOptions ?. supportedProviders ?. length &&
93- ( ! preferredProvider ||
94- buyWithFiatOptions . supportedProviders . includes ( preferredProvider ) )
95- ? buyWithFiatOptions ?. supportedProviders
96- : [ ...FiatProviders ]
97- : [ ] ;
90+ const supportedProviders = ( ( ) => {
91+ if ( ! buyWithFiatOptions ) return [ ] ;
92+ const options = buyWithFiatOptions ?. supportedProviders ?? [ ] ;
93+ return options . length > 0 &&
94+ ( ! preferredProvider || options . includes ( preferredProvider ) )
95+ ? options
96+ : [ ...FiatProviders ] ;
97+ } ) ( ) ;
9898
9999 const fiatQuoteQuery = useBuyWithFiatQuote (
100100 buyWithFiatOptions !== false && tokenAmount
You can’t perform that action at this time.
0 commit comments