Open luziusmeisser opened 3 weeks ago
The function that is to be called when redeeming WFPS is different from the function for redeeming FPS. For WFPS, it is:
wfps.unwrapAndSell(uint256 amount)
See also here: https://etherscan.io/address/0x5052d3cc819f53116641e89b96ff4cd1ee80b182#writeContract
The maximum amount is the WFPS balance of the user. And to check the holding period, you have to get the FPS holding period of the WFPS contract, i.e.:
fps.holdingDuration(wfps)
At the time of writing, this is 5982719 seconds, or 69 days, so the button would be disabled!
Currently, the equity page only allows selling FPS:
For example, this could be done by making the FPS thing a uniswap-inspired dropdown that allows the user to select WFPS:
Related to that, we should also show the WFPS and the Polygon WFPS balances of the user. (I'll create a separate issue for that.)
After selecting WFPS, it could look like this: