feat: remove pending reconcile notifications section from wallet screen
Some checks failed
lotteryfront CI / build (push) Has been cancelled

- Deleted WalletPendingReconcileSection component and usePendingWalletReconcile hook
- Removed pending reconcile notification helpers and translation key functions
- Cleaned up wallet logs refresh event dispatching and pending reconcile cache logic
- Simplified wallet screen section deep linking to only handle logs section
This commit is contained in:
2026-06-29 17:54:12 +08:00
parent 7702bc90e0
commit 7bfc713b14
4 changed files with 1 additions and 338 deletions

View File

@@ -14,10 +14,8 @@ import {
TransferInDialog,
TransferOutDialog,
} from "@/features/wallet/wallet-transfer-dialogs";
import { WalletPendingReconcileSection } from "@/features/wallet/wallet-pending-reconcile-section";
import { PlayerMoneyDisplay } from "@/components/player-money-display";
import { WalletLogsBlock } from "@/features/wallet/wallet-logs-block";
import { dispatchWalletLogsRefresh } from "@/hooks/use-pending-wallet-reconcile";
import { useActivePlayerCurrency } from "@/hooks/use-active-player-currency";
import { isCreditFundingPlayer } from "@/lib/player-funding-mode";
import { formatMinorAsCurrency } from "@/lib/money";
@@ -80,10 +78,7 @@ export function WalletScreen() {
if (section !== "logs" && section !== "pending") return;
sectionDeepLinkHandledRef.current = true;
const targetId =
section === "logs" || (section === "pending" && isCreditPlayer)
? "wallet-logs"
: "wallet-pending";
const targetId = "wallet-logs";
const timer = window.setTimeout(() => {
scrollToWalletSection(targetId);
router.replace("/wallet", { scroll: false });
@@ -103,7 +98,6 @@ export function WalletScreen() {
? { ...nextLogs, items: [...current.items, ...nextLogs.items] }
: nextLogs,
);
dispatchWalletLogsRefresh(nextLogs.pending_reconcile ?? []);
return nextLogs;
}, [currency, filter]);
@@ -126,7 +120,6 @@ export function WalletScreen() {
if (cancelled) return;
setBalance(b);
setLogs(nextLogs);
dispatchWalletLogsRefresh(nextLogs.pending_reconcile ?? []);
} catch (e) {
if (!cancelled) {
setError(formatWalletClientError(e, t));
@@ -169,7 +162,6 @@ export function WalletScreen() {
});
if (!cancelled) {
setLogs(nextLogs);
dispatchWalletLogsRefresh(nextLogs.pending_reconcile ?? []);
}
} catch (e) {
if (!cancelled) {
@@ -340,10 +332,6 @@ export function WalletScreen() {
</div>
) : null}
<WalletPendingReconcileSection
onViewLogs={() => scrollToWalletSection("wallet-logs")}
/>
<div id="wallet-logs" className="scroll-mt-3">
<WalletLogsBlock
creditMode={isCreditPlayer}