Skip to content
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

fix: fixed fee selection modal bug #15753

Closed
wants to merge 4 commits into from
Closed

fix: fixed fee selection modal bug #15753

wants to merge 4 commits into from

Conversation

paulallensuxs
Copy link
Contributor

Description

This pull request introduces fixes to the fee selection modal for the bridge. It addresses the issue where selecting a custom fee, then switching to the recommended or zero fee, and subsequently cancelling the modal results in unpredictable fee selections. Furthermore, it implements logic allowing users to set a zero fee by entering '0' in the custom fee field and defaults to the recommended fee if the input box is left empty,

Changes Made

  • Added a temporary variable tempProcessingFeeMethod to store the current processing fee method. This ensures the selected fee method does not change until confirmed by the user, thereby resolving the issue of unpredictable selections.
  • Modified the closeModal function to use inputBox?.getValue() instead of $processingFee to distinguish between an empty input and a zero value. This change allows users to explicitly set a fee to zero and defaults to the recommended fee if the custom fee input is left empty.
  • Updated the inputProcessFee event to reference tempProcessingFeeMethod to correctly capture the state of the selected fee method during user interaction.

Testing

The fixes have been thoroughly tested under various scenarios to ensure the modal behaves as expected. The following cases have been tested:

  • Setting a custom fee and then selecting recommended and cancelling retains the previously selected fee method.
  • Setting a custom fee and then selecting zero fee and cancelling retains the previously selected fee method.
  • Setting a custom fee to zero and confirming now accurately sets the fee to zero.
  • Leaving the custom fee input empty and confirming defaults to the recommended fee.

Video Demo

image1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant