Skip to content

Conversation

@gugell
Copy link
Contributor

@gugell gugell commented Dec 3, 2025

Description

This pull request refactors several core modules and tests in the mobile codebase to improve maintainability, modularity, and testability. The most significant changes include replacing direct imports and usage of API/cache clients with injected client interfaces, updating test mocks to use these interfaces, and moving shared types to a common location. Additionally, there are improvements to VSCode and ESLint settings for developer experience.

API Client Refactoring and Test Improvements

  • Refactored WatchlistService and related tests to use an injectable WatchListClient interface instead of direct imports, improving testability and modularity. Test mocks now instantiate WatchlistService with a mock client and update all relevant assertions and setups. [1] [2] [3] [4] [5] [6] [7] [8] [9]

  • Updated TokenService and related tests to use the new watchListClient API for price and trending token data, replacing the previous watchListCacheClient import and usage. [1] [2] [3] [4] [5] [6]

Type and Schema Consolidation

  • Removed the TrendingToken schema and type from services/token/types.ts, updating all imports to use utils/api/types for shared type definitions. [1] [2] [3] [4]

Service Refactoring

  • Refactored EarnService to use the new glacierApiClient for listing primary network transactions, simplifying the implementation and removing unnecessary manual pagination logic. [1] [2]

Developer Experience Improvements

  • Updated .vscode/settings.json to enable format on save and organize/fix imports and lint errors automatically.
  • Updated ESLint ignore patterns to exclude generated files for cleaner linting.

Testing Utilities

  • Added a Jest mock for react-native-nitro-fetch to support testing modules that depend on it.

Testing

Dev Testing (if applicable)

  • Provide steps to test the happy path of your feature
  • Provide steps to test edge cases and error states
  • Trigger a build on bitrise and reference it here
  • Move the ticket into the "Testing" column on Jira

QA Testing (if applicable)

  • Provide instructions for QA to test this feature thoroughly
  • State expected behavior / acceptance criteria

Checklist

Please check all that apply (if applicable)

  • I have performed a self-review of my code
  • I have verified the code works
  • I have included screenshots / videos of android and ios
  • I have added testing steps
  • I have added/updated necessary unit tests
  • I have updated the documentation

Szymon20000 and others added 30 commits November 4, 2025 22:14
# Conflicts:
#	yarn.lock

fix set problems

stash work

# Conflicts:
#	yarn.lock

stash work

# Conflicts:
#	packages/core-mobile/index.js

performance tracking

# Conflicts:
#	yarn.lock

stash work

make it more solid

fix patch for ios

update sentry

fix patches
# Conflicts:
#	packages/core-mobile/android/app/src/main/AndroidManifest.xml
#	yarn.lock
@gugell gugell force-pushed the @gugell/feature/openapi-nitro-fetch branch 2 times, most recently from 31e198d to 9758d1e Compare December 3, 2025 22:07
@gugell gugell force-pushed the @gugell/feature/openapi-nitro-fetch branch from 9758d1e to fb95fe1 Compare December 3, 2025 22:11
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.

2 participants