Skip to content

Conversation

@seshanthS
Copy link
Collaborator

@seshanthS seshanthS commented Oct 24, 2025

Summary by CodeRabbit

Release Notes

  • New Features

    • Introduced Self Points system allowing users to earn points through referrals, notifications, backups, and identity verification.
    • Added Turnkey wallet integration for secure account restoration and backup capabilities.
    • Enhanced account recovery with multiple backup methods (iCloud and Turnkey).
    • New referral system with direct sharing via SMS, WhatsApp, and native sharing.
  • UI/UX Improvements

    • New Points dashboard with history tracking and reward exploration.
    • Updated cloud backup screen with backup method selection.
    • Gratification screen for successful point-earning interactions.
    • Enhanced navigation with dedicated Points and Referral screens.
  • Version Update

    • Bumped app version from 2.7.3 to 2.7.4.

Note

Integrates Turnkey wallet (OAuth) into the app with new backup/restore flows and deeplink handling, plus related UI, config, and build/dependency updates.

  • Auth/Wallet Integration
    • Add TurnkeyProvider and config/callbacks in app/App.tsx with env-driven IDs and platform redirect URIs.
    • New useTurnkeyUtils for authenticate/backup/restore/mnemonic export; store backedUpWithTurnKey in useSettingStore.
    • Update auth flow to generate/store points address on mnemonic restore; require auth for mnemonic access.
  • Backup/Recovery UX
    • Enhance CloudBackupScreen with selectable iCloud or Turnkey backup, progress/disable flows, and modals.
    • Extend AccountRecoveryChoiceScreen to restore via Turnkey or cloud; shared restore flow with CSCA checks.
    • Points screen records backup points when either cloud or Turnkey backup is enabled.
    • Navigation: rename CloudBackupSettings title to “Account Backup”.
  • Deeplinks & Tests
    • Support Turnkey OAuth params (code, id_token, etc.) in utils/deeplinks.ts; ignore OAuth redirects from navigation.
    • Expand deeplinks tests for OAuth, validation, and parsing.
  • Build & Platform Config
    • Android: bump compileSdkVersion to 36, Kotlin 2.0.21; enable buildFeatures and set app auth redirect scheme.
    • iOS: add URL scheme com.warroom.proofofpassport and webcredentials:redirect.self.xyz entitlement; add pods (react-native-compat, react-native-passkey, RNInAppBrowser); update RNSVG.
    • Metro: custom resolves for @turnkey/* and viem; Babel adds @babel/plugin-transform-export-namespace-from.
  • Dependencies & Tooling
    • Add Turnkey, WalletConnect compat, passkey, in-app browser, URL polyfill, expo-application; adjust safe-area/svg versions; patch react-native-svg.
    • Jest: mocks for Turnkey wallet kit and device info.
    • Increase bundle size thresholds (iOS/Android 44 MB).
    • Security config: fix .gitguardian.yml keys (paths_ignore, secrets_ignore) and extend .gitleaksignore.

Written by Cursor Bugbot for commit 545303c. This will update automatically on new commits. Configure here.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 24, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (3)
  • main
  • dev
  • staging

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

This PR integrates Turnkey wallet support with environment configuration, implements a comprehensive points and referral system featuring earning flows, confirmation modals, and history tracking, adds new navigation routes (Points, Referral, Gratification), bumps app versions to 2.7.4, extends mobile SDK with new utilities and animations, and expands test coverage throughout.

Changes

Cohort / File(s) Summary
Turnkey Integration
app/App.tsx, app/env.ts, app/src/utils/turnkey.ts
Added TurnkeyProvider wrapper with callbacks and platform-aware OAuth config; exported TURNKEY_CONFIG and TURNKEY_CALLBACKS with environment variables for org/proxy/Google credentials
Points System — Core
app/src/utils/points/*, app/src/stores/pointEventStore.ts
Introduced points API utilities (api.ts, getEvents.ts, recordEvents.ts, registerEvents.ts, types.ts, utils.ts), new Zustand store for point events with async persistence, and centralized index for public API surface
Referral System — Hooks
app/src/hooks/useEarnPointsFlow.ts, app/src/hooks/useReferralConfirmation.ts, app/src/hooks/useReferralMessage.ts, app/src/hooks/useReferralRegistration.ts, app/src/hooks/useRegisterReferral.ts, app/src/hooks/useTestReferralFlow.ts
New hooks orchestrating points earning, referral confirmation flow with modals, referral message generation, registration automation from route params, and dev-mode testing utilities
Points & Referral UI Components
app/src/components/NavBar/Points.tsx, app/src/components/NavBar/PointsNavBar.tsx, app/src/components/PointHistoryList.tsx, app/src/components/referral/*
New Points screen with points display and earning actions, PointsNavBar header, PointHistoryList with event grouping, and referral UI (CopyReferralButton, ReferralHeader, ReferralInfo, ShareButton)
Screens — New
app/src/screens/app/GratificationScreen.tsx, app/src/screens/app/ReferralScreen.tsx
New GratificationScreen showing animated win sequence and earned points, ReferralScreen with share options (SMS, native, WhatsApp) and copy referral link
Account Recovery & Backup
app/src/screens/account/recovery/AccountRecoveryChoiceScreen.tsx, app/src/screens/account/settings/CloudBackupScreen.tsx, app/src/providers/authProvider.tsx
Unified restore flow with Turnkey and cloud pathways; CloudBackupScreen refactored to support both iCloud and Turnkey backup methods; authProvider enhanced with points address generation and storage
Navigation Updates
app/src/navigation/app.tsx, app/src/navigation/home.ts, app/src/navigation/index.tsx, app/src/navigation/account.ts
Added Points and Referral routes to homeScreens, Gratification to appScreens, extended RootStackParamList with new screens and params, updated CloudBackupSettings styling (white header, Account Backup title)
Home Screen & Launch
app/src/screens/home/HomeScreen.tsx, app/src/screens/app/LaunchScreen.tsx, app/src/screens/app/SplashScreen.tsx
HomeScreen reworked with onboarding UI when no documents exist and Self Points panel with Earn Points button; LaunchScreen adds Turnkey wallet import flow; SplashScreen changed to navigate to Home instead of Launch
Deep Links & Dev Utils
app/src/utils/deeplinks.ts, app/src/utils/devUtils.ts, app/src/utils/referralShare.ts
Extended deeplink validation to support code, state, id_token, scope, scheme, referrer params; added IS_DEV_MODE constant; new shareVia* utilities for SMS/WhatsApp/native sharing
Points & Referral Utilities
app/src/utils/constants.ts, app/src/utils/fonts.ts, app/src/utils/notifications/notificationService.ts
Added Turnkey OAuth redirect URIs (Android/iOS); exported dinotBold font; added isTopicSubscribed helper for notification subscriptions
Store Updates
app/src/stores/settingStore.ts, app/src/stores/userStore.ts
Extended settingStore with backedUpWithTurnKey and hasCompletedBackupForPoints flags; extended userStore with referrer tracking (deepLinkReferrer, registeredReferrers) and related accessors
Navigation & Utility Screens
app/src/screens/documents/management/IdDetailsScreen.tsx, app/src/screens/verification/ProveScreen.tsx, app/src/screens/dev/DevSettingsScreen.tsx, app/src/screens/onboarding/*
IdDetailsScreen made focus-aware for BlurView conditionally; ProveScreen logo resized and text phrasing updated; DevSettingsScreen added point event management and test referral UI; onboarding screens migrated to object-based navigation
Android Build Config
app/android/app/build.gradle, app/android/app/src/main/AndroidManifest.xml, app/android/build.gradle
Version incremented to 2.7.4 (versionCode 115); added buildFeatures (buildConfig, viewBinding); updated compileSdkVersion to 36, kotlinVersion to 2.0.21; added WhatsApp intent query declaration
iOS Configuration
app/ios/OpenPassport/Info.plist, app/ios/OpenPassport/OpenPassport.entitlements, app/ios/OpenPassport/OpenPassportDebug.entitlements, app/ios/Self.xcodeproj/project.pbxproj
Version bumped to 2.7.4; added DINOT-Bold.otf font and associated domains (webcredentials:redirect.self.xyz); added custom URL scheme (com.warroom.proofofpassport) and LSApplicationQueriesSchemes (whatsapp, sms)
Babel & Build Config
app/babel.config.cjs, app/metro.config.cjs, app/package.json
Added @babel/plugin-transform-export-namespace-from; extended Metro resolver with CommonJS fallbacks for @turnkey/, viem, @noble/hashes; added postinstall patch-package script; new deps (@turnkey/, @walletconnect/react-native-compat, expo-application)
Mobile SDK — Core
packages/mobile-sdk-alpha/src/index.ts, packages/mobile-sdk-alpha/package.json
Removed exports (DG1, DG2, ParsedNFCResponse, defaultConfig, extractNameFromDocument, generateMockDocument, signatureAlgorithmToStrictSignatureAlgorithm, SdkErrorCategory); added dinotBold export; exposed useSafeBottomPadding hook
Mobile SDK — Proving & Animations
packages/mobile-sdk-alpha/src/proving/provingMachine.ts, packages/mobile-sdk-alpha/src/animations/loading/*
Updated provingMachine to skip ID parsing for DSC circuit type and include selfDefinedData in payload; replaced pretty-printed animation JSONs (fail, misc, prove, success) with minified versions; added youWin animation
Mobile SDK — Constants & Hooks
packages/mobile-sdk-alpha/src/constants/*, packages/mobile-sdk-alpha/src/flows/onboarding/confirm-identification.tsx, packages/mobile-sdk-alpha/src/hooks/useSafeBottomPadding.ts
Added PointEvents export to analytics constants (with duplicate block); added dinotBold font constant; added clarifying comments on bottom padding in confirm-identification flow; minor JSDoc formatting in useSafeBottomPadding
Common Utils
common/src/utils/appType.ts, common/src/utils/proving.ts, common/src/utils/circuits/registerInputs.ts
Extended SelfApp interface with selfDefinedData field; updated getPayload to accept and forward selfDefinedData parameter; removed console.log debugging from Aadhaar register inputs
Patches & Root Config
patches/react-native-svg+15.14.0.patch, package.json, app/version.json, app/web/fonts.css
Added @noble/curves and @noble/hashes resolutions, react-native-passkey dependency; updated Android SVG layout behavior in patch; added DINOT-Bold @font-face; bumped version timestamp
Test Files — Points & Referral
app/tests/src/hooks/useEarnPointsFlow.test.ts, app/tests/src/hooks/useReferralConfirmation.test.ts, app/tests/src/hooks/useReferralMessage.test.ts, app/tests/src/hooks/useReferralRegistration.test.ts, app/tests/src/hooks/useRegisterReferral.test.ts
Comprehensive test suites for points earning flow (identity/disclosure modals, navigation, referral registration), referral confirmation (modal display, state transitions, callbacks), referral message generation (address loading, memoization), referral registration automation, and referral registration API
Test Files — Screens & Utils
app/tests/src/screens/GratificationScreen.test.tsx, app/tests/utils/deeplinks.test.ts, app/tests/utils/proving/provingUtils.test.ts, app/tests/src/iosInfoPlist.test.ts, app/tests/src/navigation.test.ts, app/tests/src/screens/WebViewScreen.test.tsx
New GratificationScreen tests, extended deeplinks tests for OAuth/referrer flows, updated proving payload tests for selfDefinedData, verified DINOT-Bold font in iOS plist, added Points/Referral/Gratification to navigation test, refactored WebViewScreen mock
Jest & Mocking
app/jest.setup.js
Comprehensive mock extensions for @turnkey/react-native-wallet-kit (AuthState, useTurnkey, TurnkeyProvider), react-native-device-info, NativeEventEmitter (constructor-style refactor), NativeStatusBarManagerIOS, and various mobile-sdk-alpha components

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant HomeScreen
    participant Modal as Modal Registry
    participant Points as Points Flow
    participant API as Points API
    participant Navigation

    User->>HomeScreen: Press Earn Points
    activate HomeScreen
    HomeScreen->>HomeScreen: Check identity document<br/>(hasUserAnIdentityDocumentRegistered)
    
    alt No identity document
        HomeScreen->>Modal: Show identity verification modal
        activate Modal
        User->>Modal: Confirm
        Modal->>Navigation: Navigate to DocumentOnboarding
        deactivate Modal
    else Has identity document
        HomeScreen->>HomeScreen: Check points disclosure<br/>(hasUserDoneThePointsDisclosure)
        alt No disclosure
            HomeScreen->>Modal: Show disclosure modal
            activate Modal
            User->>Modal: Confirm
            Modal->>Navigation: Navigate to points-disclosure
            deactivate Modal
        else Has disclosure & has referrer
            HomeScreen->>Points: Register referral
            activate Points
            Points->>API: POST /referrals/refer
            API-->>Points: Success/Error
            Points-->>HomeScreen: Result
            deactivate Points
            alt Referral success
                HomeScreen->>Navigation: Navigate to Gratification<br/>(with earned points)
            else Referral error
                HomeScreen->>Modal: Show error modal
                activate Modal
                User->>Modal: Retry/Dismiss
                deactivate Modal
            end
        else No referrer
            HomeScreen->>Navigation: Navigate to Points screen
        end
    end
    
    deactivate HomeScreen
Loading
sequenceDiagram
    participant App
    participant ReferralConfirmation as useReferralConfirmation
    participant Modal as Modal Registry
    participant UserStore
    participant Navigation

    App->>ReferralConfirmation: hasReferrer=true<br/>onConfirmed=callback
    activate ReferralConfirmation
    
    ReferralConfirmation->>UserStore: Read deepLinkReferrer<br/>isReferrerRegistered
    
    alt hasReferrer && !isReferrerRegistered<br/>&& !isReferralConfirmed
        ReferralConfirmation->>Modal: Register confirmation modal
        activate Modal
        Note over Modal: User sees referral confirmation
        User->>Modal: Confirm button press
        ReferralConfirmation->>UserStore: Set isReferralConfirmed=true
        Modal->>Navigation: Navigate back (after delay)
        deactivate Modal
        
        ReferralConfirmation->>ReferralConfirmation: isReferralConfirmed===true<br/>hasReferrer===true
        ReferralConfirmation->>App: Call onConfirmed()
    else Already confirmed or<br/>no referrer
        ReferralConfirmation->>ReferralConfirmation: Skip modal
    end
    
    deactivate ReferralConfirmation
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Areas requiring extra attention:

  • Referral & Points Flow Logic: Multiple interconnected hooks (useEarnPointsFlow, useReferralConfirmation, useReferralRegistration, useRegisterReferral) with modal-driven state management and navigation side effects; verify referrer state transitions, registration deduplication, and error handling paths thoroughly.
  • Turnkey Integration: New TurnkeyProvider wrapper in App.tsx with OAuth callbacks and platform-specific redirects; verify Turnkey initialization doesn't block app startup, OAuth state is properly managed, and wallet restoration flows don't corrupt existing mnemonic state.
  • Account Recovery with Turnkey: AccountRecoveryChoiceScreen now supports both Turnkey and cloud restore paths via a unified restoreAccountFlow helper; verify CSCA validation, backup status flags (backedUpWithTurnkey, hasCompletedBackupForPoints) are mutually consistent, and post-restore navigation doesn't leave orphaned state.
  • Deep Link Referrer Handling: Extended deeplinks.ts with referrer parameter parsing and OAuth redirect detection; verify fragment parsing (#-based params) doesn't interfere with existing deeplink handlers, and referrer routing to Home doesn't break auth flows.
  • Metro Module Resolution: Substantial additions for CommonJS fallbacks (@turnkey/*, viem, @noble/hashes) and nodeModulesRedirects; verify these don't mask legitimate import errors or create circular dependency issues.
  • Points API Integration: New points utilities (registerEvents.ts, recordEvents.ts) use hardcoded POINTS_API_BASE_URL and assume specific error response shapes; verify API endpoint is correctly configured per environment and error handling gracefully degrades.
  • Store State Consistency: New persisted fields (backedUpWithTurnkey, hasCompletedBackupForPoints, deepLinkReferrer, registeredReferrers) added to settingStore and userStore; verify migrations on app update don't lose existing persisted data and concurrent mutations don't corrupt Set/Map state in Zustand.
  • Test Mocking Complexity: jest.setup.js extensively mocks @turnkey/react-native-wallet-kit and device-info; verify mock return values align with actual SDK behavior to prevent false-positive test passes.
  • Mobile SDK Export Removals: Removed six exports from packages/mobile-sdk-alpha/src/index.ts (including extractNameFromDocument); verify no internal code still depends on these and clients are updated to import from submodules directly.

Possibly related PRs

Suggested labels

turk-integration, points-system, referral-system, navigation, mobile-sdk

Suggested reviewers

  • aaronmgdr
  • transphorm
  • shazarre

Poem

🎁 Points and referrals, a system so grand,
Turnkey wallets now shake the app's hand,
Earn while you share, watch the gratification bloom,
From discovery to backup—no more gloom!
Two-fifty-seven to four, the version ascends, ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 10.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'SELF-915: Setup and add turnkey utils' accurately describes the primary change: integration of Turnkey wallet utilities and setup throughout the application.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gitguardian
Copy link

gitguardian bot commented Oct 24, 2025

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
19414827 Triggered Generic Password cd6a7f3 packages/mobile-sdk-alpha/ios/Frameworks/NFCPassportReader.xcframework/ios-arm64/NFCPassportReader.framework/Modules/NFCPassportReader.swiftmodule/arm64-apple-ios.private.swiftinterface View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@seshanthS seshanthS changed the title Setup and add turnkey utils SELF-915: Setup and add turnkey utils Oct 28, 2025
@seshanthS seshanthS changed the base branch from dev to app/two-point-nine November 4, 2025 10:10
@seshanthS seshanthS changed the base branch from app/two-point-nine to dev November 4, 2025 10:11
@seshanthS seshanthS marked this pull request as ready for review November 7, 2025 21:29
@seshanthS seshanthS changed the base branch from dev to app/two-point-nine November 7, 2025 21:32
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

This PR is being reviewed by Cursor Bugbot

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

} catch (e: unknown) {
console.error(e);
}
}, [getMnemonic, restoreAccountFlow, setBackedUpWithTurnKey, trackEvent]);
Copy link

Choose a reason for hiding this comment

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

Bug: Restore Flag Misrepresents Success

The onRestoreFromTurnkeyPress function calls setBackedUpWithTurnKey(true) after restoreAccountFlow completes, but restoreAccountFlow itself can throw errors that are caught in the outer try-catch. If restoreAccountFlow throws an error (e.g., during passport validation), the backup flag is never set, but the function still catches the error and continues. However, if restoreAccountFlow succeeds but the user's passport isn't registered, it navigates away and sets restoring to false inside restoreAccountFlow, then the outer function still tries to set backedUpWithTurnKey to true even though the restore failed. The flag should only be set when the entire flow succeeds, not just when no exception is thrown.

Fix in Cursor Fix in Web

@transphorm transphorm merged commit dcdd45f into app/two-point-nine Nov 7, 2025
11 checks passed
@transphorm transphorm deleted the feat/turnkey branch November 7, 2025 23:25
transphorm added a commit that referenced this pull request Nov 11, 2025
* 2.9 release

* 2.9 release

* Remove debug console logs from generateTEEInputsRegister function in registerInputs.ts

* parse only the passport data during the dsc step

* Add ReferralScreen and integrate referral functionality
- Introduced ReferralScreen for sharing referral links via messages, WhatsApp, and clipboard.
- Updated navigation to include ReferralScreen in the home stack.
- Added new icons for sharing and messaging.
- Enhanced points utility functions to check user identity document registration and points disclosure status.
- Minor adjustments to existing components for better integration with the new referral feature.

* fix types

* fix font

* fix vertical spacing

* save current abstraction

* clean up linking

* clean up spurious ai slop comments

* add dinot bold font

* minify animations

* update fonts and add placeholder animation

* fix pipelines

* fix order

* Update dependencies and enhance Points component functionality
- Added `@react-native-masked-view/masked-view` and `react-native-linear-gradient` to dependencies for improved UI components.
- Refactored `PointHistoryList` to accept `ListHeaderComponent` and `onRefreshRef` props for better integration with parent components.
- Enhanced `Points` component to manage notification and backup point events, including user feedback through modals.
- Updated navigation to use `PointsNavBar` for a more cohesive user experience.
- Introduced new utility functions for managing incoming points and point event records.

* update lock

* update lock and project settings

* fix line height for android

* save wip referral message fix and deeplink setup

* Fix whatsapp link (#1352)

* add 2 new lines

* use path based param instead of query string

* use staging url for now

* SELF-1089: Fix black screen on Points (#1351)

* Fix black screen on Points

* Fix: black screen on Referral Page

* fix: prevent BlurView from displaying when IdDetailsScreen loses focus

* Fix Android message share (#1355)

* Referral flow (#1354)

* SELF-1139: update getUserAddress() (#1353)

* update getUserAddress()

* rename getUserAddress to getPointsAddress

* [SELF-1098, SELF-1099] polish gratification screen post referrer update history (#1356)

* fix: mark document as registered after restoring secret (#1350)

* update lock

* create useRegisterReferral hook and test

* add referral message test

* save wip register referral flow request

* use register referral from the home screen

* fix typing and sort screens

* fix linting issues

* register poitns and update tests

* use package

* fix tests

* simplify HomeScreen with hooks

* fix tests

* address tests

* abstract points logic, fix types and linting

* add test referral flow hook

* coderabbit feedback: fix refereral logic issues, remove sensitive logs

* move test referral flow button to dev settings screen

* close modal after referring and viewing gratification screen

* fix tests, remove alert, format

---------

Co-authored-by: Seshanth.S <[email protected]>

* add gratification bg; use safe bottom padding hook on home screen

* prep 2.7.4 as 2.9.0

* manually bump version for custom deploy

* match version code

* fix types

* formatting

* fix tests

* SELF-1144 - use real points on home screen and improve points screen (#1361)

* fix whitespace

* move effects for fetching points and incoming points to hooks, add items to deps array so that they refresh when we expect points to change.

* cleanup

* Add events for new Points Flow (#1362)

* remove deeplinkCallback from pointsSelfApp. (#1365)

* fix pipelines

* SELF-978: wire cloudbackup with points (#1360)

* wire cloudbackup with points

* wire cloudbackup with points

* Remove redundant setSelfPoints()

* add signature and simplify POST api requests (#1367)

* add signature and simplify POST api requests

* better gitleaks ignore

* update toml

* have gitguardian ignore gitleaks

* add buffer lib

* update api with 202 success code

* update scope and contract-address (#1366)

* fix navigation test

* SELF-915: Setup and add turnkey utils (#1314)

* Setup and add turnkey utils

* update CloudBackupScreen

* fix: turnkey

* add yarn.lock

* lint

* add podfile.lock

* fix deeplink

* fix tests: mock turnkey

* yarn nice

* update .gitleaksignore

* patch react-native-svg

* fix patch-package

* fix lineHeight

* points.tsx: fix lineHeight

* fix: recover with turnkey disabled state

* fix turnkey flow

* fix: address generation

* minify animations (#1368)

* fix pipelines

* fix false positives

* fix gitguardian

---------

Co-authored-by: Justin Hernandez <[email protected]>

* enable turnkey only on success

* use prod url

* fix tests and update mocks

* update version and fastlane readme

* pointsSelfApp: update scope

* bump android version to 117

* incremenet timestamp

* abstract points css, hide explore button for now, add points guardrail

* better logic

* simplify point event list data acquisition (#1375)

* simplify point event list data acquisition

* explain

* Remove BlurView in Points.tsx

* Move Points and IncomingPoints to the Point Events Store (#1363)


* add polling for event processing.
atomically update store state

* handle failed states and use real backend api


* improve concurrency reliability of pointevents

* move points to the store


* refresh all points on pull

* add points tracking events

* fix imports

* fix headers

* fix import

* fix misspelling

* enable apps link

* remove __DEV__ logging

* remove additional referall dev mode features

* Add turnkey env

* don't allow users to refer themselves

* prettier

* trim both addresses

* fix close webview button

* fix tests and format

* lint and format

* Update point rewards in NavBar component: change earned points from 20 to 44 and from 100 to 32.

* Refactor point rewards in NavBar component: replace hardcoded values with constants for backup and notification points, and update subscription state variable names for clarity.

* Update POINT_VALUES in types.ts: adjust point rewards for disclosure, notification, and backup events to 8, 44, and 32 respectively.

* App/fix backup points (#1381)

* Enhance backup completion tracking in Points component: Introduce a ref to manage backup check flag, ensuring points are recorded only when explicitly set, preventing false triggers from other navigation flows.

* Update API endpoint in getTotalPoints function: change URL from /distribution to /points for accurate points retrieval.

* formatting

* update points url

* Clear referrer on modal dismiss in useEarnPointsFlow hook to prevent retry loop

* use points private key to sign api requests

* formatting

* save working version of referral confirmation

* fix circular dependency

* don't fetch private key if unable to fetch points key

* add url

* add debug info

* Refactor optimistic points calculation in usePointEventStore: update return value to only include incomingPoints.amount, marking the optimistic approach for future improvement.

* save clean up

* clean useReferralConfirmation logic

* fix tests

* tests pass

* standardize android compile sdk version

* fix package version

* don't log errors

* Update app/src/hooks/useReferralConfirmation.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* better test

* add turnkey entitlements

* fix linting

* remove entitlements

* prettier and fix lint

* update gradle version

* update lock file

* fix tests

* fix build failure

* bump android version to 118

* update date

* bump version for next build

* address failing pipelines due to cache issues

* Hide turnkey button (#1387)

* prep for 2.9.0 release

* fix mobile e2e test

* fix tests

* bump android version

---------

Co-authored-by: Justin Hernandez <[email protected]>
Co-authored-by: Seshanth.S <[email protected]>
Co-authored-by: Leszek Stachowski <[email protected]>
Co-authored-by: Aaron DeRuvo <[email protected]>
Co-authored-by: seshanthS <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
transphorm added a commit that referenced this pull request Nov 12, 2025
* 2.9 release

* 2.9 release

* Remove debug console logs from generateTEEInputsRegister function in registerInputs.ts

* parse only the passport data during the dsc step

* Add ReferralScreen and integrate referral functionality
- Introduced ReferralScreen for sharing referral links via messages, WhatsApp, and clipboard.
- Updated navigation to include ReferralScreen in the home stack.
- Added new icons for sharing and messaging.
- Enhanced points utility functions to check user identity document registration and points disclosure status.
- Minor adjustments to existing components for better integration with the new referral feature.

* fix types

* fix font

* fix vertical spacing

* save current abstraction

* clean up linking

* clean up spurious ai slop comments

* add dinot bold font

* minify animations

* update fonts and add placeholder animation

* fix pipelines

* fix order

* Update dependencies and enhance Points component functionality
- Added `@react-native-masked-view/masked-view` and `react-native-linear-gradient` to dependencies for improved UI components.
- Refactored `PointHistoryList` to accept `ListHeaderComponent` and `onRefreshRef` props for better integration with parent components.
- Enhanced `Points` component to manage notification and backup point events, including user feedback through modals.
- Updated navigation to use `PointsNavBar` for a more cohesive user experience.
- Introduced new utility functions for managing incoming points and point event records.

* update lock

* update lock and project settings

* fix line height for android

* save wip referral message fix and deeplink setup

* Fix whatsapp link (#1352)

* add 2 new lines

* use path based param instead of query string

* use staging url for now

* SELF-1089: Fix black screen on Points (#1351)

* Fix black screen on Points

* Fix: black screen on Referral Page

* fix: prevent BlurView from displaying when IdDetailsScreen loses focus

* Fix Android message share (#1355)

* Referral flow (#1354)

* SELF-1139: update getUserAddress() (#1353)

* update getUserAddress()

* rename getUserAddress to getPointsAddress

* [SELF-1098, SELF-1099] polish gratification screen post referrer update history (#1356)

* fix: mark document as registered after restoring secret (#1350)

* update lock

* create useRegisterReferral hook and test

* add referral message test

* save wip register referral flow request

* use register referral from the home screen

* fix typing and sort screens

* fix linting issues

* register poitns and update tests

* use package

* fix tests

* simplify HomeScreen with hooks

* fix tests

* address tests

* abstract points logic, fix types and linting

* add test referral flow hook

* coderabbit feedback: fix refereral logic issues, remove sensitive logs

* move test referral flow button to dev settings screen

* close modal after referring and viewing gratification screen

* fix tests, remove alert, format

---------

Co-authored-by: Seshanth.S <[email protected]>

* add gratification bg; use safe bottom padding hook on home screen

* prep 2.7.4 as 2.9.0

* manually bump version for custom deploy

* match version code

* fix types

* formatting

* fix tests

* SELF-1144 - use real points on home screen and improve points screen (#1361)

* fix whitespace

* move effects for fetching points and incoming points to hooks, add items to deps array so that they refresh when we expect points to change.

* cleanup

* Add events for new Points Flow (#1362)

* remove deeplinkCallback from pointsSelfApp. (#1365)

* fix pipelines

* SELF-978: wire cloudbackup with points (#1360)

* wire cloudbackup with points

* wire cloudbackup with points

* Remove redundant setSelfPoints()

* add signature and simplify POST api requests (#1367)

* add signature and simplify POST api requests

* better gitleaks ignore

* update toml

* have gitguardian ignore gitleaks

* add buffer lib

* update api with 202 success code

* update scope and contract-address (#1366)

* fix navigation test

* SELF-915: Setup and add turnkey utils (#1314)

* Setup and add turnkey utils

* update CloudBackupScreen

* fix: turnkey

* add yarn.lock

* lint

* add podfile.lock

* fix deeplink

* fix tests: mock turnkey

* yarn nice

* update .gitleaksignore

* patch react-native-svg

* fix patch-package

* fix lineHeight

* points.tsx: fix lineHeight

* fix: recover with turnkey disabled state

* fix turnkey flow

* fix: address generation

* minify animations (#1368)

* fix pipelines

* fix false positives

* fix gitguardian

---------

Co-authored-by: Justin Hernandez <[email protected]>

* enable turnkey only on success

* use prod url

* fix tests and update mocks

* update version and fastlane readme

* pointsSelfApp: update scope

* bump android version to 117

* incremenet timestamp

* abstract points css, hide explore button for now, add points guardrail

* better logic

* simplify point event list data acquisition (#1375)

* simplify point event list data acquisition

* explain

* Remove BlurView in Points.tsx

* Move Points and IncomingPoints to the Point Events Store (#1363)


* add polling for event processing.
atomically update store state

* handle failed states and use real backend api


* improve concurrency reliability of pointevents

* move points to the store


* refresh all points on pull

* add points tracking events

* fix imports

* fix headers

* fix import

* fix misspelling

* enable apps link

* remove __DEV__ logging

* remove additional referall dev mode features

* Add turnkey env

* don't allow users to refer themselves

* prettier

* trim both addresses

* fix close webview button

* fix tests and format

* lint and format

* Update point rewards in NavBar component: change earned points from 20 to 44 and from 100 to 32.

* Refactor point rewards in NavBar component: replace hardcoded values with constants for backup and notification points, and update subscription state variable names for clarity.

* Update POINT_VALUES in types.ts: adjust point rewards for disclosure, notification, and backup events to 8, 44, and 32 respectively.

* App/fix backup points (#1381)

* Enhance backup completion tracking in Points component: Introduce a ref to manage backup check flag, ensuring points are recorded only when explicitly set, preventing false triggers from other navigation flows.

* Update API endpoint in getTotalPoints function: change URL from /distribution to /points for accurate points retrieval.

* formatting

* update points url

* Clear referrer on modal dismiss in useEarnPointsFlow hook to prevent retry loop

* use points private key to sign api requests

* formatting

* save working version of referral confirmation

* fix circular dependency

* don't fetch private key if unable to fetch points key

* add url

* add debug info

* Refactor optimistic points calculation in usePointEventStore: update return value to only include incomingPoints.amount, marking the optimistic approach for future improvement.

* save clean up

* clean useReferralConfirmation logic

* fix tests

* tests pass

* standardize android compile sdk version

* fix package version

* don't log errors

* Update app/src/hooks/useReferralConfirmation.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* better test

* add turnkey entitlements

* fix linting

* remove entitlements

* prettier and fix lint

* update gradle version

* update lock file

* fix tests

* fix build failure

* bump android version to 118

* update date

* bump version for next build

* address failing pipelines due to cache issues

* Hide turnkey button (#1387)

* prep for 2.9.0 release

* patch turnkey to prevent keychain deletes

* add yarn.lock

* update yarn.lock

* enable buttons

* remove console logging from patch

* fix test

* skip tests

* fix test

* allow users to advance if they backup via turnkey

* Recognize Turnkey backups in onboarding (#1394)

* rename var

* update var name

* remove transform

* simplify tests to avoid oom issues

* fix check

* fix tests

---------

Co-authored-by: turnoffthiscomputer <[email protected]>
Co-authored-by: Justin Hernandez <[email protected]>
Co-authored-by: Leszek Stachowski <[email protected]>
Co-authored-by: Aaron DeRuvo <[email protected]>
Co-authored-by: turnoffthiscomputer <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
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.

3 participants