+
{bossToName[variant]} Moloch (lvl {boss ? boss.level + 1 : 0})
+
{parseFloat(parseFloat(formatUnits(bossToReward[boss?.level || 0], 18).toString()).toFixed(4))} RGCVII reward
+
+ {parseFloat((chanceToDefeat.current * 100).toFixed(2))} % to slay{" "}
+ {chanceToDefeat.current == maxChance ? (MAXED) : (Max {maxChance * 100}%)}
+
+
+}
+
+export default BossInfo
diff --git a/app/src/components/Counter.tsx b/app/src/components/Counter.tsx
index b1c0a32..843fa32 100644
--- a/app/src/components/Counter.tsx
+++ b/app/src/components/Counter.tsx
@@ -55,8 +55,8 @@ export const toReadable = (rawValue: bigint) => {
const Counter = () => {
const { balance, army, player } = usePlayer();
const [, render] = useReducer(p => !p, false);
- const balanceCount = useRef(balance.toString() ?? "0")
- const availableBalance = useRef(balance.toString() ?? "0")
+ const balanceCount = useRef(balance ? balance.toString() : "0")
+ const availableBalance = useRef(balance ? balance.toString() : "0")
useEffect(() => {
const tickInterval = setInterval(() => {
balanceCount.current = toReadable(calculateBalance(
diff --git a/app/src/components/Header.tsx b/app/src/components/Header.tsx
index 60eecdf..acf55c9 100644
--- a/app/src/components/Header.tsx
+++ b/app/src/components/Header.tsx
@@ -9,37 +9,38 @@ import { useModal } from "../providers/ModalProvider";
const Header = () => {
const { isConnected } = useAccount();
- const { isRegistered, army } = usePlayer();
+ const { isRegistered, player, army } = usePlayer();
const { openRegistrationModal } = useModal();
const title = useMemo(() => {
- return isRegistered ? `SLAY THE MOLOCH` :
- !isConnected ? "Connect your wallet traveler ☝️ and then ..." :
- "Click here to start 😈"
- }, [isConnected, isRegistered])
+ return isRegistered && !player?.has_active_session ? `You died 😇 Click here to start again and ...` :
+ isRegistered ? `SLAY THE MOLOCH` :
+ !isConnected ? "Connect your wallet traveler ☝️ and then ..." :
+ "Click here to start 😈"
+ }, [isConnected, isRegistered, player?.has_active_session])
const subtitle = useMemo(() => {
- if (isRegistered) {
+ if (isRegistered && player?.has_active_session) {
return