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

Amount to receive is not correct displayed when using the percentage fee handler #192

Closed
LyonSsS opened this issue May 8, 2024 · 4 comments · Fixed by #196
Closed

Amount to receive is not correct displayed when using the percentage fee handler #192

LyonSsS opened this issue May 8, 2024 · 4 comments · Fixed by #196
Assignees
Milestone

Comments

@LyonSsS
Copy link

LyonSsS commented May 8, 2024

STR:

  1. Select source as Sepolia.
  2. Select "TO" as Base_Sepolia
  3. Select SygUSDC as token type.
  4. Insert amount to be transfer as 12.

Exp: The fee should be 1 and the amount to transfer should be 11.
Act: The fee is 1 and the amount to be transferred is 10.

image

The issue is also found when using Source as Substrate and using a value in the lower bound

image

@LyonSsS
Copy link
Author

LyonSsS commented May 8, 2024

This issue is visible only if the fee is percentage ( lower and upper bound is fine)
image
image

@MakMuftic MakMuftic added this to the Cycle 3 🦘 milestone May 9, 2024
@wainola wainola self-assigned this May 12, 2024
@wainola wainola mentioned this issue May 13, 2024
9 tasks
@LyonSsS
Copy link
Author

LyonSsS commented May 23, 2024

Verified on PR preview build #196 - the issue is fixed now

@LyonSsS LyonSsS closed this as completed May 23, 2024
@wainola wainola reopened this May 29, 2024
@saadahmsiddiqui
Copy link
Member

@wainola why is this re opnened

@LyonSsS
Copy link
Author

LyonSsS commented Jun 4, 2024

Retested on #196 (review)

@LyonSsS LyonSsS closed this as completed Jun 4, 2024
wainola added a commit that referenced this issue Jun 11, 2024
<!--- Provide a general summary of your changes in the Title above -->

## Description

Fixes displayed amount to receive due to double subtraction over the
already subtracted value

<!--- Describe your changes in detail -->

## Related Issue Or Context

<!--- If suggesting a new feature or change, please discuss it in an
issue first -->
<!--- If fixing a bug, there should be an issue describing it with steps
to reproduce -->
<!--- Otherwise, describe context and motivation for change here -->

Closes: #192 

## How Has This Been Tested? Testing details.

<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->

## Types of changes

<!--- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->

- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation

## Checklist:

<!--- Go over all the following points, and put an `x` in all the boxes
that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->

- [ ] I have commented my code, particularly in hard-to-understand
areas.
- [ ] I have ensured that all acceptance criteria (or expected behavior)
from issue are met
- [ ] I have updated the documentation locally and in sygma-docs.
- [ ] I have added tests to cover my changes.
- [ ] I have ensured that all the checks are passing and green, I've
signed the CLA bot

---------

Co-authored-by: Saad Ahmed Siddiqui <[email protected]>
Co-authored-by: Anton Lykhoyda <[email protected]>
Co-authored-by: Filip Štoković <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants