-
Notifications
You must be signed in to change notification settings - Fork 3
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
[DRAFT] - Borrow page: Health lvl #71
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this 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.
|
||
const { formatPercent: fp, formatERC20: fs } = formatNumber; | ||
const Markets: NextPage = () => { | ||
const COLLATERAL_FACTOR = 0.65; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this removed?
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unrelated to this pr
There was a problem hiding this comment.
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
c5c3253
to
4071333
Compare
Integrated the health percentage component in the borrow page - please review.