Skip to main content
Subscribe with useWidgetEvents inside DZapWidgetProvider, or pass config.callbacks. Both fire for the same lifecycle points. useWidgetEvents() returns { on, off }. on(event, listener) returns an unsubscribe function.
Use WidgetEvent enum values or the string names interchangeably.

Event catalog

service is the transaction service type (swap / bridge / zap). settingUpdated.key is 'routePriority' | 'slippage' | 'transactionMode' | 'private'.

Callbacks

Same handlers on WidgetConfig.callbacks:
There is no onSettingUpdated callback; subscribe to WidgetEvent.SettingUpdated via useWidgetEvents for settings changes. useWidgetEvents must run under DZapWidgetProvider. It throws if called outside.
Last modified on August 18, 2026