Skip to content

Conversation

@feruzm
Copy link
Member

@feruzm feruzm commented Jan 12, 2026

Summary by CodeRabbit

  • New Features

    • Added Convert flow for HBD conversions in wallet, UI option, icon, and translation.
  • Bug Fixes

    • Improved reply/comment cache scoping and optimistic update behavior to include post and username context.
    • Removed legacy wallet cache migration cleanup to avoid outdated removals.
  • Chores

    • Package version bumps and centralized API base URL resolution for more reliable requests.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 12, 2026

📝 Walkthrough

Walkthrough

Adds a Convert wallet operation and related UI/translation, reworks React Query cache keys for discussions, removes legacy wallet cache migration logic, centralizes SDK base URL resolution via ConfigManager.getValidatedBaseUrl, adds convertHbd mutation and wiring, and bumps package versions.

Changes

Cohort / File(s) Summary
Discussion cache key migration
apps/web/src/api/mutations/create-reply.ts, apps/web/src/api/mutations/delete-comment.ts, apps/web/src/features/shared/discussion/discussion-item.tsx
Replaced QueryIdentifiers.FETCH_DISCUSSIONS keys with composite keys like ["posts","discussions", root.author, root.permlink, SortOrder.created, <username?>] and adjusted username fallback/guards for cache reads/writes.
Wallet UI & translations
apps/web/src/app/(dynamicPages)/profile/[username]/wallet/(token)/_components/profile-wallet-token-operation-helpers.tsx, apps/web/src/features/wallet/wallet-operations-dialog.tsx, apps/web/src/features/i18n/locales/en-US.json
Added AssetOperation.Convert and AssetOperation.Undelegate icon mappings, enabled Convert to render via existing transfer UI, and added wallet.operations.convert translation.
Convert implementation & wiring
packages/wallets/src/modules/assets/hive/mutations/convert.ts, packages/wallets/src/modules/assets/hive/mutations/index.ts, packages/wallets/src/modules/wallets/mutations/wallet-operation.ts
New convertHbd mutation supporting key, keychain/hiveauth, and hive-signer flows; exported from hive mutations and mapped to AssetOperation.Convert in wallet operation dispatcher.
SDK base URL centralization
packages/sdk/src/modules/core/config.ts, packages/sdk/src/modules/hive-engine/requests.ts, packages/sdk/src/modules/posts/queries/*, packages/sdk/src/modules/accounts/queries/get-referrals-infinite-query-options.ts
Introduced ConfigManager.getValidatedBaseUrl() and replaced direct CONFIG.privateApiHost usage with safe base URL construction (using new URL(..., baseUrl)) across multiple query/request modules.
Client init cleanup
apps/web/src/app/client-init.tsx
Removed legacy wallet cache migration block that cleared old wallet-related queries and updated local storage cache version.
Package bumps
packages/sdk/package.json, packages/wallets/package.json
Bumped versions: packages/sdk 1.5.5 → 1.5.6, packages/wallets 1.5.13 → 1.5.14.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant WalletOp as Wallet Operation Dispatcher
    participant Convert as convertHbd
    participant Auth as Auth Context / Broadcaster
    participant HiveClient
    participant HiveSigner

    User->>WalletOp: Trigger Convert action
    WalletOp->>Convert: call convertHbd(payload, auth?)

    alt payload.type == "key"
        Convert->>HiveClient: broadcast via sendOperations(key)
        HiveClient-->>Convert: response
    else payload.type == "keychain" or "hiveauth"
        Convert->>Auth: use broadcaster to broadcast(operation,"active")
        alt broadcaster available
            Auth-->>Convert: response
        else no broadcaster
            Convert-->>WalletOp: throw error
        end
    else (default: hive-signer)
        Convert->>HiveSigner: sendOperation(operation, callbackUrl)
        HiveSigner-->>User: redirect to wallet for approval
        User-->>Convert: completes via callback
    end

    Convert-->>WalletOp: result
    WalletOp-->>User: surface outcome
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

  • Fix wallet actions #611: Touches client-init and profile wallet components; relates to wallet cache migration removal and profile wallet UI changes.
  • Bridge and Hive to sdk #607: Migrates discussion-related React Query keys similar to this PR's cache key restructuring.

Poem

🐰 I chewed a key and found a convert song,
Icons hopped in, translations joined along,
Cache keys stitched from root to user name,
URLs now find their base without shame,
Hop—Hive ops sing, and wallets dance along!

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ 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 accurately reflects the primary changes: adding Convert operation support and fixing optimistic commenting cache keys.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/web/src/api/mutations/create-reply.ts (1)

6-6: Remove unused import.

QueryIdentifiers is imported on line 6 but never used in the file. The code now uses explicit string-based keys instead.

🤖 Fix all issues with AI agents
In
@packages/sdk/src/modules/accounts/queries/get-referrals-infinite-query-options.ts:
- Around line 13-14: The URL construction can throw when CONFIG.privateApiHost
is falsy and window is undefined because baseUrl becomes an empty string; update
the logic around baseUrl and the new URL(...) call in
get-referrals-infinite-query-options.ts to guard against an empty baseUrl (e.g.,
compute a validated baseUrl or throw a descriptive error before calling new URL)
and include the same guard wherever the pattern repeats
(get-waves-by-tag-query-options.ts, get-waves-following-query-options.ts, etc.);
centralize this into a shared helper function (e.g., getValidatedBaseUrl or
resolveApiBaseUrl) that checks CONFIG.privateApiHost, falls back to
window.location.origin when available, and otherwise throws a clear error so new
URL(...) is never called with an empty base.

In
@packages/sdk/src/modules/posts/queries/get-waves-trending-tags-query-options.ts:
- Around line 15-16: The code builds `baseUrl` then calls `new
URL("/private-api/waves/trending/tags", baseUrl)`, but when
CONFIG.privateApiHost is falsy and window is undefined `baseUrl` becomes an
empty string and `new URL()` throws; update the logic around the `baseUrl`/`url`
creation to ensure a valid base is used on server side (e.g., if
CONFIG.privateApiHost is falsy and typeof window === 'undefined' fallback to a
safe origin like 'http://localhost' or construct an absolute URL elsewhere),
validate `baseUrl` before calling `new URL()`, and use the same variable names
(`baseUrl`, `CONFIG.privateApiHost`, `window`, `url`, `new URL`) so the fix is
easy to locate.
🧹 Nitpick comments (4)
packages/sdk/src/modules/posts/queries/get-waves-following-query-options.ts (1)

26-27: Same baseUrl fallback issue, though mitigated by try-catch.

The empty string fallback for baseUrl would throw when constructing the URL. Here, the try-catch block (lines 25-63) catches the error and returns an empty array, preventing a crash. However, this silently hides potential configuration issues in SSR environments.

The console.error on line 61 will log the error, but consider adding explicit validation for better debuggability, especially since this pattern is duplicated across multiple query options files.

packages/sdk/src/modules/posts/queries/get-waves-by-tag-query-options.ts (1)

21-22: Consider extracting the baseUrl initialization into a shared utility function.

The URL construction pattern is duplicated across 4 files:

  • get-waves-by-tag-query-options.ts
  • get-waves-following-query-options.ts
  • get-waves-trending-tags-query-options.ts
  • get-referrals-infinite-query-options.ts

The try-catch block (lines 20-51) properly handles errors. If this pattern is intentional and likely to be reused elsewhere, extracting it into a utility function would reduce duplication and make future updates easier.

packages/wallets/src/modules/assets/hive/mutations/convert.ts (2)

26-31: Redundant operation payload reconstruction.

The operation variable is already constructed at line 24 but the "key" path reconstructs it inline at line 29. This duplicates logic and can lead to inconsistencies if one is updated without the other.

Proposed refactor to reuse operation variable
   if (payload.type === "key" && "key" in payload) {
-    const { key, type, ...params } = payload;
-    return CONFIG.hiveClient.broadcast.sendOperations(
-      [["convert", { ...params, owner: params.from, requestid }]],
-      key
-    );
+    const { key } = payload;
+    return CONFIG.hiveClient.broadcast.sendOperations([operation], key);
   } else if (payload.type === "keychain" || payload.type === "hiveauth") {

40-42: Hardcoded callback URL and empty callback handler.

The callback URL is hardcoded to https://ecency.com/@${payload.from}/wallet. Consider using a configurable base URL from CONFIG for portability across environments. Additionally, the empty callback function () => {} silently ignores the result—consider adding error handling or at least logging.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 691e6e4 and e00141f.

⛔ Files ignored due to path filters (13)
  • packages/sdk/dist/browser/index.js is excluded by !**/dist/**
  • packages/sdk/dist/browser/index.js.map is excluded by !**/dist/**, !**/*.map
  • packages/sdk/dist/node/index.cjs is excluded by !**/dist/**
  • packages/sdk/dist/node/index.cjs.map is excluded by !**/dist/**, !**/*.map
  • packages/sdk/dist/node/index.mjs is excluded by !**/dist/**
  • packages/sdk/dist/node/index.mjs.map is excluded by !**/dist/**, !**/*.map
  • packages/wallets/dist/browser/index.d.ts is excluded by !**/dist/**
  • packages/wallets/dist/browser/index.js is excluded by !**/dist/**
  • packages/wallets/dist/browser/index.js.map is excluded by !**/dist/**, !**/*.map
  • packages/wallets/dist/node/index.cjs is excluded by !**/dist/**
  • packages/wallets/dist/node/index.cjs.map is excluded by !**/dist/**, !**/*.map
  • packages/wallets/dist/node/index.mjs is excluded by !**/dist/**
  • packages/wallets/dist/node/index.mjs.map is excluded by !**/dist/**, !**/*.map
📒 Files selected for processing (16)
  • apps/web/src/api/mutations/create-reply.ts
  • apps/web/src/api/mutations/delete-comment.ts
  • apps/web/src/app/(dynamicPages)/profile/[username]/wallet/(token)/_components/profile-wallet-token-operation-helpers.tsx
  • apps/web/src/app/client-init.tsx
  • apps/web/src/features/i18n/locales/en-US.json
  • apps/web/src/features/shared/discussion/discussion-item.tsx
  • apps/web/src/features/wallet/wallet-operations-dialog.tsx
  • packages/sdk/package.json
  • packages/sdk/src/modules/accounts/queries/get-referrals-infinite-query-options.ts
  • packages/sdk/src/modules/posts/queries/get-waves-by-tag-query-options.ts
  • packages/sdk/src/modules/posts/queries/get-waves-following-query-options.ts
  • packages/sdk/src/modules/posts/queries/get-waves-trending-tags-query-options.ts
  • packages/wallets/package.json
  • packages/wallets/src/modules/assets/hive/mutations/convert.ts
  • packages/wallets/src/modules/assets/hive/mutations/index.ts
  • packages/wallets/src/modules/wallets/mutations/wallet-operation.ts
💤 Files with no reviewable changes (1)
  • apps/web/src/app/client-init.tsx
🧰 Additional context used
🧬 Code graph analysis (9)
packages/sdk/src/modules/accounts/queries/get-referrals-infinite-query-options.ts (3)
packages/sdk/dist/node/index.mjs (14)
  • baseUrl (1027-1027)
  • baseUrl (2118-2118)
  • baseUrl (2156-2156)
  • baseUrl (2194-2194)
  • url (1028-1028)
  • url (1191-1193)
  • url (2119-2119)
  • url (2157-2157)
  • url (2195-2195)
  • url (4023-4023)
  • url (4061-4061)
  • url (4070-4070)
  • url (5040-5042)
  • url (5060-5060)
packages/sdk/dist/node/index.cjs (6)
  • baseUrl (1052-1052)
  • baseUrl (2143-2143)
  • baseUrl (2181-2181)
  • baseUrl (2219-2219)
  • url (1053-1053)
  • url (1216-1218)
packages/sdk/dist/browser/index.js (4)
  • url (4061-4061)
  • url (4070-4070)
  • url (5040-5042)
  • url (5060-5060)
packages/sdk/src/modules/posts/queries/get-waves-following-query-options.ts (3)
packages/sdk/dist/node/index.mjs (14)
  • baseUrl (1027-1027)
  • baseUrl (2118-2118)
  • baseUrl (2156-2156)
  • baseUrl (2194-2194)
  • url (1028-1028)
  • url (1191-1193)
  • url (2119-2119)
  • url (2157-2157)
  • url (2195-2195)
  • url (4023-4023)
  • url (4061-4061)
  • url (4070-4070)
  • url (5040-5042)
  • url (5060-5060)
