mirror of
https://github.com/status-im/liquid-funding.git
synced 2025-01-12 12:34:39 +00:00
handle no pledge info
This commit is contained in:
parent
b83eb9e7bf
commit
1f35ae88dc
@ -20,7 +20,7 @@ function FundingDetail({ classes, pledgesInfos, goal, goalToken }) {
|
||||
const { cellText, headerDetails, centerText } = classes
|
||||
const { prices } = useContext(FundingContext)
|
||||
const pledgeInfo = pledgesInfos.find(p => p.token.toUpperCase() === goalToken.toUpperCase())
|
||||
const { lifetimeReceived } = pledgeInfo
|
||||
const lifetimeReceived = pledgeInfo ? pledgeInfo.lifetimeReceived : '0'
|
||||
const lifetimeHumanReadible = getAmountFromWei(goalToken, lifetimeReceived)
|
||||
const fundedPercent = percentToGoal(lifetimeHumanReadible, goal)
|
||||
const goalAmount = Number(goal).toLocaleString()
|
||||
|
Loading…
x
Reference in New Issue
Block a user