Update index.html

This commit is contained in:
sairaj mote 2023-09-25 03:13:12 +05:30
parent 36dbf379b1
commit b3ce434325

View File

@ -2853,10 +2853,11 @@
function filterSmartContracts(options) {
const { type, subType, dynamic = false } = options || {};
console.log(options)
let filteredSmartContracts = floGlobals.smartContracts || [];
if (type) {
filteredSmartContracts = filteredSmartContracts.filter(sc => {
if (subType === 'external-trigger') {
if (subType && subType === 'external-trigger') {
return sc.status === 'expired'; // only inactive contracts can be triggered externally
} else if (type === 'continuos-event' && dynamic) {
return sc.status === 'active' && sc.contractType === type && sc.oracle_address;