Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Money Market #1003

Draft
wants to merge 19 commits into
base: develop
Choose a base branch
from
Draft

Money Market #1003

wants to merge 19 commits into from

Conversation

pietro-maximoff
Copy link
Contributor

chescalante and others added 4 commits September 5, 2024 07:53
* aave page static components, mobile first

* responsive panels

* functional static borrow asset list

* cleanup

* renaming

* lend assets list

* Lend positions list

* fixes and cleanup

* cleanup

* cleanup

* cleanup

* static ui done. missing validations

* add validations

* add validations

* move errors down

* borrow form modal

* pr comments

* pr comments

* fix typo

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/components/LendPositionAction/LendPositionAction.tsx

Co-authored-by: Juan Dahl <[email protected]>

* repay modals

* lend modal

* use simple table row

* asset amount input

* add missing translations

* fix translation

* units and prices mock

* setup layout for pool details screen

* wallet overview panel

* emode card mock

* max with for emode category

* top bar mock

* network switch

* cleanup

* ui fixes

* ui fixes, usd prices

* Efficiency card

* ordering

* fix filter 0 balances checkbox

* pr comment

* token

* Mocked table cards plus refactor of statistics card (#14)

* mocked table cards plus refactor of statistics card

* ui fixes

* Saf 41 charts (#16)

* mocked table cards plus refactor of statistics card

* ui fixes

* [SAF-41] give each graph it's own chart component

* [SAF-41] add htmlLegend plugin in charts; remove comments and refactor some colors moving them to constants

---------

Co-authored-by: matzapata <[email protected]>

* removed view transactions button (out of scope)

* fix breakpoints

* [SAF-41] fix color constant and background for mobile vs desktop views (#20)

* [SAF-41] fix color constant and background for mobile vs desktop views

* [SAF-41] use theme variables for colors and breakpoint usage for better consistency

* Apply suggestions from code review

Co-authored-by: Juan Dahl <[email protected]>

---------

Co-authored-by: Juan Dahl <[email protected]>

* Update apps/frontend/package.json

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/AmountTransition/AmountTransition.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/AssetAmountPriceRenderer/AssetAmountPriceRenderer.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/NetworkSwitch/NetworkSwitch.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/EModeDetails/EModeDetails.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/SupplyDetailsGraph/SupplyDetailsGraph.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/SupplyDetailsGraph/SupplyDetailsGraph.tsx

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* remove LinkIcon

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* pr comments

* fixes

---------

Co-authored-by: matzapata <[email protected]>
Co-authored-by: Matias Zapata <[email protected]>
Co-authored-by: Juan Dahl <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>
Co-authored-by: Pietro <[email protected]>
* aave page static components, mobile first

* responsive panels

* functional static borrow asset list

* cleanup

* renaming

* lend assets list

* Lend positions list

* fixes and cleanup

* cleanup

* cleanup

* cleanup

* static ui done. missing validations

* add validations

* add validations

* move errors down

* borrow form modal

* pr comments

* pr comments

* fix typo

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/components/LendPositionAction/LendPositionAction.tsx

Co-authored-by: Juan Dahl <[email protected]>

* repay modals

* lend modal

* use simple table row

* asset amount input

* add missing translations

* fix translation

* units and prices mock

* setup layout for pool details screen

* wallet overview panel

* emode card mock

* max with for emode category

* top bar mock

* network switch

* cleanup

* ui fixes

* ui fixes, usd prices

* Efficiency card

* ordering

* fix filter 0 balances checkbox

* pr comment

* token

* Mocked table cards plus refactor of statistics card (#14)

* mocked table cards plus refactor of statistics card

* ui fixes

* Saf 41 charts (#16)

* mocked table cards plus refactor of statistics card

* ui fixes

* [SAF-41] give each graph it's own chart component

* [SAF-41] add htmlLegend plugin in charts; remove comments and refactor some colors moving them to constants

---------

Co-authored-by: matzapata <[email protected]>

* removed view transactions button (out of scope)

* fix breakpoints

* [SAF-41] fix color constant and background for mobile vs desktop views (#20)

* [SAF-41] fix color constant and background for mobile vs desktop views

* [SAF-41] use theme variables for colors and breakpoint usage for better consistency

* Apply suggestions from code review

Co-authored-by: Juan Dahl <[email protected]>

---------

Co-authored-by: Juan Dahl <[email protected]>

* Dashboard pool data integration (#15) (#22)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* pr comments

* unit fixes

* Lend integration (#19)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* wip

* Dashboard pool data integration (#15)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* pr comments

* unit fixes

* supply wip

* fix asset renderer
add usd amount
cleanups

* fixes

* cleanup

* Cache for aave hooks (#23)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* wip

* Dashboard pool data integration (#15)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* pr comments

* unit fixes

* supply wip

* fix asset renderer
add usd amount
cleanups

* fixes

* withdraw integration

* cache useAaveReservesData

* cache useUserReserves

* cleanup

* fix imports

* fix

* Develop mockups (#25)

* fix breakpoints

* [SAF-41] fix color constant and background for mobile vs desktop views (#20)

* [SAF-41] fix color constant and background for mobile vs desktop views

* [SAF-41] use theme variables for colors and breakpoint usage for better consistency

* Apply suggestions from code review

Co-authored-by: Juan Dahl <[email protected]>

---------

Co-authored-by: Juan Dahl <[email protected]>

---------

Co-authored-by: matzapata <[email protected]>
Co-authored-by: Juan Dahl <[email protected]>

* Withdraw integration (#21)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* wip

* Dashboard pool data integration (#15)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* pr comments

* unit fixes

* supply wip

* fix asset renderer
add usd amount
cleanups

* fixes

* withdraw integration

* fix and pr comment

* pr comment

* Borrow integration (#24)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* wip

* Dashboard pool data integration (#15)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* pr comments

* unit fixes

* supply wip

* fix asset renderer
add usd amount
cleanups

* fixes

* withdraw integration

* cache useAaveReservesData

* cache useUserReserves

* cleanup

* fix imports

* wip. Health bar failing, wrong liquidation price

* fix calculations

* fix calculations

* fix

* cleanup

* replace apy with apr and health ratio with collateral ratio

* Repay integration (#26)

* calculations

* aave repay transaction factory and hook
cleanup and fixes

* use CollateralRatioHealthBar
replace health rate with collateral rate

* implement collateral switch (#27)

* Cleanup (#28)

* cleanup

* fixes

* Update apps/frontend/package.json

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/AmountTransition/AmountTransition.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/AssetAmountPriceRenderer/AssetAmountPriceRenderer.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/NetworkSwitch/NetworkSwitch.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/EModeDetails/EModeDetails.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/SupplyDetailsGraph/SupplyDetailsGraph.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/SupplyDetailsGraph/SupplyDetailsGraph.tsx

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* remove LinkIcon

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* pr comments

* fixes

* fixes

* SAF-49 setup bob (#29)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

---------

Co-authored-by: Juan <[email protected]>

* SAF 50 - E-Mode (#30)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

---------

Co-authored-by: Juan <[email protected]>

* Toggle lend mode

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* SAF 52 - Toggle lend mode (#31)

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

---------

Co-authored-by: Juan <[email protected]>

* Fixes and cleanup (#33)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

* Fix. Missing fix on borrow.

* fix borrow power to match desired collateral ratio

* rollback to working contracts for borrow eth

* fixes

* fixes and max amount

* loading when account changes

* close emode on complete

* disable emode if just one category

* error handling

* feat(network): change to new sepolia (#36)

---------

Co-authored-by: Juan <[email protected]>

* Fixes UI (#35)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

* Fix. Missing fix on borrow.

* fix borrow power to match desired collateral ratio

* rollback to working contracts for borrow eth

* fixes

* fixes and max amount

* loading when account changes

* close emode on complete

* disable emode if just one category

* error handling

* SAF-59, SAF-58, SAF-60, SAF-61, SAF-57

* limit by liquidity

* fix

* feat(network): change to new sepolia (#36)

* fixes

---------

Co-authored-by: Juan <[email protected]>

* Saf 20/pool details integration topbar (#40)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

* Fix. Missing fix on borrow.

* fix borrow power to match desired collateral ratio

* rollback to working contracts for borrow eth

* fixes

* fixes and max amount

* loading when account changes

* close emode on complete

* disable emode if just one category

* error handling

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix calculation
add balances and filter zero balances

* [SAF-20] wip testing rates data from contract Reserve Rate Strategy

* [SAF-20] wip integrating useAaveRates hook

* connect topbar

* tokens links

* add link to oracle

---------

Co-authored-by: Juan <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>

* Saf 20/pool details integration sidebar (#41)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

* Fix. Missing fix on borrow.

* fix borrow power to match desired collateral ratio

* rollback to working contracts for borrow eth

* fixes

* fixes and max amount

* loading when account changes

* close emode on complete

* disable emode if just one category

* error handling

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix calculation
add balances and filter zero balances

* [SAF-20] wip testing rates data from contract Reserve Rate Strategy

* [SAF-20] wip integrating useAaveRates hook

* [SAF-20] fix hook useAaveRates

* connect topbar

* tokens links

* add link to oracle

* [SAF_20] fix: parse totalDebt using decimals

* sidebar integration

* Connect topbar, add token links and add to wallet (#37)

* connect topbar

* tokens links

* add link to oracle

* fix merge error

---------

Co-authored-by: Juan <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>

* Saf 20/pool details integration graphs stats (#42)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

* Fix. Missing fix on borrow.

* fix borrow power to match desired collateral ratio

* rollback to working contracts for borrow eth

* fixes

* fixes and max amount

* loading when account changes

* close emode on complete

* disable emode if just one category

* error handling

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix calculation
add balances and filter zero balances

* [SAF-20] wip testing rates data from contract Reserve Rate Strategy

* [SAF-20] wip integrating useAaveRates hook

* [SAF-20] fix hook useAaveRates

* [SAF_20] fix: parse totalDebt using decimals

* Connect topbar, add token links and add to wallet (#37)

* connect topbar

* tokens links

* add link to oracle

* Money Market Mockups (#990)

* aave page static components, mobile first

* responsive panels

* functional static borrow asset list

* cleanup

* renaming

* lend assets list

* Lend positions list

* fixes and cleanup

* cleanup

* cleanup

* cleanup

* static ui done. missing validations

* add validations

* add validations

* move errors down

* borrow form modal

* pr comments

* pr comments

* fix typo

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/components/LendPositionAction/LendPositionAction.tsx

Co-authored-by: Juan Dahl <[email protected]>

* repay modals

* lend modal

* use simple table row

* asset amount input

* add missing translations

* fix translation

* units and prices mock

* setup layout for pool details screen

* wallet overview panel

* emode card mock

* max with for emode category

* top bar mock

* network switch

* cleanup

* ui fixes

* ui fixes, usd prices

* Efficiency card

* ordering

* fix filter 0 balances checkbox

* pr comment

* token

* Mocked table cards plus refactor of statistics card (#14)

* mocked table cards plus refactor of statistics card

* ui fixes

* Saf 41 charts (#16)

* mocked table cards plus refactor of statistics card

* ui fixes

* [SAF-41] give each graph it's own chart component

* [SAF-41] add htmlLegend plugin in charts; remove comments and refactor some colors moving them to constants

---------

Co-authored-by: matzapata <[email protected]>

* removed view transactions button (out of scope)

* fix breakpoints

* [SAF-41] fix color constant and background for mobile vs desktop views (#20)

* [SAF-41] fix color constant and background for mobile vs desktop views

* [SAF-41] use theme variables for colors and breakpoint usage for better consistency

* Apply suggestions from code review

Co-authored-by: Juan Dahl <[email protected]>

---------

Co-authored-by: Juan Dahl <[email protected]>

* Update apps/frontend/package.json

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/AmountTransition/AmountTransition.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/AssetAmountPriceRenderer/AssetAmountPriceRenderer.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/NetworkSwitch/NetworkSwitch.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/EModeDetails/EModeDetails.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/SupplyDetailsGraph/SupplyDetailsGraph.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/SupplyDetailsGraph/SupplyDetailsGraph.tsx

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* remove LinkIcon

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* pr comments

* fixes

---------

Co-authored-by: matzapata <[email protected]>
Co-authored-by: Matias Zapata <[email protected]>
Co-authored-by: Juan Dahl <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>
Co-authored-by: Pietro <[email protected]>

* chore: cleanup

* connected graphs

* cleanup

* cleanup

* cleanup

---------

Co-authored-by: Juan <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>
Co-authored-by: Christian Escalante <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>
Co-authored-by: Pietro <[email protected]>
Co-authored-by: Pietro <[email protected]>

* fixes

* Saf 20/charts integration (exclude supply and borrow by now) (#46)

* [SAF_20] remove mocks from pool details; create hooks useAaveRates and useAaveHistoryReserves

* [SAF-20] fix conflicts

* [SAF_20] mock api response by now

* [SAF_20] remove mock; prevent calling history data by now

* cleanup

* cleanup

* fixes

* fix: prevent NaN in interest rate charts when no data is retrieved

* fix stats

* fix available liquidity

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/LendAssetsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/BorrowPositionsList/components/BorrowPositionDetails/BorrowPositionDetails.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/BorrowPositionsList/BorrowPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* Fixes and cleanup (#48)

* coments

* fix borrow power

* fixes and cleanup

* Cleanup (#49)

* coments

* fix borrow power

* fixes and cleanup

* cleanup

* Refactor config for same code style and handle mainnet config (#50)

* coments

* fix borrow power

* fixes and cleanup

* cleanup

* refactor config for same code style and handle mainnet config

* remove unused files and fix repay with balance future collateral ratio (#51)

* coments

* fix borrow power

* fixes and cleanup

* cleanup

* refactor config for same code style and handle mainnet config

* small fixes

* remove unused files and fix repay with balance future collateral ratio

* cleanup and fixes

* disable collateral toggle if liquidation risk arises from it

* add sorting in tables

* precision and percentage

* fix hex chainId

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* rename USD to Usd

* pr comments

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/InterestRateModelGraph/components/Chart/Chart.utils.ts

Co-authored-by: Pietro <[email protected]>

* pr comment

* disable tooltip for infinite

---------

Co-authored-by: matzapata <[email protected]>
Co-authored-by: Matias Zapata <[email protected]>
Co-authored-by: Juan Dahl <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>
Co-authored-by: Pietro <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>
Co-authored-by: Pietro <[email protected]>
@pietro-maximoff pietro-maximoff added the enhancement New feature or request label Sep 12, 2024
Copy link

changeset-bot bot commented Sep 12, 2024

⚠️ No Changeset found

Latest commit: f6d4fea

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

netlify bot commented Sep 12, 2024

Deploy Preview for sovryn-storybook ready!

Name Link
🔨 Latest commit f6d4fea
🔍 Latest deploy log https://app.netlify.com/sites/sovryn-storybook/deploys/672a1df66e65380008652bf6
😎 Deploy Preview https://deploy-preview-1003--sovryn-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Sep 12, 2024

Deploy Preview for sovryn-dapp ready!

Name Link
🔨 Latest commit f6d4fea
🔍 Latest deploy log https://app.netlify.com/sites/sovryn-dapp/deploys/672a1df6619cba0008bf611a
😎 Deploy Preview https://deploy-preview-1003--sovryn-dapp.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@soulBit soulBit added the do-not-merge PR should not be merged due to dependencies/blockers label Sep 13, 2024
chescalante and others added 11 commits September 16, 2024 10:59
* aave page static components, mobile first

* responsive panels

* functional static borrow asset list

* cleanup

* renaming

* lend assets list

* Lend positions list

* fixes and cleanup

* cleanup

* cleanup

* cleanup

* static ui done. missing validations

* add validations

* add validations

* move errors down

* borrow form modal

* pr comments

* pr comments

* fix typo

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/components/LendPositionAction/LendPositionAction.tsx

Co-authored-by: Juan Dahl <[email protected]>

* repay modals

* lend modal

* use simple table row

* asset amount input

* add missing translations

* fix translation

* units and prices mock

* setup layout for pool details screen

* wallet overview panel

* emode card mock

* max with for emode category

* top bar mock

* network switch

* cleanup

* ui fixes

* ui fixes, usd prices

* Efficiency card

* ordering

* fix filter 0 balances checkbox

* pr comment

* token

* Mocked table cards plus refactor of statistics card (#14)

* mocked table cards plus refactor of statistics card

* ui fixes

* Saf 41 charts (#16)

* mocked table cards plus refactor of statistics card

* ui fixes

* [SAF-41] give each graph it's own chart component

* [SAF-41] add htmlLegend plugin in charts; remove comments and refactor some colors moving them to constants

---------

Co-authored-by: matzapata <[email protected]>

* removed view transactions button (out of scope)

* fix breakpoints

* [SAF-41] fix color constant and background for mobile vs desktop views (#20)

* [SAF-41] fix color constant and background for mobile vs desktop views

* [SAF-41] use theme variables for colors and breakpoint usage for better consistency

* Apply suggestions from code review

Co-authored-by: Juan Dahl <[email protected]>

---------

Co-authored-by: Juan Dahl <[email protected]>

* Dashboard pool data integration (#15) (#22)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* pr comments

* unit fixes

* Lend integration (#19)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* wip

* Dashboard pool data integration (#15)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* pr comments

* unit fixes

* supply wip

* fix asset renderer
add usd amount
cleanups

* fixes

* cleanup

* Cache for aave hooks (#23)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* wip

* Dashboard pool data integration (#15)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* pr comments

* unit fixes

* supply wip

* fix asset renderer
add usd amount
cleanups

* fixes

* withdraw integration

* cache useAaveReservesData

* cache useUserReserves

* cleanup

* fix imports

* fix

* Develop mockups (#25)

* fix breakpoints

* [SAF-41] fix color constant and background for mobile vs desktop views (#20)

* [SAF-41] fix color constant and background for mobile vs desktop views

* [SAF-41] use theme variables for colors and breakpoint usage for better consistency

* Apply suggestions from code review

Co-authored-by: Juan Dahl <[email protected]>

---------

Co-authored-by: Juan Dahl <[email protected]>

---------

Co-authored-by: matzapata <[email protected]>
Co-authored-by: Juan Dahl <[email protected]>

* Withdraw integration (#21)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* wip

* Dashboard pool data integration (#15)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* pr comments

* unit fixes

* supply wip

* fix asset renderer
add usd amount
cleanups

* fixes

* withdraw integration

* fix and pr comment

* pr comment

* Borrow integration (#24)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* wip

* Dashboard pool data integration (#15)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* pr comments

* unit fixes

* supply wip

* fix asset renderer
add usd amount
cleanups

* fixes

* withdraw integration

* cache useAaveReservesData

* cache useUserReserves

* cleanup

* fix imports

* wip. Health bar failing, wrong liquidation price

* fix calculations

* fix calculations

* fix

* cleanup

* replace apy with apr and health ratio with collateral ratio

* Repay integration (#26)

* calculations

* aave repay transaction factory and hook
cleanup and fixes

* use CollateralRatioHealthBar
replace health rate with collateral rate

* implement collateral switch (#27)

* Cleanup (#28)

* cleanup

* fixes

* Update apps/frontend/package.json

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/AmountTransition/AmountTransition.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/AssetAmountPriceRenderer/AssetAmountPriceRenderer.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/NetworkSwitch/NetworkSwitch.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/EModeDetails/EModeDetails.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/SupplyDetailsGraph/SupplyDetailsGraph.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/SupplyDetailsGraph/SupplyDetailsGraph.tsx

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* remove LinkIcon

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* pr comments

* fixes

* fixes

* SAF-49 setup bob (#29)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

---------

Co-authored-by: Juan <[email protected]>

* SAF 50 - E-Mode (#30)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

---------

Co-authored-by: Juan <[email protected]>

* Toggle lend mode

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* SAF 52 - Toggle lend mode (#31)

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

---------

Co-authored-by: Juan <[email protected]>

* Fixes and cleanup (#33)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

* Fix. Missing fix on borrow.

* fix borrow power to match desired collateral ratio

* rollback to working contracts for borrow eth

* fixes

* fixes and max amount

* loading when account changes

* close emode on complete

* disable emode if just one category

* error handling

* feat(network): change to new sepolia (#36)

---------

Co-authored-by: Juan <[email protected]>

* Fixes UI (#35)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

* Fix. Missing fix on borrow.

* fix borrow power to match desired collateral ratio

* rollback to working contracts for borrow eth

* fixes

* fixes and max amount

* loading when account changes

* close emode on complete

* disable emode if just one category

* error handling

* SAF-59, SAF-58, SAF-60, SAF-61, SAF-57

* limit by liquidity

* fix

* feat(network): change to new sepolia (#36)

* fixes

---------

Co-authored-by: Juan <[email protected]>

* Saf 20/pool details integration topbar (#40)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

* Fix. Missing fix on borrow.

* fix borrow power to match desired collateral ratio

* rollback to working contracts for borrow eth

* fixes

* fixes and max amount

* loading when account changes

* close emode on complete

* disable emode if just one category

* error handling

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix calculation
add balances and filter zero balances

* [SAF-20] wip testing rates data from contract Reserve Rate Strategy

* [SAF-20] wip integrating useAaveRates hook

* connect topbar

* tokens links

* add link to oracle

---------

Co-authored-by: Juan <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>

* Saf 20/pool details integration sidebar (#41)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

* Fix. Missing fix on borrow.

* fix borrow power to match desired collateral ratio

* rollback to working contracts for borrow eth

* fixes

* fixes and max amount

* loading when account changes

* close emode on complete

* disable emode if just one category

* error handling

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix calculation
add balances and filter zero balances

* [SAF-20] wip testing rates data from contract Reserve Rate Strategy

* [SAF-20] wip integrating useAaveRates hook

* [SAF-20] fix hook useAaveRates

* connect topbar

* tokens links

* add link to oracle

* [SAF_20] fix: parse totalDebt using decimals

* sidebar integration

* Connect topbar, add token links and add to wallet (#37)

* connect topbar

* tokens links

* add link to oracle

* fix merge error

---------

Co-authored-by: Juan <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>

* Saf 20/pool details integration graphs stats (#42)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

* Fix. Missing fix on borrow.

* fix borrow power to match desired collateral ratio

* rollback to working contracts for borrow eth

* fixes

* fixes and max amount

* loading when account changes

* close emode on complete

* disable emode if just one category

* error handling

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix calculation
add balances and filter zero balances

* [SAF-20] wip testing rates data from contract Reserve Rate Strategy

* [SAF-20] wip integrating useAaveRates hook

* [SAF-20] fix hook useAaveRates

* [SAF_20] fix: parse totalDebt using decimals

* Connect topbar, add token links and add to wallet (#37)

* connect topbar

* tokens links

* add link to oracle

* Money Market Mockups (#990)

* aave page static components, mobile first

* responsive panels

* functional static borrow asset list

* cleanup

* renaming

* lend assets list

* Lend positions list

* fixes and cleanup

* cleanup

* cleanup

* cleanup

* static ui done. missing validations

* add validations

* add validations

* move errors down

* borrow form modal

* pr comments

* pr comments

* fix typo

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/components/LendPositionAction/LendPositionAction.tsx

Co-authored-by: Juan Dahl <[email protected]>

* repay modals

* lend modal

* use simple table row

* asset amount input

* add missing translations

* fix translation

* units and prices mock

* setup layout for pool details screen

* wallet overview panel

* emode card mock

* max with for emode category

* top bar mock

* network switch

* cleanup

* ui fixes

* ui fixes, usd prices

* Efficiency card

* ordering

* fix filter 0 balances checkbox

* pr comment

* token

* Mocked table cards plus refactor of statistics card (#14)

* mocked table cards plus refactor of statistics card

* ui fixes

* Saf 41 charts (#16)

* mocked table cards plus refactor of statistics card

* ui fixes

* [SAF-41] give each graph it's own chart component

* [SAF-41] add htmlLegend plugin in charts; remove comments and refactor some colors moving them to constants

---------

Co-authored-by: matzapata <[email protected]>

* removed view transactions button (out of scope)

* fix breakpoints

* [SAF-41] fix color constant and background for mobile vs desktop views (#20)

* [SAF-41] fix color constant and background for mobile vs desktop views

* [SAF-41] use theme variables for colors and breakpoint usage for better consistency

* Apply suggestions from code review

Co-authored-by: Juan Dahl <[email protected]>

---------

Co-authored-by: Juan Dahl <[email protected]>

* Update apps/frontend/package.json

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/AmountTransition/AmountTransition.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/AssetAmountPriceRenderer/AssetAmountPriceRenderer.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/NetworkSwitch/NetworkSwitch.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/EModeDetails/EModeDetails.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/SupplyDetailsGraph/SupplyDetailsGraph.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/SupplyDetailsGraph/SupplyDetailsGraph.tsx

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* remove LinkIcon

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* pr comments

* fixes

---------

Co-authored-by: matzapata <[email protected]>
Co-authored-by: Matias Zapata <[email protected]>
Co-authored-by: Juan Dahl <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>
Co-authored-by: Pietro <[email protected]>

* chore: cleanup

* connected graphs

* cleanup

* cleanup

* cleanup

---------

Co-authored-by: Juan <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>
Co-authored-by: Christian Escalante <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>
Co-authored-by: Pietro <[email protected]>
Co-authored-by: Pietro <[email protected]>

* fixes

* Saf 20/charts integration (exclude supply and borrow by now) (#46)

* [SAF_20] remove mocks from pool details; create hooks useAaveRates and useAaveHistoryReserves

* [SAF-20] fix conflicts

* [SAF_20] mock api response by now

* [SAF_20] remove mock; prevent calling history data by now

* cleanup

* cleanup

* fixes

* fix: prevent NaN in interest rate charts when no data is retrieved

* fix stats

* fix available liquidity

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/LendAssetsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/BorrowPositionsList/components/BorrowPositionDetails/BorrowPositionDetails.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/BorrowPositionsList/BorrowPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* coments

* fix borrow power

* fixes and cleanup

* Fixes and cleanup (#48)

* coments

* fix borrow power

* fixes and cleanup

* cleanup

* Cleanup (#49)

* coments

* fix borrow power

* fixes and cleanup

* cleanup

* refactor config for same code style and handle mainnet config

* Refactor config for same code style and handle mainnet config (#50)

* coments

* fix borrow power

* fixes and cleanup

* cleanup

* refactor config for same code style and handle mainnet config

* small fixes

* remove unused files and fix repay with balance future collateral ratio

* remove unused files and fix repay with balance future collateral ratio (#51)

* coments

* fix borrow power

* fixes and cleanup

* cleanup

* refactor config for same code style and handle mainnet config

* small fixes

* remove unused files and fix repay with balance future collateral ratio

* cleanup and fixes

* disable collateral toggle if liquidation risk arises from it

* add sorting in tables

* precision and percentage

* fix hex chainId

* fix chain id

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* rename USD to Usd

* pr comments

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/InterestRateModelGraph/components/Chart/Chart.utils.ts

Co-authored-by: Pietro <[email protected]>

* pr comment

* disable tooltip for infinite

* [SAF_20] integrate charts data and api (#47)

* [SAF_20] integrate charts data and api

* [SAF_20] rewrite useAaveReservesHistory without using cancelable

* [SAF_20] remove type

* [SAF_20] remove jsdocs; use Decimal instead of number

* [SAF_20] remove unnecesary variable calculatedDate ; replace native fetch by axios

* [SAF_20] remove comments

* [SAF_20] move 18,27 decimals constants to math; move abi to constant file and remove unnecesary fields

* [SAF_20] use getProvider with bob chain id

* [SAF_20] remove unnecesary typed expression

* [SAF-20] add use memo

* [SAF-20] remove redundant use of loading

* [SAF-20] remove let by const

* [SAF-20] refactor supply and borrow chart data setup

* [SAF-20] refactor useRate giving symbol as a paramter

* [SAF-20] add manually time controls to charts (#52)

* [SAF-20] add manually time controls to charts

* [SAF-20] use enum from history hook to type TimeRangeButtons

* [SAF-20] replace color codes by theme variables

* [SAF-20] translate rate results from string to Decimal type ; delete unnecesary contract for the rate calculation that was introduced for reading getStableRateExcessOffset and OPTIMAL_STABLE_TO_TOTAL_DEBT_RATIO

* [SAF-20] rebase develop; resolve conflicts

* [SAF-20] rename text variable

* [SAF-20] fix calculation of utilization ratio

* [SAF-20] integrate REACT_APP_RATES_HISTORY_API_URL

* [SAF-20] improve calculateUtilizationRate

* [SAF-20] extract calculateUtilizationRate to util file; add check for value between zero and one ; add tests

* Update .env.example

* [SAF-20] remove unnecesary WEI def

* [SAF-20] wrapp describes

* [SAF-20] map values into Decimal

* [SAF-20] fix building reserve address

* [SAF-20] remove comment about a possible BUG; doesnt apply

* [SAF-20] move checkinig isBetweenZeroAndOne to inner function calculateUtilizationRate and return Zero in that case

* [SAF-20] rename parameter

* [SAF-20] move URL to constants

* [SAF-20] remove useless comments

* [SAF-20] add missing useCallback

* [SAF-20] rename parameter

* [SAF-20] remove isBetweenZeroAndOne leave the check inside calculation; move calculateUtilizationRate into AaveCalculations class

* [SAF-20] Use the same naming convention for RatesHistoryApiUrl as the rest of the constants

* [SAF-20] simplify hook useAaveRates with just one memo hook

* [SAF-20] simplify history data by removing unused utilizationRate and stableBorrowRate ; return just a type number to avoid unnecesary conversions

* [SAF-20] use Decimal to calculate interest rates

* fix(ui): fix size of wallet card

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* @pietro-maximoff suggestion applied: 'it doesn't need to be changed'

---------

Co-authored-by: matzapata <[email protected]>
Co-authored-by: Matias Zapata <[email protected]>
Co-authored-by: Juan Dahl <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>
Co-authored-by: Pietro <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>
Co-authored-by: Pietro <[email protected]>
Co-authored-by: juandahl <[email protected]>
* aave page static components, mobile first

* responsive panels

* functional static borrow asset list

* cleanup

* renaming

* lend assets list

* Lend positions list

* fixes and cleanup

* cleanup

* cleanup

* cleanup

* static ui done. missing validations

* add validations

* add validations

* move errors down

* borrow form modal

* pr comments

* pr comments

* fix typo

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/components/LendPositionAction/LendPositionAction.tsx

Co-authored-by: Juan Dahl <[email protected]>

* repay modals

* lend modal

* use simple table row

* asset amount input

* add missing translations

* fix translation

* units and prices mock

* setup layout for pool details screen

* wallet overview panel

* emode card mock

* max with for emode category

* top bar mock

* network switch

* cleanup

* ui fixes

* ui fixes, usd prices

* Efficiency card

* ordering

* fix filter 0 balances checkbox

* pr comment

* token

* Mocked table cards plus refactor of statistics card (#14)

* mocked table cards plus refactor of statistics card

* ui fixes

* Saf 41 charts (#16)

* mocked table cards plus refactor of statistics card

* ui fixes

* [SAF-41] give each graph it's own chart component

* [SAF-41] add htmlLegend plugin in charts; remove comments and refactor some colors moving them to constants

---------

Co-authored-by: matzapata <[email protected]>

* removed view transactions button (out of scope)

* fix breakpoints

* [SAF-41] fix color constant and background for mobile vs desktop views (#20)

* [SAF-41] fix color constant and background for mobile vs desktop views

* [SAF-41] use theme variables for colors and breakpoint usage for better consistency

* Apply suggestions from code review

Co-authored-by: Juan Dahl <[email protected]>

---------

Co-authored-by: Juan Dahl <[email protected]>

* Dashboard pool data integration (#15) (#22)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* pr comments

* unit fixes

* Lend integration (#19)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* wip

* Dashboard pool data integration (#15)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* pr comments

* unit fixes

* supply wip

* fix asset renderer
add usd amount
cleanups

* fixes

* cleanup

* Cache for aave hooks (#23)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* wip

* Dashboard pool data integration (#15)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* pr comments

* unit fixes

* supply wip

* fix asset renderer
add usd amount
cleanups

* fixes

* withdraw integration

* cache useAaveReservesData

* cache useUserReserves

* cleanup

* fix imports

* fix

* Develop mockups (#25)

* fix breakpoints

* [SAF-41] fix color constant and background for mobile vs desktop views (#20)

* [SAF-41] fix color constant and background for mobile vs desktop views

* [SAF-41] use theme variables for colors and breakpoint usage for better consistency

* Apply suggestions from code review

Co-authored-by: Juan Dahl <[email protected]>

---------

Co-authored-by: Juan Dahl <[email protected]>

---------

Co-authored-by: matzapata <[email protected]>
Co-authored-by: Juan Dahl <[email protected]>

* Withdraw integration (#21)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* wip

* Dashboard pool data integration (#15)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* pr comments

* unit fixes

* supply wip

* fix asset renderer
add usd amount
cleanups

* fixes

* withdraw integration

* fix and pr comment

* pr comment

* Borrow integration (#24)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* wip

* Dashboard pool data integration (#15)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* pr comments

* unit fixes

* supply wip

* fix asset renderer
add usd amount
cleanups

* fixes

* withdraw integration

* cache useAaveReservesData

* cache useUserReserves

* cleanup

* fix imports

* wip. Health bar failing, wrong liquidation price

* fix calculations

* fix calculations

* fix

* cleanup

* replace apy with apr and health ratio with collateral ratio

* Repay integration (#26)

* calculations

* aave repay transaction factory and hook
cleanup and fixes

* use CollateralRatioHealthBar
replace health rate with collateral rate

* implement collateral switch (#27)

* Cleanup (#28)

* cleanup

* fixes

* Update apps/frontend/package.json

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/AmountTransition/AmountTransition.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/AssetAmountPriceRenderer/AssetAmountPriceRenderer.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/NetworkSwitch/NetworkSwitch.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/EModeDetails/EModeDetails.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/SupplyDetailsGraph/SupplyDetailsGraph.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/SupplyDetailsGraph/SupplyDetailsGraph.tsx

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* remove LinkIcon

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* pr comments

* fixes

* fixes

* SAF-49 setup bob (#29)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

---------

Co-authored-by: Juan <[email protected]>

* SAF 50 - E-Mode (#30)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

---------

Co-authored-by: Juan <[email protected]>

* Toggle lend mode

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* SAF 52 - Toggle lend mode (#31)

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

---------

Co-authored-by: Juan <[email protected]>

* Fixes and cleanup (#33)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

* Fix. Missing fix on borrow.

* fix borrow power to match desired collateral ratio

* rollback to working contracts for borrow eth

* fixes

* fixes and max amount

* loading when account changes

* close emode on complete

* disable emode if just one category

* error handling

* feat(network): change to new sepolia (#36)

---------

Co-authored-by: Juan <[email protected]>

* Fixes UI (#35)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

* Fix. Missing fix on borrow.

* fix borrow power to match desired collateral ratio

* rollback to working contracts for borrow eth

* fixes

* fixes and max amount

* loading when account changes

* close emode on complete

* disable emode if just one category

* error handling

* SAF-59, SAF-58, SAF-60, SAF-61, SAF-57

* limit by liquidity

* fix

* feat(network): change to new sepolia (#36)

* fixes

---------

Co-authored-by: Juan <[email protected]>

* Saf 20/pool details integration topbar (#40)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

* Fix. Missing fix on borrow.

* fix borrow power to match desired collateral ratio

* rollback to working contracts for borrow eth

* fixes

* fixes and max amount

* loading when account changes

* close emode on complete

* disable emode if just one category

* error handling

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix calculation
add balances and filter zero balances

* [SAF-20] wip testing rates data from contract Reserve Rate Strategy

* [SAF-20] wip integrating useAaveRates hook

* connect topbar

* tokens links

* add link to oracle

---------

Co-authored-by: Juan <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>

* Saf 20/pool details integration sidebar (#41)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

* Fix. Missing fix on borrow.

* fix borrow power to match desired collateral ratio

* rollback to working contracts for borrow eth

* fixes

* fixes and max amount

* loading when account changes

* close emode on complete

* disable emode if just one category

* error handling

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix calculation
add balances and filter zero balances

* [SAF-20] wip testing rates data from contract Reserve Rate Strategy

* [SAF-20] wip integrating useAaveRates hook

* [SAF-20] fix hook useAaveRates

* connect topbar

* tokens links

* add link to oracle

* [SAF_20] fix: parse totalDebt using decimals

* sidebar integration

* Connect topbar, add token links and add to wallet (#37)

* connect topbar

* tokens links

* add link to oracle

* fix merge error

---------

Co-authored-by: Juan <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>

* Saf 20/pool details integration graphs stats (#42)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

* Fix. Missing fix on borrow.

* fix borrow power to match desired collateral ratio

* rollback to working contracts for borrow eth

* fixes

* fixes and max amount

* loading when account changes

* close emode on complete

* disable emode if just one category

* error handling

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix calculation
add balances and filter zero balances

* [SAF-20] wip testing rates data from contract Reserve Rate Strategy

* [SAF-20] wip integrating useAaveRates hook

* [SAF-20] fix hook useAaveRates

* [SAF_20] fix: parse totalDebt using decimals

* Connect topbar, add token links and add to wallet (#37)

* connect topbar

* tokens links

* add link to oracle

* Money Market Mockups (#990)

* aave page static components, mobile first

* responsive panels

* functional static borrow asset list

* cleanup

* renaming

* lend assets list

* Lend positions list

* fixes and cleanup

* cleanup

* cleanup

* cleanup

* static ui done. missing validations

* add validations

* add validations

* move errors down

* borrow form modal

* pr comments

* pr comments

* fix typo

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/components/LendPositionAction/LendPositionAction.tsx

Co-authored-by: Juan Dahl <[email protected]>

* repay modals

* lend modal

* use simple table row

* asset amount input

* add missing translations

* fix translation

* units and prices mock

* setup layout for pool details screen

* wallet overview panel

* emode card mock

* max with for emode category

* top bar mock

* network switch

* cleanup

* ui fixes

* ui fixes, usd prices

* Efficiency card

* ordering

* fix filter 0 balances checkbox

* pr comment

* token

* Mocked table cards plus refactor of statistics card (#14)

* mocked table cards plus refactor of statistics card

* ui fixes

* Saf 41 charts (#16)

* mocked table cards plus refactor of statistics card

* ui fixes

* [SAF-41] give each graph it's own chart component

* [SAF-41] add htmlLegend plugin in charts; remove comments and refactor some colors moving them to constants

---------

Co-authored-by: matzapata <[email protected]>

* removed view transactions button (out of scope)

* fix breakpoints

* [SAF-41] fix color constant and background for mobile vs desktop views (#20)

* [SAF-41] fix color constant and background for mobile vs desktop views

* [SAF-41] use theme variables for colors and breakpoint usage for better consistency

* Apply suggestions from code review

Co-authored-by: Juan Dahl <[email protected]>

---------

Co-authored-by: Juan Dahl <[email protected]>

* Update apps/frontend/package.json

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/AmountTransition/AmountTransition.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/AssetAmountPriceRenderer/AssetAmountPriceRenderer.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/NetworkSwitch/NetworkSwitch.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/EModeDetails/EModeDetails.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/SupplyDetailsGraph/SupplyDetailsGraph.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/SupplyDetailsGraph/SupplyDetailsGraph.tsx

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* remove LinkIcon

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* pr comments

* fixes

---------

Co-authored-by: matzapata <[email protected]>
Co-authored-by: Matias Zapata <[email protected]>
Co-authored-by: Juan Dahl <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>
Co-authored-by: Pietro <[email protected]>

* chore: cleanup

* connected graphs

* cleanup

* cleanup

* cleanup

---------

Co-authored-by: Juan <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>
Co-authored-by: Christian Escalante <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>
Co-authored-by: Pietro <[email protected]>
Co-authored-by: Pietro <[email protected]>

* fixes

* Saf 20/charts integration (exclude supply and borrow by now) (#46)

* [SAF_20] remove mocks from pool details; create hooks useAaveRates and useAaveHistoryReserves

* [SAF-20] fix conflicts

* [SAF_20] mock api response by now

* [SAF_20] remove mock; prevent calling history data by now

* cleanup

* cleanup

* fixes

* fix: prevent NaN in interest rate charts when no data is retrieved

* fix stats

* fix available liquidity

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/LendAssetsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/BorrowPositionsList/components/BorrowPositionDetails/BorrowPositionDetails.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/BorrowPositionsList/BorrowPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* coments

* fix borrow power

* fixes and cleanup

* Fixes and cleanup (#48)

* coments

* fix borrow power

* fixes and cleanup

* cleanup

* Cleanup (#49)

* coments

* fix borrow power

* fixes and cleanup

* cleanup

* refactor config for same code style and handle mainnet config

* Refactor config for same code style and handle mainnet config (#50)

* coments

* fix borrow power

* fixes and cleanup

* cleanup

* refactor config for same code style and handle mainnet config

* small fixes

* remove unused files and fix repay with balance future collateral ratio

* remove unused files and fix repay with balance future collateral ratio (#51)

* coments

* fix borrow power

* fixes and cleanup

* cleanup

* refactor config for same code style and handle mainnet config

* small fixes

* remove unused files and fix repay with balance future collateral ratio

* cleanup and fixes

* disable collateral toggle if liquidation risk arises from it

* add sorting in tables

* precision and percentage

* fix hex chainId

* fix chain id

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* rename USD to Usd

* pr comments

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/InterestRateModelGraph/components/Chart/Chart.utils.ts

Co-authored-by: Pietro <[email protected]>

* pr comment

* disable tooltip for infinite

* [SAF_20] integrate charts data and api (#47)

* [SAF_20] integrate charts data and api

* [SAF_20] rewrite useAaveReservesHistory without using cancelable

* [SAF_20] remove type

* [SAF_20] remove jsdocs; use Decimal instead of number

* [SAF_20] remove unnecesary variable calculatedDate ; replace native fetch by axios

* [SAF_20] remove comments

* [SAF_20] move 18,27 decimals constants to math; move abi to constant file and remove unnecesary fields

* [SAF_20] use getProvider with bob chain id

* [SAF_20] remove unnecesary typed expression

* [SAF-20] add use memo

* [SAF-20] remove redundant use of loading

* [SAF-20] remove let by const

* [SAF-20] refactor supply and borrow chart data setup

* [SAF-20] refactor useRate giving symbol as a paramter

* [SAF-20] add manually time controls to charts (#52)

* [SAF-20] add manually time controls to charts

* [SAF-20] use enum from history hook to type TimeRangeButtons

* [SAF-20] replace color codes by theme variables

* [SAF-20] translate rate results from string to Decimal type ; delete unnecesary contract for the rate calculation that was introduced for reading getStableRateExcessOffset and OPTIMAL_STABLE_TO_TOTAL_DEBT_RATIO

* [SAF-20] rebase develop; resolve conflicts

* [SAF-20] rename text variable

* [SAF-20] fix calculation of utilization ratio

* [SAF-20] integrate REACT_APP_RATES_HISTORY_API_URL

* [SAF-20] improve calculateUtilizationRate

* [SAF-20] extract calculateUtilizationRate to util file; add check for value between zero and one ; add tests

* Update .env.example

* [SAF-20] remove unnecesary WEI def

* [SAF-20] wrapp describes

* [SAF-20] map values into Decimal

* [SAF-20] fix building reserve address

* [SAF-20] remove comment about a possible BUG; doesnt apply

* [SAF-20] move checkinig isBetweenZeroAndOne to inner function calculateUtilizationRate and return Zero in that case

* [SAF-20] rename parameter

* [SAF-20] move URL to constants

* [SAF-20] remove useless comments

* [SAF-20] add missing useCallback

* [SAF-20] rename parameter

* [SAF-20] remove isBetweenZeroAndOne leave the check inside calculation; move calculateUtilizationRate into AaveCalculations class

* [SAF-20] Use the same naming convention for RatesHistoryApiUrl as the rest of the constants

* [SAF-20] simplify hook useAaveRates with just one memo hook

* [SAF-20] simplify history data by removing unused utilizationRate and stableBorrowRate ; return just a type number to avoid unnecesary conversions

* [SAF-20] use Decimal to calculate interest rates

* fix(ui): fix size of wallet card

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* @pietro-maximoff suggestion applied: 'it doesn't need to be changed'

* fixes and improvements

* Qa fixes (#57)

* fixes

* fix translation

* fix lend position list

* cleanup

* replicate exceeds maximum amount to other components

* remove % from health factor

* fix: code improvements

---------

Co-authored-by: matzapata <[email protected]>
Co-authored-by: Matias Zapata <[email protected]>
Co-authored-by: Juan Dahl <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>
Co-authored-by: Pietro <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>
Co-authored-by: Pietro <[email protected]>
Co-authored-by: juandahl <[email protected]>
* aave page static components, mobile first

* responsive panels

* functional static borrow asset list

* cleanup

* renaming

* lend assets list

* Lend positions list

* fixes and cleanup

* cleanup

* cleanup

* cleanup

* static ui done. missing validations

* add validations

* add validations

* move errors down

* borrow form modal

* pr comments

* pr comments

* fix typo

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/components/LendPositionAction/LendPositionAction.tsx

Co-authored-by: Juan Dahl <[email protected]>

* repay modals

* lend modal

* use simple table row

* asset amount input

* add missing translations

* fix translation

* units and prices mock

* setup layout for pool details screen

* wallet overview panel

* emode card mock

* max with for emode category

* top bar mock

* network switch

* cleanup

* ui fixes

* ui fixes, usd prices

* Efficiency card

* ordering

* fix filter 0 balances checkbox

* pr comment

* token

* Mocked table cards plus refactor of statistics card (#14)

* mocked table cards plus refactor of statistics card

* ui fixes

* Saf 41 charts (#16)

* mocked table cards plus refactor of statistics card

* ui fixes

* [SAF-41] give each graph it's own chart component

* [SAF-41] add htmlLegend plugin in charts; remove comments and refactor some colors moving them to constants

---------

Co-authored-by: matzapata <[email protected]>

* removed view transactions button (out of scope)

* fix breakpoints

* [SAF-41] fix color constant and background for mobile vs desktop views (#20)

* [SAF-41] fix color constant and background for mobile vs desktop views

* [SAF-41] use theme variables for colors and breakpoint usage for better consistency

* Apply suggestions from code review

Co-authored-by: Juan Dahl <[email protected]>

---------

Co-authored-by: Juan Dahl <[email protected]>

* Dashboard pool data integration (#15) (#22)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* pr comments

* unit fixes

* Lend integration (#19)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* wip

* Dashboard pool data integration (#15)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* pr comments

* unit fixes

* supply wip

* fix asset renderer
add usd amount
cleanups

* fixes

* cleanup

* Cache for aave hooks (#23)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* wip

* Dashboard pool data integration (#15)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* pr comments

* unit fixes

* supply wip

* fix asset renderer
add usd amount
cleanups

* fixes

* withdraw integration

* cache useAaveReservesData

* cache useUserReserves

* cleanup

* fix imports

* fix

* Develop mockups (#25)

* fix breakpoints

* [SAF-41] fix color constant and background for mobile vs desktop views (#20)

* [SAF-41] fix color constant and background for mobile vs desktop views

* [SAF-41] use theme variables for colors and breakpoint usage for better consistency

* Apply suggestions from code review

Co-authored-by: Juan Dahl <[email protected]>

---------

Co-authored-by: Juan Dahl <[email protected]>

---------

Co-authored-by: matzapata <[email protected]>
Co-authored-by: Juan Dahl <[email protected]>

* Withdraw integration (#21)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* wip

* Dashboard pool data integration (#15)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* pr comments

* unit fixes

* supply wip

* fix asset renderer
add usd amount
cleanups

* fixes

* withdraw integration

* fix and pr comment

* pr comment

* Borrow integration (#24)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* wip

* Dashboard pool data integration (#15)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* pr comments

* unit fixes

* supply wip

* fix asset renderer
add usd amount
cleanups

* fixes

* withdraw integration

* cache useAaveReservesData

* cache useUserReserves

* cleanup

* fix imports

* wip. Health bar failing, wrong liquidation price

* fix calculations

* fix calculations

* fix

* cleanup

* replace apy with apr and health ratio with collateral ratio

* Repay integration (#26)

* calculations

* aave repay transaction factory and hook
cleanup and fixes

* use CollateralRatioHealthBar
replace health rate with collateral rate

* implement collateral switch (#27)

* Cleanup (#28)

* cleanup

* fixes

* Update apps/frontend/package.json

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/AmountTransition/AmountTransition.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/AssetAmountPriceRenderer/AssetAmountPriceRenderer.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/NetworkSwitch/NetworkSwitch.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/EModeDetails/EModeDetails.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/SupplyDetailsGraph/SupplyDetailsGraph.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/SupplyDetailsGraph/SupplyDetailsGraph.tsx

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* remove LinkIcon

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* pr comments

* fixes

* fixes

* SAF-49 setup bob (#29)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

---------

Co-authored-by: Juan <[email protected]>

* SAF 50 - E-Mode (#30)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

---------

Co-authored-by: Juan <[email protected]>

* Toggle lend mode

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* SAF 52 - Toggle lend mode (#31)

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

---------

Co-authored-by: Juan <[email protected]>

* Fixes and cleanup (#33)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

* Fix. Missing fix on borrow.

* fix borrow power to match desired collateral ratio

* rollback to working contracts for borrow eth

* fixes

* fixes and max amount

* loading when account changes

* close emode on complete

* disable emode if just one category

* error handling

* feat(network): change to new sepolia (#36)

---------

Co-authored-by: Juan <[email protected]>

* Fixes UI (#35)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

* Fix. Missing fix on borrow.

* fix borrow power to match desired collateral ratio

* rollback to working contracts for borrow eth

* fixes

* fixes and max amount

* loading when account changes

* close emode on complete

* disable emode if just one category

* error handling

* SAF-59, SAF-58, SAF-60, SAF-61, SAF-57

* limit by liquidity

* fix

* feat(network): change to new sepolia (#36)

* fixes

---------

Co-authored-by: Juan <[email protected]>

* Saf 20/pool details integration topbar (#40)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

* Fix. Missing fix on borrow.

* fix borrow power to match desired collateral ratio

* rollback to working contracts for borrow eth

* fixes

* fixes and max amount

* loading when account changes

* close emode on complete

* disable emode if just one category

* error handling

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix calculation
add balances and filter zero balances

* [SAF-20] wip testing rates data from contract Reserve Rate Strategy

* [SAF-20] wip integrating useAaveRates hook

* connect topbar

* tokens links

* add link to oracle

---------

Co-authored-by: Juan <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>

* Saf 20/pool details integration sidebar (#41)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

* Fix. Missing fix on borrow.

* fix borrow power to match desired collateral ratio

* rollback to working contracts for borrow eth

* fixes

* fixes and max amount

* loading when account changes

* close emode on complete

* disable emode if just one category

* error handling

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix calculation
add balances and filter zero balances

* [SAF-20] wip testing rates data from contract Reserve Rate Strategy

* [SAF-20] wip integrating useAaveRates hook

* [SAF-20] fix hook useAaveRates

* connect topbar

* tokens links

* add link to oracle

* [SAF_20] fix: parse totalDebt using decimals

* sidebar integration

* Connect topbar, add token links and add to wallet (#37)

* connect topbar

* tokens links

* add link to oracle

* fix merge error

---------

Co-authored-by: Juan <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>

* Saf 20/pool details integration graphs stats (#42)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

* Fix. Missing fix on borrow.

* fix borrow power to match desired collateral ratio

* rollback to working contracts for borrow eth

* fixes

* fixes and max amount

* loading when account changes

* close emode on complete

* disable emode if just one category

* error handling

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix calculation
add balances and filter zero balances

* [SAF-20] wip testing rates data from contract Reserve Rate Strategy

* [SAF-20] wip integrating useAaveRates hook

* [SAF-20] fix hook useAaveRates

* [SAF_20] fix: parse totalDebt using decimals

* Connect topbar, add token links and add to wallet (#37)

* connect topbar

* tokens links

* add link to oracle

* Money Market Mockups (#990)

* aave page static components, mobile first

* responsive panels

* functional static borrow asset list

* cleanup

* renaming

* lend assets list

* Lend positions list

* fixes and cleanup

* cleanup

* cleanup

* cleanup

* static ui done. missing validations

* add validations

* add validations

* move errors down

* borrow form modal

* pr comments

* pr comments

* fix typo

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/components/LendPositionAction/LendPositionAction.tsx

Co-authored-by: Juan Dahl <[email protected]>

* repay modals

* lend modal

* use simple table row

* asset amount input

* add missing translations

* fix translation

* units and prices mock

* setup layout for pool details screen

* wallet overview panel

* emode card mock

* max with for emode category

* top bar mock

* network switch

* cleanup

* ui fixes

* ui fixes, usd prices

* Efficiency card

* ordering

* fix filter 0 balances checkbox

* pr comment

* token

* Mocked table cards plus refactor of statistics card (#14)

* mocked table cards plus refactor of statistics card

* ui fixes

* Saf 41 charts (#16)

* mocked table cards plus refactor of statistics card

* ui fixes

* [SAF-41] give each graph it's own chart component

* [SAF-41] add htmlLegend plugin in charts; remove comments and refactor some colors moving them to constants

---------

Co-authored-by: matzapata <[email protected]>

* removed view transactions button (out of scope)

* fix breakpoints

* [SAF-41] fix color constant and background for mobile vs desktop views (#20)

* [SAF-41] fix color constant and background for mobile vs desktop views

* [SAF-41] use theme variables for colors and breakpoint usage for better consistency

* Apply suggestions from code review

Co-authored-by: Juan Dahl <[email protected]>

---------

Co-authored-by: Juan Dahl <[email protected]>

* Update apps/frontend/package.json

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/AmountTransition/AmountTransition.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/AssetAmountPriceRenderer/AssetAmountPriceRenderer.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/NetworkSwitch/NetworkSwitch.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/EModeDetails/EModeDetails.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/SupplyDetailsGraph/SupplyDetailsGraph.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/SupplyDetailsGraph/SupplyDetailsGraph.tsx

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* remove LinkIcon

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* pr comments

* fixes

---------

Co-authored-by: matzapata <[email protected]>
Co-authored-by: Matias Zapata <[email protected]>
Co-authored-by: Juan Dahl <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>
Co-authored-by: Pietro <[email protected]>

* chore: cleanup

* connected graphs

* cleanup

* cleanup

* cleanup

---------

Co-authored-by: Juan <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>
Co-authored-by: Christian Escalante <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>
Co-authored-by: Pietro <[email protected]>
Co-authored-by: Pietro <[email protected]>

* fixes

* Saf 20/charts integration (exclude supply and borrow by now) (#46)

* [SAF_20] remove mocks from pool details; create hooks useAaveRates and useAaveHistoryReserves

* [SAF-20] fix conflicts

* [SAF_20] mock api response by now

* [SAF_20] remove mock; prevent calling history data by now

* cleanup

* cleanup

* fixes

* fix: prevent NaN in interest rate charts when no data is retrieved

* fix stats

* fix available liquidity

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/LendAssetsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/BorrowPositionsList/components/BorrowPositionDetails/BorrowPositionDetails.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/BorrowPositionsList/BorrowPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* coments

* fix borrow power

* fixes and cleanup

* Fixes and cleanup (#48)

* coments

* fix borrow power

* fixes and cleanup

* cleanup

* Cleanup (#49)

* coments

* fix borrow power

* fixes and cleanup

* cleanup

* refactor config for same code style and handle mainnet config

* Refactor config for same code style and handle mainnet config (#50)

* coments

* fix borrow power

* fixes and cleanup

* cleanup

* refactor config for same code style and handle mainnet config

* small fixes

* remove unused files and fix repay with balance future collateral ratio

* remove unused files and fix repay with balance future collateral ratio (#51)

* coments

* fix borrow power

* fixes and cleanup

* cleanup

* refactor config for same code style and handle mainnet config

* small fixes

* remove unused files and fix repay with balance future collateral ratio

* cleanup and fixes

* disable collateral toggle if liquidation risk arises from it

* add sorting in tables

* precision and percentage

* fix hex chainId

* fix chain id

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* rename USD to Usd

* pr comments

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/InterestRateModelGraph/components/Chart/Chart.utils.ts

Co-authored-by: Pietro <[email protected]>

* pr comment

* disable tooltip for infinite

* [SAF_20] integrate charts data and api (#47)

* [SAF_20] integrate charts data and api

* [SAF_20] rewrite useAaveReservesHistory without using cancelable

* [SAF_20] remove type

* [SAF_20] remove jsdocs; use Decimal instead of number

* [SAF_20] remove unnecesary variable calculatedDate ; replace native fetch by axios

* [SAF_20] remove comments

* [SAF_20] move 18,27 decimals constants to math; move abi to constant file and remove unnecesary fields

* [SAF_20] use getProvider with bob chain id

* [SAF_20] remove unnecesary typed expression

* [SAF-20] add use memo

* [SAF-20] remove redundant use of loading

* [SAF-20] remove let by const

* [SAF-20] refactor supply and borrow chart data setup

* [SAF-20] refactor useRate giving symbol as a paramter

* [SAF-20] add manually time controls to charts (#52)

* [SAF-20] add manually time controls to charts

* [SAF-20] use enum from history hook to type TimeRangeButtons

* [SAF-20] replace color codes by theme variables

* [SAF-20] translate rate results from string to Decimal type ; delete unnecesary contract for the rate calculation that was introduced for reading getStableRateExcessOffset and OPTIMAL_STABLE_TO_TOTAL_DEBT_RATIO

* [SAF-20] rebase develop; resolve conflicts

* [SAF-20] rename text variable

* [SAF-20] fix calculation of utilization ratio

* [SAF-20] integrate REACT_APP_RATES_HISTORY_API_URL

* [SAF-20] improve calculateUtilizationRate

* [SAF-20] extract calculateUtilizationRate to util file; add check for value between zero and one ; add tests

* Update .env.example

* [SAF-20] remove unnecesary WEI def

* [SAF-20] wrapp describes

* [SAF-20] map values into Decimal

* [SAF-20] fix building reserve address

* [SAF-20] remove comment about a possible BUG; doesnt apply

* [SAF-20] move checkinig isBetweenZeroAndOne to inner function calculateUtilizationRate and return Zero in that case

* [SAF-20] rename parameter

* [SAF-20] move URL to constants

* [SAF-20] remove useless comments

* [SAF-20] add missing useCallback

* [SAF-20] rename parameter

* [SAF-20] remove isBetweenZeroAndOne leave the check inside calculation; move calculateUtilizationRate into AaveCalculations class

* [SAF-20] Use the same naming convention for RatesHistoryApiUrl as the rest of the constants

* [SAF-20] simplify hook useAaveRates with just one memo hook

* [SAF-20] simplify history data by removing unused utilizationRate and stableBorrowRate ; return just a type number to avoid unnecesary conversions

* [SAF-20] use Decimal to calculate interest rates

* fix(ui): fix size of wallet card

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* @pietro-maximoff suggestion applied: 'it doesn't need to be changed'

* fixes and improvements

* Qa fixes (#57)

* fixes

* fix translation

* fix lend position list

* cleanup

* replicate exceeds maximum amount to other components

* remove % from health factor

* fix: code improvements

* fix(borrow): use apy instead of apr and fix rounding numbers

* fix: typo

* fix: add validations

* fix: increase error factor for eth debts

* fix: increase error factor for eth debts

* fix: use math utils

---------

Co-authored-by: matzapata <[email protected]>
Co-authored-by: Matias Zapata <[email protected]>
Co-authored-by: Juan Dahl <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>
Co-authored-by: Pietro <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>
Co-authored-by: Pietro <[email protected]>
Co-authored-by: juandahl <[email protected]>
* aave page static components, mobile first

* responsive panels

* functional static borrow asset list

* cleanup

* renaming

* lend assets list

* Lend positions list

* fixes and cleanup

* cleanup

* cleanup

* cleanup

* static ui done. missing validations

* add validations

* add validations

* move errors down

* borrow form modal

* pr comments

* pr comments

* fix typo

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/components/LendPositionAction/LendPositionAction.tsx

Co-authored-by: Juan Dahl <[email protected]>

* repay modals

* lend modal

* use simple table row

* asset amount input

* add missing translations

* fix translation

* units and prices mock

* setup layout for pool details screen

* wallet overview panel

* emode card mock

* max with for emode category

* top bar mock

* network switch

* cleanup

* ui fixes

* ui fixes, usd prices

* Efficiency card

* ordering

* fix filter 0 balances checkbox

* pr comment

* token

* Mocked table cards plus refactor of statistics card (#14)

* mocked table cards plus refactor of statistics card

* ui fixes

* Saf 41 charts (#16)

* mocked table cards plus refactor of statistics card

* ui fixes

* [SAF-41] give each graph it's own chart component

* [SAF-41] add htmlLegend plugin in charts; remove comments and refactor some colors moving them to constants

---------

Co-authored-by: matzapata <[email protected]>

* removed view transactions button (out of scope)

* fix breakpoints

* [SAF-41] fix color constant and background for mobile vs desktop views (#20)

* [SAF-41] fix color constant and background for mobile vs desktop views

* [SAF-41] use theme variables for colors and breakpoint usage for better consistency

* Apply suggestions from code review

Co-authored-by: Juan Dahl <[email protected]>

---------

Co-authored-by: Juan Dahl <[email protected]>

* Dashboard pool data integration (#15) (#22)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* pr comments

* unit fixes

* Lend integration (#19)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* wip

* Dashboard pool data integration (#15)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* pr comments

* unit fixes

* supply wip

* fix asset renderer
add usd amount
cleanups

* fixes

* cleanup

* Cache for aave hooks (#23)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* wip

* Dashboard pool data integration (#15)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* pr comments

* unit fixes

* supply wip

* fix asset renderer
add usd amount
cleanups

* fixes

* withdraw integration

* cache useAaveReservesData

* cache useUserReserves

* cleanup

* fix imports

* fix

* Develop mockups (#25)

* fix breakpoints

* [SAF-41] fix color constant and background for mobile vs desktop views (#20)

* [SAF-41] fix color constant and background for mobile vs desktop views

* [SAF-41] use theme variables for colors and breakpoint usage for better consistency

* Apply suggestions from code review

Co-authored-by: Juan Dahl <[email protected]>

---------

Co-authored-by: Juan Dahl <[email protected]>

---------

Co-authored-by: matzapata <[email protected]>
Co-authored-by: Juan Dahl <[email protected]>

* Withdraw integration (#21)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* wip

* Dashboard pool data integration (#15)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* pr comments

* unit fixes

* supply wip

* fix asset renderer
add usd amount
cleanups

* fixes

* withdraw integration

* fix and pr comment

* pr comment

* Borrow integration (#24)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* wip

* Dashboard pool data integration (#15)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* pr comments

* unit fixes

* supply wip

* fix asset renderer
add usd amount
cleanups

* fixes

* withdraw integration

* cache useAaveReservesData

* cache useUserReserves

* cleanup

* fix imports

* wip. Health bar failing, wrong liquidation price

* fix calculations

* fix calculations

* fix

* cleanup

* replace apy with apr and health ratio with collateral ratio

* Repay integration (#26)

* calculations

* aave repay transaction factory and hook
cleanup and fixes

* use CollateralRatioHealthBar
replace health rate with collateral rate

* implement collateral switch (#27)

* Cleanup (#28)

* cleanup

* fixes

* Update apps/frontend/package.json

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/AmountTransition/AmountTransition.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/AssetAmountPriceRenderer/AssetAmountPriceRenderer.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/NetworkSwitch/NetworkSwitch.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/EModeDetails/EModeDetails.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/SupplyDetailsGraph/SupplyDetailsGraph.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/SupplyDetailsGraph/SupplyDetailsGraph.tsx

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* remove LinkIcon

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* pr comments

* fixes

* fixes

* SAF-49 setup bob (#29)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

---------

Co-authored-by: Juan <[email protected]>

* SAF 50 - E-Mode (#30)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

---------

Co-authored-by: Juan <[email protected]>

* Toggle lend mode

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* SAF 52 - Toggle lend mode (#31)

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

---------

Co-authored-by: Juan <[email protected]>

* Fixes and cleanup (#33)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

* Fix. Missing fix on borrow.

* fix borrow power to match desired collateral ratio

* rollback to working contracts for borrow eth

* fixes

* fixes and max amount

* loading when account changes

* close emode on complete

* disable emode if just one category

* error handling

* feat(network): change to new sepolia (#36)

---------

Co-authored-by: Juan <[email protected]>

* Fixes UI (#35)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

* Fix. Missing fix on borrow.

* fix borrow power to match desired collateral ratio

* rollback to working contracts for borrow eth

* fixes

* fixes and max amount

* loading when account changes

* close emode on complete

* disable emode if just one category

* error handling

* SAF-59, SAF-58, SAF-60, SAF-61, SAF-57

* limit by liquidity

* fix

* feat(network): change to new sepolia (#36)

* fixes

---------

Co-authored-by: Juan <[email protected]>

* Saf 20/pool details integration topbar (#40)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

* Fix. Missing fix on borrow.

* fix borrow power to match desired collateral ratio

* rollback to working contracts for borrow eth

* fixes

* fixes and max amount

* loading when account changes

* close emode on complete

* disable emode if just one category

* error handling

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix calculation
add balances and filter zero balances

* [SAF-20] wip testing rates data from contract Reserve Rate Strategy

* [SAF-20] wip integrating useAaveRates hook

* connect topbar

* tokens links

* add link to oracle

---------

Co-authored-by: Juan <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>

* Saf 20/pool details integration sidebar (#41)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

* Fix. Missing fix on borrow.

* fix borrow power to match desired collateral ratio

* rollback to working contracts for borrow eth

* fixes

* fixes and max amount

* loading when account changes

* close emode on complete

* disable emode if just one category

* error handling

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix calculation
add balances and filter zero balances

* [SAF-20] wip testing rates data from contract Reserve Rate Strategy

* [SAF-20] wip integrating useAaveRates hook

* [SAF-20] fix hook useAaveRates

* connect topbar

* tokens links

* add link to oracle

* [SAF_20] fix: parse totalDebt using decimals

* sidebar integration

* Connect topbar, add token links and add to wallet (#37)

* connect topbar

* tokens links

* add link to oracle

* fix merge error

---------

Co-authored-by: Juan <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>

* Saf 20/pool details integration graphs stats (#42)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

* Fix. Missing fix on borrow.

* fix borrow power to match desired collateral ratio

* rollback to working contracts for borrow eth

* fixes

* fixes and max amount

* loading when account changes

* close emode on complete

* disable emode if just one category

* error handling

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix calculation
add balances and filter zero balances

* [SAF-20] wip testing rates data from contract Reserve Rate Strategy

* [SAF-20] wip integrating useAaveRates hook

* [SAF-20] fix hook useAaveRates

* [SAF_20] fix: parse totalDebt using decimals

* Connect topbar, add token links and add to wallet (#37)

* connect topbar

* tokens links

* add link to oracle

* Money Market Mockups (#990)

* aave page static components, mobile first

* responsive panels

* functional static borrow asset list

* cleanup

* renaming

* lend assets list

* Lend positions list

* fixes and cleanup

* cleanup

* cleanup

* cleanup

* static ui done. missing validations

* add validations

* add validations

* move errors down

* borrow form modal

* pr comments

* pr comments

* fix typo

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/components/LendPositionAction/LendPositionAction.tsx

Co-authored-by: Juan Dahl <[email protected]>

* repay modals

* lend modal

* use simple table row

* asset amount input

* add missing translations

* fix translation

* units and prices mock

* setup layout for pool details screen

* wallet overview panel

* emode card mock

* max with for emode category

* top bar mock

* network switch

* cleanup

* ui fixes

* ui fixes, usd prices

* Efficiency card

* ordering

* fix filter 0 balances checkbox

* pr comment

* token

* Mocked table cards plus refactor of statistics card (#14)

* mocked table cards plus refactor of statistics card

* ui fixes

* Saf 41 charts (#16)

* mocked table cards plus refactor of statistics card

* ui fixes

* [SAF-41] give each graph it's own chart component

* [SAF-41] add htmlLegend plugin in charts; remove comments and refactor some colors moving them to constants

---------

Co-authored-by: matzapata <[email protected]>

* removed view transactions button (out of scope)

* fix breakpoints

* [SAF-41] fix color constant and background for mobile vs desktop views (#20)

* [SAF-41] fix color constant and background for mobile vs desktop views

* [SAF-41] use theme variables for colors and breakpoint usage for better consistency

* Apply suggestions from code review

Co-authored-by: Juan Dahl <[email protected]>

---------

Co-authored-by: Juan Dahl <[email protected]>

* Update apps/frontend/package.json

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/AmountTransition/AmountTransition.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/AssetAmountPriceRenderer/AssetAmountPriceRenderer.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/NetworkSwitch/NetworkSwitch.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/EModeDetails/EModeDetails.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/SupplyDetailsGraph/SupplyDetailsGraph.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/SupplyDetailsGraph/SupplyDetailsGraph.tsx

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* remove LinkIcon

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* pr comments

* fixes

---------

Co-authored-by: matzapata <[email protected]>
Co-authored-by: Matias Zapata <[email protected]>
Co-authored-by: Juan Dahl <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>
Co-authored-by: Pietro <[email protected]>

* chore: cleanup

* connected graphs

* cleanup

* cleanup

* cleanup

---------

Co-authored-by: Juan <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>
Co-authored-by: Christian Escalante <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>
Co-authored-by: Pietro <[email protected]>
Co-authored-by: Pietro <[email protected]>

* fixes

* Saf 20/charts integration (exclude supply and borrow by now) (#46)

* [SAF_20] remove mocks from pool details; create hooks useAaveRates and useAaveHistoryReserves

* [SAF-20] fix conflicts

* [SAF_20] mock api response by now

* [SAF_20] remove mock; prevent calling history data by now

* cleanup

* cleanup

* fixes

* fix: prevent NaN in interest rate charts when no data is retrieved

* fix stats

* fix available liquidity

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/LendAssetsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/BorrowPositionsList/components/BorrowPositionDetails/BorrowPositionDetails.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/BorrowPositionsList/BorrowPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* coments

* fix borrow power

* fixes and cleanup

* Fixes and cleanup (#48)

* coments

* fix borrow power

* fixes and cleanup

* cleanup

* Cleanup (#49)

* coments

* fix borrow power

* fixes and cleanup

* cleanup

* refactor config for same code style and handle mainnet config

* Refactor config for same code style and handle mainnet config (#50)

* coments

* fix borrow power

* fixes and cleanup

* cleanup

* refactor config for same code style and handle mainnet config

* small fixes

* remove unused files and fix repay with balance future collateral ratio

* remove unused files and fix repay with balance future collateral ratio (#51)

* coments

* fix borrow power

* fixes and cleanup

* cleanup

* refactor config for same code style and handle mainnet config

* small fixes

* remove unused files and fix repay with balance future collateral ratio

* cleanup and fixes

* disable collateral toggle if liquidation risk arises from it

* add sorting in tables

* precision and percentage

* fix hex chainId

* fix chain id

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* rename USD to Usd

* pr comments

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/InterestRateModelGraph/components/Chart/Chart.utils.ts

Co-authored-by: Pietro <[email protected]>

* pr comment

* disable tooltip for infinite

* [SAF_20] integrate charts data and api (#47)

* [SAF_20] integrate charts data and api

* [SAF_20] rewrite useAaveReservesHistory without using cancelable

* [SAF_20] remove type

* [SAF_20] remove jsdocs; use Decimal instead of number

* [SAF_20] remove unnecesary variable calculatedDate ; replace native fetch by axios

* [SAF_20] remove comments

* [SAF_20] move 18,27 decimals constants to math; move abi to constant file and remove unnecesary fields

* [SAF_20] use getProvider with bob chain id

* [SAF_20] remove unnecesary typed expression

* [SAF-20] add use memo

* [SAF-20] remove redundant use of loading

* [SAF-20] remove let by const

* [SAF-20] refactor supply and borrow chart data setup

* [SAF-20] refactor useRate giving symbol as a paramter

* [SAF-20] add manually time controls to charts (#52)

* [SAF-20] add manually time controls to charts

* [SAF-20] use enum from history hook to type TimeRangeButtons

* [SAF-20] replace color codes by theme variables

* [SAF-20] translate rate results from string to Decimal type ; delete unnecesary contract for the rate calculation that was introduced for reading getStableRateExcessOffset and OPTIMAL_STABLE_TO_TOTAL_DEBT_RATIO

* [SAF-20] rebase develop; resolve conflicts

* [SAF-20] rename text variable

* [SAF-20] fix calculation of utilization ratio

* [SAF-20] integrate REACT_APP_RATES_HISTORY_API_URL

* [SAF-20] improve calculateUtilizationRate

* [SAF-20] extract calculateUtilizationRate to util file; add check for value between zero and one ; add tests

* Update .env.example

* [SAF-20] remove unnecesary WEI def

* [SAF-20] wrapp describes

* [SAF-20] map values into Decimal

* [SAF-20] fix building reserve address

* [SAF-20] remove comment about a possible BUG; doesnt apply

* [SAF-20] move checkinig isBetweenZeroAndOne to inner function calculateUtilizationRate and return Zero in that case

* [SAF-20] rename parameter

* [SAF-20] move URL to constants

* [SAF-20] remove useless comments

* [SAF-20] add missing useCallback

* [SAF-20] rename parameter

* [SAF-20] remove isBetweenZeroAndOne leave the check inside calculation; move calculateUtilizationRate into AaveCalculations class

* [SAF-20] Use the same naming convention for RatesHistoryApiUrl as the rest of the constants

* [SAF-20] simplify hook useAaveRates with just one memo hook

* [SAF-20] simplify history data by removing unused utilizationRate and stableBorrowRate ; return just a type number to avoid unnecesary conversions

* [SAF-20] use Decimal to calculate interest rates

* fix(ui): fix size of wallet card

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* @pietro-maximoff suggestion applied: 'it doesn't need to be changed'

* fixes and improvements

* Qa fixes (#57)

* fixes

* fix translation

* fix lend position list

* cleanup

* replicate exceeds maximum amount to other components

* remove % from health factor

* fix: code improvements

* fix(borrow): use apy instead of apr and fix rounding numbers

* fix: typo

* fix: add validations

* fix: increase error factor for eth debts

* fix: increase error factor for eth debts

* fix: use math utils

* working earn aave history

* cleanup

* new loan form

* Aave close with deposit

* liquidations table

* swap rate mode

* add missing translation

* cleanup

* cleanup

* cleanup

* cleanup

---------

Co-authored-by: matzapata <[email protected]>
Co-authored-by: Matias Zapata <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>
Co-authored-by: Christian Escalante <[email protected]>
Co-authored-by: Pietro <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>
Co-authored-by: Pietro <[email protected]>
* aave page static components, mobile first

* responsive panels

* functional static borrow asset list

* cleanup

* renaming

* lend assets list

* Lend positions list

* fixes and cleanup

* cleanup

* cleanup

* cleanup

* static ui done. missing validations

* add validations

* add validations

* move errors down

* borrow form modal

* pr comments

* pr comments

* fix typo

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/components/LendPositionAction/LendPositionAction.tsx

Co-authored-by: Juan Dahl <[email protected]>

* repay modals

* lend modal

* use simple table row

* asset amount input

* add missing translations

* fix translation

* units and prices mock

* setup layout for pool details screen

* wallet overview panel

* emode card mock

* max with for emode category

* top bar mock

* network switch

* cleanup

* ui fixes

* ui fixes, usd prices

* Efficiency card

* ordering

* fix filter 0 balances checkbox

* pr comment

* token

* Mocked table cards plus refactor of statistics card (#14)

* mocked table cards plus refactor of statistics card

* ui fixes

* Saf 41 charts (#16)

* mocked table cards plus refactor of statistics card

* ui fixes

* [SAF-41] give each graph it's own chart component

* [SAF-41] add htmlLegend plugin in charts; remove comments and refactor some colors moving them to constants

---------

Co-authored-by: matzapata <[email protected]>

* removed view transactions button (out of scope)

* fix breakpoints

* [SAF-41] fix color constant and background for mobile vs desktop views (#20)

* [SAF-41] fix color constant and background for mobile vs desktop views

* [SAF-41] use theme variables for colors and breakpoint usage for better consistency

* Apply suggestions from code review

Co-authored-by: Juan Dahl <[email protected]>

---------

Co-authored-by: Juan Dahl <[email protected]>

* Dashboard pool data integration (#15) (#22)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* pr comments

* unit fixes

* Lend integration (#19)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* wip

* Dashboard pool data integration (#15)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* pr comments

* unit fixes

* supply wip

* fix asset renderer
add usd amount
cleanups

* fixes

* cleanup

* Cache for aave hooks (#23)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* wip

* Dashboard pool data integration (#15)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* pr comments

* unit fixes

* supply wip

* fix asset renderer
add usd amount
cleanups

* fixes

* withdraw integration

* cache useAaveReservesData

* cache useUserReserves

* cleanup

* fix imports

* fix

* Develop mockups (#25)

* fix breakpoints

* [SAF-41] fix color constant and background for mobile vs desktop views (#20)

* [SAF-41] fix color constant and background for mobile vs desktop views

* [SAF-41] use theme variables for colors and breakpoint usage for better consistency

* Apply suggestions from code review

Co-authored-by: Juan Dahl <[email protected]>

---------

Co-authored-by: Juan Dahl <[email protected]>

---------

Co-authored-by: matzapata <[email protected]>
Co-authored-by: Juan Dahl <[email protected]>

* Withdraw integration (#21)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* wip

* Dashboard pool data integration (#15)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* pr comments

* unit fixes

* supply wip

* fix asset renderer
add usd amount
cleanups

* fixes

* withdraw integration

* fix and pr comment

* pr comment

* Borrow integration (#24)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* wip

* Dashboard pool data integration (#15)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* pr comments

* unit fixes

* supply wip

* fix asset renderer
add usd amount
cleanups

* fixes

* withdraw integration

* cache useAaveReservesData

* cache useUserReserves

* cleanup

* fix imports

* wip. Health bar failing, wrong liquidation price

* fix calculations

* fix calculations

* fix

* cleanup

* replace apy with apr and health ratio with collateral ratio

* Repay integration (#26)

* calculations

* aave repay transaction factory and hook
cleanup and fixes

* use CollateralRatioHealthBar
replace health rate with collateral rate

* implement collateral switch (#27)

* Cleanup (#28)

* cleanup

* fixes

* Update apps/frontend/package.json

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/AmountTransition/AmountTransition.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/AssetAmountPriceRenderer/AssetAmountPriceRenderer.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/NetworkSwitch/NetworkSwitch.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/EModeDetails/EModeDetails.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/SupplyDetailsGraph/SupplyDetailsGraph.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/SupplyDetailsGraph/SupplyDetailsGraph.tsx

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* remove LinkIcon

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* pr comments

* fixes

* fixes

* SAF-49 setup bob (#29)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

---------

Co-authored-by: Juan <[email protected]>

* SAF 50 - E-Mode (#30)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

---------

Co-authored-by: Juan <[email protected]>

* Toggle lend mode

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* SAF 52 - Toggle lend mode (#31)

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

---------

Co-authored-by: Juan <[email protected]>

* Fixes and cleanup (#33)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

* Fix. Missing fix on borrow.

* fix borrow power to match desired collateral ratio

* rollback to working contracts for borrow eth

* fixes

* fixes and max amount

* loading when account changes

* close emode on complete

* disable emode if just one category

* error handling

* feat(network): change to new sepolia (#36)

---------

Co-authored-by: Juan <[email protected]>

* Fixes UI (#35)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

* Fix. Missing fix on borrow.

* fix borrow power to match desired collateral ratio

* rollback to working contracts for borrow eth

* fixes

* fixes and max amount

* loading when account changes

* close emode on complete

* disable emode if just one category

* error handling

* SAF-59, SAF-58, SAF-60, SAF-61, SAF-57

* limit by liquidity

* fix

* feat(network): change to new sepolia (#36)

* fixes

---------

Co-authored-by: Juan <[email protected]>

* Saf 20/pool details integration topbar (#40)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

* Fix. Missing fix on borrow.

* fix borrow power to match desired collateral ratio

* rollback to working contracts for borrow eth

* fixes

* fixes and max amount

* loading when account changes

* close emode on complete

* disable emode if just one category

* error handling

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix calculation
add balances and filter zero balances

* [SAF-20] wip testing rates data from contract Reserve Rate Strategy

* [SAF-20] wip integrating useAaveRates hook

* connect topbar

* tokens links

* add link to oracle

---------

Co-authored-by: Juan <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>

* Saf 20/pool details integration sidebar (#41)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

* Fix. Missing fix on borrow.

* fix borrow power to match desired collateral ratio

* rollback to working contracts for borrow eth

* fixes

* fixes and max amount

* loading when account changes

* close emode on complete

* disable emode if just one category

* error handling

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix calculation
add balances and filter zero balances

* [SAF-20] wip testing rates data from contract Reserve Rate Strategy

* [SAF-20] wip integrating useAaveRates hook

* [SAF-20] fix hook useAaveRates

* connect topbar

* tokens links

* add link to oracle

* [SAF_20] fix: parse totalDebt using decimals

* sidebar integration

* Connect topbar, add token links and add to wallet (#37)

* connect topbar

* tokens links

* add link to oracle

* fix merge error

---------

Co-authored-by: Juan <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>

* Saf 20/pool details integration graphs stats (#42)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

* Fix. Missing fix on borrow.

* fix borrow power to match desired collateral ratio

* rollback to working contracts for borrow eth

* fixes

* fixes and max amount

* loading when account changes

* close emode on complete

* disable emode if just one category

* error handling

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix calculation
add balances and filter zero balances

* [SAF-20] wip testing rates data from contract Reserve Rate Strategy

* [SAF-20] wip integrating useAaveRates hook

* [SAF-20] fix hook useAaveRates

* [SAF_20] fix: parse totalDebt using decimals

* Connect topbar, add token links and add to wallet (#37)

* connect topbar

* tokens links

* add link to oracle

* Money Market Mockups (#990)

* aave page static components, mobile first

* responsive panels

* functional static borrow asset list

* cleanup

* renaming

* lend assets list

* Lend positions list

* fixes and cleanup

* cleanup

* cleanup

* cleanup

* static ui done. missing validations

* add validations

* add validations

* move errors down

* borrow form modal

* pr comments

* pr comments

* fix typo

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/components/LendPositionAction/LendPositionAction.tsx

Co-authored-by: Juan Dahl <[email protected]>

* repay modals

* lend modal

* use simple table row

* asset amount input

* add missing translations

* fix translation

* units and prices mock

* setup layout for pool details screen

* wallet overview panel

* emode card mock

* max with for emode category

* top bar mock

* network switch

* cleanup

* ui fixes

* ui fixes, usd prices

* Efficiency card

* ordering

* fix filter 0 balances checkbox

* pr comment

* token

* Mocked table cards plus refactor of statistics card (#14)

* mocked table cards plus refactor of statistics card

* ui fixes

* Saf 41 charts (#16)

* mocked table cards plus refactor of statistics card

* ui fixes

* [SAF-41] give each graph it's own chart component

* [SAF-41] add htmlLegend plugin in charts; remove comments and refactor some colors moving them to constants

---------

Co-authored-by: matzapata <[email protected]>

* removed view transactions button (out of scope)

* fix breakpoints

* [SAF-41] fix color constant and background for mobile vs desktop views (#20)

* [SAF-41] fix color constant and background for mobile vs desktop views

* [SAF-41] use theme variables for colors and breakpoint usage for better consistency

* Apply suggestions from code review

Co-authored-by: Juan Dahl <[email protected]>

---------

Co-authored-by: Juan Dahl <[email protected]>

* Update apps/frontend/package.json

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/AmountTransition/AmountTransition.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/AssetAmountPriceRenderer/AssetAmountPriceRenderer.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/NetworkSwitch/NetworkSwitch.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/EModeDetails/EModeDetails.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/SupplyDetailsGraph/SupplyDetailsGraph.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/SupplyDetailsGraph/SupplyDetailsGraph.tsx

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* remove LinkIcon

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* pr comments

* fixes

---------

Co-authored-by: matzapata <[email protected]>
Co-authored-by: Matias Zapata <[email protected]>
Co-authored-by: Juan Dahl <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>
Co-authored-by: Pietro <[email protected]>

* chore: cleanup

* connected graphs

* cleanup

* cleanup

* cleanup

---------

Co-authored-by: Juan <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>
Co-authored-by: Christian Escalante <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>
Co-authored-by: Pietro <[email protected]>
Co-authored-by: Pietro <[email protected]>

* fixes

* Saf 20/charts integration (exclude supply and borrow by now) (#46)

* [SAF_20] remove mocks from pool details; create hooks useAaveRates and useAaveHistoryReserves

* [SAF-20] fix conflicts

* [SAF_20] mock api response by now

* [SAF_20] remove mock; prevent calling history data by now

* cleanup

* cleanup

* fixes

* fix: prevent NaN in interest rate charts when no data is retrieved

* fix stats

* fix available liquidity

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/LendAssetsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/BorrowPositionsList/components/BorrowPositionDetails/BorrowPositionDetails.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/BorrowPositionsList/BorrowPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* coments

* fix borrow power

* fixes and cleanup

* Fixes and cleanup (#48)

* coments

* fix borrow power

* fixes and cleanup

* cleanup

* Cleanup (#49)

* coments

* fix borrow power

* fixes and cleanup

* cleanup

* refactor config for same code style and handle mainnet config

* Refactor config for same code style and handle mainnet config (#50)

* coments

* fix borrow power

* fixes and cleanup

* cleanup

* refactor config for same code style and handle mainnet config

* small fixes

* remove unused files and fix repay with balance future collateral ratio

* remove unused files and fix repay with balance future collateral ratio (#51)

* coments

* fix borrow power

* fixes and cleanup

* cleanup

* refactor config for same code style and handle mainnet config

* small fixes

* remove unused files and fix repay with balance future collateral ratio

* cleanup and fixes

* disable collateral toggle if liquidation risk arises from it

* add sorting in tables

* precision and percentage

* fix hex chainId

* fix chain id

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* rename USD to Usd

* pr comments

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/InterestRateModelGraph/components/Chart/Chart.utils.ts

Co-authored-by: Pietro <[email protected]>

* pr comment

* disable tooltip for infinite

* [SAF_20] integrate charts data and api (#47)

* [SAF_20] integrate charts data and api

* [SAF_20] rewrite useAaveReservesHistory without using cancelable

* [SAF_20] remove type

* [SAF_20] remove jsdocs; use Decimal instead of number

* [SAF_20] remove unnecesary variable calculatedDate ; replace native fetch by axios

* [SAF_20] remove comments

* [SAF_20] move 18,27 decimals constants to math; move abi to constant file and remove unnecesary fields

* [SAF_20] use getProvider with bob chain id

* [SAF_20] remove unnecesary typed expression

* [SAF-20] add use memo

* [SAF-20] remove redundant use of loading

* [SAF-20] remove let by const

* [SAF-20] refactor supply and borrow chart data setup

* [SAF-20] refactor useRate giving symbol as a paramter

* [SAF-20] add manually time controls to charts (#52)

* [SAF-20] add manually time controls to charts

* [SAF-20] use enum from history hook to type TimeRangeButtons

* [SAF-20] replace color codes by theme variables

* [SAF-20] translate rate results from string to Decimal type ; delete unnecesary contract for the rate calculation that was introduced for reading getStableRateExcessOffset and OPTIMAL_STABLE_TO_TOTAL_DEBT_RATIO

* [SAF-20] rebase develop; resolve conflicts

* [SAF-20] rename text variable

* [SAF-20] fix calculation of utilization ratio

* [SAF-20] integrate REACT_APP_RATES_HISTORY_API_URL

* [SAF-20] improve calculateUtilizationRate

* [SAF-20] extract calculateUtilizationRate to util file; add check for value between zero and one ; add tests

* Update .env.example

* [SAF-20] remove unnecesary WEI def

* [SAF-20] wrapp describes

* [SAF-20] map values into Decimal

* [SAF-20] fix building reserve address

* [SAF-20] remove comment about a possible BUG; doesnt apply

* [SAF-20] move checkinig isBetweenZeroAndOne to inner function calculateUtilizationRate and return Zero in that case

* [SAF-20] rename parameter

* [SAF-20] move URL to constants

* [SAF-20] remove useless comments

* [SAF-20] add missing useCallback

* [SAF-20] rename parameter

* [SAF-20] remove isBetweenZeroAndOne leave the check inside calculation; move calculateUtilizationRate into AaveCalculations class

* [SAF-20] Use the same naming convention for RatesHistoryApiUrl as the rest of the constants

* [SAF-20] simplify hook useAaveRates with just one memo hook

* [SAF-20] simplify history data by removing unused utilizationRate and stableBorrowRate ; return just a type number to avoid unnecesary conversions

* [SAF-20] use Decimal to calculate interest rates

* fix(ui): fix size of wallet card

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* @pietro-maximoff suggestion applied: 'it doesn't need to be changed'

* fixes and improvements

* Qa fixes (#57)

* fixes

* fix translation

* fix lend position list

* cleanup

* replicate exceeds maximum amount to other components

* remove % from health factor

* fix: code improvements

* fix(borrow): use apy instead of apr and fix rounding numbers

* fix: typo

* fix: add validations

* fix: increase error factor for eth debts

* fix: increase error factor for eth debts

* fix: use math utils

* working earn aave history

* cleanup

* new deployment
hide graphs if borrow disabled
variable apy on select

* fix typo

* fix maximum withdrawal

* cleanup

* withdraw everything if no borrows

* fix max borrow using health factor

* new loan form

* Aave close with deposit

* liquidations table

* swap rate mode

* add missing translation

* cleanup

* cleanup

* fix

* add comment

* cleanup

* fix

* fix borrow text style

* rename `isMax` from `withdraw` to `withdrawAll` and update accordingly.
Automatically update input if it exceeds maximum

* add cte for readability

* cleanup

* add missing apy value

* feat(HF): change collateral ratio by health factor

* fix(graphs): improve precission and add go back button

* fix: add tokens to wallet

* Update apps/frontend/.env.example

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/3_organisms/EarnHistoryFrame/components/AaveLendingHistoryFrame/AaveLendingHistoryFrame.constants.tsx

Co-authored-by: Pietro <[email protected]>

* add translations

---------

Co-authored-by: matzapata <[email protected]>
Co-authored-by: Matias Zapata <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>
Co-authored-by: Christian Escalante <[email protected]>
Co-authored-by: Pietro <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>
Co-authored-by: Pietro <[email protected]>
* aave page static components, mobile first

* responsive panels

* functional static borrow asset list

* cleanup

* renaming

* lend assets list

* Lend positions list

* fixes and cleanup

* cleanup

* cleanup

* cleanup

* static ui done. missing validations

* add validations

* add validations

* move errors down

* borrow form modal

* pr comments

* pr comments

* fix typo

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/components/LendPositionAction/LendPositionAction.tsx

Co-authored-by: Juan Dahl <[email protected]>

* repay modals

* lend modal

* use simple table row

* asset amount input

* add missing translations

* fix translation

* units and prices mock

* setup layout for pool details screen

* wallet overview panel

* emode card mock

* max with for emode category

* top bar mock

* network switch

* cleanup

* ui fixes

* ui fixes, usd prices

* Efficiency card

* ordering

* fix filter 0 balances checkbox

* pr comment

* token

* Mocked table cards plus refactor of statistics card (#14)

* mocked table cards plus refactor of statistics card

* ui fixes

* Saf 41 charts (#16)

* mocked table cards plus refactor of statistics card

* ui fixes

* [SAF-41] give each graph it's own chart component

* [SAF-41] add htmlLegend plugin in charts; remove comments and refactor some colors moving them to constants

---------

Co-authored-by: matzapata <[email protected]>

* removed view transactions button (out of scope)

* fix breakpoints

* [SAF-41] fix color constant and background for mobile vs desktop views (#20)

* [SAF-41] fix color constant and background for mobile vs desktop views

* [SAF-41] use theme variables for colors and breakpoint usage for better consistency

* Apply suggestions from code review

Co-authored-by: Juan Dahl <[email protected]>

---------

Co-authored-by: Juan Dahl <[email protected]>

* Dashboard pool data integration (#15) (#22)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* pr comments

* unit fixes

* Lend integration (#19)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* wip

* Dashboard pool data integration (#15)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* pr comments

* unit fixes

* supply wip

* fix asset renderer
add usd amount
cleanups

* fixes

* cleanup

* Cache for aave hooks (#23)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* wip

* Dashboard pool data integration (#15)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* pr comments

* unit fixes

* supply wip

* fix asset renderer
add usd amount
cleanups

* fixes

* withdraw integration

* cache useAaveReservesData

* cache useUserReserves

* cleanup

* fix imports

* fix

* Develop mockups (#25)

* fix breakpoints

* [SAF-41] fix color constant and background for mobile vs desktop views (#20)

* [SAF-41] fix color constant and background for mobile vs desktop views

* [SAF-41] use theme variables for colors and breakpoint usage for better consistency

* Apply suggestions from code review

Co-authored-by: Juan Dahl <[email protected]>

---------

Co-authored-by: Juan Dahl <[email protected]>

---------

Co-authored-by: matzapata <[email protected]>
Co-authored-by: Juan Dahl <[email protected]>

* Withdraw integration (#21)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* wip

* Dashboard pool data integration (#15)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* pr comments

* unit fixes

* supply wip

* fix asset renderer
add usd amount
cleanups

* fixes

* withdraw integration

* fix and pr comment

* pr comment

* Borrow integration (#24)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* wip

* Dashboard pool data integration (#15)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* pr comments

* unit fixes

* supply wip

* fix asset renderer
add usd amount
cleanups

* fixes

* withdraw integration

* cache useAaveReservesData

* cache useUserReserves

* cleanup

* fix imports

* wip. Health bar failing, wrong liquidation price

* fix calculations

* fix calculations

* fix

* cleanup

* replace apy with apr and health ratio with collateral ratio

* Repay integration (#26)

* calculations

* aave repay transaction factory and hook
cleanup and fixes

* use CollateralRatioHealthBar
replace health rate with collateral rate

* implement collateral switch (#27)

* Cleanup (#28)

* cleanup

* fixes

* Update apps/frontend/package.json

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/AmountTransition/AmountTransition.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/AssetAmountPriceRenderer/AssetAmountPriceRenderer.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/NetworkSwitch/NetworkSwitch.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/EModeDetails/EModeDetails.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/SupplyDetailsGraph/SupplyDetailsGraph.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/SupplyDetailsGraph/SupplyDetailsGraph.tsx

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* remove LinkIcon

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* pr comments

* fixes

* fixes

* SAF-49 setup bob (#29)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

---------

Co-authored-by: Juan <[email protected]>

* SAF 50 - E-Mode (#30)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

---------

Co-authored-by: Juan <[email protected]>

* Toggle lend mode

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* SAF 52 - Toggle lend mode (#31)

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

---------

Co-authored-by: Juan <[email protected]>

* Fixes and cleanup (#33)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

* Fix. Missing fix on borrow.

* fix borrow power to match desired collateral ratio

* rollback to working contracts for borrow eth

* fixes

* fixes and max amount

* loading when account changes

* close emode on complete

* disable emode if just one category

* error handling

* feat(network): change to new sepolia (#36)

---------

Co-authored-by: Juan <[email protected]>

* Fixes UI (#35)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

* Fix. Missing fix on borrow.

* fix borrow power to match desired collateral ratio

* rollback to working contracts for borrow eth

* fixes

* fixes and max amount

* loading when account changes

* close emode on complete

* disable emode if just one category

* error handling

* SAF-59, SAF-58, SAF-60, SAF-61, SAF-57

* limit by liquidity

* fix

* feat(network): change to new sepolia (#36)

* fixes

---------

Co-authored-by: Juan <[email protected]>

* Saf 20/pool details integration topbar (#40)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

* Fix. Missing fix on borrow.

* fix borrow power to match desired collateral ratio

* rollback to working contracts for borrow eth

* fixes

* fixes and max amount

* loading when account changes

* close emode on complete

* disable emode if just one category

* error handling

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix calculation
add balances and filter zero balances

* [SAF-20] wip testing rates data from contract Reserve Rate Strategy

* [SAF-20] wip integrating useAaveRates hook

* connect topbar

* tokens links

* add link to oracle

---------

Co-authored-by: Juan <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>

* Saf 20/pool details integration sidebar (#41)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

* Fix. Missing fix on borrow.

* fix borrow power to match desired collateral ratio

* rollback to working contracts for borrow eth

* fixes

* fixes and max amount

* loading when account changes

* close emode on complete

* disable emode if just one category

* error handling

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix calculation
add balances and filter zero balances

* [SAF-20] wip testing rates data from contract Reserve Rate Strategy

* [SAF-20] wip integrating useAaveRates hook

* [SAF-20] fix hook useAaveRates

* connect topbar

* tokens links

* add link to oracle

* [SAF_20] fix: parse totalDebt using decimals

* sidebar integration

* Connect topbar, add token links and add to wallet (#37)

* connect topbar

* tokens links

* add link to oracle

* fix merge error

---------

Co-authored-by: Juan <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>

* Saf 20/pool details integration graphs stats (#42)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

* Fix. Missing fix on borrow.

* fix borrow power to match desired collateral ratio

* rollback to working contracts for borrow eth

* fixes

* fixes and max amount

* loading when account changes

* close emode on complete

* disable emode if just one category

* error handling

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix calculation
add balances and filter zero balances

* [SAF-20] wip testing rates data from contract Reserve Rate Strategy

* [SAF-20] wip integrating useAaveRates hook

* [SAF-20] fix hook useAaveRates

* [SAF_20] fix: parse totalDebt using decimals

* Connect topbar, add token links and add to wallet (#37)

* connect topbar

* tokens links

* add link to oracle

* Money Market Mockups (#990)

* aave page static components, mobile first

* responsive panels

* functional static borrow asset list

* cleanup

* renaming

* lend assets list

* Lend positions list

* fixes and cleanup

* cleanup

* cleanup

* cleanup

* static ui done. missing validations

* add validations

* add validations

* move errors down

* borrow form modal

* pr comments

* pr comments

* fix typo

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/components/LendPositionAction/LendPositionAction.tsx

Co-authored-by: Juan Dahl <[email protected]>

* repay modals

* lend modal

* use simple table row

* asset amount input

* add missing translations

* fix translation

* units and prices mock

* setup layout for pool details screen

* wallet overview panel

* emode card mock

* max with for emode category

* top bar mock

* network switch

* cleanup

* ui fixes

* ui fixes, usd prices

* Efficiency card

* ordering

* fix filter 0 balances checkbox

* pr comment

* token

* Mocked table cards plus refactor of statistics card (#14)

* mocked table cards plus refactor of statistics card

* ui fixes

* Saf 41 charts (#16)

* mocked table cards plus refactor of statistics card

* ui fixes

* [SAF-41] give each graph it's own chart component

* [SAF-41] add htmlLegend plugin in charts; remove comments and refactor some colors moving them to constants

---------

Co-authored-by: matzapata <[email protected]>

* removed view transactions button (out of scope)

* fix breakpoints

* [SAF-41] fix color constant and background for mobile vs desktop views (#20)

* [SAF-41] fix color constant and background for mobile vs desktop views

* [SAF-41] use theme variables for colors and breakpoint usage for better consistency

* Apply suggestions from code review

Co-authored-by: Juan Dahl <[email protected]>

---------

Co-authored-by: Juan Dahl <[email protected]>

* Update apps/frontend/package.json

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/AmountTransition/AmountTransition.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/AssetAmountPriceRenderer/AssetAmountPriceRenderer.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/NetworkSwitch/NetworkSwitch.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/EModeDetails/EModeDetails.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/SupplyDetailsGraph/SupplyDetailsGraph.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/SupplyDetailsGraph/SupplyDetailsGraph.tsx

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* remove LinkIcon

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* pr comments

* fixes

---------

Co-authored-by: matzapata <[email protected]>
Co-authored-by: Matias Zapata <[email protected]>
Co-authored-by: Juan Dahl <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>
Co-authored-by: Pietro <[email protected]>

* chore: cleanup

* connected graphs

* cleanup

* cleanup

* cleanup

---------

Co-authored-by: Juan <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>
Co-authored-by: Christian Escalante <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>
Co-authored-by: Pietro <[email protected]>
Co-authored-by: Pietro <[email protected]>

* fixes

* Saf 20/charts integration (exclude supply and borrow by now) (#46)

* [SAF_20] remove mocks from pool details; create hooks useAaveRates and useAaveHistoryReserves

* [SAF-20] fix conflicts

* [SAF_20] mock api response by now

* [SAF_20] remove mock; prevent calling history data by now

* cleanup

* cleanup

* fixes

* fix: prevent NaN in interest rate charts when no data is retrieved

* fix stats

* fix available liquidity

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/LendAssetsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/BorrowPositionsList/components/BorrowPositionDetails/BorrowPositionDetails.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/BorrowPositionsList/BorrowPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* coments

* fix borrow power

* fixes and cleanup

* Fixes and cleanup (#48)

* coments

* fix borrow power

* fixes and cleanup

* cleanup

* Cleanup (#49)

* coments

* fix borrow power

* fixes and cleanup

* cleanup

* refactor config for same code style and handle mainnet config

* Refactor config for same code style and handle mainnet config (#50)

* coments

* fix borrow power

* fixes and cleanup

* cleanup

* refactor config for same code style and handle mainnet config

* small fixes

* remove unused files and fix repay with balance future collateral ratio

* remove unused files and fix repay with balance future collateral ratio (#51)

* coments

* fix borrow power

* fixes and cleanup

* cleanup

* refactor config for same code style and handle mainnet config

* small fixes

* remove unused files and fix repay with balance future collateral ratio

* cleanup and fixes

* disable collateral toggle if liquidation risk arises from it

* add sorting in tables

* precision and percentage

* fix hex chainId

* fix chain id

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* rename USD to Usd

* pr comments

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/InterestRateModelGraph/components/Chart/Chart.utils.ts

Co-authored-by: Pietro <[email protected]>

* pr comment

* disable tooltip for infinite

* [SAF_20] integrate charts data and api (#47)

* [SAF_20] integrate charts data and api

* [SAF_20] rewrite useAaveReservesHistory without using cancelable

* [SAF_20] remove type

* [SAF_20] remove jsdocs; use Decimal instead of number

* [SAF_20] remove unnecesary variable calculatedDate ; replace native fetch by axios

* [SAF_20] remove comments

* [SAF_20] move 18,27 decimals constants to math; move abi to constant file and remove unnecesary fields

* [SAF_20] use getProvider with bob chain id

* [SAF_20] remove unnecesary typed expression

* [SAF-20] add use memo

* [SAF-20] remove redundant use of loading

* [SAF-20] remove let by const

* [SAF-20] refactor supply and borrow chart data setup

* [SAF-20] refactor useRate giving symbol as a paramter

* [SAF-20] add manually time controls to charts (#52)

* [SAF-20] add manually time controls to charts

* [SAF-20] use enum from history hook to type TimeRangeButtons

* [SAF-20] replace color codes by theme variables

* [SAF-20] translate rate results from string to Decimal type ; delete unnecesary contract for the rate calculation that was introduced for reading getStableRateExcessOffset and OPTIMAL_STABLE_TO_TOTAL_DEBT_RATIO

* [SAF-20] rebase develop; resolve conflicts

* [SAF-20] rename text variable

* [SAF-20] fix calculation of utilization ratio

* [SAF-20] integrate REACT_APP_RATES_HISTORY_API_URL

* [SAF-20] improve calculateUtilizationRate

* [SAF-20] extract calculateUtilizationRate to util file; add check for value between zero and one ; add tests

* Update .env.example

* [SAF-20] remove unnecesary WEI def

* [SAF-20] wrapp describes

* [SAF-20] map values into Decimal

* [SAF-20] fix building reserve address

* [SAF-20] remove comment about a possible BUG; doesnt apply

* [SAF-20] move checkinig isBetweenZeroAndOne to inner function calculateUtilizationRate and return Zero in that case

* [SAF-20] rename parameter

* [SAF-20] move URL to constants

* [SAF-20] remove useless comments

* [SAF-20] add missing useCallback

* [SAF-20] rename parameter

* [SAF-20] remove isBetweenZeroAndOne leave the check inside calculation; move calculateUtilizationRate into AaveCalculations class

* [SAF-20] Use the same naming convention for RatesHistoryApiUrl as the rest of the constants

* [SAF-20] simplify hook useAaveRates with just one memo hook

* [SAF-20] simplify history data by removing unused utilizationRate and stableBorrowRate ; return just a type number to avoid unnecesary conversions

* [SAF-20] use Decimal to calculate interest rates

* fix(ui): fix size of wallet card

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* @pietro-maximoff suggestion applied: 'it doesn't need to be changed'

* fixes and improvements

* Qa fixes (#57)

* fixes

* fix translation

* fix lend position list

* cleanup

* replicate exceeds maximum amount to other components

* remove % from health factor

* fix: code improvements

* fix(borrow): use apy instead of apr and fix rounding numbers

* fix: typo

* fix: add validations

* fix: increase error factor for eth debts

* fix: increase error factor for eth debts

* fix: use math utils

* working earn aave history

* cleanup

* new deployment
hide graphs if borrow disabled
variable apy on select

* fix typo

* fix maximum withdrawal

* cleanup

* withdraw everything if no borrows

* fix max borrow using health factor

* new loan form

* Aave close with deposit

* liquidations table

* swap rate mode

* add missing translation

* cleanup

* cleanup

* fix

* add comment

* cleanup

* fix

* fix borrow text style

* rename `isMax` from `withdraw` to `withdrawAll` and update accordingly.
Automatically update input if it exceeds maximum

* add cte for readability

* cleanup

* add missing apy value

* feat(HF): change collateral ratio by health factor

* fix(graphs): improve precission and add go back button

* fix: add tokens to wallet

* Update apps/frontend/.env.example

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/3_organisms/EarnHistoryFrame/components/AaveLendingHistoryFrame/AaveLendingHistoryFrame.constants.tsx

Co-authored-by: Pietro <[email protected]>

* add translations

* fix: add more timeframes

---------

Co-authored-by: matzapata <[email protected]>
Co-authored-by: Matias Zapata <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>
Co-authored-by: Christian Escalante <[email protected]>
Co-authored-by: Pietro <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>
Co-authored-by: Pietro <[email protected]>
juandahl and others added 3 commits October 30, 2024 20:16
* aave page static components, mobile first

* responsive panels

* functional static borrow asset list

* cleanup

* renaming

* lend assets list

* Lend positions list

* fixes and cleanup

* cleanup

* cleanup

* cleanup

* static ui done. missing validations

* add validations

* add validations

* move errors down

* borrow form modal

* pr comments

* pr comments

* fix typo

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/components/LendPositionAction/LendPositionAction.tsx

Co-authored-by: Juan Dahl <[email protected]>

* repay modals

* lend modal

* use simple table row

* asset amount input

* add missing translations

* fix translation

* units and prices mock

* setup layout for pool details screen

* wallet overview panel

* emode card mock

* max with for emode category

* top bar mock

* network switch

* cleanup

* ui fixes

* ui fixes, usd prices

* Efficiency card

* ordering

* fix filter 0 balances checkbox

* pr comment

* token

* Mocked table cards plus refactor of statistics card (#14)

* mocked table cards plus refactor of statistics card

* ui fixes

* Saf 41 charts (#16)

* mocked table cards plus refactor of statistics card

* ui fixes

* [SAF-41] give each graph it's own chart component

* [SAF-41] add htmlLegend plugin in charts; remove comments and refactor some colors moving them to constants

---------

Co-authored-by: matzapata <[email protected]>

* removed view transactions button (out of scope)

* fix breakpoints

* [SAF-41] fix color constant and background for mobile vs desktop views (#20)

* [SAF-41] fix color constant and background for mobile vs desktop views

* [SAF-41] use theme variables for colors and breakpoint usage for better consistency

* Apply suggestions from code review

Co-authored-by: Juan Dahl <[email protected]>

---------

Co-authored-by: Juan Dahl <[email protected]>

* Dashboard pool data integration (#15) (#22)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* pr comments

* unit fixes

* Lend integration (#19)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* wip

* Dashboard pool data integration (#15)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* pr comments

* unit fixes

* supply wip

* fix asset renderer
add usd amount
cleanups

* fixes

* cleanup

* Cache for aave hooks (#23)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* wip

* Dashboard pool data integration (#15)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* pr comments

* unit fixes

* supply wip

* fix asset renderer
add usd amount
cleanups

* fixes

* withdraw integration

* cache useAaveReservesData

* cache useUserReserves

* cleanup

* fix imports

* fix

* Develop mockups (#25)

* fix breakpoints

* [SAF-41] fix color constant and background for mobile vs desktop views (#20)

* [SAF-41] fix color constant and background for mobile vs desktop views

* [SAF-41] use theme variables for colors and breakpoint usage for better consistency

* Apply suggestions from code review

Co-authored-by: Juan Dahl <[email protected]>

---------

Co-authored-by: Juan Dahl <[email protected]>

---------

Co-authored-by: matzapata <[email protected]>
Co-authored-by: Juan Dahl <[email protected]>

* Withdraw integration (#21)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* wip

* Dashboard pool data integration (#15)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* pr comments

* unit fixes

* supply wip

* fix asset renderer
add usd amount
cleanups

* fixes

* withdraw integration

* fix and pr comment

* pr comment

* Borrow integration (#24)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* wip

* Dashboard pool data integration (#15)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* pr comments

* unit fixes

* supply wip

* fix asset renderer
add usd amount
cleanups

* fixes

* withdraw integration

* cache useAaveReservesData

* cache useUserReserves

* cleanup

* fix imports

* wip. Health bar failing, wrong liquidation price

* fix calculations

* fix calculations

* fix

* cleanup

* replace apy with apr and health ratio with collateral ratio

* Repay integration (#26)

* calculations

* aave repay transaction factory and hook
cleanup and fixes

* use CollateralRatioHealthBar
replace health rate with collateral rate

* implement collateral switch (#27)

* Cleanup (#28)

* cleanup

* fixes

* Update apps/frontend/package.json

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/AmountTransition/AmountTransition.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/AssetAmountPriceRenderer/AssetAmountPriceRenderer.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/NetworkSwitch/NetworkSwitch.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/EModeDetails/EModeDetails.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/SupplyDetailsGraph/SupplyDetailsGraph.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/SupplyDetailsGraph/SupplyDetailsGraph.tsx

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* remove LinkIcon

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* pr comments

* fixes

* fixes

* SAF-49 setup bob (#29)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

---------

Co-authored-by: Juan <[email protected]>

* SAF 50 - E-Mode (#30)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

---------

Co-authored-by: Juan <[email protected]>

* Toggle lend mode

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* SAF 52 - Toggle lend mode (#31)

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

---------

Co-authored-by: Juan <[email protected]>

* Fixes and cleanup (#33)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

* Fix. Missing fix on borrow.

* fix borrow power to match desired collateral ratio

* rollback to working contracts for borrow eth

* fixes

* fixes and max amount

* loading when account changes

* close emode on complete

* disable emode if just one category

* error handling

* feat(network): change to new sepolia (#36)

---------

Co-authored-by: Juan <[email protected]>

* Fixes UI (#35)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

* Fix. Missing fix on borrow.

* fix borrow power to match desired collateral ratio

* rollback to working contracts for borrow eth

* fixes

* fixes and max amount

* loading when account changes

* close emode on complete

* disable emode if just one category

* error handling

* SAF-59, SAF-58, SAF-60, SAF-61, SAF-57

* limit by liquidity

* fix

* feat(network): change to new sepolia (#36)

* fixes

---------

Co-authored-by: Juan <[email protected]>

* Saf 20/pool details integration topbar (#40)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

* Fix. Missing fix on borrow.

* fix borrow power to match desired collateral ratio

* rollback to working contracts for borrow eth

* fixes

* fixes and max amount

* loading when account changes

* close emode on complete

* disable emode if just one category

* error handling

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix calculation
add balances and filter zero balances

* [SAF-20] wip testing rates data from contract Reserve Rate Strategy

* [SAF-20] wip integrating useAaveRates hook

* connect topbar

* tokens links

* add link to oracle

---------

Co-authored-by: Juan <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>

* Saf 20/pool details integration sidebar (#41)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

* Fix. Missing fix on borrow.

* fix borrow power to match desired collateral ratio

* rollback to working contracts for borrow eth

* fixes

* fixes and max amount

* loading when account changes

* close emode on complete

* disable emode if just one category

* error handling

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix calculation
add balances and filter zero balances

* [SAF-20] wip testing rates data from contract Reserve Rate Strategy

* [SAF-20] wip integrating useAaveRates hook

* [SAF-20] fix hook useAaveRates

* connect topbar

* tokens links

* add link to oracle

* [SAF_20] fix: parse totalDebt using decimals

* sidebar integration

* Connect topbar, add token links and add to wallet (#37)

* connect topbar

* tokens links

* add link to oracle

* fix merge error

---------

Co-authored-by: Juan <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>

* Saf 20/pool details integration graphs stats (#42)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

* Fix. Missing fix on borrow.

* fix borrow power to match desired collateral ratio

* rollback to working contracts for borrow eth

* fixes

* fixes and max amount

* loading when account changes

* close emode on complete

* disable emode if just one category

* error handling

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix calculation
add balances and filter zero balances

* [SAF-20] wip testing rates data from contract Reserve Rate Strategy

* [SAF-20] wip integrating useAaveRates hook

* [SAF-20] fix hook useAaveRates

* [SAF_20] fix: parse totalDebt using decimals

* Connect topbar, add token links and add to wallet (#37)

* connect topbar

* tokens links

* add link to oracle

* Money Market Mockups (#990)

* aave page static components, mobile first

* responsive panels

* functional static borrow asset list

* cleanup

* renaming

* lend assets list

* Lend positions list

* fixes and cleanup

* cleanup

* cleanup

* cleanup

* static ui done. missing validations

* add validations

* add validations

* move errors down

* borrow form modal

* pr comments

* pr comments

* fix typo

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/components/LendPositionAction/LendPositionAction.tsx

Co-authored-by: Juan Dahl <[email protected]>

* repay modals

* lend modal

* use simple table row

* asset amount input

* add missing translations

* fix translation

* units and prices mock

* setup layout for pool details screen

* wallet overview panel

* emode card mock

* max with for emode category

* top bar mock

* network switch

* cleanup

* ui fixes

* ui fixes, usd prices

* Efficiency card

* ordering

* fix filter 0 balances checkbox

* pr comment

* token

* Mocked table cards plus refactor of statistics card (#14)

* mocked table cards plus refactor of statistics card

* ui fixes

* Saf 41 charts (#16)

* mocked table cards plus refactor of statistics card

* ui fixes

* [SAF-41] give each graph it's own chart component

* [SAF-41] add htmlLegend plugin in charts; remove comments and refactor some colors moving them to constants

---------

Co-authored-by: matzapata <[email protected]>

* removed view transactions button (out of scope)

* fix breakpoints

* [SAF-41] fix color constant and background for mobile vs desktop views (#20)

* [SAF-41] fix color constant and background for mobile vs desktop views

* [SAF-41] use theme variables for colors and breakpoint usage for better consistency

* Apply suggestions from code review

Co-authored-by: Juan Dahl <[email protected]>

---------

Co-authored-by: Juan Dahl <[email protected]>

* Update apps/frontend/package.json

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/AmountTransition/AmountTransition.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/AssetAmountPriceRenderer/AssetAmountPriceRenderer.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/NetworkSwitch/NetworkSwitch.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/EModeDetails/EModeDetails.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/SupplyDetailsGraph/SupplyDetailsGraph.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/SupplyDetailsGraph/SupplyDetailsGraph.tsx

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* remove LinkIcon

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* pr comments

* fixes

---------

Co-authored-by: matzapata <[email protected]>
Co-authored-by: Matias Zapata <[email protected]>
Co-authored-by: Juan Dahl <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>
Co-authored-by: Pietro <[email protected]>

* chore: cleanup

* connected graphs

* cleanup

* cleanup

* cleanup

---------

Co-authored-by: Juan <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>
Co-authored-by: Christian Escalante <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>
Co-authored-by: Pietro <[email protected]>
Co-authored-by: Pietro <[email protected]>

* fixes

* Saf 20/charts integration (exclude supply and borrow by now) (#46)

* [SAF_20] remove mocks from pool details; create hooks useAaveRates and useAaveHistoryReserves

* [SAF-20] fix conflicts

* [SAF_20] mock api response by now

* [SAF_20] remove mock; prevent calling history data by now

* cleanup

* cleanup

* fixes

* fix: prevent NaN in interest rate charts when no data is retrieved

* fix stats

* fix available liquidity

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/LendAssetsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/BorrowPositionsList/components/BorrowPositionDetails/BorrowPositionDetails.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/BorrowPositionsList/BorrowPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* coments

* fix borrow power

* fixes and cleanup

* Fixes and cleanup (#48)

* coments

* fix borrow power

* fixes and cleanup

* cleanup

* Cleanup (#49)

* coments

* fix borrow power

* fixes and cleanup

* cleanup

* refactor config for same code style and handle mainnet config

* Refactor config for same code style and handle mainnet config (#50)

* coments

* fix borrow power

* fixes and cleanup

* cleanup

* refactor config for same code style and handle mainnet config

* small fixes

* remove unused files and fix repay with balance future collateral ratio

* remove unused files and fix repay with balance future collateral ratio (#51)

* coments

* fix borrow power

* fixes and cleanup

* cleanup

* refactor config for same code style and handle mainnet config

* small fixes

* remove unused files and fix repay with balance future collateral ratio

* cleanup and fixes

* disable collateral toggle if liquidation risk arises from it

* add sorting in tables

* precision and percentage

* fix hex chainId

* fix chain id

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* rename USD to Usd

* pr comments

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/InterestRateModelGraph/components/Chart/Chart.utils.ts

Co-authored-by: Pietro <[email protected]>

* pr comment

* disable tooltip for infinite

* [SAF_20] integrate charts data and api (#47)

* [SAF_20] integrate charts data and api

* [SAF_20] rewrite useAaveReservesHistory without using cancelable

* [SAF_20] remove type

* [SAF_20] remove jsdocs; use Decimal instead of number

* [SAF_20] remove unnecesary variable calculatedDate ; replace native fetch by axios

* [SAF_20] remove comments

* [SAF_20] move 18,27 decimals constants to math; move abi to constant file and remove unnecesary fields

* [SAF_20] use getProvider with bob chain id

* [SAF_20] remove unnecesary typed expression

* [SAF-20] add use memo

* [SAF-20] remove redundant use of loading

* [SAF-20] remove let by const

* [SAF-20] refactor supply and borrow chart data setup

* [SAF-20] refactor useRate giving symbol as a paramter

* [SAF-20] add manually time controls to charts (#52)

* [SAF-20] add manually time controls to charts

* [SAF-20] use enum from history hook to type TimeRangeButtons

* [SAF-20] replace color codes by theme variables

* [SAF-20] translate rate results from string to Decimal type ; delete unnecesary contract for the rate calculation that was introduced for reading getStableRateExcessOffset and OPTIMAL_STABLE_TO_TOTAL_DEBT_RATIO

* [SAF-20] rebase develop; resolve conflicts

* [SAF-20] rename text variable

* [SAF-20] fix calculation of utilization ratio

* [SAF-20] integrate REACT_APP_RATES_HISTORY_API_URL

* [SAF-20] improve calculateUtilizationRate

* [SAF-20] extract calculateUtilizationRate to util file; add check for value between zero and one ; add tests

* Update .env.example

* [SAF-20] remove unnecesary WEI def

* [SAF-20] wrapp describes

* [SAF-20] map values into Decimal

* [SAF-20] fix building reserve address

* [SAF-20] remove comment about a possible BUG; doesnt apply

* [SAF-20] move checkinig isBetweenZeroAndOne to inner function calculateUtilizationRate and return Zero in that case

* [SAF-20] rename parameter

* [SAF-20] move URL to constants

* [SAF-20] remove useless comments

* [SAF-20] add missing useCallback

* [SAF-20] rename parameter

* [SAF-20] remove isBetweenZeroAndOne leave the check inside calculation; move calculateUtilizationRate into AaveCalculations class

* [SAF-20] Use the same naming convention for RatesHistoryApiUrl as the rest of the constants

* [SAF-20] simplify hook useAaveRates with just one memo hook

* [SAF-20] simplify history data by removing unused utilizationRate and stableBorrowRate ; return just a type number to avoid unnecesary conversions

* [SAF-20] use Decimal to calculate interest rates

* fix(ui): fix size of wallet card

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* @pietro-maximoff suggestion applied: 'it doesn't need to be changed'

* fixes and improvements

* Qa fixes (#57)

* fixes

* fix translation

* fix lend position list

* cleanup

* replicate exceeds maximum amount to other components

* remove % from health factor

* fix: code improvements

* fix(borrow): use apy instead of apr and fix rounding numbers

* fix: typo

* fix: add validations

* fix: increase error factor for eth debts

* fix: increase error factor for eth debts

* fix: use math utils

* working earn aave history

* cleanup

* new deployment
hide graphs if borrow disabled
variable apy on select

* fix typo

* fix maximum withdrawal

* cleanup

* withdraw everything if no borrows

* fix max borrow using health factor

* new loan form

* Aave close with deposit

* liquidations table

* swap rate mode

* add missing translation

* cleanup

* cleanup

* fix

* add comment

* cleanup

* fix

* fix borrow text style

* rename `isMax` from `withdraw` to `withdrawAll` and update accordingly.
Automatically update input if it exceeds maximum

* add cte for readability

* cleanup

* add missing apy value

* feat(HF): change collateral ratio by health factor

* fix(graphs): improve precission and add go back button

* fix: add tokens to wallet

* Update apps/frontend/.env.example

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/3_organisms/EarnHistoryFrame/components/AaveLendingHistoryFrame/AaveLendingHistoryFrame.constants.tsx

Co-authored-by: Pietro <[email protected]>

* add translations

* fix: add more timeframes

* fix: match csv with page

* fix: filter non useful tx

---------

Co-authored-by: matzapata <[email protected]>
Co-authored-by: Matias Zapata <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>
Co-authored-by: Christian Escalante <[email protected]>
Co-authored-by: Pietro <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>
Co-authored-by: Pietro <[email protected]>
* aave page static components, mobile first

* responsive panels

* functional static borrow asset list

* cleanup

* renaming

* lend assets list

* Lend positions list

* fixes and cleanup

* cleanup

* cleanup

* cleanup

* static ui done. missing validations

* add validations

* add validations

* move errors down

* borrow form modal

* pr comments

* pr comments

* fix typo

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/components/LendPositionAction/LendPositionAction.tsx

Co-authored-by: Juan Dahl <[email protected]>

* repay modals

* lend modal

* use simple table row

* asset amount input

* add missing translations

* fix translation

* units and prices mock

* setup layout for pool details screen

* wallet overview panel

* emode card mock

* max with for emode category

* top bar mock

* network switch

* cleanup

* ui fixes

* ui fixes, usd prices

* Efficiency card

* ordering

* fix filter 0 balances checkbox

* pr comment

* token

* Mocked table cards plus refactor of statistics card (#14)

* mocked table cards plus refactor of statistics card

* ui fixes

* Saf 41 charts (#16)

* mocked table cards plus refactor of statistics card

* ui fixes

* [SAF-41] give each graph it's own chart component

* [SAF-41] add htmlLegend plugin in charts; remove comments and refactor some colors moving them to constants

---------

Co-authored-by: matzapata <[email protected]>

* removed view transactions button (out of scope)

* fix breakpoints

* [SAF-41] fix color constant and background for mobile vs desktop views (#20)

* [SAF-41] fix color constant and background for mobile vs desktop views

* [SAF-41] use theme variables for colors and breakpoint usage for better consistency

* Apply suggestions from code review

Co-authored-by: Juan Dahl <[email protected]>

---------

Co-authored-by: Juan Dahl <[email protected]>

* Dashboard pool data integration (#15) (#22)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* pr comments

* unit fixes

* Lend integration (#19)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* wip

* Dashboard pool data integration (#15)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* pr comments

* unit fixes

* supply wip

* fix asset renderer
add usd amount
cleanups

* fixes

* cleanup

* Cache for aave hooks (#23)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* wip

* Dashboard pool data integration (#15)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* pr comments

* unit fixes

* supply wip

* fix asset renderer
add usd amount
cleanups

* fixes

* withdraw integration

* cache useAaveReservesData

* cache useUserReserves

* cleanup

* fix imports

* fix

* Develop mockups (#25)

* fix breakpoints

* [SAF-41] fix color constant and background for mobile vs desktop views (#20)

* [SAF-41] fix color constant and background for mobile vs desktop views

* [SAF-41] use theme variables for colors and breakpoint usage for better consistency

* Apply suggestions from code review

Co-authored-by: Juan Dahl <[email protected]>

---------

Co-authored-by: Juan Dahl <[email protected]>

---------

Co-authored-by: matzapata <[email protected]>
Co-authored-by: Juan Dahl <[email protected]>

* Withdraw integration (#21)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* wip

* Dashboard pool data integration (#15)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* pr comments

* unit fixes

* supply wip

* fix asset renderer
add usd amount
cleanups

* fixes

* withdraw integration

* fix and pr comment

* pr comment

* Borrow integration (#24)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* wip

* Dashboard pool data integration (#15)

* dashboard tables

* emode usd and borrowing powers

* fix asset details

* pr comments

* unit fixes

* supply wip

* fix asset renderer
add usd amount
cleanups

* fixes

* withdraw integration

* cache useAaveReservesData

* cache useUserReserves

* cleanup

* fix imports

* wip. Health bar failing, wrong liquidation price

* fix calculations

* fix calculations

* fix

* cleanup

* replace apy with apr and health ratio with collateral ratio

* Repay integration (#26)

* calculations

* aave repay transaction factory and hook
cleanup and fixes

* use CollateralRatioHealthBar
replace health rate with collateral rate

* implement collateral switch (#27)

* Cleanup (#28)

* cleanup

* fixes

* Update apps/frontend/package.json

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/AmountTransition/AmountTransition.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/AssetAmountPriceRenderer/AssetAmountPriceRenderer.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/NetworkSwitch/NetworkSwitch.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/EModeDetails/EModeDetails.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/SupplyDetailsGraph/SupplyDetailsGraph.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/SupplyDetailsGraph/SupplyDetailsGraph.tsx

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* remove LinkIcon

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* pr comments

* fixes

* fixes

* SAF-49 setup bob (#29)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

---------

Co-authored-by: Juan <[email protected]>

* SAF 50 - E-Mode (#30)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

---------

Co-authored-by: Juan <[email protected]>

* Toggle lend mode

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* SAF 52 - Toggle lend mode (#31)

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

---------

Co-authored-by: Juan <[email protected]>

* Fixes and cleanup (#33)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

* Fix. Missing fix on borrow.

* fix borrow power to match desired collateral ratio

* rollback to working contracts for borrow eth

* fixes

* fixes and max amount

* loading when account changes

* close emode on complete

* disable emode if just one category

* error handling

* feat(network): change to new sepolia (#36)

---------

Co-authored-by: Juan <[email protected]>

* Fixes UI (#35)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

* Fix. Missing fix on borrow.

* fix borrow power to match desired collateral ratio

* rollback to working contracts for borrow eth

* fixes

* fixes and max amount

* loading when account changes

* close emode on complete

* disable emode if just one category

* error handling

* SAF-59, SAF-58, SAF-60, SAF-61, SAF-57

* limit by liquidity

* fix

* feat(network): change to new sepolia (#36)

* fixes

---------

Co-authored-by: Juan <[email protected]>

* Saf 20/pool details integration topbar (#40)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

* Fix. Missing fix on borrow.

* fix borrow power to match desired collateral ratio

* rollback to working contracts for borrow eth

* fixes

* fixes and max amount

* loading when account changes

* close emode on complete

* disable emode if just one category

* error handling

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix calculation
add balances and filter zero balances

* [SAF-20] wip testing rates data from contract Reserve Rate Strategy

* [SAF-20] wip integrating useAaveRates hook

* connect topbar

* tokens links

* add link to oracle

---------

Co-authored-by: Juan <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>

* Saf 20/pool details integration sidebar (#41)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

* Fix. Missing fix on borrow.

* fix borrow power to match desired collateral ratio

* rollback to working contracts for borrow eth

* fixes

* fixes and max amount

* loading when account changes

* close emode on complete

* disable emode if just one category

* error handling

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix calculation
add balances and filter zero balances

* [SAF-20] wip testing rates data from contract Reserve Rate Strategy

* [SAF-20] wip integrating useAaveRates hook

* [SAF-20] fix hook useAaveRates

* connect topbar

* tokens links

* add link to oracle

* [SAF_20] fix: parse totalDebt using decimals

* sidebar integration

* Connect topbar, add token links and add to wallet (#37)

* connect topbar

* tokens links

* add link to oracle

* fix merge error

---------

Co-authored-by: Juan <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>

* Saf 20/pool details integration graphs stats (#42)

* cleanup

* fixes

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix modal closing on lending positions change plus style adjustments

* fix withdraw modals

* modal fixes

* fix calculation
add balances and filter zero balances

* use memo items

* fix dependencies

* data normalizers

* Apply suggestions from code review

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/components/LendAssetAction/LendAssetAction.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/LendPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* wip refactor done. Missing hooks merge

* implementations and cleanup

* cleanup

* cleanup

* math safety

* more math safety

* cleanup

* clenaup

* emode mocks

* enable emode working

* emode working

* fixes and cleanup

* remove whitelist

* toggle lend mode working

* fixes and cleanup

* add collateral check

* fix collateral

* fixes

* Fix. Missing fix on borrow.

* fix borrow power to match desired collateral ratio

* rollback to working contracts for borrow eth

* fixes

* fixes and max amount

* loading when account changes

* close emode on complete

* disable emode if just one category

* error handling

* fixes. Connect provider. Fix repay adding proper allowance. Fix switch collateral token.address instead of token

* refetch user data based on blocknumber

* fix calculation
add balances and filter zero balances

* [SAF-20] wip testing rates data from contract Reserve Rate Strategy

* [SAF-20] wip integrating useAaveRates hook

* [SAF-20] fix hook useAaveRates

* [SAF_20] fix: parse totalDebt using decimals

* Connect topbar, add token links and add to wallet (#37)

* connect topbar

* tokens links

* add link to oracle

* Money Market Mockups (#990)

* aave page static components, mobile first

* responsive panels

* functional static borrow asset list

* cleanup

* renaming

* lend assets list

* Lend positions list

* fixes and cleanup

* cleanup

* cleanup

* cleanup

* static ui done. missing validations

* add validations

* add validations

* move errors down

* borrow form modal

* pr comments

* pr comments

* fix typo

* Update apps/frontend/src/app/5_pages/AavePage/components/LendPositionsList/components/LendPositionAction/LendPositionAction.tsx

Co-authored-by: Juan Dahl <[email protected]>

* repay modals

* lend modal

* use simple table row

* asset amount input

* add missing translations

* fix translation

* units and prices mock

* setup layout for pool details screen

* wallet overview panel

* emode card mock

* max with for emode category

* top bar mock

* network switch

* cleanup

* ui fixes

* ui fixes, usd prices

* Efficiency card

* ordering

* fix filter 0 balances checkbox

* pr comment

* token

* Mocked table cards plus refactor of statistics card (#14)

* mocked table cards plus refactor of statistics card

* ui fixes

* Saf 41 charts (#16)

* mocked table cards plus refactor of statistics card

* ui fixes

* [SAF-41] give each graph it's own chart component

* [SAF-41] add htmlLegend plugin in charts; remove comments and refactor some colors moving them to constants

---------

Co-authored-by: matzapata <[email protected]>

* removed view transactions button (out of scope)

* fix breakpoints

* [SAF-41] fix color constant and background for mobile vs desktop views (#20)

* [SAF-41] fix color constant and background for mobile vs desktop views

* [SAF-41] use theme variables for colors and breakpoint usage for better consistency

* Apply suggestions from code review

Co-authored-by: Juan Dahl <[email protected]>

---------

Co-authored-by: Juan Dahl <[email protected]>

* Update apps/frontend/package.json

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/AmountTransition/AmountTransition.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/AssetAmountPriceRenderer/AssetAmountPriceRenderer.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/2_molecules/NetworkSwitch/NetworkSwitch.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/EModeDetails/EModeDetails.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/SupplyDetailsGraph/SupplyDetailsGraph.tsx

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/SupplyDetailsGraph/SupplyDetailsGraph.tsx

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* remove LinkIcon

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* pr comments

* fixes

---------

Co-authored-by: matzapata <[email protected]>
Co-authored-by: Matias Zapata <[email protected]>
Co-authored-by: Juan Dahl <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>
Co-authored-by: Pietro <[email protected]>

* chore: cleanup

* connected graphs

* cleanup

* cleanup

* cleanup

---------

Co-authored-by: Juan <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>
Co-authored-by: Christian Escalante <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>
Co-authored-by: Pietro <[email protected]>
Co-authored-by: Pietro <[email protected]>

* fixes

* Saf 20/charts integration (exclude supply and borrow by now) (#46)

* [SAF_20] remove mocks from pool details; create hooks useAaveRates and useAaveHistoryReserves

* [SAF-20] fix conflicts

* [SAF_20] mock api response by now

* [SAF_20] remove mock; prevent calling history data by now

* cleanup

* cleanup

* fixes

* fix: prevent NaN in interest rate charts when no data is retrieved

* fix stats

* fix available liquidity

* Update apps/frontend/src/app/5_pages/AavePage/components/LendAssetsList/LendAssetsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/BorrowPositionsList/components/BorrowPositionDetails/BorrowPositionDetails.tsx

Co-authored-by: Juan <[email protected]>

* Update apps/frontend/src/app/5_pages/AavePage/components/BorrowPositionsList/BorrowPositionsList.constants.tsx

Co-authored-by: Juan <[email protected]>

* coments

* fix borrow power

* fixes and cleanup

* Fixes and cleanup (#48)

* coments

* fix borrow power

* fixes and cleanup

* cleanup

* Cleanup (#49)

* coments

* fix borrow power

* fixes and cleanup

* cleanup

* refactor config for same code style and handle mainnet config

* Refactor config for same code style and handle mainnet config (#50)

* coments

* fix borrow power

* fixes and cleanup

* cleanup

* refactor config for same code style and handle mainnet config

* small fixes

* remove unused files and fix repay with balance future collateral ratio

* remove unused files and fix repay with balance future collateral ratio (#51)

* coments

* fix borrow power

* fixes and cleanup

* cleanup

* refactor config for same code style and handle mainnet config

* small fixes

* remove unused files and fix repay with balance future collateral ratio

* cleanup and fixes

* disable collateral toggle if liquidation risk arises from it

* add sorting in tables

* precision and percentage

* fix hex chainId

* fix chain id

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* rename USD to Usd

* pr comments

* Update apps/frontend/src/app/5_pages/AaveReserveOverviewPage/components/InterestRateModelGraph/components/Chart/Chart.utils.ts

Co-authored-by: Pietro <[email protected]>

* pr comment

* disable tooltip for infinite

* [SAF_20] integrate charts data and api (#47)

* [SAF_20] integrate charts data and api

* [SAF_20] rewrite useAaveReservesHistory without using cancelable

* [SAF_20] remove type

* [SAF_20] remove jsdocs; use Decimal instead of number

* [SAF_20] remove unnecesary variable calculatedDate ; replace native fetch by axios

* [SAF_20] remove comments

* [SAF_20] move 18,27 decimals constants to math; move abi to constant file and remove unnecesary fields

* [SAF_20] use getProvider with bob chain id

* [SAF_20] remove unnecesary typed expression

* [SAF-20] add use memo

* [SAF-20] remove redundant use of loading

* [SAF-20] remove let by const

* [SAF-20] refactor supply and borrow chart data setup

* [SAF-20] refactor useRate giving symbol as a paramter

* [SAF-20] add manually time controls to charts (#52)

* [SAF-20] add manually time controls to charts

* [SAF-20] use enum from history hook to type TimeRangeButtons

* [SAF-20] replace color codes by theme variables

* [SAF-20] translate rate results from string to Decimal type ; delete unnecesary contract for the rate calculation that was introduced for reading getStableRateExcessOffset and OPTIMAL_STABLE_TO_TOTAL_DEBT_RATIO

* [SAF-20] rebase develop; resolve conflicts

* [SAF-20] rename text variable

* [SAF-20] fix calculation of utilization ratio

* [SAF-20] integrate REACT_APP_RATES_HISTORY_API_URL

* [SAF-20] improve calculateUtilizationRate

* [SAF-20] extract calculateUtilizationRate to util file; add check for value between zero and one ; add tests

* Update .env.example

* [SAF-20] remove unnecesary WEI def

* [SAF-20] wrapp describes

* [SAF-20] map values into Decimal

* [SAF-20] fix building reserve address

* [SAF-20] remove comment about a possible BUG; doesnt apply

* [SAF-20] move checkinig isBetweenZeroAndOne to inner function calculateUtilizationRate and return Zero in that case

* [SAF-20] rename parameter

* [SAF-20] move URL to constants

* [SAF-20] remove useless comments

* [SAF-20] add missing useCallback

* [SAF-20] rename parameter

* [SAF-20] remove isBetweenZeroAndOne leave the check inside calculation; move calculateUtilizationRate into AaveCalculations class

* [SAF-20] Use the same naming convention for RatesHistoryApiUrl as the rest of the constants

* [SAF-20] simplify hook useAaveRates with just one memo hook

* [SAF-20] simplify history data by removing unused utilizationRate and stableBorrowRate ; return just a type number to avoid unnecesary conversions

* [SAF-20] use Decimal to calculate interest rates

* fix(ui): fix size of wallet card

* Apply suggestions from code review

Co-authored-by: Pietro <[email protected]>

* @pietro-maximoff suggestion applied: 'it doesn't need to be changed'

* fixes and improvements

* Qa fixes (#57)

* fixes

* fix translation

* fix lend position list

* cleanup

* replicate exceeds maximum amount to other components

* remove % from health factor

* fix: code improvements

* fix(borrow): use apy instead of apr and fix rounding numbers

* fix: typo

* fix: add validations

* fix: increase error factor for eth debts

* fix: increase error factor for eth debts

* fix: use math utils

* working earn aave history

* cleanup

* new deployment
hide graphs if borrow disabled
variable apy on select

* fix typo

* fix maximum withdrawal

* cleanup

* withdraw everything if no borrows

* fix max borrow using health factor

* new loan form

* Aave close with deposit

* liquidations table

* swap rate mode

* add missing translation

* cleanup

* cleanup

* fix

* add comment

* cleanup

* fix

* fix borrow text style

* rename `isMax` from `withdraw` to `withdrawAll` and update accordingly.
Automatically update input if it exceeds maximum

* add cte for readability

* cleanup

* add missing apy value

* feat(HF): change collateral ratio by health factor

* fix(graphs): improve precission and add go back button

* fix: add tokens to wallet

* Update apps/frontend/.env.example

Co-authored-by: Pietro <[email protected]>

* Update apps/frontend/src/app/3_organisms/EarnHistoryFrame/components/AaveLendingHistoryFrame/AaveLendingHistoryFrame.constants.tsx

Co-authored-by: Pietro <[email protected]>

* add translations

* fix: add more timeframes

* fix: match csv with page

* fix: filter non useful tx

* fix: change address and fix max button

* fix: withdraw max

---------

Co-authored-by: matzapata <[email protected]>
Co-authored-by: Matias Zapata <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>
Co-authored-by: Christian Escalante <[email protected]>
Co-authored-by: Pietro <[email protected]>
Co-authored-by: Luciano Perez Cerra <[email protected]>
Co-authored-by: Pietro <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge PR should not be merged due to dependencies/blockers enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants