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 }) {
|
function LockupCard({ stakeAccount }: { stakeAccount: StakeAccountInfo }) {
|
||||||
const unixTimestamp = stakeAccount.meta?.lockup.unixTimestamp;
|
const unixTimestamp = 1000 * (stakeAccount.meta?.lockup.unixTimestamp || 0);
|
||||||
if (unixTimestamp && unixTimestamp > 0) {
|
if (Date.now() < unixTimestamp) {
|
||||||
const prettyTimestamp = displayTimestampUtc(unixTimestamp * 1000);
|
const prettyTimestamp = displayTimestampUtc(unixTimestamp);
|
||||||
return (
|
return (
|
||||||
<div className="alert alert-warning text-center">
|
<div className="alert alert-warning text-center">
|
||||||
<strong>Account is locked!</strong> Lockup expires on {prettyTimestamp}
|
<strong>Account is locked!</strong> Lockup expires on {prettyTimestamp}
|
||||||
|
|
Loading…
Reference in New Issue