sygmaprotocol / sygma-widget

Transfer widget for the sygmaprotocol
5 stars 2 forks source link

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

Closed LyonSsS closed 5 months ago

LyonSsS commented 6 months ago

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 commented 6 months ago

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

LyonSsS commented 5 months ago

Verified on PR preview build https://github.com/sygmaprotocol/sygma-widget/pull/196 - the issue is fixed now

saadahmsiddiqui commented 5 months ago

@wainola why is this re opnened

LyonSsS commented 5 months ago

Retested on https://github.com/sygmaprotocol/sygma-widget/pull/196#pullrequestreview-2096177921