We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 592bf6f commit c82c978Copy full SHA for c82c978
packages/thirdweb/src/react/web/ui/Bridge/BuyWidget.tsx
@@ -312,7 +312,18 @@ export function BuyWidget(props: BuyWidgetProps) {
312
props.client,
313
NATIVE_TOKEN_ADDRESS,
314
props.chain.id,
315
- );
+ ).catch((err) => {
316
+ err.message.includes("not supported")
317
+ ? undefined
318
+ : Promise.reject(err);
319
+ });
320
+ if (!ETH) {
321
+ return {
322
+ chain: props.chain,
323
+ tokenAddress: props.tokenAddress || NATIVE_TOKEN_ADDRESS,
324
+ type: "unsupported_token",
325
+ };
326
+ }
327
return {
328
data: {
329
destinationToken: ETH,
0 commit comments