Skip to content
TokenFlight SDK

FAQ

  • 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.

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

callbacks: {
onConnectWallet: () => {
myWalletModal.open();
},
}
  • Check API connectivity.
  • Requests time out after 15 seconds.
  • Some token pairs simply have no available route.

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,
},
});

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

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.