fix: uses a separate consoleApiHttpClient for public access#1719
fix: uses a separate consoleApiHttpClient for public access#1719
Conversation
|
""" WalkthroughThe changes systematically replace the use of Changes
Sequence Diagram(s)sequenceDiagram
participant ReactHook
participant Services
participant publicConsoleApiHttpClient
participant API
ReactHook->>Services: useServices()
Services-->>ReactHook: { publicConsoleApiHttpClient }
ReactHook->>publicConsoleApiHttpClient: get(endpoint)
publicConsoleApiHttpClient->>API: HTTP GET request
API-->>publicConsoleApiHttpClient: Response
publicConsoleApiHttpClient-->>ReactHook: Data
Estimated code review effort2 (~15 minutes) Possibly related PRs
Suggested reviewers
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
npm error Exit handler never called! 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (9)
✅ Files skipped from review due to trivial changes (2)
🚧 Files skipped from review as they are similar to previous changes (7)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found. ❌ Your patch status has failed because the patch coverage (20.00%) is below the target coverage (50.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #1719 +/- ##
==========================================
- Coverage 72.40% 72.26% -0.14%
==========================================
Files 607 602 -5
Lines 14178 14011 -167
Branches 2404 2390 -14
==========================================
- Hits 10265 10125 -140
+ Misses 3592 3566 -26
+ Partials 321 320 -1
*This pull request uses carry forward flags. Click here to find out more.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
apps/deploy-web/src/queries/useMarketData.spec.tsx (1)
21-26: Consider renaming the mock variable for consistency.The service key change is correct, but the mock variable name
consoleApiHttpClientdoesn't match the service it's mocking (publicConsoleApiHttpClient). Consider renaming for better clarity.- const consoleApiHttpClient = mock<AxiosInstance>(); - consoleApiHttpClient.get.mockResolvedValue({ data: mockData }); + const publicConsoleApiHttpClient = mock<AxiosInstance>(); + publicConsoleApiHttpClient.get.mockResolvedValue({ data: mockData }); const { result } = setup({ services: { - publicConsoleApiHttpClient: () => consoleApiHttpClient + publicConsoleApiHttpClient: () => publicConsoleApiHttpClient } }); await waitFor(() => { - expect(consoleApiHttpClient.get).toHaveBeenCalledWith(ApiUrlService.marketData()); + expect(publicConsoleApiHttpClient.get).toHaveBeenCalledWith(ApiUrlService.marketData());apps/deploy-web/src/queries/featureFlags.ts (1)
28-31: Consider renaming parameter for consistency and verify URL construction pattern.The parameter name
consoleApiHttpClientshould be updated topublicConsoleApiHttpClientto match the actual client being passed. Also, this file uses a different URL construction pattern (relative path + baseURL option) compared to other updated files that use full URLs.Apply this diff to rename the parameter:
-export async function getFeatureFlags(networkId: NetworkId, consoleApiHttpClient: AxiosInstance, apiUrlService: ApiUrlService) { +export async function getFeatureFlags(networkId: NetworkId, publicConsoleApiHttpClient: AxiosInstance, apiUrlService: ApiUrlService) { - const response = await consoleApiHttpClient.get<{ data: Features }>("/v1/features", { + const response = await publicConsoleApiHttpClient.get<{ data: Features }>("/v1/features", {
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (9)
apps/deploy-web/src/components/providers/ProviderRawData/ProviderRawData.spec.tsx(3 hunks)apps/deploy-web/src/pages/api/auth/[...auth0].ts(1 hunks)apps/deploy-web/src/queries/featureFlags.ts(2 hunks)apps/deploy-web/src/queries/useBlocksQuery.ts(1 hunks)apps/deploy-web/src/queries/useGpuQuery.ts(1 hunks)apps/deploy-web/src/queries/useMarketData.spec.tsx(1 hunks)apps/deploy-web/src/queries/useMarketData.ts(1 hunks)apps/deploy-web/src/queries/useProvidersQuery.ts(4 hunks)apps/deploy-web/src/services/http/http-browser.service.ts(1 hunks)
📓 Path-based instructions (4)
**/*.{ts,tsx}
📄 CodeRabbit Inference Engine (.cursor/rules/general.mdc)
Never use type any or cast to type any. Always define the proper TypeScript types.
Files:
apps/deploy-web/src/queries/useBlocksQuery.tsapps/deploy-web/src/queries/useProvidersQuery.tsapps/deploy-web/src/queries/useMarketData.tsapps/deploy-web/src/queries/useMarketData.spec.tsxapps/deploy-web/src/pages/api/auth/[...auth0].tsapps/deploy-web/src/services/http/http-browser.service.tsapps/deploy-web/src/components/providers/ProviderRawData/ProviderRawData.spec.tsxapps/deploy-web/src/queries/useGpuQuery.tsapps/deploy-web/src/queries/featureFlags.ts
**/*.{js,jsx,ts,tsx}
📄 CodeRabbit Inference Engine (.cursor/rules/general.mdc)
**/*.{js,jsx,ts,tsx}: Never use deprecated methods from libraries.
Don't add unnecessary comments to the code
Files:
apps/deploy-web/src/queries/useBlocksQuery.tsapps/deploy-web/src/queries/useProvidersQuery.tsapps/deploy-web/src/queries/useMarketData.tsapps/deploy-web/src/queries/useMarketData.spec.tsxapps/deploy-web/src/pages/api/auth/[...auth0].tsapps/deploy-web/src/services/http/http-browser.service.tsapps/deploy-web/src/components/providers/ProviderRawData/ProviderRawData.spec.tsxapps/deploy-web/src/queries/useGpuQuery.tsapps/deploy-web/src/queries/featureFlags.ts
**/*.spec.{ts,tsx}
📄 CodeRabbit Inference Engine (.cursor/rules/no-jest-mock.mdc)
Don't use
jest.mock()to mock dependencies in test files. Instead, usejest-mock-extendedto create mocks and pass mocks as dependencies to the service under test.
**/*.spec.{ts,tsx}: Usesetupfunction instead ofbeforeEachin test files
setupfunction must be at the bottom of the rootdescribeblock in test files
setupfunction creates an object under test and returns it
setupfunction should accept a single parameter with inline type definition
Don't use shared state insetupfunction
Don't specify return type ofsetupfunction
Files:
apps/deploy-web/src/queries/useMarketData.spec.tsxapps/deploy-web/src/components/providers/ProviderRawData/ProviderRawData.spec.tsx
apps/{deploy-web,provider-console}/**/*.spec.tsx
📄 CodeRabbit Inference Engine (.cursor/rules/query-by-in-tests.mdc)
Use
queryBymethods instead ofgetBymethods in test expectations in.spec.tsxfiles
Files:
apps/deploy-web/src/queries/useMarketData.spec.tsxapps/deploy-web/src/components/providers/ProviderRawData/ProviderRawData.spec.tsx
🧠 Learnings (9)
📓 Common learnings
Learnt from: jzsfkzm
PR: akash-network/console#1372
File: apps/api/src/transaction/services/transaction/transaction.service.ts:13-15
Timestamp: 2025-05-28T20:10:28.008Z
Learning: In the Akash Network console API, input validation is preferably handled at the schema level rather than in service methods to maintain clean separation of concerns and consistent validation across endpoints.
Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use `queryBy` methods instead of `getBy` methods in test expectations in `.spec.tsx` files
Learnt from: baktun14
PR: akash-network/console#1428
File: apps/api/src/deployment/controllers/deployment/deployment.controller.ts:0-0
Timestamp: 2025-06-03T15:06:34.211Z
Learning: The `getByOwnerAndDseq` method in `apps/api/src/deployment/controllers/deployment/deployment.controller.ts` is intentionally public without the `@Protected` decorator because it serves public blockchain data from an indexer, following the pattern of public blockchain APIs.
Learnt from: jzsfkzm
PR: akash-network/console#1372
File: apps/api/src/dashboard/services/stats/stats.service.ts:0-0
Timestamp: 2025-05-28T20:42:58.200Z
Learning: The user successfully implemented CosmosHttpService with retry logic using axiosRetry, exponential backoff, and proper error handling for Cosmos API calls, replacing direct axios usage in StatsService.
Learnt from: stalniy
PR: akash-network/console#1660
File: apps/deploy-web/src/components/alerts/DeploymentAlertsContainer/DeploymentAlertsContainer.spec.tsx:54-56
Timestamp: 2025-07-11T10:46:43.711Z
Learning: In apps/{deploy-web,provider-console}/**/*.spec.tsx files: Use `getBy` methods instead of `queryBy` methods when testing element presence with `toBeInTheDocument()` because `getBy` throws an error and shows DOM state when element is not found, providing better debugging information than `queryBy` which returns null.
apps/deploy-web/src/queries/useBlocksQuery.ts (4)
Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files
Learnt from: stalniy
PR: #1660
File: apps/deploy-web/src/components/alerts/DeploymentAlertsContainer/DeploymentAlertsContainer.spec.tsx:54-56
Timestamp: 2025-07-11T10:46:43.711Z
Learning: In apps/{deploy-web,provider-console}/**/*.spec.tsx files: Use getBy methods instead of queryBy methods when testing element presence with toBeInTheDocument() because getBy throws an error and shows DOM state when element is not found, providing better debugging information than queryBy which returns null.
Learnt from: baktun14
PR: #1428
File: apps/api/src/deployment/controllers/deployment/deployment.controller.ts:0-0
Timestamp: 2025-06-03T15:06:34.211Z
Learning: The getByOwnerAndDseq method in apps/api/src/deployment/controllers/deployment/deployment.controller.ts is intentionally public without the @Protected decorator because it serves public blockchain data from an indexer, following the pattern of public blockchain APIs.
Learnt from: jzsfkzm
PR: #1372
File: apps/api/src/dashboard/services/stats/stats.service.ts:0-0
Timestamp: 2025-05-28T20:42:58.200Z
Learning: The user successfully implemented CosmosHttpService with retry logic using axiosRetry, exponential backoff, and proper error handling for Cosmos API calls, replacing direct axios usage in StatsService.
apps/deploy-web/src/queries/useProvidersQuery.ts (4)
Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files
Learnt from: stalniy
PR: #1660
File: apps/deploy-web/src/components/alerts/DeploymentAlertsContainer/DeploymentAlertsContainer.spec.tsx:54-56
Timestamp: 2025-07-11T10:46:43.711Z
Learning: In apps/{deploy-web,provider-console}/**/*.spec.tsx files: Use getBy methods instead of queryBy methods when testing element presence with toBeInTheDocument() because getBy throws an error and shows DOM state when element is not found, providing better debugging information than queryBy which returns null.
Learnt from: baktun14
PR: #1428
File: apps/api/src/deployment/controllers/deployment/deployment.controller.ts:0-0
Timestamp: 2025-06-03T15:06:34.211Z
Learning: The getByOwnerAndDseq method in apps/api/src/deployment/controllers/deployment/deployment.controller.ts is intentionally public without the @Protected decorator because it serves public blockchain data from an indexer, following the pattern of public blockchain APIs.
Learnt from: jzsfkzm
PR: #1372
File: apps/api/src/dashboard/services/stats/stats.service.ts:0-0
Timestamp: 2025-05-28T20:42:58.200Z
Learning: The user successfully implemented CosmosHttpService with retry logic using axiosRetry, exponential backoff, and proper error handling for Cosmos API calls, replacing direct axios usage in StatsService.
apps/deploy-web/src/queries/useMarketData.ts (2)
Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files
Learnt from: baktun14
PR: #1428
File: apps/api/src/deployment/controllers/deployment/deployment.controller.ts:0-0
Timestamp: 2025-06-03T15:06:34.211Z
Learning: The getByOwnerAndDseq method in apps/api/src/deployment/controllers/deployment/deployment.controller.ts is intentionally public without the @Protected decorator because it serves public blockchain data from an indexer, following the pattern of public blockchain APIs.
apps/deploy-web/src/queries/useMarketData.spec.tsx (9)
Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files
Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/no-jest-mock.mdc:0-0
Timestamp: 2025-07-21T08:24:24.269Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use jest.mock() to mock dependencies in test files. Instead, use jest-mock-extended to create mocks and pass mocks as dependencies to the service under test.
Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Use setup function instead of beforeEach in test files
Learnt from: stalniy
PR: #1660
File: apps/deploy-web/src/components/alerts/DeploymentAlertsContainer/DeploymentAlertsContainer.spec.tsx:54-56
Timestamp: 2025-07-11T10:46:43.711Z
Learning: In apps/{deploy-web,provider-console}/**/*.spec.tsx files: Use getBy methods instead of queryBy methods when testing element presence with toBeInTheDocument() because getBy throws an error and shows DOM state when element is not found, providing better debugging information than queryBy which returns null.
Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use shared state in setup function
Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't specify return type of setup function
Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function creates an object under test and returns it
Learnt from: jzsfkzm
PR: #1372
File: apps/api/src/dashboard/services/stats/stats.service.ts:0-0
Timestamp: 2025-05-28T20:42:58.200Z
Learning: The user successfully implemented CosmosHttpService with retry logic using axiosRetry, exponential backoff, and proper error handling for Cosmos API calls, replacing direct axios usage in StatsService.
Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function should accept a single parameter with inline type definition
apps/deploy-web/src/services/http/http-browser.service.ts (6)
Learnt from: baktun14
PR: #1428
File: apps/api/src/deployment/controllers/deployment/deployment.controller.ts:0-0
Timestamp: 2025-06-03T15:06:34.211Z
Learning: The getByOwnerAndDseq method in apps/api/src/deployment/controllers/deployment/deployment.controller.ts is intentionally public without the @Protected decorator because it serves public blockchain data from an indexer, following the pattern of public blockchain APIs.
Learnt from: jzsfkzm
PR: #1372
File: apps/api/src/dashboard/services/stats/stats.service.ts:0-0
Timestamp: 2025-05-28T20:42:58.200Z
Learning: The user successfully implemented CosmosHttpService with retry logic using axiosRetry, exponential backoff, and proper error handling for Cosmos API calls, replacing direct axios usage in StatsService.
Learnt from: jzsfkzm
PR: #1364
File: apps/api/src/provider/routes/provider-deployments/provider-deployments.router.ts:38-44
Timestamp: 2025-05-25T19:37:00.800Z
Learning: The Akash Console API uses centralized error handling through the OpenApiHonoHandler's defaultHook, which automatically processes errors via HonoErrorHandlerService. Individual route handlers do not use explicit try-catch blocks and instead rely on this framework-level error handling mechanism.
Learnt from: stalniy
PR: #1353
File: apps/deploy-web/src/config/browser-env.config.ts:0-0
Timestamp: 2025-05-22T14:25:01.336Z
Learning: For the __AK_INJECTED_CONFIG__ global window property in the Akash Network Console, security is handled through cryptographic signature verification using a public key rather than property protection mechanisms like Object.defineProperty.
Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/general.mdc:0-0
Timestamp: 2025-07-21T08:24:19.412Z
Learning: Applies to **/*.{js,jsx,ts,tsx} : Never use deprecated methods from libraries.
Learnt from: ygrishajev
PR: #1461
File: apps/notifications/src/modules/alert/services/deployment-alert/deployment-alert.service.ts:194-197
Timestamp: 2025-06-10T14:19:14.122Z
Learning: The alert.CONSOLE_WEB_URL environment variable in the notifications app is controlled and configured by the Akash team, reducing XSS concerns for HTML link generation in alert messages.
apps/deploy-web/src/components/providers/ProviderRawData/ProviderRawData.spec.tsx (9)
Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files
Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/no-jest-mock.mdc:0-0
Timestamp: 2025-07-21T08:24:24.269Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use jest.mock() to mock dependencies in test files. Instead, use jest-mock-extended to create mocks and pass mocks as dependencies to the service under test.
Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function creates an object under test and returns it
Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Use setup function instead of beforeEach in test files
Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function should accept a single parameter with inline type definition
Learnt from: stalniy
PR: #1436
File: apps/api/src/provider/repositories/provider/provider.repository.ts:79-90
Timestamp: 2025-06-08T03:07:13.871Z
Learning: The getProvidersHostUriByAttributes method in apps/api/src/provider/repositories/provider/provider.repository.ts already has comprehensive test coverage in provider.repository.spec.ts, including tests for complex HAVING clause logic with COUNT(*) FILTER (WHERE ...) syntax, signature conditions (anyOf/allOf), and glob pattern matching.
Learnt from: stalniy
PR: #1660
File: apps/deploy-web/src/components/alerts/DeploymentAlertsContainer/DeploymentAlertsContainer.spec.tsx:54-56
Timestamp: 2025-07-11T10:46:43.711Z
Learning: In apps/{deploy-web,provider-console}/**/*.spec.tsx files: Use getBy methods instead of queryBy methods when testing element presence with toBeInTheDocument() because getBy throws an error and shows DOM state when element is not found, providing better debugging information than queryBy which returns null.
Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use shared state in setup function
Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't specify return type of setup function
apps/deploy-web/src/queries/useGpuQuery.ts (2)
Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files
Learnt from: stalniy
PR: #1660
File: apps/deploy-web/src/components/alerts/DeploymentAlertsContainer/DeploymentAlertsContainer.spec.tsx:54-56
Timestamp: 2025-07-11T10:46:43.711Z
Learning: In apps/{deploy-web,provider-console}/**/*.spec.tsx files: Use getBy methods instead of queryBy methods when testing element presence with toBeInTheDocument() because getBy throws an error and shows DOM state when element is not found, providing better debugging information than queryBy which returns null.
apps/deploy-web/src/queries/featureFlags.ts (3)
Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files
Learnt from: stalniy
PR: #1660
File: apps/deploy-web/src/components/alerts/DeploymentAlertsContainer/DeploymentAlertsContainer.spec.tsx:54-56
Timestamp: 2025-07-11T10:46:43.711Z
Learning: In apps/{deploy-web,provider-console}/**/*.spec.tsx files: Use getBy methods instead of queryBy methods when testing element presence with toBeInTheDocument() because getBy throws an error and shows DOM state when element is not found, providing better debugging information than queryBy which returns null.
Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/general.mdc:0-0
Timestamp: 2025-07-21T08:24:19.412Z
Learning: Applies to **/*.{js,jsx,ts,tsx} : Never use deprecated methods from libraries.
🧬 Code Graph Analysis (6)
apps/deploy-web/src/queries/useBlocksQuery.ts (2)
apps/deploy-web/src/context/ServicesProvider/ServicesProvider.tsx (1)
useServices(28-30)apps/deploy-web/src/utils/apiUtils.ts (1)
ApiUrlService(7-132)
apps/deploy-web/src/queries/useProvidersQuery.ts (3)
apps/deploy-web/src/context/ServicesProvider/ServicesProvider.tsx (1)
useServices(28-30)apps/deploy-web/src/queries/queryKeys.ts (1)
QueryKeys(1-107)apps/deploy-web/src/utils/apiUtils.ts (1)
ApiUrlService(7-132)
apps/deploy-web/src/queries/useMarketData.ts (2)
apps/deploy-web/src/context/ServicesProvider/ServicesProvider.tsx (1)
useServices(28-30)apps/deploy-web/src/utils/apiUtils.ts (1)
ApiUrlService(7-132)
apps/deploy-web/src/pages/api/auth/[...auth0].ts (2)
apps/deploy-web/src/services/http/http-browser.service.ts (1)
services(21-39)apps/deploy-web/src/services/http/http-server.service.ts (1)
services(22-32)
apps/deploy-web/src/services/http/http-browser.service.ts (1)
apps/deploy-web/src/services/http/http-server.service.ts (1)
services(22-32)
apps/deploy-web/src/queries/featureFlags.ts (2)
apps/deploy-web/src/context/ServicesProvider/ServicesProvider.tsx (1)
useServices(28-30)apps/deploy-web/src/queries/queryKeys.ts (1)
QueryKeys(1-107)
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{ts,tsx}
📄 CodeRabbit Inference Engine (.cursor/rules/general.mdc)
Never use type any or cast to type any. Always define the proper TypeScript types.
Files:
apps/deploy-web/src/queries/useBlocksQuery.tsapps/deploy-web/src/queries/useProvidersQuery.tsapps/deploy-web/src/queries/useMarketData.tsapps/deploy-web/src/queries/useMarketData.spec.tsxapps/deploy-web/src/pages/api/auth/[...auth0].tsapps/deploy-web/src/services/http/http-browser.service.tsapps/deploy-web/src/components/providers/ProviderRawData/ProviderRawData.spec.tsxapps/deploy-web/src/queries/useGpuQuery.tsapps/deploy-web/src/queries/featureFlags.ts
**/*.{js,jsx,ts,tsx}
📄 CodeRabbit Inference Engine (.cursor/rules/general.mdc)
**/*.{js,jsx,ts,tsx}: Never use deprecated methods from libraries.
Don't add unnecessary comments to the code
Files:
apps/deploy-web/src/queries/useBlocksQuery.tsapps/deploy-web/src/queries/useProvidersQuery.tsapps/deploy-web/src/queries/useMarketData.tsapps/deploy-web/src/queries/useMarketData.spec.tsxapps/deploy-web/src/pages/api/auth/[...auth0].tsapps/deploy-web/src/services/http/http-browser.service.tsapps/deploy-web/src/components/providers/ProviderRawData/ProviderRawData.spec.tsxapps/deploy-web/src/queries/useGpuQuery.tsapps/deploy-web/src/queries/featureFlags.ts
**/*.spec.{ts,tsx}
📄 CodeRabbit Inference Engine (.cursor/rules/no-jest-mock.mdc)
Don't use
jest.mock()to mock dependencies in test files. Instead, usejest-mock-extendedto create mocks and pass mocks as dependencies to the service under test.
**/*.spec.{ts,tsx}: Usesetupfunction instead ofbeforeEachin test files
setupfunction must be at the bottom of the rootdescribeblock in test files
setupfunction creates an object under test and returns it
setupfunction should accept a single parameter with inline type definition
Don't use shared state insetupfunction
Don't specify return type ofsetupfunction
Files:
apps/deploy-web/src/queries/useMarketData.spec.tsxapps/deploy-web/src/components/providers/ProviderRawData/ProviderRawData.spec.tsx
apps/{deploy-web,provider-console}/**/*.spec.tsx
📄 CodeRabbit Inference Engine (.cursor/rules/query-by-in-tests.mdc)
Use
queryBymethods instead ofgetBymethods in test expectations in.spec.tsxfiles
Files:
apps/deploy-web/src/queries/useMarketData.spec.tsxapps/deploy-web/src/components/providers/ProviderRawData/ProviderRawData.spec.tsx
🧠 Learnings (9)
📓 Common learnings
Learnt from: jzsfkzm
PR: akash-network/console#1372
File: apps/api/src/transaction/services/transaction/transaction.service.ts:13-15
Timestamp: 2025-05-28T20:10:28.008Z
Learning: In the Akash Network console API, input validation is preferably handled at the schema level rather than in service methods to maintain clean separation of concerns and consistent validation across endpoints.
Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use `queryBy` methods instead of `getBy` methods in test expectations in `.spec.tsx` files
Learnt from: baktun14
PR: akash-network/console#1428
File: apps/api/src/deployment/controllers/deployment/deployment.controller.ts:0-0
Timestamp: 2025-06-03T15:06:34.211Z
Learning: The `getByOwnerAndDseq` method in `apps/api/src/deployment/controllers/deployment/deployment.controller.ts` is intentionally public without the `@Protected` decorator because it serves public blockchain data from an indexer, following the pattern of public blockchain APIs.
Learnt from: jzsfkzm
PR: akash-network/console#1372
File: apps/api/src/dashboard/services/stats/stats.service.ts:0-0
Timestamp: 2025-05-28T20:42:58.200Z
Learning: The user successfully implemented CosmosHttpService with retry logic using axiosRetry, exponential backoff, and proper error handling for Cosmos API calls, replacing direct axios usage in StatsService.
Learnt from: stalniy
PR: akash-network/console#1660
File: apps/deploy-web/src/components/alerts/DeploymentAlertsContainer/DeploymentAlertsContainer.spec.tsx:54-56
Timestamp: 2025-07-11T10:46:43.711Z
Learning: In apps/{deploy-web,provider-console}/**/*.spec.tsx files: Use `getBy` methods instead of `queryBy` methods when testing element presence with `toBeInTheDocument()` because `getBy` throws an error and shows DOM state when element is not found, providing better debugging information than `queryBy` which returns null.
apps/deploy-web/src/queries/useBlocksQuery.ts (4)
Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files
Learnt from: stalniy
PR: #1660
File: apps/deploy-web/src/components/alerts/DeploymentAlertsContainer/DeploymentAlertsContainer.spec.tsx:54-56
Timestamp: 2025-07-11T10:46:43.711Z
Learning: In apps/{deploy-web,provider-console}/**/*.spec.tsx files: Use getBy methods instead of queryBy methods when testing element presence with toBeInTheDocument() because getBy throws an error and shows DOM state when element is not found, providing better debugging information than queryBy which returns null.
Learnt from: baktun14
PR: #1428
File: apps/api/src/deployment/controllers/deployment/deployment.controller.ts:0-0
Timestamp: 2025-06-03T15:06:34.211Z
Learning: The getByOwnerAndDseq method in apps/api/src/deployment/controllers/deployment/deployment.controller.ts is intentionally public without the @Protected decorator because it serves public blockchain data from an indexer, following the pattern of public blockchain APIs.
Learnt from: jzsfkzm
PR: #1372
File: apps/api/src/dashboard/services/stats/stats.service.ts:0-0
Timestamp: 2025-05-28T20:42:58.200Z
Learning: The user successfully implemented CosmosHttpService with retry logic using axiosRetry, exponential backoff, and proper error handling for Cosmos API calls, replacing direct axios usage in StatsService.
apps/deploy-web/src/queries/useProvidersQuery.ts (4)
Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files
Learnt from: stalniy
PR: #1660
File: apps/deploy-web/src/components/alerts/DeploymentAlertsContainer/DeploymentAlertsContainer.spec.tsx:54-56
Timestamp: 2025-07-11T10:46:43.711Z
Learning: In apps/{deploy-web,provider-console}/**/*.spec.tsx files: Use getBy methods instead of queryBy methods when testing element presence with toBeInTheDocument() because getBy throws an error and shows DOM state when element is not found, providing better debugging information than queryBy which returns null.
Learnt from: baktun14
PR: #1428
File: apps/api/src/deployment/controllers/deployment/deployment.controller.ts:0-0
Timestamp: 2025-06-03T15:06:34.211Z
Learning: The getByOwnerAndDseq method in apps/api/src/deployment/controllers/deployment/deployment.controller.ts is intentionally public without the @Protected decorator because it serves public blockchain data from an indexer, following the pattern of public blockchain APIs.
Learnt from: jzsfkzm
PR: #1372
File: apps/api/src/dashboard/services/stats/stats.service.ts:0-0
Timestamp: 2025-05-28T20:42:58.200Z
Learning: The user successfully implemented CosmosHttpService with retry logic using axiosRetry, exponential backoff, and proper error handling for Cosmos API calls, replacing direct axios usage in StatsService.
apps/deploy-web/src/queries/useMarketData.ts (2)
Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files
Learnt from: baktun14
PR: #1428
File: apps/api/src/deployment/controllers/deployment/deployment.controller.ts:0-0
Timestamp: 2025-06-03T15:06:34.211Z
Learning: The getByOwnerAndDseq method in apps/api/src/deployment/controllers/deployment/deployment.controller.ts is intentionally public without the @Protected decorator because it serves public blockchain data from an indexer, following the pattern of public blockchain APIs.
apps/deploy-web/src/queries/useMarketData.spec.tsx (9)
Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files
Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/no-jest-mock.mdc:0-0
Timestamp: 2025-07-21T08:24:24.269Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use jest.mock() to mock dependencies in test files. Instead, use jest-mock-extended to create mocks and pass mocks as dependencies to the service under test.
Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Use setup function instead of beforeEach in test files
Learnt from: stalniy
PR: #1660
File: apps/deploy-web/src/components/alerts/DeploymentAlertsContainer/DeploymentAlertsContainer.spec.tsx:54-56
Timestamp: 2025-07-11T10:46:43.711Z
Learning: In apps/{deploy-web,provider-console}/**/*.spec.tsx files: Use getBy methods instead of queryBy methods when testing element presence with toBeInTheDocument() because getBy throws an error and shows DOM state when element is not found, providing better debugging information than queryBy which returns null.
Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use shared state in setup function
Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't specify return type of setup function
Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function creates an object under test and returns it
Learnt from: jzsfkzm
PR: #1372
File: apps/api/src/dashboard/services/stats/stats.service.ts:0-0
Timestamp: 2025-05-28T20:42:58.200Z
Learning: The user successfully implemented CosmosHttpService with retry logic using axiosRetry, exponential backoff, and proper error handling for Cosmos API calls, replacing direct axios usage in StatsService.
Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function should accept a single parameter with inline type definition
apps/deploy-web/src/services/http/http-browser.service.ts (6)
Learnt from: baktun14
PR: #1428
File: apps/api/src/deployment/controllers/deployment/deployment.controller.ts:0-0
Timestamp: 2025-06-03T15:06:34.211Z
Learning: The getByOwnerAndDseq method in apps/api/src/deployment/controllers/deployment/deployment.controller.ts is intentionally public without the @Protected decorator because it serves public blockchain data from an indexer, following the pattern of public blockchain APIs.
Learnt from: jzsfkzm
PR: #1372
File: apps/api/src/dashboard/services/stats/stats.service.ts:0-0
Timestamp: 2025-05-28T20:42:58.200Z
Learning: The user successfully implemented CosmosHttpService with retry logic using axiosRetry, exponential backoff, and proper error handling for Cosmos API calls, replacing direct axios usage in StatsService.
Learnt from: jzsfkzm
PR: #1364
File: apps/api/src/provider/routes/provider-deployments/provider-deployments.router.ts:38-44
Timestamp: 2025-05-25T19:37:00.800Z
Learning: The Akash Console API uses centralized error handling through the OpenApiHonoHandler's defaultHook, which automatically processes errors via HonoErrorHandlerService. Individual route handlers do not use explicit try-catch blocks and instead rely on this framework-level error handling mechanism.
Learnt from: stalniy
PR: #1353
File: apps/deploy-web/src/config/browser-env.config.ts:0-0
Timestamp: 2025-05-22T14:25:01.336Z
Learning: For the __AK_INJECTED_CONFIG__ global window property in the Akash Network Console, security is handled through cryptographic signature verification using a public key rather than property protection mechanisms like Object.defineProperty.
Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/general.mdc:0-0
Timestamp: 2025-07-21T08:24:19.412Z
Learning: Applies to **/*.{js,jsx,ts,tsx} : Never use deprecated methods from libraries.
Learnt from: ygrishajev
PR: #1461
File: apps/notifications/src/modules/alert/services/deployment-alert/deployment-alert.service.ts:194-197
Timestamp: 2025-06-10T14:19:14.122Z
Learning: The alert.CONSOLE_WEB_URL environment variable in the notifications app is controlled and configured by the Akash team, reducing XSS concerns for HTML link generation in alert messages.
apps/deploy-web/src/components/providers/ProviderRawData/ProviderRawData.spec.tsx (9)
Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files
Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/no-jest-mock.mdc:0-0
Timestamp: 2025-07-21T08:24:24.269Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use jest.mock() to mock dependencies in test files. Instead, use jest-mock-extended to create mocks and pass mocks as dependencies to the service under test.
Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function creates an object under test and returns it
Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Use setup function instead of beforeEach in test files
Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : setup function should accept a single parameter with inline type definition
Learnt from: stalniy
PR: #1436
File: apps/api/src/provider/repositories/provider/provider.repository.ts:79-90
Timestamp: 2025-06-08T03:07:13.871Z
Learning: The getProvidersHostUriByAttributes method in apps/api/src/provider/repositories/provider/provider.repository.ts already has comprehensive test coverage in provider.repository.spec.ts, including tests for complex HAVING clause logic with COUNT(*) FILTER (WHERE ...) syntax, signature conditions (anyOf/allOf), and glob pattern matching.
Learnt from: stalniy
PR: #1660
File: apps/deploy-web/src/components/alerts/DeploymentAlertsContainer/DeploymentAlertsContainer.spec.tsx:54-56
Timestamp: 2025-07-11T10:46:43.711Z
Learning: In apps/{deploy-web,provider-console}/**/*.spec.tsx files: Use getBy methods instead of queryBy methods when testing element presence with toBeInTheDocument() because getBy throws an error and shows DOM state when element is not found, providing better debugging information than queryBy which returns null.
Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't use shared state in setup function
Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/setup-instead-of-before-each.mdc:0-0
Timestamp: 2025-07-21T08:25:07.474Z
Learning: Applies to **/*.spec.{ts,tsx} : Don't specify return type of setup function
apps/deploy-web/src/queries/useGpuQuery.ts (2)
Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files
Learnt from: stalniy
PR: #1660
File: apps/deploy-web/src/components/alerts/DeploymentAlertsContainer/DeploymentAlertsContainer.spec.tsx:54-56
Timestamp: 2025-07-11T10:46:43.711Z
Learning: In apps/{deploy-web,provider-console}/**/*.spec.tsx files: Use getBy methods instead of queryBy methods when testing element presence with toBeInTheDocument() because getBy throws an error and shows DOM state when element is not found, providing better debugging information than queryBy which returns null.
apps/deploy-web/src/queries/featureFlags.ts (3)
Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/query-by-in-tests.mdc:0-0
Timestamp: 2025-07-21T08:24:27.953Z
Learning: Applies to apps/{deploy-web,provider-console}/**/*.spec.tsx : Use queryBy methods instead of getBy methods in test expectations in .spec.tsx files
Learnt from: stalniy
PR: #1660
File: apps/deploy-web/src/components/alerts/DeploymentAlertsContainer/DeploymentAlertsContainer.spec.tsx:54-56
Timestamp: 2025-07-11T10:46:43.711Z
Learning: In apps/{deploy-web,provider-console}/**/*.spec.tsx files: Use getBy methods instead of queryBy methods when testing element presence with toBeInTheDocument() because getBy throws an error and shows DOM state when element is not found, providing better debugging information than queryBy which returns null.
Learnt from: CR
PR: akash-network/console#0
File: .cursor/rules/general.mdc:0-0
Timestamp: 2025-07-21T08:24:19.412Z
Learning: Applies to **/*.{js,jsx,ts,tsx} : Never use deprecated methods from libraries.
🧬 Code Graph Analysis (6)
apps/deploy-web/src/queries/useBlocksQuery.ts (2)
apps/deploy-web/src/context/ServicesProvider/ServicesProvider.tsx (1)
useServices(28-30)apps/deploy-web/src/utils/apiUtils.ts (1)
ApiUrlService(7-132)
apps/deploy-web/src/queries/useProvidersQuery.ts (3)
apps/deploy-web/src/context/ServicesProvider/ServicesProvider.tsx (1)
useServices(28-30)apps/deploy-web/src/queries/queryKeys.ts (1)
QueryKeys(1-107)apps/deploy-web/src/utils/apiUtils.ts (1)
ApiUrlService(7-132)
apps/deploy-web/src/queries/useMarketData.ts (2)
apps/deploy-web/src/context/ServicesProvider/ServicesProvider.tsx (1)
useServices(28-30)apps/deploy-web/src/utils/apiUtils.ts (1)
ApiUrlService(7-132)
apps/deploy-web/src/pages/api/auth/[...auth0].ts (2)
apps/deploy-web/src/services/http/http-browser.service.ts (1)
services(21-39)apps/deploy-web/src/services/http/http-server.service.ts (1)
services(22-32)
apps/deploy-web/src/services/http/http-browser.service.ts (1)
apps/deploy-web/src/services/http/http-server.service.ts (1)
services(22-32)
apps/deploy-web/src/queries/featureFlags.ts (2)
apps/deploy-web/src/context/ServicesProvider/ServicesProvider.tsx (1)
useServices(28-30)apps/deploy-web/src/queries/queryKeys.ts (1)
QueryKeys(1-107)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: validate / validate-app
- GitHub Check: test-build
🔇 Additional comments (14)
apps/deploy-web/src/services/http/http-browser.service.ts (1)
37-38: LGTM! Temporary solution properly implemented.The
publicConsoleApiHttpClientservice correctly implements the interim solution for separating public API access. The lack of base URL and interceptors is appropriate for public endpoints that may need different configurations.apps/deploy-web/src/queries/useBlocksQuery.ts (1)
23-26: Confirm absolute URL in ApiUrlService.blocks()I wasn’t able to locate the
blocks(limit)implementation via automated search in
apps/deploy-web/src/services/api-url/api-url.service.tsapps/deploy-web/src/utils/apiUtils.tsSince
publicConsoleApiHttpClienthas no base URL, please manually verify that
ApiUrlService.blocks(limit)returns a fully qualified URL (including protocol and domain) rather than a relative path.apps/deploy-web/src/queries/useGpuQuery.ts (1)
9-12: URL completeness verifiedApiUrlService.gpuModels() returns
${this.baseApiUrl}/v1/gpu-models, andbaseApiUrlis sourced from the environment variables (NEXT_PUBLIC_BASE_API_MAINNET_URL, etc.) viagetBaseApiUrlFor(). This guarantees a fully qualified URL even when usingpublicConsoleApiHttpClientwithout a default baseURL. No further changes needed.apps/deploy-web/src/queries/useMarketData.ts (1)
10-13: Confirmed full URLs from ApiUrlService.marketData()The
marketData()method returns${this.baseApiUrl}/v1/market-data, andgetBaseApiUrlForresolves to the fullBASE_API_*orNEXT_PUBLIC_BASE_API_*URL (including protocol) for the selected network. The switch topublicConsoleApiHttpClientis correct—no further changes are required.apps/deploy-web/src/pages/api/auth/[...auth0].ts (1)
67-67: LGTM! Good refactoring to centralize API URL management.The change from direct configuration access to using the
apiUrlService.getBaseApiUrlFor("mainnet")method improves maintainability and consistency across the codebase.apps/deploy-web/src/queries/useProvidersQuery.ts (7)
16-16: LGTM! Correct usage of public client for provider detail endpoint.Using
publicConsoleApiHttpClientis appropriate for the provider detail endpoint as it's a public API that doesn't require user authentication.Also applies to: 21-21
52-52: LGTM! Correct usage of public client for network capacity endpoint.Using
publicConsoleApiHttpClientis appropriate for the network capacity endpoint as it provides public blockchain data.Also applies to: 55-55
61-61: LGTM! Correct usage of public client for auditors endpoint.Using
publicConsoleApiHttpClientis appropriate for the auditors endpoint as it provides public blockchain data.Also applies to: 64-64
74-74: LGTM! Correct usage of public client for provider active leases graph.Using
publicConsoleApiHttpClientis appropriate for the provider active leases graph endpoint as it provides public blockchain data.Also applies to: 77-77
83-83: LGTM! Correct usage of public client for provider attributes schema.Using
publicConsoleApiHttpClientis appropriate for the provider attributes schema endpoint as it provides public configuration data.Also applies to: 86-86
96-96: LGTM! Correct usage of public client for provider list endpoint.Using
publicConsoleApiHttpClientis appropriate for the provider list endpoint as it provides public blockchain data.Also applies to: 99-99
105-105: LGTM! Correct usage of public client for provider regions endpoint.Using
publicConsoleApiHttpClientis appropriate for the provider regions endpoint as it provides public configuration data.Also applies to: 108-108
apps/deploy-web/src/components/providers/ProviderRawData/ProviderRawData.spec.tsx (1)
23-33: LGTM! Test mocks updated correctly to match implementation changes.The test setup has been properly updated to mock
publicConsoleApiHttpClientinstead ofconsoleApiHttpClient, maintaining the same mock behavior while aligning with the new service structure.Also applies to: 49-49
apps/deploy-web/src/queries/featureFlags.ts (1)
14-14: LGTM! Correct usage of public client for feature flags.Using
publicConsoleApiHttpClientis appropriate for the feature flags endpoint as it provides public configuration data.Also applies to: 19-19
089bb94 to
e47f8a7
Compare
e47f8a7 to
4834df5
Compare
4834df5 to
ad2af98
Compare
Why
we have public available API on console-api and user specific one. Eventually it should be a single API instance but at the moment it's not possible to get all public endpoints. There is a separate task for this #1701 . Related #1720
What
Adds
publicConsoleApiHttpClientserviceSummary by CodeRabbit
Summary by CodeRabbit
New Features
Refactor