shapeshift / web

ShapeShift Web
https://app.shapeshift.com
MIT License
167 stars 176 forks source link

Unable to deposit in Fox Yieldy on MM (gets stuck on approval) #3428

Closed MBMaria closed 1 year ago

MBMaria commented 1 year ago

Overview

When trying to deposit into Fox Yieldy on MM in a wallet that hasn't approved fox, it is getting stuck on the approval, and not allowing the deposit to go through

References and additional details

1) Log into app.shapeshift and connect to a MM wallet that doesn't have fox already staked 2) Navigate to DeFi page and select earn 3) Select Fox and go to Deposit Fox now 4) Select a % or 'max' amount to deposit 5) Go to approval and select continue and confirm 6) Note an error comes up saying 'Transaction Failed'

if fox already staked, the error does not occur can have a work around by approving directly on etherscan if you select a whole number of fox to deposit, ie 10 then the approval goes through

https://user-images.githubusercontent.com/100157997/204659100-c4ad7835-d1f5-447c-a9ec-700bf9193c8d.mov

Acceptance Criteria

Should be able to use % and max button of fox and approval will be accepted

Need By Date

No response

Screenshots/Mockups

No response

Ownership

Estimated effort

No response

Sponsor / Stakeholder

No response

Bounty Hunters

MBMaria commented 1 year ago

@gomesalexandre is this something you would typically work on? Just wondering if there would be a timeline when this might get fixed as marketing are about to do a push/promo for foxy and asked if it will be fixed before hand?

MBMaria commented 1 year ago

Experiencing this on KK with account 1 that hasn't been deposited into previously. I entered $5 of fox to be deposited and transaction failed. i selected 25% however, and it went through image

gomesalexandre commented 1 year ago

https://github.com/shapeshift/web/pull/3414 will pave the way for things to be more sane here, we're passing a "base unit" float (?) amount to Foxy API while it expects a base unit as the integer it should be.

By itself, the aforementinoed PR won't fix it nor make us able to spot the issue, so we'll need another level of safety in

  1. naming
  2. ensuring we are blazingly safe, checking the stringified BN is an integer (not fail-proof by itself as e.g 1 ETH would be an integer, but safe in combination with the right vernacular)
gomesalexandre commented 1 year ago

@MBMaria I couldn't reproduce and was able to complete the flow in develop, looks like the recent refactors fixed this. I'm still going to bring some safety to this domain as part of https://github.com/shapeshift/web/pull/3414, but as far as this issue is concerned, looks like this is resolved.

Could you confirm this is fixed when today's release goes into ops testing? šŸ™šŸ½

tshifty commented 1 year ago

Fixed and closed

MBMaria commented 1 year ago

i just experienced this again @gomesalexandre . it gets stuck on the approval if i choose a $ amount of fox deposit or it i choose a percent of fox to deposit . this is on MM where no fox has been deposited previously image