mirror of
https://github.com/stronk-dev/LivepeerEvents.git
synced 2025-07-05 18:55:09 +02:00
Separate complex events as migrations, which they might not be but probably are
This commit is contained in:
parent
27cbc9dcba
commit
e3dd2c476f
@ -12,6 +12,7 @@ const updateColour = "rgba(122, 63, 23, 0.3)";
|
|||||||
const withdrawStakeColour = "rgba(102, 3, 10, 0.3)";
|
const withdrawStakeColour = "rgba(102, 3, 10, 0.3)";
|
||||||
const stakeColour = "rgba(71, 23, 122, 0.3)";
|
const stakeColour = "rgba(71, 23, 122, 0.3)";
|
||||||
const claimColour = "rgba(77, 91, 42, 0.3)";
|
const claimColour = "rgba(77, 91, 42, 0.3)";
|
||||||
|
const migrateColour = "rgba(56, 23, 122, 0.3)";
|
||||||
|
|
||||||
const thresholdStaking = 0.001;
|
const thresholdStaking = 0.001;
|
||||||
const thresholdFees = 0.00009;
|
const thresholdFees = 0.00009;
|
||||||
@ -86,12 +87,12 @@ const EventButton = (obj) => {
|
|||||||
transactionAmount = parseFloat(eventObj.data.amount) / 1000000000000000000;
|
transactionAmount = parseFloat(eventObj.data.amount) / 1000000000000000000;
|
||||||
}
|
}
|
||||||
if (hasEarningsClaimed) {
|
if (hasEarningsClaimed) {
|
||||||
transactionName = "Rebond";
|
transactionName = "Migrate";
|
||||||
hasEarningsClaimed = false;
|
hasEarningsClaimed = false;
|
||||||
transactionTo = eventObj.data.delegate.toLowerCase();
|
transactionTo = eventObj.data.delegate.toLowerCase();
|
||||||
transactionCaller = eventObj.data.delegator.toLowerCase();
|
transactionCaller = eventObj.data.delegator.toLowerCase();
|
||||||
transactionAmount = parseFloat(eventObj.data.amount) / 1000000000000000000;
|
transactionAmount = parseFloat(eventObj.data.amount) / 1000000000000000000;
|
||||||
thisColour = stakeColour;
|
thisColour = migrateColour;
|
||||||
}
|
}
|
||||||
hasRebondTransaction = true;
|
hasRebondTransaction = true;
|
||||||
}
|
}
|
||||||
@ -155,6 +156,9 @@ const EventButton = (obj) => {
|
|||||||
|
|
||||||
// If we only had a bond transaction and nothing else, this is a stake
|
// If we only had a bond transaction and nothing else, this is a stake
|
||||||
if (hasBondTransaction) {
|
if (hasBondTransaction) {
|
||||||
|
if (transactionName === "Migrate"){
|
||||||
|
console.log("overwr");
|
||||||
|
}
|
||||||
transactionName = "Stake";
|
transactionName = "Stake";
|
||||||
thisColour = stakeColour;
|
thisColour = stakeColour;
|
||||||
}
|
}
|
||||||
@ -214,6 +218,12 @@ const EventButton = (obj) => {
|
|||||||
}
|
}
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
if (obj.stakeActivated) {
|
||||||
|
if (transactionName === "Migrate") {
|
||||||
|
isFiltered = false;
|
||||||
|
}
|
||||||
|
count++;
|
||||||
|
}
|
||||||
if (obj.delegatorRewardActivated) {
|
if (obj.delegatorRewardActivated) {
|
||||||
if (transactionName === "Claim") {
|
if (transactionName === "Claim") {
|
||||||
isFiltered = false;
|
isFiltered = false;
|
||||||
@ -286,6 +296,12 @@ const EventButton = (obj) => {
|
|||||||
<p> increased their stake with {transactionAmount.toFixed(2)} LPT at </p>
|
<p> increased their stake with {transactionAmount.toFixed(2)} LPT at </p>
|
||||||
<button className="selectOrch" onClick={() => { dispatch(getOrchestratorInfo(transactionTo)) }} >{transactionTo}</button>
|
<button className="selectOrch" onClick={() => { dispatch(getOrchestratorInfo(transactionTo)) }} >{transactionTo}</button>
|
||||||
</div>
|
</div>
|
||||||
|
} else if (transactionName === "Migrate") {
|
||||||
|
eventSpecificInfo =
|
||||||
|
<div className="rowAlignLeft">
|
||||||
|
<p> migrated {transactionAmount.toFixed(2)} LPT to L2 at </p>
|
||||||
|
<button className="selectOrch" onClick={() => { dispatch(getOrchestratorInfo(transactionTo)) }} >{transactionTo}</button>
|
||||||
|
</div>
|
||||||
} else if (transactionName === "Withdraw") {
|
} else if (transactionName === "Withdraw") {
|
||||||
eventSpecificInfo =
|
eventSpecificInfo =
|
||||||
<div className="rowAlignLeft">
|
<div className="rowAlignLeft">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user