Skip to content

fix(mobile): remove mock receipt fallback from production - #1074

Open
martinshub-tech wants to merge 1 commit into
Pulsefy:mainfrom
martinshub-tech:fix-mock-receipt
Open

martinshub-tech wants to merge 1 commit into
Pulsefy:mainfrom
martinshub-tech:fix-mock-receipt

Conversation

@martinshub-tech

Copy link
Copy Markdown

Closes #847

I've resolved the issue according to all the acceptance criteria and created a new branch fix-mock-receipt with the commit. The changes address the following:

Moved Mock Fixture: app/mobile/src/data/mockReceipt.ts has been safely moved to app/mobile/tests/fixtures/mockReceipt.ts, and all the test files utilizing it have had their imports updated.
Removed Invented Fallback & Added Error States: Instead of deriving a mock fallback object when transaction isn't resolved in app/mobile/app/transaction/[id].tsx, the component now returns null for the transaction in that case, and properly renders an whilst hydrating, and a clear "Receipt not found" error state with an alert icon when no data is found.
CI Strict Rules Added: Configured no-restricted-imports in app/mobile/eslint.config.js to ensure the CI throws an error if any file under src/ or app/ tries to import from tests/fixtures/.

Resolves issue where receipt screen would fall back to an invented receipt if transaction details were incomplete. The mock fixture has been moved to tests, and eslint configuration updated to prevent mock imports in production modules.
@drips-wave

drips-wave Bot commented Sep 23, 2026

Copy link
Copy Markdown

@martinshub-tech Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MOB-57: Remove Mock Receipt Data from Production Paths

1 participant