Skip to content

Commit 099f47e

Browse files
committed
feat(explorer): accept latest in query string in signer registration page
1 parent 1c6220e commit 099f47e

File tree

1 file changed

+3
-3
lines changed
  • mithril-explorer/src/app/registrations

1 file changed

+3
-3
lines changed

mithril-explorer/src/app/registrations/page.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,21 +49,21 @@ export default function Registrations() {
4949

5050
useEffect(() => {
5151
const aggregator = searchParams.get(aggregatorSearchParam);
52-
const epoch = Number(searchParams.get("epoch"));
52+
const epoch = searchParams.get("epoch");
5353
let error = undefined;
5454
setAggregator(aggregator);
55-
setRegistrationEpoch(epoch);
5655

5756
if (!checkUrl(aggregator)) {
5857
error = "invalidAggregatorUrl";
59-
} else if (!Number.isInteger(epoch)) {
58+
} else if (epoch !== "latest" && !Number.isInteger(Number(epoch))) {
6059
error = "invalidEpoch";
6160
}
6261

6362
if (error === undefined) {
6463
fetchRegistrations(aggregator, epoch)
6564
.then((data) => {
6665
setSigningEpoch(data.signing_at);
66+
setRegistrationEpoch(data.registered_at);
6767
setRegistrations(data.registrations);
6868
setCharts({
6969
stakesBreakdown: computeStakeShapesDataset(data.registrations),

0 commit comments

Comments
 (0)