@@ -67,20 +76,20 @@ const Nav = () => {
{'View on '}IPFS
- {state.connected ? (
+ {isConnected && address ? (
) : (
@@ -115,14 +124,22 @@ const Heading = ({ children }: { children: ReactNode }) => (
const Actions = () => (
-
-
+
);
@@ -151,6 +168,7 @@ const Stats = () => (
Voting addresses
+ {/* */}
@@ -159,6 +177,8 @@ const Stats = () => (
const MyStake = () => {
const { state, setState } = useContext(StateContext);
+ const { isConnected } = useAccount();
+ const { openConnectModal } = useConnectModal();
const totalLocked = state.lockups.reduce((m, l) => {
return m + l.tokens;
@@ -170,7 +190,7 @@ const MyStake = () => {
My stake
- {!state.connected ? (
+ {!isConnected ? (
) : (
@@ -183,30 +203,27 @@ const MyStake = () => {
Wallet balance
- {state.connected ? (
+ {isConnected ? (
- {state.walletBalance.toLocaleString()}
+
) : (
)}
{state.walletBalance ? null : (
-
+
)}
- {state.connected ? (
+ {isConnected ? (