Skip to content

fix: switch nuqs history mode from push to replace in amount inputs #1847

Description

@chip-peanut-bot

Problem

MantecaAddMoney.tsx and [country]/bank/page.tsx use nuqs (useQueryStates) with history: 'push'. This syncs step/amount to URL params, but every keystroke in the amount field pushes a new history entry.

On Android WebView/PWA, this pollutes the navigation stack — pressing back navigates through previous amount states (e.g. "10" → "1" → "") instead of going to the previous page. This makes back/home buttons appear unresponsive.

This is the strongest candidate for the reported 'back button doesn't work' symptom.

Fix

Change { history: 'push' } to { history: 'replace' } in useQueryStates calls in:

  • src/components/AddMoney/components/MantecaAddMoney.tsx (line ~47)
  • src/app/(mobile-ui)/add-money/[country]/bank/page.tsx (line ~48)

Keep push only for step transitions (inputAmount → showDetails) where back navigation makes sense.

Context

User report: app freezes on add-money/withdraw screen, back button and home unresponsive. Reproducible on 2 Android devices.
Investigation: https://discord.com/channels/972435984954302464/1486336087747199059/1486337803708141588

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions