Fix rewardcut and feecut

This commit is contained in:
Marco van Dijk 2022-03-02 17:48:18 +01:00
parent 8b8dcd5143
commit 6b4dce94e8
2 changed files with 7 additions and 5 deletions

View File

@ -36,7 +36,7 @@ const EventButton = (obj) => {
</div>
} else if (obj.name == "TranscoderUpdate") {
eventSpecificInfo = <div className="row" style={{ backgroundColor: 'rgba(215, 15, 0, 0.3)' }}>
<p>O {obj.data.transcoder} changed their rewardCut to {obj.data.rewardCut} and their feeShare to {obj.data.feeShare}</p>
<p>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)}</p>
</div>
} else if (obj.name == "TranscoderActivated") {
eventSpecificInfo = <div className="row" style={{ backgroundColor: 'rgba(0, 255, 1, 0.3)' }}>

View File

@ -13,6 +13,12 @@ const EventViewer = (obj) => {
<ScrollContainer className="overflow-container" hideScrollbars={false}>
<div className="overflow-content" style={{ cursor: 'grab' }}>
{obj.events.slice(0).reverse().map((eventObj, idx) => {
// TODO: once txCounter falls out of a certain range, stop parsing new blocks
// Apply the filter first so that the IDX only counts displayed blocks
// Skip WithdrawFees buttons cause they are not interesting for the MVP
if (eventObj.name == "WithdrawFees"){
return;
}
if (currentTx != eventObj.transactionHash) {
txCounter++;
currentTx = eventObj.transactionHash;
@ -22,10 +28,6 @@ const EventViewer = (obj) => {
eventCache.push(eventObj);
return;
}
// Skip WithdrawFees buttons cause they are not interesting for the MVP
if (eventObj.name == "WithdrawFees"){
return;
}
return <EventButton
key={eventObj.transactionUrl + idx}
transactionUrl={eventObj.transactionUrl}