packages/sdk/dist/node/index.cjs (6)
  • baseUrl (1052-1052)
  • baseUrl (2143-2143)
  • baseUrl (2181-2181)
  • baseUrl (2219-2219)
  • url (1053-1053)
  • url (1216-1218)
packages/sdk/dist/browser/index.js (4)
  • url (4061-4061)
  • url (4070-4070)
  • url (5040-5042)
  • url (5060-5060)
apps/web/src/features/wallet/wallet-operations-dialog.tsx (2)
packages/wallets/dist/browser/index.d.ts (1)
  • AssetOperation (2031-2031)
packages/wallets/dist/index.d.ts (1)
  • AssetOperation (1643-1643)
apps/web/src/features/shared/discussion/discussion-item.tsx (1)
packages/sdk/dist/browser/index.d.ts (1)
  • SortOrder (3181-3181)
apps/web/src/api/mutations/delete-comment.ts (2)
packages/sdk/src/modules/posts/types/entry.ts (1)
  • Entry (46-89)
packages/sdk/dist/browser/index.d.ts (1)
  • SortOrder (3181-3181)
packages/sdk/src/modules/posts/queries/get-waves-by-tag-query-options.ts (2)
packages/sdk/dist/node/index.cjs (6)
  • baseUrl (1052-1052)
  • baseUrl (2143-2143)
  • baseUrl (2181-2181)
  • baseUrl (2219-2219)
  • url (1053-1053)
  • url (1216-1218)
packages/sdk/dist/browser/index.js (4)
  • url (4061-4061)
  • url (4070-4070)
  • url (5040-5042)
  • url (5060-5060)
packages/sdk/src/modules/posts/queries/get-waves-trending-tags-query-options.ts (2)
packages/sdk/dist/node/index.mjs (14)
  • baseUrl (1027-1027)
  • baseUrl (2118-2118)
  • baseUrl (2156-2156)
  • baseUrl (2194-2194)
  • url (1028-1028)
  • url (1191-1193)
  • url (2119-2119)
  • url (2157-2157)
  • url (2195-2195)
  • url (4023-4023)
  • url (4061-4061)
  • url (4070-4070)
  • url (5040-5042)
  • url (5060-5060)
packages/sdk/dist/node/index.cjs (6)
  • baseUrl (1052-1052)
  • baseUrl (2143-2143)
  • baseUrl (2181-2181)
  • baseUrl (2219-2219)
  • url (1053-1053)
  • url (1216-1218)
packages/wallets/src/modules/assets/hive/mutations/convert.ts (1)
packages/wallets/dist/node/index.cjs (8)
  • auth (400-400)
  • requestid (1581-1581)
  • operationPayload (1310-1315)
  • operationPayload (1338-1344)
  • operationPayload (1366-1371)
  • operationPayload (1393-1397)
  • key (411-411)
  • key (416-416)
apps/web/src/app/(dynamicPages)/profile/[username]/wallet/(token)/_components/profile-wallet-token-operation-helpers.tsx (1)
packages/wallets/dist/browser/index.d.ts (1)
  • AssetOperation (2031-2031)
🔇 Additional comments (16)
packages/wallets/package.json (1)

4-4: LGTM!

Version bump aligns with the new convert mutation feature and related wallet operation changes.

packages/sdk/package.json (1)

4-4: LGTM!

Version bump aligns with the URL construction improvements in the SDK query options.

packages/wallets/src/modules/assets/hive/mutations/index.ts (1)

10-10: LGTM!

The new export follows the established barrel export pattern in this file.

