fix: fixed fee selection modal bug #15753
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
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.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.inputProcessFee
event to referencetempProcessingFeeMethod
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:
Video Demo