FAQ
Widget displays a blank area
Section titled “Widget displays a blank area”- Verify
registerWidgetElement()is called before using the HTML tag. - Check the browser console for errors, especially CSP violations.
- Ensure the container element exists before
initialize()runs. - In SSR frameworks, mount only on the client. See SSR Guide.
”Connect Wallet” button does nothing
Section titled “”Connect Wallet” button does nothing”When no wallet adapter is provided, the widget calls onConnectWallet. If you do not handle that callback, nothing visible happens.
callbacks: { onConnectWallet: () => { myWalletModal.open(); },}Quote is stuck loading
Section titled “Quote is stuck loading”- Check API connectivity.
- Requests time out after 15 seconds.
- Some token pairs simply have no available route.
Next.js throws window is not defined
Section titled “Next.js throws window is not defined”Only initialize the widget on the client side. See SSR Guide.
How do I hide the “Powered by” branding?
Section titled “How do I hide the “Powered by” branding?”<tokenflight-widget hide-powered-by theme="dark" to-token="eip155:8453:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913" trade-type="EXACT_OUTPUT" amount="100"></tokenflight-widget>const widget = new TokenFlightWidget({ container: '#widget', config: { toToken: { chainId: 8453, address: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913' }, tradeType: 'EXACT_OUTPUT', amount: '100', theme: 'dark', hidePoweredBy: true, },});What wallets are supported?
Section titled “What wallets are supported?”Supported wallets depend on the adapter you use:
| Adapter | Wallets |
|---|---|
| AppKit | WalletConnect-compatible wallets plus Solana support |
| wagmi | wagmi connectors such as injected, WalletConnect, and Coinbase |
| ethers | Injected EIP-1193 wallets such as MetaMask and Brave |
Can I have multiple widgets on one page?
Section titled “Can I have multiple widgets on one page?”Yes. Each widget instance has isolated DOM and state, while sharing cached API data for better performance.
Does the SDK collect analytics or telemetry?
Section titled “Does the SDK collect analytics or telemetry?”No. The SDK sends no analytics and sets no cookies.