packages/wallets/src/modules/wallets/mutations/wallet-operation.ts (2)

23-24: LGTM on the import.

The convertHbd import is correctly added to support the new Convert operation.


40-46: Asset refresh logic is correct - no changes needed.

The Convert operation correctly refreshes both HBD and HIVE balances in the onSuccess handler. Since converting HBD produces HIVE, the current implementation at lines 130-131 properly handles both asset refreshes.

apps/web/src/features/wallet/wallet-operations-dialog.tsx (1)

106-117: LGTM with note on balance handling for Convert operation

The addition of AssetOperation.Convert to the operations list and its exclusion from the showMemo requirement are both correct. Convert operations don't require a memo field per the HBD conversion operation specification.

However, the WalletOperationsTransfer component's balance calculation for Convert is worth reviewing: Convert operations currently fall through to the default balance case (total account balance) rather than explicitly using liquidBalance like Transfer and PowerUp operations. Since Convert converts HBD, it should likely display the liquid HBD balance. This may work functionally but could display incorrect balance amounts to users.

apps/web/src/features/i18n/locales/en-US.json (1)

3036-3036: LGTM!

The new translation entry for the Convert operation follows the existing naming pattern and is consistent with other wallet operation translations.

apps/web/src/api/mutations/create-reply.ts (4)

68-81: LGTM!

The cache key update is consistent with the new composite key pattern. The blockchain success handler correctly replaces the optimistic entry and maintains proper cache state.


91-102: LGTM!

Error handling correctly removes the optimistic entry from cache using the same key structure, maintaining consistency.


146-156: LGTM!

The onMutate optimistic update uses the same key pattern, ensuring cache operations are aligned across the mutation lifecycle.


172-183: LGTM!

The onError handler appropriately uses optional chaining for activeUser?.username since this is an error recovery path where activeUser state might be uncertain.

apps/web/src/api/mutations/delete-comment.ts (2)

9-9: LGTM!

The SortOrder import is correctly added to support the new composite cache key structure.


33-57: Cache key alignment is correct despite confusing parameter naming.

The parent parameter passed to useDeleteComment in the discussion-item context is actually the root post (parent={root}), so the cache key construction correctly targets the same discussion thread cache used by create-reply.ts and discussion-item.tsx. No fix is required.

apps/web/src/app/(dynamicPages)/profile/[username]/wallet/(token)/_components/profile-wallet-token-operation-helpers.tsx (2)

14-14: LGTM!

The new icon mappings are well-chosen:

  • UilUserMinus semantically represents undelegation (removing a user relationship)
  • UilArrowsHAlt for Convert aligns with Swap, as both operations involve asset transformation

Also applies to: 28-30


41-55: LGTM!

The label function correctly handles the new Convert operation via the fallback path, which resolves to profile-wallet.operations.convert - matching the translation added in en-US.json.

apps/web/src/features/shared/discussion/discussion-item.tsx (1)

175-182: Cache key mismatch between sort order in parent component and hardcoded sort in cache read.

The discussion-item.tsx hardcodes SortOrder.created in the cache key, but the parent Discussion component can change the sort order dynamically via setOrder(). When a user changes the sort order, the query cache key changes (e.g., to SortOrder.trending), but discussion-item.tsx still attempts to read cache with the hardcoded SortOrder.created, resulting in cache misses.

The username fallback (activeUser?.username ?? root.author) is intentional and working correctly—it matches the fallback behavior in getDiscussionsQueryOptions which uses observer || entry?.author.

Likely an incorrect or invalid review comment.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
packages/sdk/src/modules/hive-engine/requests.ts (2)

28-29: Consider using new URL() for consistency.

This uses string interpolation (${baseUrl}/private-api/engine-api) while other endpoints in this file use the new URL() constructor (e.g., lines 285, 311). For consistency and safer URL handling, consider aligning with the new URL() pattern.

♻️ Optional refactor for consistency
 async function engineRpc<T>(payload: Record<string, unknown>): Promise<T> {
   const fetchApi = getBoundFetch();
   const baseUrl = ConfigManager.getValidatedBaseUrl();
-  const response = await fetchApi(`${baseUrl}/private-api/engine-api`, {
+  const url = new URL("/private-api/engine-api", baseUrl);
+  const response = await fetchApi(url.toString(), {
     method: "POST",
     body: JSON.stringify(payload),
     headers: ENGINE_RPC_HEADERS,
   });

332-334: Consider URL-encoding the username parameter.

The username is interpolated directly into the URL path without encoding. While Hive usernames typically follow strict character rules, defensively encoding would prevent issues with edge cases.

♻️ Safer URL construction
 export async function getHiveEngineUnclaimedRewards<T = Record<string, unknown>>(
   username: string
 ): Promise<Record<string, T>> {
   const fetchApi = getBoundFetch();
   const baseUrl = ConfigManager.getValidatedBaseUrl();
+  const url = new URL(`/private-api/engine-reward-api/${encodeURIComponent(username)}`, baseUrl);
+  url.searchParams.set("hive", "1");
   const response = await fetchApi(
-    `${baseUrl}/private-api/engine-reward-api/${username}?hive=1`
+    url.toString()
   );
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e00141f and 986b74d.

⛔ Files ignored due to path filters (7)
  • packages/sdk/dist/browser/index.d.ts is excluded by !**/dist/**
  • packages/sdk/dist/browser/index.js is excluded by !**/dist/**
  • packages/sdk/dist/browser/index.js.map is excluded by !**/dist/**, !**/*.map
  • packages/sdk/dist/node/index.cjs is excluded by !**/dist/**
  • packages/sdk/dist/node/index.cjs.map is excluded by !**/dist/**, !**/*.map
  • packages/sdk/dist/node/index.mjs is excluded by !**/dist/**
  • packages/sdk/dist/node/index.mjs.map is excluded by !**/dist/**, !**/*.map
📒 Files selected for processing (7)
  • packages/sdk/src/modules/accounts/queries/get-referrals-infinite-query-options.ts
  • packages/sdk/src/modules/core/config.ts
  • packages/sdk/src/modules/hive-engine/requests.ts
  • packages/sdk/src/modules/posts/queries/get-promoted-posts-query-options.ts
  • packages/sdk/src/modules/posts/queries/get-waves-by-tag-query-options.ts
  • packages/sdk/src/modules/posts/queries/get-waves-following-query-options.ts
  • packages/sdk/src/modules/posts/queries/get-waves-trending-tags-query-options.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • packages/sdk/src/modules/posts/queries/get-waves-trending-tags-query-options.ts
  • packages/sdk/src/modules/accounts/queries/get-referrals-infinite-query-options.ts
🧰 Additional context used
🧬 Code graph analysis (4)
packages/sdk/src/modules/core/config.ts (1)
packages/sdk/dist/browser/index.d.ts (1)
  • CONFIG (3194-3194)
packages/sdk/src/modules/posts/queries/get-promoted-posts-query-options.ts (3)
packages/sdk/dist/node/index.mjs (19)
  • baseUrl (1037-1037)
  • baseUrl (1201-1201)
  • baseUrl (2127-2127)
  • baseUrl (2165-2165)
  • baseUrl (2203-2203)
  • baseUrl (4844-4844)
  • baseUrl (5050-5050)
  • baseUrl (5069-5069)
  • baseUrl (5085-5085)
  • url (1038-1038)
  • url (1202-1202)
  • url (2128-2128)
  • url (2166-2166)
  • url (2204-2204)
  • url (4032-4032)
  • url (4070-4070)
  • url (4079-4079)
  • url (5051-5051)
  • url (5070-5070)
packages/sdk/dist/browser/index.js (8)
  • baseUrl (4844-4844)
  • baseUrl (5050-5050)
  • baseUrl (5069-5069)
  • baseUrl (5085-5085)
  • url (4070-4070)
  • url (4079-4079)
  • url (5051-5051)
  • url (5070-5070)
packages/sdk/dist/node/index.cjs (5)
  • baseUrl (1062-1062)
  • baseUrl (1226-1226)
  • baseUrl (2152-2152)
  • url (1063-1063)
  • url (1227-1227)
packages/sdk/src/modules/posts/queries/get-waves-following-query-options.ts (2)
packages/sdk/dist/browser/index.js (8)
  • baseUrl (4844-4844)
  • baseUrl (5050-5050)
  • baseUrl (5069-5069)
  • baseUrl (5085-5085)
  • url (4070-4070)
  • url (4079-4079)
  • url (5051-5051)
  • url (5070-5070)
packages/sdk/dist/node/index.cjs (5)
  • baseUrl (1062-1062)
  • baseUrl (1226-1226)
  • baseUrl (2152-2152)
  • url (1063-1063)
  • url (1227-1227)
packages/sdk/src/modules/hive-engine/requests.ts (4)
packages/sdk/dist/node/index.mjs (19)
  • baseUrl (1037-1037)
  • baseUrl (1201-1201)
  • baseUrl (2127-2127)
  • baseUrl (2165-2165)
  • baseUrl (2203-2203)
  • baseUrl (4844-4844)
  • baseUrl (5050-5050)
  • baseUrl (5069-5069)
  • baseUrl (5085-5085)
  • url (1038-1038)
  • url (1202-1202)
  • url (2128-2128)
  • url (2166-2166)
  • url (2204-2204)
  • url (4032-4032)
  • url (4070-4070)
  • url (4079-4079)
  • url (5051-5051)
  • url (5070-5070)
packages/sdk/dist/browser/index.js (8)
  • baseUrl (4844-4844)
  • baseUrl (5050-5050)
  • baseUrl (5069-5069)
  • baseUrl (5085-5085)
  • url (4070-4070)
  • url (4079-4079)
  • url (5051-5051)
  • url (5070-5070)
packages/sdk/dist/node/index.cjs (5)
  • baseUrl (1062-1062)
  • baseUrl (1226-1226)
  • baseUrl (2152-2152)
  • url (1063-1063)
  • url (1227-1227)
packages/sdk/dist/browser/index.d.ts (1)
  • ConfigManager (3194-3194)
🔇 Additional comments (5)
packages/sdk/src/modules/posts/queries/get-waves-following-query-options.ts (1)

2-2: LGTM! Consistent adoption of centralized base URL resolution.

The change from direct CONFIG usage to ConfigManager.getValidatedBaseUrl() aligns with the broader refactor across the SDK. The new URL() constructor properly handles path resolution against the base URL.

Also applies to: 26-27

packages/sdk/src/modules/posts/queries/get-waves-by-tag-query-options.ts (1)

2-2: LGTM! Consistent with the centralized URL resolution pattern.

The migration to ConfigManager.getValidatedBaseUrl() follows the same pattern as other waves-related query options, maintaining consistency across the SDK.

Also applies to: 21-22

packages/sdk/src/modules/posts/queries/get-promoted-posts-query-options.ts (1)

1-1: LGTM! Consistent migration to ConfigManager.

The import update and URL construction follow the established pattern across the SDK modules.

Also applies to: 11-12

packages/sdk/src/modules/hive-engine/requests.ts (1)

284-285: LGTM! Proper URL construction with new URL().

Both getHiveEngineTokenTransactions and getHiveEngineTokenMetrics correctly use the new URL() constructor and searchParams.set() for query parameters, which properly handles URL encoding.

Also applies to: 310-311

packages/sdk/src/modules/core/config.ts (1)

67-78: Review comment is incorrect—CONFIG.privateApiHost is set to an empty string in production.

The review overlooks that setPrivateApiHost("") is called in production environments (apps/web/src/core/sdk-init.ts, line 22-23) based on isMainProduction logic. An empty string is falsy in JavaScript, so the condition if (CONFIG.privateApiHost) on line 68 evaluates to false in production, allowing the window.location.origin and SSR fallback branches to execute as intended.

The fallback logic is working correctly and is reachable in production scenarios.

Likely an incorrect or invalid review comment.

@feruzm feruzm merged commit 9a1639a into develop Jan 12, 2026
1 check passed
@feruzm feruzm deleted the convert branch January 12, 2026 10:33
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