diff --git a/index.html b/index.html index ff336cb..5a3e18f 100644 --- a/index.html +++ b/index.html @@ -1258,7 +1258,7 @@ if (scName && scAddress) selectedSmartContract = getScDetails(scName, scAddress) const { price, contractName, contractAddress, acceptingToken, sellingToken, tokenIdentification, contractSubType } = selectedSmartContract - history.replaceState(null, null, `#/smartcontracts/deposit?scName=${contractName}&scAddress=${contractAddress}`) + history.replaceState(null, null, `#/smartcontracts/${subpage}?scName=${contractName}&scAddress=${contractAddress}`) const defaultExpiration = new Date(new Date().getTime() + (floGlobals.expirationDays * 24 * 60 * 60 * 1000)) .toISOString().slice(0, -8); renderElem(getRef('smart_contract_deposit_form'), html` @@ -1313,7 +1313,7 @@ if (scName && scAddress) selectedSmartContract = getScDetails(scName, scAddress) const { price, contractName, contractAddress, acceptingToken, sellingToken, tokenIdentification, userChoices, contractSubType } = selectedSmartContract - history.replaceState(null, null, `#/smartcontracts/participate?scName=${contractName}&scAddress=${contractAddress}`) + history.replaceState(null, null, `#/smartcontracts/${subpage}?scName=${contractName}&scAddress=${contractAddress}`) renderElem(getRef('smart_contract_participate_form'), html`
Select smart contract @@ -1375,7 +1375,7 @@ if (scName && scAddress) selectedSmartContract = getScDetails(scName, scAddress) const { contractName, contractAddress, oracle_address, price, acceptingToken } = selectedSmartContract - history.replaceState(null, null, `#/smartcontracts/participate?scName=${contractName}&scAddress=${contractAddress}`) + history.replaceState(null, null, `#/smartcontracts/${subpage}?scName=${contractName}&scAddress=${contractAddress}`) renderElem(getRef('smart_contract_update_form'), html`
Oracle FLO Address @@ -1427,7 +1427,7 @@ if (scName && scAddress) selectedSmartContract = getScDetails(scName, scAddress) const { contractName, contractAddress, price, tokenIdentification, userChoices } = selectedSmartContract - history.replaceState(null, null, `#/smartcontracts/trigger?scName=${contractName}&scAddress=${contractAddress}`) + history.replaceState(null, null, `#/smartcontracts/${subpage}?scName=${contractName}&scAddress=${contractAddress}`) renderElem(getRef('smart_contract_trigger_form'), html`
Select smart contract @@ -2002,7 +2002,7 @@ availableSmartContractOptions(smartContracts = [], selected) { return smartContracts .map(({ contractName, contractAddress }) => html` - ${`${replaceDash(contractName)} (${contractAddress})`} + ${`${replaceDash(contractName)} (${contractAddress})`} `) }, contractCreationForm(type, subtype) { @@ -3042,6 +3042,7 @@ const [contractName, contractAddress] = (selectedSmartContract).split('_') const oraclePrivateKey = document.getElementById('oracle_private_key').value.trim() const oracleAddress = document.getElementById('oracle_address').value + const { acceptingToken } = getScDetails(contractName, contractAddress) if (!floCrypto.verifyPrivKey(oraclePrivateKey, oracleAddress)) { return notify(`Private key doesn't match with Oracle address`, 'error') } @@ -3049,7 +3050,7 @@ const floData = ` {"price-update":{"contract-name": "${contractName}", "contract-address": "${contractAddress}", "price": ${updatedPrice}}} ` console.log(floData) getConfirmation('Update price', { - message: `Are you sure you want to update the price of ${contractName} to ${updatedPrice} FLO?`, + message: `Are you sure you want to update the price of ${contractName} to ${updatedPrice} ${acceptingToken}?`, confirmText: 'Update', cancelText: 'Cancel' }).then((res) => {