Bug fix
This commit is contained in:
parent
af0ecf4a13
commit
1ebbf51bb4
24
index.html
24
index.html
@ -2852,17 +2852,23 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function filterSmartContracts(options) {
|
function filterSmartContracts(options) {
|
||||||
const { type, subType, dynamic = false } = options || {}
|
const { type, subType, dynamic = false } = options || {};
|
||||||
let filteredSmartContracts = (floGlobals.smartContracts || [])
|
let filteredSmartContracts = floGlobals.smartContracts || [];
|
||||||
.filter(sc => sc.status === 'active')
|
|
||||||
if (type) {
|
if (type) {
|
||||||
filteredSmartContracts = filteredSmartContracts.filter(sc => sc.contractType === type)
|
filteredSmartContracts = filteredSmartContracts.filter(sc => {
|
||||||
if (type === 'continuos-event' && dynamic)
|
if (type === 'external-trigger') {
|
||||||
filteredSmartContracts = filteredSmartContracts.filter(sc => sc.oracle_address)
|
return sc.status !== 'active'; // only inactive contracts can be triggered externally
|
||||||
|
} else if (type === 'continuos-event' && dynamic) {
|
||||||
|
return sc.status === 'active' && sc.contractType === type && sc.oracle_address;
|
||||||
|
} else {
|
||||||
|
return sc.status === 'active' && sc.contractType === type;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
if (subType)
|
if (subType) {
|
||||||
filteredSmartContracts = filteredSmartContracts.filter(sc => sc.contractSubType === subType)
|
filteredSmartContracts = filteredSmartContracts.filter(sc => sc.contractSubType === subType);
|
||||||
return filteredSmartContracts
|
}
|
||||||
|
return filteredSmartContracts;
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleSmartContractSelection(actionType) {
|
function handleSmartContractSelection(actionType) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user