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

HNT to DC swap burns more HNT than selected when Wallet App currency is not USD #311

Open
greenbreakfast opened this issue May 8, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@greenbreakfast
Copy link

Describe the bug

Encountered a bug when burning HNT for DC when Helium Wallet currency is set to CAD. When the swap happens, it ends up burning more than the amount of HNT specified when the swap was set up.

To Reproduce
Steps to reproduce the behavior:

  1. In Helium Wallet App settings set currency to CAD
  2. On the main wallet page, click Swap
  3. Select HNT as input to Swap, let's say 5
  4. Observe app says You receive 670000 DC in swap output
  5. Perform the token swap
  6. Observe HNT balance has dropped by more than the amount selected in step 3
  7. Open the swap transaction in explorer, observe ~1.33x HNT has been burned than selected in step 3

This doesn't happen if Helium Wallet currency is set to USD

Expected behavior
Expecting the transaction to burn the amount of HNT selected in step 3 regardless of the App's currency setting

Smartphone (please complete the following information):

  • Device: iPhone 12 Pro
  • OS: iOS 16.2
  • App Version v2.0.7

Additional context
It looks like when swapping HNT to DC, when you enter an HNT amount, the app uses the HNT USD price to calculate the amount of DC that will be minted regardless of the App's currency setting.
Then when the transaction is submitted, the DC mint amount will remain constant and the HNT amount will automatically be modified in order to burn enough the create the specified amount of DC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants