explorer: Hide banner when lockup has expired (#14473)
This commit is contained in:
parent
17337441c6
commit
3fc7362486
|
@ -48,9 +48,9 @@ export function StakeAccountSection({
|
|||
}
|
||||
|
||||
function LockupCard({ stakeAccount }: { stakeAccount: StakeAccountInfo }) {
|
||||
const unixTimestamp = stakeAccount.meta?.lockup.unixTimestamp;
|
||||
if (unixTimestamp && unixTimestamp > 0) {
|
||||
const prettyTimestamp = displayTimestampUtc(unixTimestamp * 1000);
|
||||
const unixTimestamp = 1000 * (stakeAccount.meta?.lockup.unixTimestamp || 0);
|
||||
if (Date.now() < unixTimestamp) {
|
||||
const prettyTimestamp = displayTimestampUtc(unixTimestamp);
|
||||
return (
|
||||
<div className="alert alert-warning text-center">
|
||||
<strong>Account is locked!</strong> Lockup expires on {prettyTimestamp}
|
||||
|
|
Loading…
Reference in New Issue