Skip to content

feat: complete issues #586, #580, #561, and #549 - #657

Merged
ONEONUORA merged 2 commits into
Fracverse:masterfrom
Dami24-hub:feat/batch-issues-586-580-561-549
Jul 27, 2026
Merged

feat: complete issues #586, #580, #561, and #549#657
ONEONUORA merged 2 commits into
Fracverse:masterfrom
Dami24-hub:feat/batch-issues-586-580-561-549

Conversation

@Dami24-hub

Copy link
Copy Markdown
Contributor

Summary

This PR implements end-to-end authentication security, biometric transaction authorization on mobile, and on-chain yield vault transaction generation on the backend across issues #586, #580, #561, and #549.

Closes #586
Closes #580
Closes #561
Closes #549


Detailed Changes

Mobile Application (mobileapp)

Backend Services (backend)


Technical Scope & Files Changed

  • mobileapp/src/services/api.ts
  • mobileapp/app/biometric.tsx
  • mobileapp/app/transfer.tsx
  • backend/src/main.rs
  • backend/src/api/mod.rs
  • backend/src/api/yield.rs

Verification Plan

  • Verify expo-secure-store correctly reads/writes tokens on iOS Keychain and Android Keystore.
  • Verify transfer initiation triggers the biometric modal and blocks unauthenticated requests.
  • Test passcode fallback behavior on devices without biometric hardware enabled.
  • Test backend auth middleware against invalid/expired Privy tokens (confirm 401 Unauthorized responses).
  • Validate /yield/deposit and /yield/withdraw return valid base64 XDR payloads that successfully parse in the Stellar Laboratory/RPC inspector.

…Fracverse#549

Fracverse#586 [mobileapp] - Secure Store Privy Session Tokens
- Rewrite mobileapp/src/services/api.ts to use expo-secure-store for Privy JWT tokens
- Add setSessionToken/getSessionToken/clearSessionToken keychain wrappers
- Create apiFetch wrapper that attaches Bearer token and handles 401 by clearing session
- Register optional onSessionExpired callback for logout/navigation

Fracverse#580 [mobileapp] - Biometric Verification Overlay
- Implement authenticateWithBiometrics() in biometric.tsx using expo-local-authentication
- Support hasHardwareAsync, isEnrolledAsync, authenticateAsync with graceful passcode fallback
- Gate payment submission in transfer.tsx (step 3) behind biometric/passcode authentication
- Block transfer unless biometric authentication returns success

Fracverse#561 [backend] - Session Refresh & Auth Middleware
- Create backend/src/api/auth_middleware.rs with AuthTokenCache (5min TTL, lazy eviction)
- Implement auth_middleware function that validates Bearer JWT and caches result
- Attach AuthenticatedUser extension to request for downstream handlers
- Update main.rs to spawn cache sweep background task and wire protected_routes()
- Wrap feed/social/bridge/yield routes with auth middleware

Fracverse#549 [backend] - Unsigned Transaction XDR Generator
- Add POST /api/yield/build/deposit and /api/yield/build/withdraw endpoints
- Accept user_account, amount, vault_contract_address parameters
- Build Soroban ManageData transaction envelope encoding vault operations
- Call simulateTransaction RPC for realistic fee estimation
- Return { unsigned_xdr, estimated_fee_stroops, sequence_sentinel } for client signing
- Add address validation helpers and comprehensive unit tests
@drips-wave

drips-wave Bot commented Jul 27, 2026

Copy link
Copy Markdown

@Dami24-hub 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

@ONEONUORA ONEONUORA left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job @Dami24-hub

@ONEONUORA
ONEONUORA merged commit 60dcfb3 into Fracverse:master Jul 27, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment