Bug fixes

This commit is contained in:
sairaj mote 2023-04-16 01:21:37 +05:30
parent bf6e3dc8a0
commit 2f824b609b

View File

@ -822,7 +822,8 @@
contractType,
contractSubtype,
contractAddress,
expiration, token,
expiration,
token,
participationFees,
userChoices,
payeeAddress,
@ -845,14 +846,6 @@
<div class=${`status ${status}`}>${status}</div>
`: ''}
<h2 class="uppercase">${replaceDash(contract)}</h2>
${userChoices ? html`
<h3 class="heading">Available Choices</h3>
<ul type="circle" class="card">
${Object.keys(userChoices).map(choice => html`
<li>${userChoices[choice]}</li>
`)}
</ul>
`: ''}
<div id="contract_info" class="card">
<div class="flex info-row">
<h5 class="label">Contract Type</h5>
@ -871,7 +864,7 @@
${expiration ? html`
<div class="flex info-row">
<h5 class="label">Expiration</h5>
<h4>${expiration}</h4>
<h4>${getFormattedTime(new Date(expiration).getTime())}</h4>
</div>
` : ''}
${payeeAddress ? html`
@ -951,7 +944,15 @@
</div>
`: ''}
</div>
<sm-chips data-target="contract_views" onchange="changeView(event)">
${userChoices ? html`
<h3>Available Choices</h3>
<ul type="circle" class="card">
${Object.keys(userChoices).map(choice => html`
<li>${userChoices[choice]}</li>
`)}
</ul>
`: ''}
<sm-chips class="margin-top-1" data-target="contract_views" onchange="changeView(event)">
<sm-chip value="0" selected>Transactions</sm-chip>
<sm-chip value="1">Participants</sm-chip>
${contractType === 'one-time-event' && contractSubtype === 'external-trigger' ? html`<sm-chip value="2">Winners</sm-chip>` : ''}
@ -1185,6 +1186,7 @@
},
contractCreationCard(obj) {
const { hash, blockHeight, token, contractName, incAddress, contractType, expiration, participationFees, availableChoices, time } = obj;
console.log(obj);
return html`
<div id=${hash} class="transaction contract-creation">
<svg class="icon" viewBox="0 0 64 64"> <title>contract creation</title> <path d="M47.07,23.85V11"/> <path d="M3,47A7,7,0,0,0,.48,52.39a6.89,6.89,0,0,0,2.05,4.93,6.78,6.78,0,0,0,3.78,2,6.34,6.34,0,0,0,1.16.1H40.09a7,7,0,0,0,7-7V44"/> <path d="M6.31,53V11.61a7,7,0,0,1,7-7H45.91a6.26,6.26,0,0,1,1.16.1,6.74,6.74,0,0,1,3.78,1.95A7,7,0,0,1,50.37,17"/> <line x1="14.46" y1="23.85" x2="38.92" y2="23.85"/> <line x1="14.46" y1="32" x2="38.92" y2="32"/> <line x1="14.46" y1="40.15" x2="31.93" y2="40.15"/> <path d="M57.79,24.44l-2.88-2.9,3.79-3.79a1,1,0,0,1,1.39,0l3.11,3.11a1,1,0,0,1,0,1.39L40.34,45.1a1,1,0,0,1-.52.28L36,46A1,1,0,0,1,34.9,44.9l.67-3.77a1,1,0,0,1,.27-.52L52.65,23.8"/> </svg>
@ -1212,7 +1214,7 @@
</div>
<div class="flex flex-direction-column">
<h5 class="label">expiration</h5>
<h4 class="capitalise">${expiration}</h4>
<h4 class="capitalise">${getFormattedTime(new Date(expiration).getTime())}</h4>
</div>
<div class="flex flex-direction-column">
<h5 class="label">participation amount</h5>
@ -1451,11 +1453,23 @@
// if(transactionKey == '11571ce7e5eed0bce30e24de89bb1ba6cc432df7b5b40bbc9f0225b98968cb47'){
// //debugger
// }
console.log(tx)
const {
transactionDetails: {
txid, blockHeight, vin, vout, time },
parsedFloData: {
contractAddress, contractType, expiryTime, contractAmount, type, tokenAmount, tokenIdentification, transferType, contractName, triggerCondition, userChoice, nftHash
contractAddress,
contractType,
contractConditions: { expiryTime } = {},
contractAmount,
type,
tokenAmount,
tokenIdentification,
transferType,
contractName,
triggerCondition,
userChoice,
nftHash
}
} = tx;
let obj = {