Token Service updated

This commit is contained in:
Sidharth Prabhu
2026-04-20 20:04:40 +05:30
parent c8936d8cad
commit 10d250686b
2 changed files with 3 additions and 3 deletions

View File

@@ -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);

View File

@@ -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) {