From 82dc15c435589b9ecbd48d386d50288f570fffbd Mon Sep 17 00:00:00 2001 From: Vivek Teega Date: Sat, 22 Aug 2020 20:16:59 +0530 Subject: [PATCH] Temporary fix for Smart Contract Triggers --- index.html | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 19b7810..00cae07 100644 --- a/index.html +++ b/index.html @@ -258,6 +258,10 @@ page = document.createElement("div"); page.classList.add("page"); page.id = "transaction_page"; + // todo : This is a temporary fix. Fix this on the Database and API level + if(type =='smartContractPays' || type ==' smartContractPays'){ + name = '' + } page.innerHTML = `
${type}
@@ -1640,7 +1644,7 @@ } async function getTxInfo(thisTx) { - const response = await fetch(`${tokenapiUrl}/api/v1.0/getTransactionDetails/${thisTx}`), + var response = await fetch(`${tokenapiUrl}/api/v1.0/getTransactionDetails/${thisTx}`), transaction = await response.json(), transactionHash = transaction.transactionHash, { flodata, tokenAmount, tokenIdentification, type } = transaction.parsedFloData, @@ -1653,10 +1657,15 @@ } } console.log(transaction) + // todo - temporary fixes below. Fix these on the Databse and API level let transactionType = '' if( type=='transfer'){ transactionType = transaction.parsedFloData?.transferType } + if( type=='smartContractPays'){ + tokenAmount = '-' + flodata = transaction.transactionDetails.floData + } return { type: `${transactionType} ${type}`, name: tokenIdentification,