diff --git a/index.html b/index.html index 6d9f120..537fef7 100644 --- a/index.html +++ b/index.html @@ -1318,7 +1318,7 @@ let selectedSmartContract = filteredSmartContracts[0] || {} if (scName && scAddress) selectedSmartContract = getScDetails(scName, scAddress) - const { contractName, contractAddress, acceptingToken, tokenIdentification, userChoices } = selectedSmartContract + const { price, contractName, contractAddress, acceptingToken, sellingToken, tokenIdentification, userChoices, contractSubType } = selectedSmartContract history.replaceState(null, null, `#/smartcontracts/participate?scName=${contractName}&scAddress=${contractAddress}`) renderElem(getRef('smart_contract_participate_form'), html`
@@ -1339,6 +1339,12 @@ `)}
`: ''} + ${contractSubType === 'tokenswap' ? html` +
+

Swap ${acceptingToken} with ${sellingToken}

+

Exchange rate: 1 ${acceptingToken} = ${price} ${sellingToken} +

+ `: ''}
Participation amount (${acceptingToken || tokenIdentification}) @@ -2572,7 +2578,7 @@ // name = floGlobals.smartContracts[0].contractName // address = floGlobals.smartContracts[0].contractAddress // } - // fetchJSON(`${floGlobals.tokenApiUrl}/api/v2/smartContractInfo?contractName=${name}&contractAddress=${address}`) + // fetchJSON(`https://ranchimallflo.duckdns.org/api/v2/smartContractInfo?contractName=${name}&contractAddress=${address}`) // .then(info => { // console.log(info) // const {