Skip to content

FAQ ​

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 ​

When no wallet adapter is provided, the widget calls onConnectWallet. If you do not handle that callback, nothing visible happens.

js
callbacks: {
  onConnectWallet: () => {
    myWalletModal.open();
  },
}

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 ​

Only initialize the widget on the client side. See SSR Guide.

How do I hide the "Powered by" branding? ​

html
<tokenflight-widget
  hide-powered-by
  theme="dark"
  to-token="eip155:8453:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
  trade-type="EXACT_OUTPUT"
  amount="100"
></tokenflight-widget>
js
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? ​

Supported wallets depend on the adapter you use:

AdapterWallets
AppKitWalletConnect-compatible wallets plus Solana support
wagmiwagmi connectors such as injected, WalletConnect, and Coinbase
ethersInjected EIP-1193 wallets such as MetaMask and Brave

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? ​

No. The SDK sends no analytics and sets no cookies.