fix(match,wallet): remove silent mock fallback and add token expiry guard - #842
Open
Mansa147 wants to merge 2 commits into
Open
fix(match,wallet): remove silent mock fallback and add token expiry guard#842Mansa147 wants to merge 2 commits into
Mansa147 wants to merge 2 commits into
Conversation
…uard - Remove try/catch mock-data fallback from useMatch queryFn; API errors now surface naturally via TanStack Query isError - Match detail page keyed on isError with dedicated error UI and Retry button; null-data case shows separate not-found state - MatchHubDetails import in page changed to type-only from @/types/match - Add __tests__/fixtures/matchFixtures.ts as the single test-only re-export for matchHubDetails and mockMatchDetails; no production file imports these - Update match-hub-params test to use new fixture path and isError:true mock - Add lib/wallet/tokenExpiry.ts: setTokenExpiresIn, isTokenNearExpiry, isTokenExpired, tokenRemainingMs with 60s EXPIRY_THRESHOLD_MS constant - useAuth stores public expiry timestamp after login and refresh; clears on logout - Add SessionExpiredModal component for pre-transaction re-auth prompt - WalletDashboard checks isTokenNearExpiry() before any withdrawal; on near-expiry attempts silent refresh, shows SessionExpiredModal on failure, replays pending transaction after successful re-auth, redirects to login if refresh fails a second time - Add 15 unit tests for tokenExpiry module covering all exported functions Closes Arenax-gaming#736 Closes Arenax-gaming#737
|
@Mansa147 is attempting to deploy a commit to the paul joseph's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@Mansa147 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! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #736
closes #737