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: {
87
87
: undefined ,
88
88
) ;
89
89
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
+ } ) ( ) ;
98
98
99
99
const fiatQuoteQuery = useBuyWithFiatQuote (
100
100
buyWithFiatOptions !== false && tokenAmount
You can’t perform that action at this time.
0 commit comments