-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: emit events for settings changes #312
Conversation
c63f618
to
8eba952
Compare
Hey! This is your new endopint: https://b7cae349.widget-settingsev.pages.dev |
); | ||
}, | ||
[debouncedSetValue], | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had to decouple the inputs value from setting the slippage value in the settings store a little. The debounce means setting the slippage value should happen once and not on each keystroke
Hey! This is your new endopint: https://d3f5bd09.widget-settingsev.pages.dev |
Hey! This is your new endopint: https://e0759c6b.widget-settingsev.pages.dev |
Hey! This is your new endopint: https://c05b5e54.widget-settingsev.pages.dev |
Jira: LF-10342
This PR as the settingUpdate event - this event will fire whenever the settings in the Widget are changed
Testing
Note: for testing I have been cherry-picking the addition of the WidgetEventsControl from the #309. its in this one commit. Once that PR is merged those changes will be available here as well
To test using the WidgetEventsControl
Using the event
To add a listener
The payload for the event will look like this...
The above is for the slippage setting but each of the settings will emit an event when changed. This should cover - appearance, gasPrice, language, routePriority, enabledAutoRefuel, slippage, disabledBridges, enabledBridges, _enabledBridges, disabledExchanges, enabledExchanges and _enabledExchanges