+
+
+ {stakeForConnectedAddressOrNode.toFixed(2)}{" "}
+ SHM
+
+
+ Min. requirement:
+ {minimumStakeRequirement} SHM
-
-
-
- {isConnected && chain?.id === CHAIN_ID ? (
-
-
-
+ {(hasStakeOnDifferentNode &&
+
+
+ This wallet already has an active stake on a different
+ node. Remove your stake first if you wish to stake for
+ the current node.
+
+
+ )}
+ >
);
};
diff --git a/components/organisms/SettingsDisplay.tsx b/components/organisms/SettingsDisplay.tsx
index 6b43f7a..924aede 100644
--- a/components/organisms/SettingsDisplay.tsx
+++ b/components/organisms/SettingsDisplay.tsx
@@ -56,7 +56,7 @@ export const SettingsDisplay = () => {
}
nominator={address?.toString() || ""}
nominee={stakeInfo?.nominee || ""}
- currentRewards={parseFloat(nodeStatus?.currentRewards || "0")}
+ currentRewards={parseFloat(stakeInfo?.rewards ?? nodeStatus?.currentRewards ?? "0")}
currentStake={parseFloat(stakeInfo?.stake || "0")}
/>
)}
diff --git a/model/account-stake-info.ts b/model/account-stake-info.ts
index 4a5f4f6..524d48d 100644
--- a/model/account-stake-info.ts
+++ b/model/account-stake-info.ts
@@ -1,4 +1,5 @@
export interface AccountStakeInfo {
stake: string,
- nominee: string
+ nominee: string,
+ rewards: string
}
diff --git a/model/node-status.ts b/model/node-status.ts
index 9f31593..489afa8 100644
--- a/model/node-status.ts
+++ b/model/node-status.ts
@@ -16,7 +16,7 @@ export interface NodeStatus {
totalTimeValidating: number;
lastActive: string;
lockedStake: string;
- unstakable: {
+ stakeState: {
canUnstake: boolean;
reason: string,
remainingTime: number,
diff --git a/pages/dashboard/index.tsx b/pages/dashboard/index.tsx
index 4ffbc9c..424c5f6 100644
--- a/pages/dashboard/index.tsx
+++ b/pages/dashboard/index.tsx
@@ -20,7 +20,6 @@ import useNotificationsStore from "../../hooks/useNotificationsStore";
import { ToastWindow } from "../../components/molecules/ToastWindow";
import { useDevice } from "../../context/device";
import { NodeStatusRibbon } from "../../components/molecules/NodeStatusRibbon";
-import { useAccount } from "wagmi";
import { MobileModalWrapper } from "../../components/layouts/MobileModalWrapper";
import useModalStore from "../../hooks/useModalStore";
import { MobileMenu } from "../../components/molecules/MobileMenu";
@@ -53,7 +52,6 @@ const Dashboard = () => {
setContentPane(Content.LOGS);
};
const { isMobile } = useDevice();
- const { isConnected } = useAccount();
const { setShowModal, setContent } = useModalStore((state: any) => ({
setShowModal: state.setShowModal,
setContent: state.setContent,