diff --git a/backend/src/routes/livepeer.js b/backend/src/routes/livepeer.js index 902c214..23ff40d 100644 --- a/backend/src/routes/livepeer.js +++ b/backend/src/routes/livepeer.js @@ -249,8 +249,6 @@ const parseOrchestrator = async function (reqAddr) { // First get cached object for (var orch of orchestratorCache) { if (orch.addr == reqAddr) { - console.log("found cached obj"); - console.log(orch); wasCached = true; orchestratorObj = orch; break; @@ -259,9 +257,6 @@ const parseOrchestrator = async function (reqAddr) { if (wasCached) { if (now - orch.lastGet < timeoutTheGraph) { needsUpdate = false; - console.log("cached obj is up to date"); - }else{ - console.log("cached obj needs update"); } } if (!wasCached || needsUpdate) { @@ -306,23 +301,17 @@ const parseOrchestrator = async function (reqAddr) { } `; orchestratorObj = JSON.stringify(await request("https://api.thegraph.com/subgraphs/name/livepeer/arbitrum-one", orchQuery)); - console.log("downloaded new obj"); - console.log(orchestratorObj); if (wasCached) { for (var orch of orchestratorCache) { if (orch.addr == requestedOrchestrator) { - console.log("modifying existing obj in cache"); orch = orchestratorObj; break; } } } else { - console.log("pushing this obj to cache"); orchestratorCache.push(orchestratorObj); } } - console.log("returning obj"); - console.log(orchestratorObj); return orchestratorObj; } @@ -335,7 +324,6 @@ apiRouter.get("/getOrchestrator", async (req, res) => { const reqObj = await parseOrchestrator(reqOrch); res.send(reqObj); } catch (err) { - console.log(err); res.status(400).send(err); } }); @@ -345,7 +333,6 @@ apiRouter.get("/getOrchestrator/:orch", async (req, res) => { const reqObj = await parseOrchestrator(req.params.orch); res.send(reqObj); } catch (err) { - console.log(err); res.status(400).send(err); } }); diff --git a/src/actions/error.js b/src/actions/error.js index 9571eb4..48d6d41 100644 --- a/src/actions/error.js +++ b/src/actions/error.js @@ -1,9 +1,3 @@ -{/* Ability to receive and clear errors as dispatch actions -Requires this in files where errors can be received: -const mapStateToProps = ({ errors }) => ({ - errors -}); -*/} export const RECEIVE_ERRORS = "RECEIVE_ERRORS"; export const RECEIVE_NOTIFICATIONS = "RECEIVE_NOTIFICATIONS"; export const CLEAR_ERRORS = "CLEAR_ERRORS"; diff --git a/src/actions/livepeer.js b/src/actions/livepeer.js index b6c11ac..3627484 100644 --- a/src/actions/livepeer.js +++ b/src/actions/livepeer.js @@ -62,7 +62,6 @@ export const getCurrentOrchestratorInfo = () => async dispatch => { export const getOrchestratorInfo = (orchAddr) => async dispatch => { const response = await apiUtil.getOrchestratorInfo(orchAddr); const data = await response.json(); - console.log(data); if (response.ok) { return dispatch(setOrchestratorInfo(data)); } diff --git a/src/eventButton.js b/src/eventButton.js index 932569c..77dcb7a 100644 --- a/src/eventButton.js +++ b/src/eventButton.js @@ -9,9 +9,9 @@ const stakeColour = "rgba(71, 23, 122, 0.3)"; const EventButton = (obj) => { // Data shared among all events in this transaction const thisURL = obj.transactionUrl; - const thisTransaction = obj.transactionHash; + //const thisTransaction = obj.transactionHash; const thisData = obj.events; - const thisIndex = obj.idx; + //const thisIndex = obj.idx; // Abstraction of all events in this transaction let transactionName = ""; let transactionCaller = ""; @@ -28,7 +28,7 @@ const EventButton = (obj) => { // Which we will fill in by going over all of the events once thisData.map(eventObj => { // Bond: contains amount the transaction is about and who is participating - if (eventObj.name == "Bond") { + if (eventObj.name === "Bond") { transactionCaller = eventObj.data.delegator.toLowerCase(); transactionFrom = eventObj.data.oldDelegate.toLowerCase(); transactionTo = eventObj.data.newDelegate.toLowerCase(); @@ -37,7 +37,7 @@ const EventButton = (obj) => { hasBondTransaction = true; } // TranscoderActivated: defines transactionName. Defines transactionAmount as X * 7e-18 LPT - if (eventObj.name == "TranscoderActivated") { + if (eventObj.name === "TranscoderActivated") { transactionName = "Activated"; transactionWhen = eventObj.data.activationRound; if (!hasBondTransaction) { @@ -47,7 +47,7 @@ const EventButton = (obj) => { isOnlyBond = false; } // TranscoderActivated: defines transactionName. Defines transactionAmount as X / 1000000000000000000 LPT - if (eventObj.name == "Reward") { + if (eventObj.name === "Reward") { transactionName = "Reward"; transactionCaller = eventObj.data.transcoder.toLowerCase(); transactionAmount = eventObj.data.amount / 1000000000000000000; @@ -55,7 +55,7 @@ const EventButton = (obj) => { isOnlyBond = false; } // TranscoderUpdate: defines transactionName. Defines transactionAmount as rewardCut and transactionAdditionalAmount as feeCut - if (eventObj.name == "TranscoderUpdate") { + if (eventObj.name === "TranscoderUpdate") { transactionName = "Update"; transactionCaller = eventObj.data.transcoder.toLowerCase(); transactionAmount = eventObj.data.rewardCut / 10000; @@ -64,7 +64,7 @@ const EventButton = (obj) => { isOnlyBond = false; } // WithdrawStake: defines transactionName. Defines transactionAmount as rewardCut and transactionAdditionalAmount as feeCut - if (eventObj.name == "WithdrawStake") { + if (eventObj.name === "WithdrawStake") { transactionName = "Withdraw"; transactionCaller = eventObj.data.delegator.toLowerCase(); transactionAmount = eventObj.data.amount / 1000000000000000000; @@ -81,7 +81,7 @@ const EventButton = (obj) => { } let eventSpecificInfo; - if (transactionName == "Reward") { + if (transactionName === "Reward") { if (transactionAmount - 69 < 1 && transactionAmount - 69 > 0) { eventSpecificInfo =
called reward worth {transactionAmount.toFixed(2)} LPT
changed their reward commission to {transactionAmount.toFixed(2)}% and their fee commission to {transactionAdditionalAmount.toFixed(2)}%
withdrew {(transactionAmount / 1000000000000000000).toFixed(2)} LPT in round {transactionWhen}
Earned fees {totalVolumeETH} Eth (${totalVolumeUSD})
-Reward Cut {rewardCut}%
-Fee Cut {feeCut}%
-Total Stake {totalStake} LPT
-Self stake {selfStake} LPT ({selfStakeRatio}%)
-Earned fees {totalVolumeETH} Eth (${totalVolumeUSD})
+Reward Cut {rewardCut}%
+Fee Cut {feeCut}%
+Total Stake {totalStake} LPT
+Self stake {selfStake} LPT ({selfStakeRatio}%)
Click on an orchestrator in the list below!
-Click on an orchestrator in the list below!