@@ -65,7 +71,6 @@ export const RewardsCard = () => {
{parseFloat(nodeStatus?.currentRewards || "0").toFixed(2)}{" "}
SHM
- {/* (~0.00$) */}
Earned since last validating cycle
@@ -92,11 +97,16 @@ export const RewardsCard = () => {
(canRedeem
? "text-primary"
: `text-gray-400 ${
- nodeStatus?.state === "active" ? "tooltip" : ""
+ nodeStatus?.state === "active" || !isStoppedForLongerThan15Minutes ? "tooltip" : ""
}`)
}
- data-tip="It is not possible to redeem rewards while you are validating.
- If absolutely necessary, use the force stop option in settings (Not Recommended)."
+ data-tip={
+ nodeStatus?.state === "active"
+ ? "It is not possible to redeem rewards while you are validating. If absolutely necessary, use the force stop option in settings (Not Recommended)."
+ : !isStoppedForLongerThan15Minutes
+ ? `Node has been stopped recently. Please wait for another ${formatRemainingTime(remainingWaitTime)} before redeeming rewards.`
+ : ""
+ }
disabled={!canRedeem}
onClick={() => {
resetModal();
@@ -128,4 +138,4 @@ export const RewardsCard = () => {
);
-};
+};
\ No newline at end of file
diff --git a/components/molecules/StakeDisplay.tsx b/components/molecules/StakeDisplay.tsx
index 1d318ff5..74b346f2 100644
--- a/components/molecules/StakeDisplay.tsx
+++ b/components/molecules/StakeDisplay.tsx
@@ -11,6 +11,7 @@ import { ClipboardIcon } from "../atoms/ClipboardIcon";
import { MobileModalWrapper } from "../layouts/MobileModalWrapper";
import { useAccountStakeInfo } from "../../hooks/useAccountStakeInfo";
import { useSettings } from "../../hooks/useSettings";
+import { formatRemainingTime } from "../../utils/formatTime";
export const StakeDisplay = () => {
const addressRef = useRef