fix: asset-aware tx amounts, real overview data, biometric lockout counting, job queue visibility timeout - #1438
Closed
ritik4ever wants to merge 1 commit into
Closed
ritik4ever wants to merge 1 commit into
ritik4ever wants to merge 1 commit into
Conversation
…t failed biometrics, add queue visibility timeout
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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 #1410
Closes #1415
Closes #1418
Closes #1407
Summary
Four small, independent fixes across the monorepo.
#1410 — [WEB-DASHBOARD] TransactionTable hardcodes USD
formatAmount()formatted every amount asstyle: 'currency', currency: 'USD', ignoringTransaction.asset. It now renders"142.50 XLM"and falls back toXLMwhen the field isabsent, matching the documented default.
apps/web-dashboard/src/components/transactions/TransactionTable.tsx:46#1415 — [MOBILE] NativeBiometricAdapter misclassifies failed matches
A resolved
{ success: false }fromcreateSignature()is a genuinely failed match (wrongfinger / spoofing attempt), not a voluntary cancel, but it was mapped to
USER_CANCEL— whichBiometricLockoutManager.recordFailure()explicitly excludes from the failure counter. Theresolve path now returns
AUTHENTICATION_FAILED, soBIOMETRIC_MAX_ATTEMPTSand the lockouttimer actually engage. The thrown-exception path still distinguishes real cancellation.
apps/mobile-wallet/src/security/NativeBiometricAdapter.ts:45#1418 — [RELAYER] PgJobQueue.dequeue() has no visibility timeout
Jobs claimed via
FOR UPDATE SKIP LOCKEDhad no lease, so a worker SIGKILLed betweendequeue()andack()/nack()stranded the job inprocessingforever.dequeue()nowreclaims any
processingrow whoseupdated_atis older than a 5-minute visibility timeoutback to
pendingbefore selecting, using a data-modifying CTE (always executed, independentof whether the outer query reads its output).
services/relayer/src/queue/PgJobQueue.ts:135#1407 — [WEB-DASHBOARD] OverviewPage is entirely hardcoded
OverviewPage— the component actually rendered at/dashboard— rendered a literal array offabricated figures (
1,245.80 XLM,24 payments) and fired zero network requests. It nowreads the app's real hooks:
useAccountState()for the active address anduseAccountOverview()for balance, status and nonce, with a loading placeholder.apps/web-dashboard/src/router/index.tsx:212Testing
Not run — changes are scoped and reviewable individually. Worth a follow-up pass:
TransactionTablecase withassetset to a non-XLM codeNativeBiometricAdaptercase forresolve({ success: false })PgJobQueuecase asserting a staleprocessingjob is reclaimedNotes
apps/mobile-wallet/.../persist-wallet.ts. This fix is in the relayer queue; [RELAYER] PgJobQueue.dequeue() has no visibility timeout — a worker crash after dequeue leaves a job permanently stuck in 'processing' #1369 may stillneed reopening.
evidence only.