fix display commit time in pledge table

This commit is contained in:
Barry Gitarts 2019-01-09 17:11:22 -05:00
parent 5efc0fd300
commit 0fcb4cf467
3 changed files with 18339 additions and 966 deletions

View File

@ -13,9 +13,8 @@ const pledgeStateMap = {
2: 'Paid' 2: 'Paid'
} }
const convertToDatetime = (field, fundProfiles) => { const convertToDatetime = (field, fundProfiles) => {
const { commitTime, id } = field const { commitTime, owner } = field
const profile = fundProfiles[id - 1] const profile = fundProfiles[Number(owner) - 1]
//TODO fix - add commitTime from funder and delegates to get actual dateTime
if (!profile || Number(commitTime) === 0) return 0 if (!profile || Number(commitTime) === 0) return 0
const time = Number(commitTime) + Number(profile.commitTime) const time = Number(commitTime) + Number(profile.commitTime)
const date = new Date(time * 1000) const date = new Date(time * 1000)

19299
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -63,6 +63,7 @@
"cytoscape": "^3.3.0", "cytoscape": "^3.3.0",
"cytoscape-cose-bilkent": "^4.0.0", "cytoscape-cose-bilkent": "^4.0.0",
"cytoscape-dagre": "^2.2.2", "cytoscape-dagre": "^2.2.2",
"embark": "^4.0.0-alpha.2",
"eslint": "^5.9.0", "eslint": "^5.9.0",
"eth-contract-class": "^0.0.12", "eth-contract-class": "^0.0.12",
"formik": "^1.3.2", "formik": "^1.3.2",