diff --git a/backend/src/routes/livepeer.js b/backend/src/routes/livepeer.js index 5155a9f..40fef43 100644 --- a/backend/src/routes/livepeer.js +++ b/backend/src/routes/livepeer.js @@ -70,8 +70,6 @@ const orchQuery = gql` } rewardCut feeShare - pricePerSegment - pendingPricePerSegment pendingFeeShare pendingRewardCut totalStake diff --git a/src/actions/livepeer.js b/src/actions/livepeer.js index 768428e..e176bd9 100644 --- a/src/actions/livepeer.js +++ b/src/actions/livepeer.js @@ -4,6 +4,7 @@ import { receiveErrors } from "./error"; export const RECEIVE_QUOTES = "RECEIVE_QUOTES"; export const RECEIVE_BLOCKCHAIN_DATA = "RECEIVE_BLOCKCHAIN_DATA"; export const RECEIVE_EVENTS = "RECEIVE_EVENTS"; +export const RECEIVE_ORCHESTRATOR = "RECEIVE_ORCHESTRATOR"; const setQuotes = message => ({ type: RECEIVE_QUOTES, message @@ -14,6 +15,9 @@ const setBlockchainData = message => ({ const setEvents = message => ({ type: RECEIVE_EVENTS, message }); +const setCurrentOrchestratorInfo = message => ({ + type: RECEIVE_ORCHESTRATOR, message +}); export const getQuotes = () => async dispatch => { const response = await apiUtil.getQuotes(); @@ -40,4 +44,13 @@ export const getEvents = () => async dispatch => { return dispatch(setEvents(data)); } return dispatch(receiveErrors(data)); +}; + +export const getCurrentOrchestratorInfo = () => async dispatch => { + const response = await apiUtil.getCurrentOrchestratorInfo(); + const data = await response.json(); + if (response.ok) { + return dispatch(setCurrentOrchestratorInfo(data)); + } + return dispatch(receiveErrors(data)); }; \ No newline at end of file diff --git a/src/eventButton.js b/src/eventButton.js index 665e924..63cf313 100644 --- a/src/eventButton.js +++ b/src/eventButton.js @@ -36,7 +36,7 @@ const EventButton = (obj) => { } else if (obj.name == "TranscoderUpdate") { eventSpecificInfo =
O {obj.data.transcoder} changed their rewardCut to {(obj.data.rewardCut / 10000).toFixed(2)} and their feeCut to {(100 - (obj.data.feeShare / 10000)).toFixed(2)}
+O {obj.data.transcoder} changed their rewardCut to {(obj.data.rewardCut / 10000).toFixed(2)}% and their feeCut to {(100 - (obj.data.feeShare / 10000)).toFixed(2)}%
${lptPrice}
+({lptPriceChange24h}%)
+${ethPrice}
+({ethPriceChange24h}%)
+Reward Cut {rewardCut}%
+Fee Cut {feeCut}%
+Total Stake {totalStake} LPT
+Earned fees {totalVolumeETH} Eth (${totalVolumeUSD})
+Self stake {selfStake} LPT (Ratio of {selfStakeRatio}%)
+Total stake {delegatorsTotalStake} LPT
+