mirror of
https://github.com/stronk-dev/LivepeerEvents.git
synced 2025-07-05 18:55:09 +02:00
Minor adjustment to stake visualisation
This commit is contained in:
parent
daf1dc51c2
commit
1de8f1951f
@ -5,10 +5,9 @@ const activationColour = "rgba(23, 60, 122, 0.3)";
|
||||
const rewardColour = "rgba(20, 99, 29, 0.3)";
|
||||
const updateColour = "rgba(122, 63, 23, 0.3)";
|
||||
const withdrawStakeColour = "rgba(115, 110, 22, 0.3)";
|
||||
const stakeColour = "rgba(71, 23, 122, 0.3)";
|
||||
const stakeColour = "rgba(56, 23, 122, 0.3)";
|
||||
const unbondColour = "rgba(122, 23, 51, 0.3)";
|
||||
const claimColour = "rgba(77, 91, 42, 0.3)";
|
||||
const migrateColour = "rgba(56, 23, 122, 0.3)";
|
||||
|
||||
const thresholdStaking = 0.001;
|
||||
const thresholdFees = 0.00009;
|
||||
@ -93,18 +92,11 @@ export const getEvents = () => async dispatch => {
|
||||
}
|
||||
// New transaction found
|
||||
if (currentTx !== eventObj.transactionHash) {
|
||||
// Unbond <> TransferBond <> Rebond => Stake Event
|
||||
// Unbond <> TransferBond <> (eventContainsEarningsClaimed) <> Rebond => Stake Event
|
||||
if (eventContainsUnbond && eventContainsTransferBond && eventContainsRebond) {
|
||||
// If also hasEarningsClaimed => Migrate Event
|
||||
if (eventContainsEarningsClaimed) {
|
||||
eventType = "Migrate";
|
||||
eventColour = migrateColour;
|
||||
eventDescription = "migrated " + tmpAmount.toFixed(2) + " LPT to L2";
|
||||
} else {
|
||||
eventType = "Stake";
|
||||
eventColour = stakeColour;
|
||||
}
|
||||
}
|
||||
// (Bond <>) TranscoderActivated => Activate Event
|
||||
else if (eventContainsTranscoderActivated) {
|
||||
eventType = "Activate";
|
||||
@ -133,7 +125,7 @@ export const getEvents = () => async dispatch => {
|
||||
else if (eventContainsRebond) {
|
||||
eventType = "Stake";
|
||||
eventColour = stakeColour;
|
||||
eventDescription = "increased their stake with " + tmpAmount.toFixed(2) + " LPT at";
|
||||
eventDescription = "increased their stake to " + tmpAmount.toFixed(2) + " LPT at";
|
||||
}
|
||||
|
||||
// Fill description of Stake Event if it wasn't set yet
|
||||
@ -142,7 +134,7 @@ export const getEvents = () => async dispatch => {
|
||||
eventDescription = "staked " + tmpAmount.toFixed(2) + " LPT";
|
||||
} else if (eventFrom === eventTo) {
|
||||
eventFrom = "";
|
||||
eventDescription = "increased their self stake to " + tmpAmount.toFixed(2) + " LPT";
|
||||
eventDescription = "increased their stake to " + tmpAmount.toFixed(2) + " LPT";
|
||||
} else {
|
||||
eventDescription = "moved a " + tmpAmount.toFixed(2) + " LPT stake";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user