Bug fixes
This commit is contained in:
parent
9098a460fe
commit
b7fd195eec
32
index.html
32
index.html
@ -389,18 +389,26 @@
|
|||||||
// append latest transactions
|
// append latest transactions
|
||||||
renderTransactions('contract_transaction_container', contractTransactions)
|
renderTransactions('contract_transaction_container', contractTransactions)
|
||||||
console.log(contractParticipants)
|
console.log(contractParticipants)
|
||||||
let winners = []
|
renderElem(
|
||||||
for (const participant in contractParticipants) {
|
document.getElementById('participant_container'),
|
||||||
if (contractParticipants[participant].winningAmount)
|
html`${Object.keys(contractParticipants).map(participant => render.contractChoiceCard(contractParticipants[participant]))}`
|
||||||
winners.push(contractParticipants[participant])
|
)
|
||||||
}
|
switch (contractInfo.contractType) {
|
||||||
renderElem(document.getElementById('participant_container'), html`${Object.keys(contractParticipants).map(participant => render.contractChoiceCard(contractParticipants[participant]))
|
case 'one-time-event':
|
||||||
}`)
|
let winners = []
|
||||||
|
for (const participant in contractParticipants) {
|
||||||
if (winners.length) {
|
if (contractParticipants[participant].winningAmount)
|
||||||
renderElem(document.getElementById('winners_container'), html`${winners.map(winner => render.contractChoiceCard(winner))}`)
|
winners.push(contractParticipants[participant])
|
||||||
} else {
|
}
|
||||||
renderElem(document.getElementById('winners_container'), html`<div>No winners found</div>`)
|
if (winners.length) {
|
||||||
|
renderElem(document.getElementById('winners_container'), html`${winners.map(winner => render.contractChoiceCard(winner))}`)
|
||||||
|
} else {
|
||||||
|
renderElem(document.getElementById('winners_container'), html`<div>No winners found</div>`)
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'continuos-event':
|
||||||
|
console.log('should render continuos-event')
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user