Bettter tickets

This commit is contained in:
Marco van Dijk 2022-04-22 10:29:10 +02:00
parent 6318c7e622
commit dc18713749
2 changed files with 26 additions and 17 deletions

View File

@ -394,7 +394,7 @@ const WinnerMonth = (obj) => {
{obj.data.reactivationCount ? {obj.data.reactivationCount ?
<div className="row"> <div className="row">
<div className="row" style={{ justifyContent: 'space-between', alignItems: 'stretch', maxWidth: '61.8%', textAlign: 'justify', padding: '0.5em', backgroundColor: activationColour, border: '0.1em solid rgba(54, 46, 46, 0.1)' }}> <div className="row" style={{ justifyContent: 'space-between', alignItems: 'stretch', maxWidth: '61.8%', textAlign: 'justify', padding: '0.5em', backgroundColor: activationColour, border: '0.1em solid rgba(54, 46, 46, 0.1)' }}>
<Ticket seed={obj.seed + "-reactivationCount-"} icon={"🔌"} subtext={obj.data.reactivationCount + " reactivated"} descriptions={[ <Ticket seed={obj.seed + "-reactivationCount-"} icon={"🔌"} subtext={obj.data.reactivationCount + " reactivations"} descriptions={[
obj.data.reactivationCount + " Orchestrators reactivated" obj.data.reactivationCount + " Orchestrators reactivated"
]} /> ]} />
</div> </div>
@ -405,17 +405,26 @@ const WinnerMonth = (obj) => {
<div className="row"> <div className="row">
<div className="row" style={{ justifyContent: 'space-between', alignItems: 'stretch', maxWidth: '61.8%', textAlign: 'justify', padding: '0.5em', backgroundColor: activationColour, border: '0.1em solid rgba(54, 46, 46, 0.1)' }}> <div className="row" style={{ justifyContent: 'space-between', alignItems: 'stretch', maxWidth: '61.8%', textAlign: 'justify', padding: '0.5em', backgroundColor: activationColour, border: '0.1em solid rgba(54, 46, 46, 0.1)' }}>
<Ticket seed={obj.seed + "-neworchs-"} icon={"🔧"} subtext={obj.data.activationCount + " new orchestrators"} descriptions={[ <Ticket seed={obj.seed + "-neworchs-"} icon={"🔧"} subtext={obj.data.activationCount + " new orchestrators"} descriptions={[
obj.data.activationCount + " orchestrators joined with an initial stake of " + obj.data.activationInitialSum.toFixed(2) + " LPT" obj.data.activationCount + " orchestrators joined with an initial stake of " + obj.data.activationInitialSum.toLocaleString({maximumFractionDigits:2}) + " LPT"
]} /> ]} />
</div> </div>
</div> : null </div> : null
} }
<div className="halfVerticalDivider" /> <div className="halfVerticalDivider" />
{(obj.data.latestCommission && obj.data.latestCommission.length) ?
<div className="row">
<div className="row" style={{ justifyContent: 'space-between', alignItems: 'stretch', maxWidth: '61.8%', textAlign: 'justify', padding: '0.5em', backgroundColor: updateColour, border: '0.1em solid rgba(54, 46, 46, 0.1)' }}>
<Ticket seed={obj.seed + "-neworchs-"} icon={"🔗"} subtext={obj.data.latestCommission.length + " orchestrators found"} descriptions={[
obj.data.latestCommission.length + " orchestrators had a total of " + totalStakeSum.toLocaleString({maximumFractionDigits:2}) + " LPT staked to them"
]} />
</div>
</div> : null}
<div className="halfVerticalDivider" />
{obj.data.bondCount ? {obj.data.bondCount ?
<div className="row"> <div className="row">
<div className="row" style={{ justifyContent: 'space-between', alignItems: 'stretch', maxWidth: '61.8%', textAlign: 'justify', padding: '0.5em', backgroundColor: stakeColour, border: '0.1em solid rgba(54, 46, 46, 0.1)' }}> <div className="row" style={{ justifyContent: 'space-between', alignItems: 'stretch', maxWidth: '61.8%', textAlign: 'justify', padding: '0.5em', backgroundColor: stakeColour, border: '0.1em solid rgba(54, 46, 46, 0.1)' }}>
<Ticket seed={obj.seed + "-neworchs-"} icon={"📈"} subtext={obj.data.bondCount + " new delegators"} descriptions={[ <Ticket seed={obj.seed + "-neworchs-"} icon={"📈"} subtext={obj.data.bondCount + " new delegators"} descriptions={[
obj.data.bondCount + " accounts delegated for the first time for a total of " + obj.data.bondStakeSum.toFixed(2) + " LPT" obj.data.bondCount + " accounts delegated for the first time for a total of " + obj.data.bondStakeSum.toLocaleString({maximumFractionDigits:2}) + " LPT"
]} /> ]} />
</div> </div>
</div> : null </div> : null
@ -425,7 +434,7 @@ const WinnerMonth = (obj) => {
<div className="row"> <div className="row">
<div className="row" style={{ justifyContent: 'space-between', alignItems: 'stretch', maxWidth: '61.8%', textAlign: 'justify', padding: '0.5em', backgroundColor: unbondColour, border: '0.1em solid rgba(54, 46, 46, 0.1)' }}> <div className="row" style={{ justifyContent: 'space-between', alignItems: 'stretch', maxWidth: '61.8%', textAlign: 'justify', padding: '0.5em', backgroundColor: unbondColour, border: '0.1em solid rgba(54, 46, 46, 0.1)' }}>
<Ticket seed={obj.seed + "-neworchs-"} icon={"📉"} subtext={obj.data.unbondCount + " leaving delegators"} descriptions={[ <Ticket seed={obj.seed + "-neworchs-"} icon={"📉"} subtext={obj.data.unbondCount + " leaving delegators"} descriptions={[
obj.data.unbondCount + " delegators unbonded " + obj.data.unbondStakeSum.toFixed(2) + " LPT" obj.data.unbondCount + " delegators unbonded " + obj.data.unbondStakeSum.toLocaleString({maximumFractionDigits:2}) + " LPT"
]} /> ]} />
</div> </div>
</div> : null </div> : null
@ -435,7 +444,7 @@ const WinnerMonth = (obj) => {
<div className="row"> <div className="row">
<div className="row" style={{ justifyContent: 'space-between', alignItems: 'stretch', maxWidth: '61.8%', textAlign: 'justify', padding: '0.5em', backgroundColor: rewardColour, border: '0.1em solid rgba(54, 46, 46, 0.1)' }}> <div className="row" style={{ justifyContent: 'space-between', alignItems: 'stretch', maxWidth: '61.8%', textAlign: 'justify', padding: '0.5em', backgroundColor: rewardColour, border: '0.1em solid rgba(54, 46, 46, 0.1)' }}>
<Ticket seed={obj.seed + "-neworchs-"} icon={"⌛"} subtext={obj.data.rewardCount + " reward calls"} descriptions={[ <Ticket seed={obj.seed + "-neworchs-"} icon={"⌛"} subtext={obj.data.rewardCount + " reward calls"} descriptions={[
obj.data.rewardCount + " reward calls were made worth " + obj.data.rewardAmountSum.toFixed(2) + " LPT" obj.data.rewardCount + " reward calls made by orchestrators were worth " + obj.data.rewardAmountSum.toLocaleString({maximumFractionDigits:2}) + " LPT"
]} /> ]} />
</div> </div>
</div> : null </div> : null
@ -444,8 +453,8 @@ const WinnerMonth = (obj) => {
{obj.data.claimCount ? {obj.data.claimCount ?
<div className="row"> <div className="row">
<div className="row" style={{ justifyContent: 'space-between', alignItems: 'stretch', maxWidth: '61.8%', textAlign: 'justify', padding: '0.5em', backgroundColor: claimColour, border: '0.1em solid rgba(54, 46, 46, 0.1)' }}> <div className="row" style={{ justifyContent: 'space-between', alignItems: 'stretch', maxWidth: '61.8%', textAlign: 'justify', padding: '0.5em', backgroundColor: claimColour, border: '0.1em solid rgba(54, 46, 46, 0.1)' }}>
<Ticket seed={obj.seed + "-neworchs-"} icon={"💸"} subtext={obj.data.claimCount + " reward claims"} descriptions={[ <Ticket seed={obj.seed + "-neworchs-"} icon={"🏦"} subtext={obj.data.claimCount + " reward claims"} descriptions={[
obj.data.claimRewardSum.toFixed(2) + " LPT and " + obj.data.claimFeeSum.toFixed(2) + " ETH worth of rewards were claimed" obj.data.claimRewardSum.toLocaleString({maximumFractionDigits:2}) + " LPT and " + obj.data.claimFeeSum.toLocaleString({maximumFractionDigits:2}) + " ETH worth of rewards were claimed by delegators"
]} /> ]} />
</div> </div>
</div> : null </div> : null
@ -454,8 +463,8 @@ const WinnerMonth = (obj) => {
{obj.data.withdrawStakeCount ? {obj.data.withdrawStakeCount ?
<div className="row"> <div className="row">
<div className="row" style={{ justifyContent: 'space-between', alignItems: 'stretch', maxWidth: '61.8%', textAlign: 'justify', padding: '0.5em', backgroundColor: withdrawStakeColour, border: '0.1em solid rgba(54, 46, 46, 0.1)' }}> <div className="row" style={{ justifyContent: 'space-between', alignItems: 'stretch', maxWidth: '61.8%', textAlign: 'justify', padding: '0.5em', backgroundColor: withdrawStakeColour, border: '0.1em solid rgba(54, 46, 46, 0.1)' }}>
<Ticket seed={obj.seed + "-neworchs-"} icon={"🏦"} subtext={obj.data.withdrawStakeCount + " withdraw reward calls"} descriptions={[ <Ticket seed={obj.seed + "-neworchs-"} icon={"💸"} subtext={obj.data.withdrawStakeCount + " withdraw reward calls"} descriptions={[
obj.data.withdrawStakeAmountSum.toFixed(2) + " LPT worth of staking rewards were withdrawn" obj.data.withdrawStakeAmountSum.toLocaleString({maximumFractionDigits:2}) + " LPT worth of staking rewards were withdrawn to the account of the delegator"
]} /> ]} />
</div> </div>
</div> : null </div> : null
@ -464,8 +473,8 @@ const WinnerMonth = (obj) => {
{obj.data.withdrawFeesCount ? {obj.data.withdrawFeesCount ?
<div className="row"> <div className="row">
<div className="row" style={{ justifyContent: 'space-between', alignItems: 'stretch', maxWidth: '61.8%', textAlign: 'justify', padding: '0.5em', backgroundColor: withdrawStakeColour, border: '0.1em solid rgba(54, 46, 46, 0.1)' }}> <div className="row" style={{ justifyContent: 'space-between', alignItems: 'stretch', maxWidth: '61.8%', textAlign: 'justify', padding: '0.5em', backgroundColor: withdrawStakeColour, border: '0.1em solid rgba(54, 46, 46, 0.1)' }}>
<Ticket seed={obj.seed + "-neworchs-"} icon={"🏦"} subtext={obj.data.withdrawFeesCount + " withdraw fee calls"} descriptions={[ <Ticket seed={obj.seed + "-neworchs-"} icon={"💸"} subtext={obj.data.withdrawFeesCount + " withdraw fee calls"} descriptions={[
obj.data.withdrawFeesAmountSum.toFixed(2) + " ETH worth of transcoding fees were withdrawn" obj.data.withdrawFeesAmountSum.toLocaleString({maximumFractionDigits:2}) + " ETH worth of transcoding fees were withdrawn to the account of the delegator"
]} /> ]} />
</div> </div>
</div> : null </div> : null
@ -475,7 +484,7 @@ const WinnerMonth = (obj) => {
<div className="row"> <div className="row">
<div className="row" style={{ justifyContent: 'space-between', alignItems: 'stretch', maxWidth: '61.8%', textAlign: 'justify', padding: '0.5em', backgroundColor: stakeColour, border: '0.1em solid rgba(54, 46, 46, 0.1)' }}> <div className="row" style={{ justifyContent: 'space-between', alignItems: 'stretch', maxWidth: '61.8%', textAlign: 'justify', padding: '0.5em', backgroundColor: stakeColour, border: '0.1em solid rgba(54, 46, 46, 0.1)' }}>
<Ticket seed={obj.seed + "-neworchs-"} icon={"🔄"} subtext={obj.data.moveStakeCount + " stake movements"} descriptions={[ <Ticket seed={obj.seed + "-neworchs-"} icon={"🔄"} subtext={obj.data.moveStakeCount + " stake movements"} descriptions={[
obj.data.moveStakeSum.toFixed(2) + " LPT worth of stake was moved between orchestrators" obj.data.moveStakeSum.toLocaleString({maximumFractionDigits:2}) + " LPT worth of stake was moved between orchestrators"
]} /> ]} />
</div> </div>
</div> : null </div> : null
@ -494,8 +503,8 @@ const WinnerMonth = (obj) => {
{obj.data.winningTicketsRedeemedCount ? {obj.data.winningTicketsRedeemedCount ?
<div className="row"> <div className="row">
<div className="row" style={{ justifyContent: 'space-between', alignItems: 'stretch', maxWidth: '61.8%', textAlign: 'justify', padding: '0.5em', backgroundColor: ticketRedeemColour, border: '0.1em solid rgba(54, 46, 46, 0.1)' }}> <div className="row" style={{ justifyContent: 'space-between', alignItems: 'stretch', maxWidth: '61.8%', textAlign: 'justify', padding: '0.5em', backgroundColor: ticketRedeemColour, border: '0.1em solid rgba(54, 46, 46, 0.1)' }}>
<Ticket seed={obj.seed + "-neworchs-"} icon={"🎟️"} subtext={obj.data.winningTicketsRedeemedCount + " winning tickets"} descriptions={[ <Ticket seed={obj.seed + "-neworchs-"} icon={"🎟️"} subtext={obj.data.winningTicketsRedeemedCount + " redeemed tickets"} descriptions={[
obj.data.winningTicketsRedeemedCount + " winning tickets were redeemed worth " + obj.data.winningTicketsRedeemedSum.toFixed(2) + " ETH" obj.data.winningTicketsRedeemedCount + " winning tickets were redeemed worth " + obj.data.winningTicketsRedeemedSum.toLocaleString({maximumFractionDigits:2}) + " ETH"
]} /> ]} />
</div> </div>
</div> : null </div> : null

View File

@ -32,7 +32,7 @@ const EventButton = (obj) => {
eventColour = updateColour; eventColour = updateColour;
} else if (obj.type == "reward") { } else if (obj.type == "reward") {
eventCaller = obj.eventObj.address; eventCaller = obj.eventObj.address;
eventDescription = <Ticket seed={obj.seed + "-desc-"} icon={"💸"} subtext={"called reward"} descriptions={[ eventDescription = <Ticket seed={obj.seed + "-desc-"} icon={"🏦"} subtext={"called reward"} descriptions={[
"+" + obj.eventObj.amount.toFixed(2) + " LPT" + (Math.floor(obj.eventObj.amount) == 69 ? "... Nice!" : "") "+" + obj.eventObj.amount.toFixed(2) + " LPT" + (Math.floor(obj.eventObj.amount) == 69 ? "... Nice!" : "")
]} /> ]} />
eventColour = rewardColour; eventColour = rewardColour;
@ -46,14 +46,14 @@ const EventButton = (obj) => {
eventColour = claimColour; eventColour = claimColour;
} else if (obj.type == "withdrawStake") { } else if (obj.type == "withdrawStake") {
eventCaller = obj.eventObj.address; eventCaller = obj.eventObj.address;
eventDescription = <Ticket seed={obj.seed + "-desc-"} icon={"🏦"} subtext={"withdrew stake"} descriptions={[ eventDescription = <Ticket seed={obj.seed + "-desc-"} icon={"💸"} subtext={"withdrew stake"} descriptions={[
obj.eventObj.amount.toFixed(2) + " LPT", obj.eventObj.amount.toFixed(2) + " LPT",
"round " + obj.eventObj.round "round " + obj.eventObj.round
]} /> ]} />
eventColour = withdrawStakeColour; eventColour = withdrawStakeColour;
} else if (obj.type == "withdrawFees") { } else if (obj.type == "withdrawFees") {
eventCaller = obj.eventObj.address; eventCaller = obj.eventObj.address;
eventDescription = <Ticket seed={obj.seed + "-desc-"} icon={"🏦"} subtext={"withdrew fees"} descriptions={[ eventDescription = <Ticket seed={obj.seed + "-desc-"} icon={"💸"} subtext={"withdrew fees"} descriptions={[
"+" + obj.eventObj.amount.toFixed(4) + " Eth fees" "+" + obj.eventObj.amount.toFixed(4) + " Eth fees"
]} /> ]} />
eventColour = withdrawStakeColour; eventColour = withdrawStakeColour;