Skip to content

Commit

Permalink
rwmove nanoTicker
Browse files Browse the repository at this point in the history
  • Loading branch information
tombertrand committed Mar 21, 2024
1 parent fb322aa commit 38060cd
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 109 deletions.
2 changes: 0 additions & 2 deletions server/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ const TELEMETRY = "TELEMETRY";
const REPRESENTATIVE = "REPRESENTATIVE";
const REDIS_RICH_LIST = "RICH_LIST";
const PARTICIPANTS = "PARTICIPANTS";
const NANOTICKER_STATS = "NANOTICKER_STATS";
const NANOTPS_STATS = "NANOTPS_STATS";
const NANOSPEED_STATS = "NANOSPEED_STATS";
const NANOBROWSERQUEST_ONLINE_PLAYERS = "NANOBROWSERQUEST_ONLINE_PLAYERS";
Expand Down Expand Up @@ -125,7 +124,6 @@ module.exports = {
DELEGATED_ENTITY,
REDIS_RICH_LIST,
PARTICIPANTS,
NANOTICKER_STATS,
NANOTPS_STATS,
NANOSPEED_STATS,
NANOBROWSERQUEST_ONLINE_PLAYERS,
Expand Down
5 changes: 2 additions & 3 deletions server/cron/nanobrowserquestStats.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const getNanoBrowserQuestLeaderboard = async () => {
);
// rawCursor = reply.cursor;

console.log('~~~reply.cursor',reply.cursor)
console.log("~~~reply.cursor", reply.cursor);
keys.push(...reply.keys);
} while (reply.cursor);
return keys;
Expand Down Expand Up @@ -99,6 +99,5 @@ cron.schedule("*/15 * * * *", async () => {
});

if (!nodeCache.get(NANOBROWSERQUEST_LEADERBOARD)) {

getNanoBrowserQuestLeaderboard();
getNanoBrowserQuestLeaderboard();
}
27 changes: 0 additions & 27 deletions server/cron/nanotickerStats.js

This file was deleted.

10 changes: 0 additions & 10 deletions server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ require("./cron/telemetry");
require("./cron/ws");
require("./cron/coingeckoStats");
require("./cron/btcTransactionFees");
require("./cron/nanotickerStats");
require("./cron/nanotpsStats");
require("./cron/nanospeed");
require("./cron/nanobrowserquestStats");
Expand All @@ -38,7 +37,6 @@ const {
TOTAL_VOLUME_7D,
TOTAL_VOLUME_14D,
CONFIRMATIONS_PER_SECOND,
NANOTICKER_STATS,
NANOBROWSERQUEST_ONLINE_PLAYERS,
NANOBROWSERQUEST_LEADERBOARD,
NANOTPS_STATS,
Expand Down Expand Up @@ -323,14 +321,6 @@ app.get("/api/nanobrowserquest/leaderboard", async (req, res, next) => {
}
});

app.get("/api/nanoticker", async (req, res, next) => {
try {
res.send(nodeCache.get(NANOTICKER_STATS) || {});
} catch (err) {
next(err);
}
});

app.get("/api/youtube-playlist", async (req, res) => {
const playlist = await getYoutubePlaylist();

Expand Down
50 changes: 0 additions & 50 deletions src/api/hooks/use-nanoticker.tsx

This file was deleted.

17 changes: 0 additions & 17 deletions src/components/ConfirmationsPerSecond/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,16 @@ import { useTranslation } from "react-i18next";
import { Skeleton, Statistic, Tooltip, Typography } from "antd";

import useConfirmationsPerSecond from "api/hooks/use-confirmations-per-second";
import useNanoTicker from "api/hooks/use-nanoticker";
import QuestionCircle from "components/QuestionCircle";

const { Text } = Typography;

const ConfirmationsPerSecond = () => {
const { t } = useTranslation();
const { confirmationsPerSecond: nodeCps } = useConfirmationsPerSecond();
const { confirmationsPerSecond: networkCps } = useNanoTicker();

return nodeCps ? (
<>
{networkCps ? (
<>
<Text style={{ fontSize: 13, textAlign: "center", display: "block" }}>
{t("pages.home.cpsNetwork")}
</Text>
<div className="cps-container">
<Statistic
suffix={t("transaction.cps")}
value={networkCps?.toFixed(2)}
style={{ display: "inline-block" }}
/>
</div>
</>
) : null}

{nodeCps ? (
<Text style={{ fontSize: 13, textAlign: "center", display: "block" }}>
{t("pages.home.cpsLocal")}
Expand Down

0 comments on commit 38060cd

Please sign in to comment.