Refactor/actions reserve overview
General Changes
• Refactored the Supply and Borrow actions on the reserve-overview page to fully use the SDK for calculating health factor previews and for building the transaction to be sent.
• Special cases for wrapped tokens (DAI/sDAI) and USDT resets are all covered and tested.
• This PR also includes the refactor of Withdraw and Repay (added here for future use in the dashboard page).
Developer Notes
• For testing purposes, you can access the Supply SDK and Borrow SDK in the reserve-overview page. • You can access the Withdraw SDK and Repay SDK in the supplied position view and borrowed position view respectively.
• NOTE: Major issue blocking the release of the Repay SDK flow: I have tested that the SDK’s Repay action does not support aToken repayments. This means we cannot repay debt using collateral; only ERC-20 tokens from the wallet are supported.
Reviewer Checklist
Please ensure you, as the reviewer(s), have gone through this checklist to ensure that the code changes are ready to ship safely and to help mitigate any downstream issues that may occur.
- [ ] End-to-end tests are passing without any errors
- [ ] Code changes do not significantly increase the application bundle size
- [ ] If there are new 3rd-party packages, they do not introduce potential security threats
- [ ] If there are new environment variables being added, they have been added to the
.env.examplefile as well as the pertinant.github/actions/*files - [ ] There are no CI changes, or they have been approved by the DevOps and Engineering team(s)