From 8bde1eb85b6be43fa9108ac4b796562e09f10135 Mon Sep 17 00:00:00 2001 From: starknetdev Date: Thu, 12 Oct 2023 17:58:25 +0100 Subject: [PATCH] fix bigint error --- ui/src/app/components/upgrade/StatAttribute.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui/src/app/components/upgrade/StatAttribute.tsx b/ui/src/app/components/upgrade/StatAttribute.tsx index abacf3b4e..45056185d 100644 --- a/ui/src/app/components/upgrade/StatAttribute.tsx +++ b/ui/src/app/components/upgrade/StatAttribute.tsx @@ -44,7 +44,10 @@ export const StatAttribute = ({ const newUpgradeTotal = amount + ((adventurer?.statUpgrades ?? 0) - upgradesTotal); - const maxNonBoosted = nonBoostedStat + BigInt(amount) >= BigInt(15); + console.log(nonBoostedStat, BigInt(amount), BigInt(15)); + + const maxNonBoosted = + (nonBoostedStat ?? BigInt(0)) + BigInt(amount) >= BigInt(15); useEffect(() => { if (buttonClicked) {