Skip to content

Conversation

@islandbitcoin
Copy link
Contributor

Key Changes

  1. GraphQL Mutations Added
  • newUserEmailRegistrationInitiate - Initiates email registration by sending a code
  • newUserEmailRegistrationValidate - Validates the email code and returns auth token
  1. Email Login Screens Refactored
  • email-login-initiate.tsx:
    • Migrated from axios to GraphQL mutation
    • Added Firebase Crashlytics error tracking
    • Removed useAppConfig dependency for auth URL
    • Improved error handling for rate limiting
  • email-login-validate.tsx:
    • Migrated from axios to GraphQL mutation
    • Added Crashlytics error tracking
    • Handles TOTP flow if 2FA is enabled
    • Better error messages for invalid codes and rate limiting
  1. Code Quality Improvements
  • Removed unused useEffect import
  • Fixed parameter naming consistency (emailFlowId throughout)
  • Removed commented localhost URL from codegen.yml
  • Uses existing translation keys from LL.errors instead of creating new ones
  1. Technical Details
  • Generated GraphQL types for type safety
  • Proper error handling with specific error codes (TOO_MANY_REQUEST, INVALID_CODE)
  • Analytics tracking for successful email login
  • Navigation flow: Initiate → Validate → (TOTP if required) → Home

Files Modified

  • app/screens/email-login-screen/email-login-initiate.tsx
  • app/screens/email-login-screen/email-login-validate.tsx
  • app/navigation/stack-param-lists.ts
  • codegen.yml
  • app/graphql/generated.gql (auto-generated)
  • app/graphql/generated.ts (auto-generated)

…nality, replacing the previous axios-based implementation.

  Key Changes

  1. GraphQL Mutations Added
  - newUserEmailRegistrationInitiate - Initiates email registration by sending a code
  - newUserEmailRegistrationValidate - Validates the email code and returns auth token

  2. Email Login Screens Refactored
  - email-login-initiate.tsx:
    - Migrated from axios to GraphQL mutation
    - Added Firebase Crashlytics error tracking
    - Removed useAppConfig dependency for auth URL
    - Improved error handling for rate limiting
  - email-login-validate.tsx:
    - Migrated from axios to GraphQL mutation
    - Added Crashlytics error tracking
    - Handles TOTP flow if 2FA is enabled
    - Better error messages for invalid codes and rate limiting

  3. Code Quality Improvements
  - Removed unused useEffect import
  - Fixed parameter naming consistency (emailFlowId throughout)
  - Removed commented localhost URL from codegen.yml
  - Uses existing translation keys from LL.errors instead of creating new ones

  4. Technical Details
  - Generated GraphQL types for type safety
  - Proper error handling with specific error codes (TOO_MANY_REQUEST, INVALID_CODE)
  - Analytics tracking for successful email login
  - Navigation flow: Initiate → Validate → (TOTP if required) → Home

  Files Modified

  - app/screens/email-login-screen/email-login-initiate.tsx
  - app/screens/email-login-screen/email-login-validate.tsx
  - app/navigation/stack-param-lists.ts
  - codegen.yml
  - app/graphql/generated.gql (auto-generated)
  - app/graphql/generated.ts (auto-generated)
@islandbitcoin islandbitcoin self-assigned this Sep 17, 2025
@islandbitcoin islandbitcoin added the enhancement New feature or request label Sep 17, 2025
@Nodirbek75
Copy link
Contributor

Need to update the Email card description:
Import or Create your Cash wallet using email address

Screenshot_1758138576

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

Labels

enhancement New feature or request Waiting on backend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants