Fix staking amount calculation

This commit is contained in:
Marco van Dijk 2022-03-03 20:39:50 +01:00
parent 2681d2c4b2
commit c317eef732

View File

@ -99,20 +99,27 @@ const EventButton = (obj) => {
<p>changed their reward commission to {transactionAmount.toFixed(2)}% and their fee commission to {transactionAdditionalAmount.toFixed(2)}%</p> <p>changed their reward commission to {transactionAmount.toFixed(2)}% and their fee commission to {transactionAdditionalAmount.toFixed(2)}%</p>
</div> </div>
} else if (transactionName == "Stake") { } else if (transactionName == "Stake") {
if (transactionFrom == "0x0000000000000000000000000000000000000000") {
eventSpecificInfo = eventSpecificInfo =
<div className="row"> <div className="row">
<p> changed stake from {transactionFrom} to {transactionTo} of {(transactionAmount * 7e-18).toFixed(2)} LPT</p> <p> staked {(transactionAmount / 1000000000000000000).toFixed(2)} LPT to {transactionTo} </p>
</div> </div>
} else {
eventSpecificInfo =
<div className="row">
<p> changed stake from {transactionFrom} to {transactionTo} of {(transactionAmount / 1000000000000000000).toFixed(2)} LPT</p>
</div>
}
} else if (transactionName == "Withdraw") { } else if (transactionName == "Withdraw") {
eventSpecificInfo = eventSpecificInfo =
<div className="row"> <div className="row">
<p> withdrew {(transactionAmount * 7e-18).toFixed(2)} LPT in round {transactionWhen}</p> <p> withdrew {(transactionAmount / 1000000000000000000).toFixed(2)} LPT in round {transactionWhen}</p>
</div> </div>
} else if (transactionName == "Activated") { } else if (transactionName == "Activated") {
if (hasBondTransaction) { if (hasBondTransaction) {
eventSpecificInfo = eventSpecificInfo =
<div className="row"> <div className="row">
<p>{transactionCaller} activated with a self stake of {(transactionAmount * 7e-18).toFixed(2)} LPT and will become active in round {transactionWhen}</p> <p>{transactionCaller} activated with a self stake of {(transactionAmount / 1000000000000000000).toFixed(2)} LPT and will become active in round {transactionWhen}</p>
</div> </div>
} else { } else {
// If there was no bond transaction, display fewer information // If there was no bond transaction, display fewer information