added min | nax subscription amount to smart contract creation tx
This commit is contained in:
parent
30a901f911
commit
060a33b5a3
98
index.html
98
index.html
@ -837,7 +837,10 @@
|
|||||||
`;
|
`;
|
||||||
},
|
},
|
||||||
contractCreationCard(obj) {
|
contractCreationCard(obj) {
|
||||||
const { hash, blockHeight, token, contractName, incAddress, contractType, expiration, participationFees, availableChoices, time, acceptingToken, sellingToken, price } = obj;
|
const {
|
||||||
|
hash, blockHeight, token, contractName, incAddress, contractType,
|
||||||
|
expiration, participationFees, availableChoices, time, acceptingToken, sellingToken, price,
|
||||||
|
minAmount, maxAmount } = obj;
|
||||||
console.log(obj)
|
console.log(obj)
|
||||||
return html`
|
return html`
|
||||||
<li id=${hash} class="transaction contract-creation">
|
<li id=${hash} class="transaction contract-creation">
|
||||||
@ -864,42 +867,56 @@
|
|||||||
${replaceDash(contractType) === 'continuos event' ? 'continuous event' : replaceDash(contractType)}
|
${replaceDash(contractType) === 'continuos event' ? 'continuous event' : replaceDash(contractType)}
|
||||||
</h4>
|
</h4>
|
||||||
</div>
|
</div>
|
||||||
${token ? html`
|
<div class="flex flex-wrap gap-1-5">
|
||||||
<div class="flex flex-direction-column">
|
${token ? html`
|
||||||
<h5 class="label">token used</h5>
|
<div class="flex flex-direction-column">
|
||||||
<h4>${token}</h4>
|
<h5 class="label">token used</h5>
|
||||||
</div>
|
<h4>${token}</h4>
|
||||||
`: ''}
|
</div>
|
||||||
${acceptingToken ? html`
|
`: ''}
|
||||||
<div class="flex flex-direction-column">
|
${acceptingToken ? html`
|
||||||
<h5 class="label">Participation token</h5>
|
<div class="flex flex-direction-column">
|
||||||
<h4>${acceptingToken}</h4>
|
<h5 class="label">Participation token</h5>
|
||||||
</div>
|
<h4>${acceptingToken}</h4>
|
||||||
`: ''}
|
</div>
|
||||||
${sellingToken ? html`
|
`: ''}
|
||||||
<div class="flex flex-direction-column">
|
${sellingToken ? html`
|
||||||
<h5 class="label">Deposit token</h5>
|
<div class="flex flex-direction-column">
|
||||||
<h4>${sellingToken}</h4>
|
<h5 class="label">Deposit token</h5>
|
||||||
</div>
|
<h4>${sellingToken}</h4>
|
||||||
`: ''}
|
</div>
|
||||||
${expiration ? html`
|
`: ''}
|
||||||
<div class="flex flex-direction-column">
|
${expiration ? html`
|
||||||
<h5 class="label">expiration</h5>
|
<div class="flex flex-direction-column">
|
||||||
<h4 class="capitalise">${getFormattedTime(new Date(expiration).getTime())}</h4>
|
<h5 class="label">expiration</h5>
|
||||||
</div>
|
<h4 class="capitalise">${getFormattedTime(new Date(expiration).getTime())}</h4>
|
||||||
`: ''}
|
</div>
|
||||||
${participationFees ? html`
|
`: ''}
|
||||||
<div class="flex flex-direction-column">
|
${participationFees ? html`
|
||||||
<h5 class="label">participation amount</h5>
|
<div class="flex flex-direction-column">
|
||||||
<h4>${participationFees} ${token}</h4>
|
<h5 class="label">participation amount</h5>
|
||||||
</div>
|
<h4>${participationFees} ${token}</h4>
|
||||||
`: ''}
|
</div>
|
||||||
${price ? html`
|
`: ''}
|
||||||
<div class="flex flex-direction-column">
|
${price ? html`
|
||||||
<h5 class="label">price</h5>
|
<div class="flex flex-direction-column">
|
||||||
<h4>1 ${sellingToken} = ${formatAmount(price, 'usd')} ${acceptingToken}</h4>
|
<h5 class="label">price</h5>
|
||||||
</div>
|
<h4>1 ${sellingToken} = ${formatAmount(price, 'usd')} ${acceptingToken}</h4>
|
||||||
`: ''}
|
</div>
|
||||||
|
`: ''}
|
||||||
|
${minAmount ? html`
|
||||||
|
<div class="flex flex-direction-column">
|
||||||
|
<h5 class="label">min amount</h5>
|
||||||
|
<h4>${minAmount} ${token}</h4>
|
||||||
|
</div>
|
||||||
|
`: ''}
|
||||||
|
${maxAmount ? html`
|
||||||
|
<div class="flex flex-direction-column">
|
||||||
|
<h5 class="label">max amount</h5>
|
||||||
|
<h4>${maxAmount} ${token}</h4>
|
||||||
|
</div>
|
||||||
|
`: ''}
|
||||||
|
</div>
|
||||||
<div class="flex align-center space-between flex-wrap gap-1">
|
<div class="flex align-center space-between flex-wrap gap-1">
|
||||||
<div class="flex flex-direction-column">
|
<div class="flex flex-direction-column">
|
||||||
<h5 class="label">Transaction ID</h5>
|
<h5 class="label">Transaction ID</h5>
|
||||||
@ -1702,7 +1719,10 @@
|
|||||||
senderAddress,
|
senderAddress,
|
||||||
contractAddress,
|
contractAddress,
|
||||||
contractType,
|
contractType,
|
||||||
contractConditions: { expiryTime, accepting_token, selling_token, subtype, price } = {},
|
contractConditions: {
|
||||||
|
expiryTime, accepting_token, selling_token, subtype, price,
|
||||||
|
participationAmount, minimumsubscriptionamount, maximumsubscriptionamount
|
||||||
|
} = {},
|
||||||
contractAmount,
|
contractAmount,
|
||||||
type,
|
type,
|
||||||
tokenAmount,
|
tokenAmount,
|
||||||
@ -1784,6 +1804,8 @@
|
|||||||
participationFees: contractAmount,
|
participationFees: contractAmount,
|
||||||
availableChoices: "",
|
availableChoices: "",
|
||||||
type: "contractincorp",
|
type: "contractincorp",
|
||||||
|
minAmount: minimumsubscriptionamount,
|
||||||
|
maxAmount: maximumsubscriptionamount,
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user