diff --git a/index.html b/index.html index e2d885a..0acd7ae 100644 --- a/index.html +++ b/index.html @@ -389,16 +389,15 @@ // append latest transactions renderTransactions('contract_transaction_container', contractTransactions) console.log(contractParticipants) - let winners = [] + let winners = [] for (const participant in contractParticipants) { if (contractParticipants[participant].winningAmount) winners.push(contractParticipants[participant]) } - renderElem(document.getElementById('participant_container'), html`${ - Object.keys(contractParticipants).map(participant => render.contractChoiceCard(contractParticipants[participant])) - }`) + renderElem(document.getElementById('participant_container'), html`${Object.keys(contractParticipants).map(participant => render.contractChoiceCard(contractParticipants[participant])) + }`) - if(winners.length){ + if (winners.length) { renderElem(document.getElementById('winners_container'), html`${winners.map(winner => render.contractChoiceCard(winner))}`) } }) @@ -911,20 +910,20 @@
- - ${contractType === 'one-time-event' && contractSubtype === 'external-trigger' ? html`` : ''} - ${contractType === 'continuos-event' && contractSubtype === 'token-swap' ? html`` : ''} + + ${contractType === 'one-time-event' && contractSubtype === 'external-trigger' ? html`` : ''} + ${contractType === 'continuos-event' && contractSubtype === 'token-swap' ? html`` : ''}
`; }, contractChoiceCard(details) { - const { participantFloAddress, userChoice, tokenAmount, transactionHash, winningAmount} = details; + const { participantFloAddress, userChoice, tokenAmount, transactionHash, winningAmount } = details; let action; if (winningAmount) { action = 'Won' amount = winningAmount - }else + } else action = 'Invested' return html`