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

Final delivery money market (includes the charts) #1004

Merged

Conversation

chescalante
Copy link

@chescalante chescalante commented Sep 12, 2024

matzapata and others added 18 commits September 9, 2024 16:38
#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
…ts/InterestRateModelGraph/components/Chart/Chart.utils.ts

Co-authored-by: Pietro <[email protected]>
* [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
Copy link

netlify bot commented Sep 12, 2024

👷 Deploy request for sovryn-dapp pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 500fe4c

Copy link

changeset-bot bot commented Sep 12, 2024

⚠️ No Changeset found

Latest commit: 500fe4c

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 canceled.

Name Link
🔨 Latest commit 500fe4c
🔍 Latest deploy log https://app.netlify.com/sites/sovryn-storybook/deploys/66e43baedb6c21000821d912

if (!signer) {
return null;
}
if (!signer) return null;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it doesn't need to be changed

apps/frontend/src/hooks/aave/useAaveRates.tsx Outdated Show resolved Hide resolved
if (!signer) {
return null;
}
if (!signer) return null;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it doesn't need to be changed

if (!signer) {
return null;
}
if (!signer) return null;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it doesn't need to be changed

if (!signer) {
return null;
}
if (!signer) return null;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it doesn't need to be changed

@pietro-maximoff pietro-maximoff marked this pull request as ready for review September 16, 2024 08:59
@pietro-maximoff pietro-maximoff merged commit 42a7342 into DistributedCollective:feat/money-market Sep 16, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants