Bug fixes
This commit is contained in:
parent
b8f0dd296e
commit
c26a778e54
13
index.html
13
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`
|
||||
<div class="grid gap-0-5">
|
||||
<span class="label">Select smart contract</span>
|
||||
@ -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`
|
||||
<div class="grid gap-0-5">
|
||||
<span class="label">Oracle FLO Address</span>
|
||||
@ -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`
|
||||
<div class="grid gap-0-5">
|
||||
<span class="label">Select smart contract</span>
|
||||
@ -2002,7 +2002,7 @@
|
||||
availableSmartContractOptions(smartContracts = [], selected) {
|
||||
return smartContracts
|
||||
.map(({ contractName, contractAddress }) => html`
|
||||
<sm-option class="breakable" value=${`${contractName}_${contractAddress}`} ?selected=${`${contractName}_${contractAddress}` === `${selected}`}>${`${replaceDash(contractName)} (${contractAddress})`}</sm-option>
|
||||
<sm-option class="breakable" value=${`${contractName}_${contractAddress}`} selected=${`${contractName}_${contractAddress}` === `${selected}`}>${`${replaceDash(contractName)} (${contractAddress})`}</sm-option>
|
||||
`)
|
||||
},
|
||||
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) => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user