Balmy-protocol/dca-fe

[Feature Request]: Add ability to approve only required amount of token

Closed this issue · 1 comments

Right now when a user approves a token we set the maximum amount to the allowance, this could be a security issue for users since it's generally regarded safer to only approve the amount that the SC will use. That being sad it is sometimes annoying to have to approve and submit a TX before trying to do everything.

In line with this we should start providing users with the option to only approve the amount that is going to be used for that specific action.

Currently we have 2 workflows that might require a token approval:

  • When a user is creating a position
  • When a user is increasing the funds of an existing position

Expected result:

  • Instead of having just 1 button that says "Approve X" we need to start providing 2 buttons "Approve Max X" and "Approve Minimum X"

Being worked on #139