-
Notifications
You must be signed in to change notification settings - Fork 13
Integrate with react-native-nitro-fetch + openapi-fetch #3393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
gugell
wants to merge
57
commits into
ava-labs:main
Choose a base branch
from
gugell:@gugell/feature/openapi-nitro-fetch
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+20,567
−326
Conversation
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
# 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
# Conflicts: # yarn.lock
# Conflicts: # yarn.lock
# Conflicts: # packages/core-mobile/package.json # packages/react-native-nitro-avalabs-crypto/.eslintrc.js # packages/react-native-nitro-avalabs-crypto/package.json # packages/react-native-nitro-avalabs-crypto/src/Crypto.ts # packages/react-native-nitro-avalabs-crypto/tsconfig.json # yarn.lock
31e198d to
9758d1e
Compare
9758d1e to
fb95fe1
Compare
# Conflicts: # packages/core-mobile/.eslintrc.js # packages/core-mobile/app/services/earn/EarnService.ts # packages/core-mobile/package.json
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.
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
WatchlistServiceand related tests to use an injectableWatchListClientinterface instead of direct imports, improving testability and modularity. Test mocks now instantiateWatchlistServicewith a mock client and update all relevant assertions and setups. [1] [2] [3] [4] [5] [6] [7] [8] [9]Updated
TokenServiceand related tests to use the newwatchListClientAPI for price and trending token data, replacing the previouswatchListCacheClientimport and usage. [1] [2] [3] [4] [5] [6]Type and Schema Consolidation
TrendingTokenschema and type fromservices/token/types.ts, updating all imports to useutils/api/typesfor shared type definitions. [1] [2] [3] [4]Service Refactoring
EarnServiceto use the newglacierApiClientfor listing primary network transactions, simplifying the implementation and removing unnecessary manual pagination logic. [1] [2]Developer Experience Improvements
.vscode/settings.jsonto enable format on save and organize/fix imports and lint errors automatically.Testing Utilities
react-native-nitro-fetchto support testing modules that depend on it.Testing
Dev Testing (if applicable)
QA Testing (if applicable)
Checklist
Please check all that apply (if applicable)