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

[DRAFT] - Borrow page: Health lvl #71

Conversation

bowtiedpyro
Copy link
Collaborator

Integrated the health percentage component in the borrow page - please review.

@vercel
Copy link

vercel bot commented Dec 9, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
evm-redesign ✅ Ready (Inspect) Visit Preview Dec 9, 2022 at 6:50PM (UTC)

Copy link
Collaborator

@BowTiedHeron BowTiedHeron left a comment

Choose a reason for hiding this comment

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

added a few comments, lets discuss these on a call.

components/HealthLvl/HealthLvl.tsx Outdated Show resolved Hide resolved

const { formatPercent: fp, formatERC20: fs } = formatNumber;
const Markets: NextPage = () => {
const COLLATERAL_FACTOR = 0.65;
Copy link
Collaborator

Choose a reason for hiding this comment

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

we should not use hard coded values. for EVM we can get this from the contracts.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oke, we should call upon the contract and extract the value there

Copy link
Collaborator

Choose a reason for hiding this comment

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

see example: #73

@@ -2,6 +2,8 @@ import React, { FC } from 'react';
import * as style from './HealthLvl.css';
import { HealthLvlProps, HealthLvlPoint } from './types';

// const { formatPercent: fp } = formatNumber;
Copy link
Collaborator

Choose a reason for hiding this comment

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

why is this removed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Unused import

const { currentUser, setCurrentUser } = useContext(UserContext);
const [tableData, setTableData] = useState<MarketTableRow[]>([]);
const [isMyCollectionsFilterEnabled, setIsMyCollectionsFilterEnabled] = useState(false);
const [expandedRowKeys, setExpandedRowKeys] = useState<readonly antdKey[]>([]);
const { toast, ToastComponent } = useToast();
Copy link
Collaborator

Choose a reason for hiding this comment

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

seems unrelated, please create an issue for new found bugs

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it's not, we need it in the useEffect otherwise can't integrate the loader - see commit below

const { currentUser, setCurrentUser } = useContext(UserContext);
const [tableData, setTableData] = useState<MarketTableRow[]>([]);
const [isMyCollectionsFilterEnabled, setIsMyCollectionsFilterEnabled] = useState(false);
const [expandedRowKeys, setExpandedRowKeys] = useState<readonly antdKey[]>([]);
const { toast, ToastComponent } = useToast();
const NFTId = useLoanFlowStore((state) => state.NFTId);
Copy link
Collaborator

Choose a reason for hiding this comment

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

unrelated to this pr

Copy link
Collaborator Author

@bowtiedpyro bowtiedpyro Dec 9, 2022

Choose a reason for hiding this comment

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

it's not, we need it in the useEffect otherwise can't integrate the loader - see commit below. Also used for the call of borrowamount

@BowTiedHeron BowTiedHeron changed the title 67 borrow page re introduce health lvl and make sure the calc works Borrow page: Health lvl Dec 9, 2022
@BowTiedHeron BowTiedHeron changed the title Borrow page: Health lvl [DRAFT] - Borrow page: Health lvl Dec 9, 2022
@BowTiedHeron BowTiedHeron linked an issue Dec 9, 2022 that may be closed by this pull request
@BowTiedHeron BowTiedHeron deleted the 67-borrow-page-re-introduce-health-lvl-and-make-sure-the-calc-works branch March 11, 2023 19:55
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.

Borrow page: re-introduce health lvl and make sure the calc works
2 participants