diff --git a/backend/src/main/java/com/rit/canteen/sales/service/TokenService.java b/backend/src/main/java/com/rit/canteen/sales/service/TokenService.java index 537cdfb7..8f7f6a9a 100644 --- a/backend/src/main/java/com/rit/canteen/sales/service/TokenService.java +++ b/backend/src/main/java/com/rit/canteen/sales/service/TokenService.java @@ -86,8 +86,8 @@ public class TokenService { BigDecimal currentBalance = user.getRitzTokenBalance() != null ? user.getRitzTokenBalance() : BigDecimal.ZERO; BigDecimal newBalance = currentBalance.add(amount); - if (newBalance.compareTo(new BigDecimal("5000")) > 0) { - throw new RuntimeException("Wallet limit exceeded (Max: 5,000 Ritz Tokens)"); + if (amount.compareTo(new BigDecimal("5000")) > 0) { + throw new RuntimeException("Single transaction limit exceeded (Max: 5,000 Ritz Tokens)"); } user.setRitzTokenBalance(newBalance); diff --git a/ordering_site/src/components/BottomNav.tsx b/ordering_site/src/components/BottomNav.tsx index ec7ff779..0d1ccfe6 100644 --- a/ordering_site/src/components/BottomNav.tsx +++ b/ordering_site/src/components/BottomNav.tsx @@ -14,7 +14,7 @@ const BottomNav: React.FC = () => { ]; // Only show on main screens and stall details - const isMainScreen = ['/', '/orders', '/profile'].includes(location.pathname); + const isMainScreen = ['/', '/orders', '/profile', '/wallet', '/topup'].includes(location.pathname); const isStallDetail = location.pathname.startsWith('/stall/'); if (!isMainScreen && !isStallDetail) {