Conversation
|
Caution Review failedFailed to post review comments WalkthroughComprehensive SDK53 upgrade across the Akash console and related services, migrating from Cosmos SDK v1beta3/v1beta4 to v1/v1beta5 message types. Updates include protocol type imports, message-type URLs, data schema refactoring (renaming ID fields, nesting escrow state), dependency upgrades, gRPC client migrations, testnet configuration changes, and new CI/CD workflows for multi-environment deployments. Changes
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120+ minutes
Areas requiring extra attention:
Possibly related issues
Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
| @@ -40,7 +40,7 @@ | |||
| "dependencies": { | |||
There was a problem hiding this comment.
🔄 Carefully review the package-lock.json diff
Resolve the comment if everything is ok
* apps/api/node_modules/@cosmjs/crypto 0.32.4 -> 0.36.1
* apps/api/node_modules/@cosmjs/encoding 0.32.4 -> 0.36.1
* apps/api/node_modules/@cosmjs/math 0.32.4 -> 0.36.1
* apps/api/node_modules/@cosmjs/stargate 0.32.4 -> 0.36.1
* apps/deploy-web/node_modules/@cosmjs/encoding 0.32.4 -> 0.36.1
* apps/deploy-web/node_modules/@cosmjs/math 0.32.4 -> 0.36.1
* apps/deploy-web/node_modules/@cosmjs/stargate 0.32.4 -> 0.36.1
* apps/indexer/node_modules/@cosmjs/crypto 0.32.4 -> 0.36.1
* apps/indexer/node_modules/@cosmjs/encoding 0.32.4 -> 0.36.1
* apps/indexer/node_modules/@cosmjs/math 0.32.4 -> 0.36.1
* apps/indexer/node_modules/@cosmjs/stargate 0.32.4 -> 0.36.1
* apps/notifications/node_modules/@cosmjs/amino 0.33.1 -> 0.36.1
* apps/notifications/node_modules/@cosmjs/crypto/node_modules/@cosmjs/math 0.32.4 -> 0.36.1
* apps/notifications/node_modules/@cosmjs/crypto 0.32.4 -> 0.36.1
* apps/notifications/node_modules/@cosmjs/encoding 0.32.4 -> 0.36.1
* apps/notifications/node_modules/@cosmjs/json-rpc 0.33.1 -> 0.36.1
* apps/notifications/node_modules/@cosmjs/proto-signing 0.33.1 -> 0.36.1
* apps/notifications/node_modules/@cosmjs/socket 0.33.1 -> 0.36.1
* apps/notifications/node_modules/@cosmjs/stargate 0.33.1 -> 0.36.1
* apps/notifications/node_modules/@cosmjs/stream 0.33.1 -> 0.36.1
* apps/notifications/node_modules/@cosmjs/tendermint-rpc 0.33.1 -> 0.36.1
* apps/notifications/node_modules/@cosmjs/utils 0.33.1 -> 0.36.1
* apps/provider-proxy/node_modules/@cosmjs/amino 0.33.1 -> 0.36.1
* apps/provider-proxy/node_modules/@cosmjs/crypto 0.33.1 -> 0.36.1
* apps/provider-proxy/node_modules/@cosmjs/encoding 0.32.4 -> 0.36.1
* apps/provider-proxy/node_modules/@cosmjs/math 0.33.1 -> 0.36.1
* apps/provider-proxy/node_modules/@cosmjs/utils 0.33.1 -> 0.36.1
* apps/stats-web/node_modules/@cosmjs/encoding 0.32.4 -> 0.36.1
* node_modules/@adraffy/ens-normalize 1.11.0 -> 1.11.1
* node_modules/@akashnetwork/chain-sdk/node_modules/@cosmjs/crypto 0.33.1 -> 0.36.1
* node_modules/@akashnetwork/chain-sdk/node_modules/@cosmjs/encoding 0.33.1 -> 0.36.1
* node_modules/@akashnetwork/chain-sdk/node_modules/@cosmjs/json-rpc 0.33.1 -> 0.36.1
* node_modules/@akashnetwork/chain-sdk/node_modules/@cosmjs/math 0.33.1 -> 0.36.1
* node_modules/@akashnetwork/chain-sdk/node_modules/@cosmjs/proto-signing 0.33.1 -> 0.36.1
* node_modules/@akashnetwork/chain-sdk/node_modules/@cosmjs/socket 0.33.1 -> 0.36.1
* node_modules/@akashnetwork/chain-sdk/node_modules/@cosmjs/stargate 0.33.1 -> 0.36.1
* node_modules/@akashnetwork/chain-sdk/node_modules/@cosmjs/stream 0.33.1 -> 0.36.1
* node_modules/@akashnetwork/chain-sdk/node_modules/@cosmjs/tendermint-rpc 0.33.1 -> 0.36.1
* node_modules/@akashnetwork/chain-sdk/node_modules/@cosmjs/utils 0.33.1 -> 0.36.1
* node_modules/@akashnetwork/chain-sdk 1.0.0-alpha.9 -> 1.0.0-alpha.12
* node_modules/@chain-registry/cosmostation 1.66.71 -> 1.72.372
* node_modules/@chain-registry/keplr 1.68.2 -> 1.74.372
* node_modules/@chain-registry/types 0.50.17 -> 0.50.233
* node_modules/@chain-registry/utils 1.51.12 -> 1.51.233
* node_modules/@cosmos-kit/core 2.15.0 -> 2.16.6
* node_modules/@cosmos-kit/cosmos-extension-metamask 0.10.0 -> 0.13.3
* node_modules/@cosmos-kit/cosmostation-extension 2.13.0 -> 2.16.6
* node_modules/@cosmos-kit/keplr-extension/node_modules/@keplr-wallet/types 0.12.156 -> 0.12.280
* node_modules/@cosmos-kit/keplr-extension 2.14.0 -> 2.15.7
* node_modules/@cosmos-kit/keplr-mobile 2.14.1 -> 2.15.7
* node_modules/@cosmos-kit/keplr 2.14.1 -> 2.15.7
* node_modules/@cosmos-kit/leap-extension 2.14.1 -> 2.15.6
* node_modules/@cosmos-kit/leap-metamask-cosmos-snap 0.14.1 -> 0.15.6
* node_modules/@cosmos-kit/leap-mobile 2.13.1 -> 2.14.6
* node_modules/@cosmos-kit/leap 2.14.1 -> 2.15.6
* node_modules/@cosmos-kit/walletconnect 2.12.0 -> 2.13.6
* node_modules/@keplr-wallet/provider-extension/node_modules/@keplr-wallet/types 0.12.156 -> 0.12.280
* node_modules/@keplr-wallet/provider-extension 0.12.156 -> 0.12.280
* node_modules/@keplr-wallet/provider/node_modules/@keplr-wallet/types 0.12.156 -> 0.12.280
* node_modules/@keplr-wallet/provider 0.12.156 -> 0.12.280
* node_modules/@keplr-wallet/router 0.12.156 -> 0.12.280
* node_modules/@keplr-wallet/wc-client/node_modules/@keplr-wallet/types 0.12.156 -> 0.12.280
* node_modules/@keplr-wallet/wc-client 0.12.156 -> 0.12.280
* node_modules/@scure/base 1.2.5 -> 1.2.6
* node_modules/@walletconnect/core/node_modules/@walletconnect/types 2.21.3 -> 2.22.4
* node_modules/@walletconnect/core 2.21.3 -> 2.22.4
* node_modules/@walletconnect/sign-client/node_modules/@walletconnect/types 2.21.3 -> 2.22.4
* node_modules/@walletconnect/sign-client 2.21.3 -> 2.22.4
* node_modules/@walletconnect/utils/node_modules/@noble/curves 1.9.2 -> 1.9.7
* node_modules/@walletconnect/utils/node_modules/@walletconnect/types 2.21.3 -> 2.22.4
* node_modules/@walletconnect/utils 2.21.3 -> 2.22.4
* node_modules/abitype 1.0.8 -> 1.1.1
* node_modules/lossless-json 4.1.0 -> 4.3.0
* node_modules/ox 0.7.1 -> 0.9.3
* node_modules/starknet-types-07 -> node_modules/ starknet-io/starknet-types-07
* node_modules/starknet 6.24.1 -> 7.6.4
* packages/http-sdk/node_modules/@cosmjs/encoding 0.32.4 -> 0.36.1
* packages/http-sdk/node_modules/@cosmjs/math 0.32.4 -> 0.36.1
* packages/http-sdk/node_modules/@cosmjs/stargate 0.32.4 -> 0.36.1
+ apps/notifications/node_modules/@cosmjs/tendermint-rpc/node_modules/@cosmjs/math 0.36.1
+ node_modules/@cosmos-kit/core/node_modules/@dao-dao/cosmiframe 1.0.0
+ node_modules/@keplr-wallet/provider-extension/node_modules/uuid 11.1.0
+ node_modules/@starknet-io/starknet-types-08 0.8.4
+ node_modules/@walletconnect/utils/node_modules/@walletconnect/logger 3.0.0
+ node_modules/@walletconnect/utils/node_modules/on-exit-leak-free 2.1.2
+ node_modules/@walletconnect/utils/node_modules/pino-abstract-transport 2.0.0
+ node_modules/@walletconnect/utils/node_modules/pino-std-serializers 7.0.0
+ node_modules/@walletconnect/utils/node_modules/pino 10.0.0
+ node_modules/@walletconnect/utils/node_modules/process-warning 5.0.0
+ node_modules/@walletconnect/utils/node_modules/real-require 0.2.0
+ node_modules/@walletconnect/utils/node_modules/sonic-boom 4.2.0
+ node_modules/@walletconnect/utils/node_modules/thread-stream 3.1.0
+ node_modules/hash-wasm 4.12.0
+ node_modules/slow-redact 0.3.2
+ packages/http-sdk/node_modules/@cosmjs/amino 0.36.1
+ packages/http-sdk/node_modules/@cosmjs/crypto 0.36.1
+ packages/http-sdk/node_modules/@cosmjs/json-rpc 0.36.1
+ packages/http-sdk/node_modules/@cosmjs/proto-signing 0.36.1
+ packages/http-sdk/node_modules/@cosmjs/socket 0.36.1
+ packages/http-sdk/node_modules/@cosmjs/stream 0.36.1
+ packages/http-sdk/node_modules/@cosmjs/tendermint-rpc 0.36.1
+ packages/http-sdk/node_modules/@cosmjs/utils 0.36.1
+ packages/http-sdk/node_modules/@noble/ciphers 1.3.0
+ packages/http-sdk/node_modules/@noble/curves 1.9.7
+ packages/http-sdk/node_modules/cosmjs-types 0.10.1
+ packages/http-sdk/node_modules/ws 7.5.10
- apps/notifications/node_modules/@cosmjs/crypto/node_modules/@cosmjs/utils 0.32.4
- apps/notifications/node_modules/@cosmjs/math 0.33.1
- apps/notifications/node_modules/@cosmjs/tendermint-rpc/node_modules/@cosmjs/crypto 0.33.1
- apps/provider-proxy/node_modules/@cosmjs/crypto/node_modules/@cosmjs/encoding 0.33.1
- node_modules/@akashnetwork/chain-sdk/node_modules/@cosmjs/stargate/node_modules/@cosmjs/amino 0.33.1
- node_modules/@chain-registry/cosmostation/node_modules/@chain-registry/types 0.45.57
- node_modules/@chain-registry/keplr/node_modules/@chain-registry/types 0.45.55
- node_modules/@cosmos-kit/core/node_modules/@chain-registry/keplr/node_modules/@chain-registry/types 0.50.12
- node_modules/@cosmos-kit/leap-mobile/node_modules/@chain-registry/keplr 1.74.31
- node_modules/@walletconnect/utils/node_modules/@scure/base 1.2.6
- node_modules/fetch-cookie 3.0.1
- node_modules/filter-obj 1.1.0
- node_modules/isomorphic-fetch 3.0.0
- node_modules/isows 1.0.7
- node_modules/json2csv/node_modules/commander 6.2.1
- node_modules/json2csv 5.0.7
- node_modules/query-string 7.1.3
- node_modules/set-cookie-parser 2.7.1
- node_modules/split-on-first 1.1.0
- node_modules/strict-uri-encode 2.0.0
- node_modules/viem 2.31.0 * feat(network): testnet deposit implementation * feat(analytics): implement new handlers for indexing * feat(analytics): add protobuf types from chain sdk for indexer * fix(analytics): remove test throw * feat: update chain-sdk indexer * feat: update net package
* refactor: migrate provider-proxy to next chain sdk (#1980) * feat(analytics): chain sdk next indexer (#1983) * feat(network): testnet deposit implementation * feat(analytics): implement new handlers for indexing * feat(analytics): add protobuf types from chain sdk for indexer * fix(analytics): remove test throw * feat: update chain-sdk indexer * feat: update net package * fix: net package testnet (#2016) fix: net config data * feat: implement new chain sdk types in api * fix: replace DepositAuthorization * fix: update http sdk + functional test envs * fix: undo frontend code changes * fix: balance calculation * fix: pr fixes * fix: gpu prices test * fix: tests * fix: fallback deployment tests * fix: stripe webhook tests * fix: balances test * fix: api structure for leases + tests * fix: lease fallback tests * fix: tests * fix: build fix * fix: faucet json * refactor: gets rid of akashjs and akash-api * fix: pr fixes for tests * fix: build * fix: sdl --------- Co-authored-by: Serhii Stotskyi <sergiy.stotskiy@gmail.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Codecov Report❌ Patch coverage is ❌ Your patch status has failed because the patch coverage (46.25%) 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 #2114 +/- ##
==========================================
+ Coverage 46.11% 46.42% +0.31%
==========================================
Files 1019 1016 -3
Lines 28877 28674 -203
Branches 7543 7436 -107
==========================================
- Hits 13316 13313 -3
+ Misses 15252 14259 -993
- Partials 309 1102 +793
🚀 New features to boost your workflow:
|
* feat: update proto types to chain-sdk * feat: implement testnet console-web * feat: chain-sdk deployments + remove akashjs * fix: pr fixes * fix: pr fixes
* fix(deployment): get all deployment grants * fix: onboarding redirects * fix: remove log * fix: functional tests with sandbox * fix: env var * fix: remove log * fix: undo faucet changes * fix: faucet url * fix: tests * fix: remove testnet providers test * fix: window not defined
BREAKING CHANGE: targets sdk53
c16516d to
bea3e24
Compare
There was a problem hiding this comment.
Actionable comments posted: 50
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (28)
apps/api/test/functional/provider-graph-data.spec.ts (1)
206-206: Avoid using typeany.The code casts the response to
any, which violates the coding guideline. Define a proper TypeScript interface for the expected response structure.As per coding guidelines.
+interface ProviderGraphDataResponse { + currentValue: number; + compareValue: number; + snapshots: Array<{ date: string; value: number }>; + now: { + count: number; + cpu: number; + gpu: number; + memory: number; + storage: number; + }; + compare: { + count: number; + cpu: number; + gpu: number; + memory: number; + storage: number; + }; +} + - const data = (await response.json()) as any; + const data = (await response.json()) as ProviderGraphDataResponse;apps/deploy-web/src/utils/walletUtils.ts (2)
109-109: Type inconsistency: useNetworkIdinstead ofstring.The
networkIdparameter should be typed asNetworkId | undefinedto match the type used consistently throughout the file (lines 35, 79, 86, 97, 114).Apply this diff:
-export function updateStorageWallets(wallets: LocalWallet[], networkId?: string) { +export function updateStorageWallets(wallets: LocalWallet[], networkId?: NetworkId) {
114-132: PassnetworkIdto wallet storage operations.The function computes
selectedNetworkIdfrom thenetworkIdparameter (line 115) but doesn't pass it togetStorageWallets()(line 116) andupdateStorageWallets()(line 119). This causes operations to target the default network instead of the specified one, leading to data inconsistency when managing wallets across different networks.Apply this diff:
export function deleteWalletFromStorage(address: string, deleteDeployments: boolean, networkId?: NetworkId) { const selectedNetworkId = networkId || networkStore.selectedNetworkId; - const wallets = getStorageWallets(); + const wallets = getStorageWallets(networkId); const newWallets = wallets.filter(w => w.address !== address).map((w, i) => ({ ...w, selected: i === 0 })); - updateStorageWallets(newWallets); + updateStorageWallets(newWallets, networkId);apps/notifications/test/seeders/message.seeder.ts (2)
143-143: Incomplete migration: Hardcoded v1beta3 typeUrl.This function still uses the hardcoded v1beta3 typeUrl while the rest of the file has been migrated to v1beta4 with dynamic type construction. This creates inconsistency in test data where create deployment messages use v1beta4 types but close deployment messages use v1beta3.
Apply this diff to align with the SDK53 migration:
- typeUrl: "/akash.deployment.v1beta3.MsgCloseDeployment", + typeUrl: `/${MsgCloseDeployment.$type}`,
282-290: Incomplete migration: v1beta3 hardcoded throughout.This entire function still uses hardcoded v1beta3 type strings (lines 282, 283, 289) while the corresponding
generateMsgCreateDeploymentfunction was updated to use dynamic types. This creates inconsistent test data mixing v1beta3 and v1beta4 message types.Apply this diff to align with the SDK53 migration:
return { - type: "akash.deployment.v1beta3.MsgCloseDeployment", - typeUrl: "/akash.deployment.v1beta3.MsgCloseDeployment", + type: MsgCloseDeployment.$type, + typeUrl: `/${MsgCloseDeployment.$type}`, value: { id: { dseq: { low: parseInt(deploymentId.dseq, 10) }, owner: deploymentId.owner }, - $type: "akash.deployment.v1beta3.MsgCloseDeployment" + $type: MsgCloseDeployment.$type } };apps/api/src/billing/services/managed-signer/managed-signer.service.spec.ts (2)
34-34: Removeas anytype casts.These type casts violate the coding guidelines which explicitly state: "Never use type any or cast to type any. Always define the proper TypeScript types."
As per coding guidelines.
Apply this diff to use proper types:
- await expect(service.executeDecodedTxByUserId(null as any, [])).rejects.toThrow("User Not Found"); + await expect(service.executeDecodedTxByUserId(null!, [])).rejects.toThrow("User Not Found");- await expect(service.executeDecodedTxByUserId(undefined as any, [])).rejects.toThrow("User Not Found"); + await expect(service.executeDecodedTxByUserId(undefined!, [])).rejects.toThrow("User Not Found");Also applies to: 40-40
143-143: Replace explicitanytype withunknown.The explicit
anytype annotation violates the coding guidelines. Useunknowninstead, which is type-safe and requires proper type narrowing.As per coding guidelines.
Apply this diff:
- } catch (error: any) { + } catch (error: unknown) {apps/deploy-web/src/utils/deploymentData/v1beta3.ts (2)
98-98: Critical logic bug when deposit array lacks matching denom.When
depositis an array butdeposit.find()returnsundefined(no matching denom), the fallbackdeposit.toString()is called on the array, producing an invalid string like"[object Object],[object Object]"instead of a valid amount.Apply this diff to fix the logic:
- const _deposit = (Array.isArray(deposit) && deposit.find(d => d.denom === denom)) || { denom, amount: deposit.toString() }; + const _deposit = Array.isArray(deposit) + ? (deposit.find(d => d.denom === denom) || { denom, amount: "0" }) + : { denom, amount: deposit.toString() };Alternatively, throw an error if the required denom is not found in the array:
- const _deposit = (Array.isArray(deposit) && deposit.find(d => d.denom === denom)) || { denom, amount: deposit.toString() }; + const _deposit = Array.isArray(deposit) + ? deposit.find(d => d.denom === denom) ?? (() => { throw new Error(`Deposit denom ${denom} not found in provided deposits`); })() + : { denom, amount: deposit.toString() };
106-118: Breaking change: verify and update all consumers of the return object.The return object structure in
apps/deploy-web/src/utils/deploymentData/v1beta3.ts(lines 106-118) has breaking changes:
versionfield replaced withhashdepositorfield removed entirelyFound active consumers that require updates:
apps/stats-web/src/components/transactions/akash/MsgCreateDeployment.tsx:24- directly referencesdata?.depositorapps/stats-web/src/components/transactions/akash/MsgDepositDeployment.tsx:17- directly referencesmessage?.data?.depositorUpdate these components to remove references to the removed
depositorfield and ensure they usehashinstead ofversion.apps/notifications/src/modules/chain/services/tx-events-service/tx-events.service.spec.ts (1)
187-195: Align setup() with test guidelines: accept param, return SUT, and surface mocks.Per the repo’s spec guidelines, setup should accept a single param (inline typed), create the object under test, and return it (avoid shared state). Update setup to accept overrides and return
serviceandcometClient, then simplify the test body.Proposed change:
@@ - async function setup() { - const module = await Test.createTestingModule({ - providers: [TxEventsService, { provide: Comet38Client, useValue: mock<Comet38Client>() }, MockProvider(LoggerService)] - }).compile(); - - return { - module - }; - } + async function setup(opts: { + cometClient?: DeepPartial<Comet38Client>; + logger?: DeepPartial<LoggerService>; + } = {}) { + const module = await Test.createTestingModule({ + providers: [ + TxEventsService, + MockProvider(Comet38Client, opts.cometClient), + MockProvider(LoggerService, opts.logger), + ], + }).compile(); + const service = module.get<TxEventsService>(TxEventsService); + const cometClient = module.get<MockProxy<Comet38Client>>(Comet38Client); + return { service, cometClient, module }; + }And in the test:
- const { module } = await setup(); - const service = module.get<TxEventsService>(TxEventsService); - const cometClient = module.get<MockProxy<Comet38Client>>(Comet38Client); + const { service, cometClient } = await setup();Based on coding guidelines
Also applies to: 15-17
apps/api/src/billing/services/balances/balances.service.ts (1)
87-92: Add null safety check forescrowAccount.state.fundsbefore calling.reduce().The review comment is valid. While the
DeploymentInfoSchemadefinesfundsas a required array, the codebase uses inconsistent defensive patterns, indicating runtime concerns.Evidence of inconsistency in the same file (
deployment-reader.service.ts):
- Line 256 uses optional chaining:
state.funds[0]?.denom- Line 296 directly accesses without checks:
state.funds.reduce(...)Additionally,
deploymentDetailUtils.ts(line 19) checksif (d.escrow_account.state.funds.length > 0)before access. This mixed approach suggestsstate.fundsmay not always be guaranteed at runtime, even if the schema requires it.Adding a null check ensures the code won't throw a TypeError if
state.fundsis undefined:const deploymentEscrowBalance = activeDeployments.reduce((total: number, deployment: DeploymentInfo) => { const escrowAccount = deployment.escrow_account; if (!escrowAccount || !escrowAccount.state.funds) return total; return total + parseFloat(escrowAccount.state.funds.reduce((sum, { amount }) => sum + parseFloat(amount), 0).toFixed(18)); }, 0);apps/deploy-web/src/components/new-deployment/CreateLease/CreateLease.spec.tsx (1)
47-56: Use queryBy for expectations in deploy-web specs.*Per guidelines for apps/deploy-web .spec.tsx, prefer queryBy* in expectations. Replace getBy*/screen.getBy* in asserts within waitFor. Example patch:
- const { getByRole } = setup({ + const { queryByRole } = setup({ BidGroup, bids }); ... - expect(getByRole("button", { name: /Accept Bid/i })).toBeInTheDocument(); + expect(queryByRole("button", { name: /Accept Bid/i })).toBeInTheDocument();Similarly:
- const { getByRole } = setup({ + const { queryByRole } = setup({ BidGroup, bids }); - expect(getByRole("button", { name: /Accept Bid/i })).toBeInTheDocument(); + expect(queryByRole("button", { name: /Accept Bid/i })).toBeInTheDocument();- expect(getByRole("button", { name: /Close Deployment/i })).toBeInTheDocument(); - expect(queryByRole("button", { name: /Accept Bid/i })).not.toBeInTheDocument(); + expect(queryByRole("button", { name: /Close Deployment/i })).toBeInTheDocument(); + expect(queryByRole("button", { name: /Accept Bid/i })).not.toBeInTheDocument();- expect(screen.getByText(/Blockchain is unavailable/i)).toBeInTheDocument(); + expect(screen.queryByText(/Blockchain is unavailable/i)).toBeInTheDocument();- expect(screen.getByRole<HTMLButtonElement>("button", { name: /Accept Bid/i })).not.toBeDisabled(); + expect(screen.queryByRole<HTMLButtonElement>("button", { name: /Accept Bid/i })).not.toBeDisabled();- expect(screen.getByRole<HTMLButtonElement>("button", { name: /Accept Bid/i })).not.toBeDisabled(); + expect(screen.queryByRole<HTMLButtonElement>("button", { name: /Accept Bid/i })).not.toBeDisabled();- expect(screen.getByRole<HTMLButtonElement>("button", { name: /Re-send Manifest/i })).not.toBeDisabled(); + expect(screen.queryByRole<HTMLButtonElement>("button", { name: /Re-send Manifest/i })).not.toBeDisabled();Also applies to: 88-96, 98-104, 127-133, 178-180, 196-199, 248-250, 316-318
apps/indexer/src/shared/utils/protobuf.ts (1)
18-26: Filter Akash API values by $type to avoid "/undefined" registry entries.Current akashTypes maps all Object.values() without guarding for
$type. This can register invalid keys (e.g., "/undefined") and non‑GeneratedType values.Apply:
-const akashTypes: ReadonlyArray<[string, GeneratedType]> = [ - ...Object.values(v1beta1), - ...Object.values(v1beta2), - ...Object.values(v1beta3), - ...Object.values(prevV1beta4) -].map(x => ["/" + x.$type, x]); +const akashTypes: ReadonlyArray<[string, GeneratedType]> = [ + ...Object.values(v1beta1), + ...Object.values(v1beta2), + ...Object.values(v1beta3), + ...Object.values(prevV1beta4) +] + .filter((x: any): x is { $type: string } => "$type" in x) + .map(x => ["/" + x.$type, x as unknown as GeneratedType]);apps/deploy-web/src/hooks/useWalletBalance.ts (1)
66-68: Bug: totalDeploymentGrantsUUSDC is assigned from deploymentEscrowUAKT.Likely copy/paste error.
- totalDeploymentGrantsUUSDC: balances.deploymentEscrowUAKT, + totalDeploymentGrantsUUSDC: balances.deploymentGrantsUUSDC,apps/notifications/src/modules/chain/services/tx-events-service/tx-events.service.ts (1)
73-79: Critical: Comet38 uses txsResults, not results; handle null safely.
blockResults.resultswill be undefined and break. UsetxsResults ?? []in both places.- transactionCount: blockResults.results.length + transactionCount: (blockResults.txsResults ?? []).length @@ - return blockResults.results + return (blockResults.txsResults ?? []) .map(result => { let events: Event[] = [];Also applies to: 111-125
apps/stats-web/src/types/deployment.ts (1)
81-111: Removeany[]per repo TS guidelines; define anAttributetype.Violations found at 8 locations across both
DeploymentGroup_v2andDeploymentGroup_v3:
- Lines 86, 92, 98, 105 (cpu, gpu, memory, storage attributes in v2)
- Lines 147, 153, 159, 166 (cpu, gpu, memory, storage attributes in v3)
Define an
Attributetype and replace all instances:+type Attribute = { key: string; value: string };Then replace each
attributes: any[]withattributes: Attribute[]across all 8 occurrences.This aligns with the typed attributes pattern already used for
provider.attributesandrequirements.attributeselsewhere in the file.apps/deploy-web/src/components/sdl/RentGpusForm.tsx (1)
126-136: Type deposit explicitly to avoid implicit any/over‑broad inferenceClarify union to match callers and SDK.
-async function createAndValidateDeploymentData(yamlStr: string, dseq: string | null = null, deposit = defaultDeposit) { +async function createAndValidateDeploymentData( + yamlStr: string, + dseq: string | null = null, + deposit: number | DepositParams[] = defaultDeposit as number | DepositParams[] +) {Also consider dropping the default and always passing deposit from caller to prevent unintended string defaults.
apps/api/src/billing/services/trial-validation/trial-validation.service.ts (1)
47-57: AUDITOR check is too strict; use inclusion, not equality.
every(signedBy => signedBy === AUDITOR)rejects providers that include AUDITOR plus other signers. Usesome(...)orincludes(AUDITOR).Apply this diff:
- const hasSignedByAllOf = group.requirements?.signedBy?.allOf.every(signedBy => { - return signedBy === AUDITOR; - }); - assert(hasAttribute && hasSignedByAllOf, 400, `provider not authorized: ${JSON.stringify(group.requirements?.attributes)}`); + const hasAuditor = group.requirements?.signedBy?.allOf?.some(addr => addr === AUDITOR) === true; + assert(hasAttribute && hasAuditor, 400, `provider not authorized: ${JSON.stringify(group.requirements?.attributes)}`);apps/api/test/functional/balances.spec.ts (1)
47-47: Remove theanytype cast.The
as anycast violates the coding guideline that forbids using typeany. Define a proper TypeScript interface for the response structure.As per coding guidelines.
Apply this diff to define a proper type:
+interface BalancesResponse { + data: { + balance: number; + deployments: number; + total: number; + }; +} + const response = await app.request("/v1/balances", { method: "GET", headers: new Headers({ "Content-Type": "application/json", "x-api-key": apiKey }) }); expect(response.status).toBe(200); - const result = (await response.json()) as any; + const result = (await response.json()) as BalancesResponse;apps/deploy-web/src/services/auto-top-up-message/auto-top-up-message.service.ts (2)
48-69: Fix optional chaining and honor denom for fee allowances.
- Bug: options.next?.expiration.getTime() dereferences getTime on possibly undefined.
- Logic: collectFeeMessages always grants "uakt", ignoring USDC. Use options.denom (and pass it from callers).
Apply:
- const isSameExpiration = options.prev?.expiration?.getTime() === options.next?.expiration.getTime(); + const isSameExpiration = options.prev?.expiration?.getTime() === options.next?.expiration?.getTime();- if (options.next?.limit) { - messages.push(TransactionMessageData.getGrantBasicAllowanceMsg(options.granter, options.grantee, options.next.limit, "uakt", options.next.expiration)); + if (options.next?.limit) { + messages.push( + TransactionMessageData.getGrantBasicAllowanceMsg( + options.granter, + options.grantee, + options.next.limit, + options.denom ?? "uakt", + options.next.expiration + ) + );And pass denom from callers:
- ...this.collectFeeMessages({ + ...this.collectFeeMessages({ ...uaktSides, + denom: "uakt", prev: { /* ... */ }, next: options.next && { /* ... */ } }), - ...this.collectFeeMessages({ + ...this.collectFeeMessages({ ...usdcSides, + denom: this.usdcDenom, prev: { /* ... */ }, next: options.next && { /* ... */ } }),Also applies to: 97-115
119-121: Same optional chaining bug here.Mirror the fix in collectDeploymentMessages.
- const isSameExpiration = options.prev?.expiration?.getTime() === options.next?.expiration.getTime(); + const isSameExpiration = options.prev?.expiration?.getTime() === options.next?.expiration?.getTime();apps/api/test/functional/sign-and-broadcast-tx.spec.ts (1)
48-53: Removeas any; use typed destructuring.Avoids forbidden
anytype. As per coding guidelines, line 48 violates the "Never use type any" rule.- const { token } = (await differentUserResponse.json()) as any; + const { token }: { token: string } = await differentUserResponse.json();apps/deploy-web/src/components/deployments/DeploymentDetail.tsx (1)
96-104: Guard against undefined wallet address before reading local storage.On initial render
addresscan be empty/undefined; callingdeploymentLocalStorage.get(address, dseq)may throw or read the wrong key.useEffect(() => { if (deployment) { - getLeases(); - getProviders(); - const deploymentData = deploymentLocalStorage.get(address, dseq); + getLeases(); + getProviders(); + if (!address) return; + const deploymentData = deploymentLocalStorage.get(address, dseq); setDeploymentManifest(deploymentData?.manifest || ""); } - }, [deployment, dseq, getLeases, getProviders, address, deploymentLocalStorage]); + }, [deployment, dseq, getLeases, getProviders, address, deploymentLocalStorage]);apps/deploy-web/src/components/new-deployment/CreateLease/CreateLease.tsx (1)
183-198: Bug:isSendingManifestcan get stuck true on early return.You set
setIsSendingManifest(true)and thenreturnif no local manifest, skipping thefinallyreset. UI can hang.const sendManifest = useCallback( async (cert: LocalCert) => { - setIsSendingManifest(true); const bidKeys = Object.keys(selectedBids); - const localDeploymentData = deploymentLocalStorage.get(address, dseq); + const localDeploymentData = deploymentLocalStorage.get(address, dseq); analyticsService.track("send_manifest", { category: "deployments", label: "Send manifest after creating lease" }); - if (!localDeploymentData || !localDeploymentData.manifest) { - return; - } + if (!localDeploymentData || !localDeploymentData.manifest) { + return; + } + setIsSendingManifest(true); const sendManifestNotification = !isManaged && enqueueSnackbar(<Snackbar title="Deploying! 🚀" subTitle="Please wait a few seconds..." showLoading />, { variant: "info", autoHideDuration: null });Alternatively, move the early-return into the
try { ... } finally { setIsSendingManifest(false) }block.apps/api/test/seeders/deployment-info.seeder.ts (1)
12-12: Rename input field to reflect API: version → hashThe seeder input still exposes version, but output writes hash. Rename for clarity and to avoid confusion across tests.
-export interface DeploymentInfoSeederInput { +export interface DeploymentInfoSeederInput { owner?: string; dseq?: string; state?: string; - version?: string; + hash?: string; createdAt?: string; amount?: string; denom?: string; }And update usages accordingly in this file.
apps/deploy-web/src/components/deployments/DeploymentDepositModal.tsx (1)
100-117: <!-- [scratchpad_start]
[task: verify_onDeploymentDeposit_signature 3/3]
[observations]
- DeploymentDepositModal prop type (line 27):
onDeploymentDeposit: (deposit: number) => void;- DeploymentDetailTopBar impl (line 101):
async (deposit: number) => { ... return response; }- returns a value- DeploymentDetailTopBar usage (line 142):
const isSuccess = await onDeploymentDeposit(deposit);- awaits and checks return- Reviewed code line 116:
onDeploymentDeposit(deposit);- calls without await (consistent with void type)- All implementations (DetailTopBar, ListRow, RentGpusForm, ManifestEdit) are async with return values
- Prop type is
voidbut all callsites expect Promise with return value[analysis]
- CRITICAL TYPE MISMATCH: Prop signature declares
voidbut all implementations return Promises- DeploymentDetailTopBar will receive undefined for isSuccess (line 144 check will always be falsy)
- This is a runtime bug disguised as TypeScript: code compiles but fails at runtime
- The reviewed code (onSubmit) itself is fine - it just calls the prop without await
- The bug is in the prop type definition (line 27) which is outside reviewed code range
- But the issue affects correctness of all callsites including DeploymentDetailTopBar
[critical_issue]
- Type definition at line 27 is WRONG
- Should be:
onDeploymentDeposit: (deposit: number) => Promise<any>;or similar- Current type allows void return but all implementations return Promises
[decision]
- Original review says "" but missed type error
- The reviewed code (100-117) is fine, but prop type (line 27) needs fixing
- Tag as to flag the type error
[/scratchpad_end] -->Prop type signature mismatch:
onDeploymentDepositreturns Promise but typed asvoidThe prop type at line 27 declares
onDeploymentDeposit: (deposit: number) => void;, but all implementations (DeploymentDetailTopBar, DeploymentListRow, RentGpusForm, ManifestEdit) are async functions that return Promise-based values.DeploymentDetailTopBar at line 142 awaits and checks the return value (
const isSuccess = await onDeploymentDeposit(deposit); if (!isSuccess) { return; }), but receivesundefinedbecause the prop is typed asvoid. This causes a logic bug.Fix: Line 27 should be
onDeploymentDeposit: (deposit: number) => Promise<any>;(or the appropriate Promise return type matching implementations).apps/deploy-web/src/types/deployment.ts (2)
90-141: Resource.gpu/endpoints should be optional; also consider reusing DeploymentResource instead of inlining.Many groups omit GPU; requiring
gpuandendpointscan cause unnecessary type churn. Make them optional. Also, this inline struct duplicatesDeploymentResource; prefer reuse.Minimal fix (make fields optional):
- gpu: { + gpu?: { units: { val: string; }; attributes: Array<{ key: string; value: string; }>; }; - endpoints: Array<{ + endpoints?: Array<{ kind: string; sequence_number: number; }>;De-duplication alternative:
- resources: Array<{ - resource: { - id: number; - cpu: { /* ... */ }; - memory: { /* ... */ }; - storage: Array<{ /* ... */ }>; - gpu?: { /* ... */ }; - endpoints?: Array<{ /* ... */ }>; - }; + resources: Array<{ + resource: DeploymentResource_V3; count: number; price: { denom: string; amount: string }; }>;
165-214: Same as v2: makegpuandendpointsoptional; prefer reusingDeploymentResource_V3.Mirror the v2 changes here to avoid divergence between versions.
- gpu: { + gpu?: { units: { val: string; }; attributes: Array<{ key: string; value: string; }>; }; - endpoints: Array<{ + endpoints?: Array<{ kind: string; sequence_number: number; }>;Or replace the inline
resourcewithDeploymentResource_V3as in the v2 comment.
| @@ -0,0 +1,59 @@ | |||
| name: Deploy Deploy Web testnet | |||
There was a problem hiding this comment.
Fix workflow name typo.
Line 1 has "Deploy Deploy Web testnet" – should be "Deploy Console Web testnet" (remove duplicate "Deploy").
-name: Deploy Deploy Web testnet
+name: Deploy Console Web testnet📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| name: Deploy Deploy Web testnet | |
| name: Deploy Console Web testnet |
🤖 Prompt for AI Agents
.github/workflows/console-web-deploy-testnet.yml lines 1-1: The workflow name
has a typo "Deploy Deploy Web testnet"; update the name to "Deploy Console Web
testnet" by removing the duplicate "Deploy" and inserting "Console" so the first
line reads the corrected workflow name.
| getRevokeAllowanceMsg({ granter, grantee }: { granter: string; grantee: string }) { | ||
| return { | ||
| typeUrl: "/cosmos.feegrant.v1beta1.MsgRevokeAllowance", | ||
| typeUrl: `/${MsgRevokeAllowance.$type}`, | ||
| value: MsgRevoke.fromPartial({ | ||
| granter, | ||
| grantee, | ||
| msgTypeUrl: "/cosmos.feegrant.v1beta1.MsgGrantAllowance" | ||
| msgTypeUrl: `/${MsgGrantAllowance.$type}` | ||
| }) | ||
| }; | ||
| } |
There was a problem hiding this comment.
🧩 Analysis chain
Bug: typeUrl/value mismatch for feegrant revoke.
You set typeUrl to /${MsgRevokeAllowance.$type} but encode MsgRevoke. Use MsgRevokeAllowance value (no msgTypeUrl) or switch typeUrl to /${MsgRevoke.$type}.
Apply one of these diffs (prefer A):
Option A (preferred: feegrant-specific revoke):
- return {
- typeUrl: `/${MsgRevokeAllowance.$type}`,
- value: MsgRevoke.fromPartial({
- granter,
- grantee,
- msgTypeUrl: `/${MsgGrantAllowance.$type}`
- })
- };
+ return {
+ typeUrl: `/${MsgRevokeAllowance.$type}`,
+ value: MsgRevokeAllowance.fromPartial({
+ granter,
+ grantee
+ })
+ };Option B (generic authz revoke of feegrant):
- return {
- typeUrl: `/${MsgRevokeAllowance.$type}`,
- value: MsgRevoke.fromPartial({
+ return {
+ typeUrl: `/${MsgRevoke.$type}`,
+ value: MsgRevoke.fromPartial({
granter,
grantee,
msgTypeUrl: `/${MsgGrantAllowance.$type}`
})
};🏁 Script executed:
#!/bin/bash
# Ensure no other mismatches between typeUrl and value constructor exist
rg -nP --type=ts 'typeUrl:\s*`/\$\{(.+?)\}`.*\n\s*value:\s*(\w+)\.fromPartial' -C1Length of output: 0
I need to verify this issue more thoroughly using different approaches. Let me examine the file directly and search for type definitions.
Now let me examine the actual file to verify the imports and confirm the issue:
Based on my research, I've confirmed the distinction: MsgRevoke is from cosmos.authz.v1beta1 while MsgRevokeAllowance is from cosmos.feegrant.v1beta1. The review comment is identifying a real bug. Let me inspect the file to verify the exact context:
🏁 Script executed:
#!/bin/bash
# View the file with context around the bug
cat apps/api/src/billing/services/rpc-message-service/rpc-message.service.ts | head -120 | tail -25Length of output: 604
🏁 Script executed:
#!/bin/bash
# Look for imports of MsgRevoke and MsgRevokeAllowance
rg -n "import.*Msg(Revoke|RevokeAllowance)" apps/api/src/billing/services/rpc-message-service/rpc-message.service.tsLength of output: 158
🏁 Script executed:
#!/bin/bash
# Search for all typeUrl/value patterns in the file to find similar issues
rg -n "typeUrl:" apps/api/src/billing/services/rpc-message-service/rpc-message.service.ts -A2Length of output: 1708
🏁 Script executed:
#!/bin/bash
# Check if this method is used elsewhere
rg -n "getRevokeAllowanceMsg" apps/Length of output: 1152
🏁 Script executed:
#!/bin/bash
# Look for the pattern across the entire codebase
find apps/ -name "*.ts" -o -name "*.tsx" | xargs grep -l "getRevokeAllowanceMsg" 2>/dev/null || echo "No additional usage found"Length of output: 415
Fix the typeUrl/value mismatch: use MsgRevokeAllowance instead of MsgRevoke.
The bug is confirmed. Line 107–108 mismatches the feegrant revocation message: typeUrl references MsgRevokeAllowance (feegrant module) but the value uses MsgRevoke.fromPartial() (authz module). These are incompatible. The method name getRevokeAllowanceMsg and typeUrl both clearly indicate this should be a feegrant operation, so apply Option A from the review: use MsgRevokeAllowance.fromPartial({ granter, grantee }) without the msgTypeUrl field (which doesn't exist on that message type).
🤖 Prompt for AI Agents
In apps/api/src/billing/services/rpc-message-service/rpc-message.service.ts
around lines 105 to 114, the returned message mixes feegrant and authz types:
the typeUrl indicates MsgRevokeAllowance but the value is built with
MsgRevoke.fromPartial and includes a msgTypeUrl field. Replace the value
construction to use MsgRevokeAllowance.fromPartial({ granter, grantee }) and
remove the msgTypeUrl property so the typeUrl and value match the feegrant
MsgRevokeAllowance shape.
| const acceptedBids = createBidMsgs.filter(createBidMsg => | ||
| createLeaseMsgs.some( | ||
| l => | ||
| l.bidId?.gseq === createBidMsg.decoded.order?.gseq && | ||
| l.bidId?.oseq === createBidMsg.decoded.order?.oseq && | ||
| l.bidId?.provider === createBidMsg.decoded.provider | ||
| ) | ||
| createLeaseMsgs.some(l => { | ||
| const bidGseq = "gseq" in createBidMsg.decoded ? createBidMsg.decoded.gseq : (createBidMsg.decoded as v1beta5.MsgCreateBid).id?.gseq; | ||
| const bidOseq = "oseq" in createBidMsg.decoded ? createBidMsg.decoded.oseq : (createBidMsg.decoded as v1beta5.MsgCreateBid).id?.oseq; | ||
| const bidProvider = "provider" in createBidMsg.decoded ? createBidMsg.decoded.provider : (createBidMsg.decoded as v1beta5.MsgCreateBid).id?.provider; | ||
| return l.bidId?.gseq === bidGseq && l.bidId?.oseq === bidOseq && l.bidId?.provider === bidProvider; | ||
| }) | ||
| ); |
There was a problem hiding this comment.
Bug: accepted bid match ignores order shape (v1beta1–v1beta4)
Older MsgCreateBid versions expose gseq/oseq under order. Current check will miss them. Extract from id || order before comparing.
Apply:
- const acceptedBids = createBidMsgs.filter(createBidMsg =>
- createLeaseMsgs.some(l => {
- const bidGseq = "gseq" in createBidMsg.decoded ? createBidMsg.decoded.gseq : (createBidMsg.decoded as v1beta5.MsgCreateBid).id?.gseq;
- const bidOseq = "oseq" in createBidMsg.decoded ? createBidMsg.decoded.oseq : (createBidMsg.decoded as v1beta5.MsgCreateBid).id?.oseq;
- const bidProvider = "provider" in createBidMsg.decoded ? createBidMsg.decoded.provider : (createBidMsg.decoded as v1beta5.MsgCreateBid).id?.provider;
- return l.bidId?.gseq === bidGseq && l.bidId?.oseq === bidOseq && l.bidId?.provider === bidProvider;
- })
- );
+ const acceptedBids = createBidMsgs.filter(({ decoded }) =>
+ createLeaseMsgs.some(l => {
+ const id = ("id" in decoded && decoded.id) || ("order" in decoded && decoded.order);
+ const provider = ("provider" in decoded && decoded.provider) || (id && "provider" in id ? id.provider : undefined);
+ const gseq = id?.gseq;
+ const oseq = id?.oseq;
+ return l.bidId?.gseq === gseq && l.bidId?.oseq === oseq && l.bidId?.provider === provider;
+ })
+ );🤖 Prompt for AI Agents
In apps/api/src/deployment/repositories/message/message.repository.ts around
lines 59 to 66, the current matching logic extracts gseq/oseq/provider only from
top-level fields or id, but older MsgCreateBid versions store these under order;
update the extraction to prefer direct fields, then id, then order (i.e. use id
|| order) for gseq, oseq and provider before comparing to lease.bidId so all
v1beta1–v1beta5 shapes are covered; ensure null-safe optional chaining when
accessing id/order fields and keep comparisons unchanged otherwise.
| id: { | ||
| owner: lease.owner, | ||
| dseq: lease.dseq, | ||
| gseq: lease.gseq, | ||
| oseq: lease.oseq, | ||
| provider: lease.providerAddress | ||
| provider: lease.providerAddress, | ||
| bseq: 0 // Default value since bseq is not available in the database lease | ||
| }, |
There was a problem hiding this comment.
Use database bseq instead of a hardcoded 0.
DB schema includes lease.bseq with default 0 and unique index across owner/dseq/gseq/oseq/provider/bseq. Hardcoding 0 can misidentify leases.
- provider: lease.providerAddress,
- bseq: 0 // Default value since bseq is not available in the database lease
+ provider: lease.providerAddress,
+ bseq: lease.bseq📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| id: { | |
| owner: lease.owner, | |
| dseq: lease.dseq, | |
| gseq: lease.gseq, | |
| oseq: lease.oseq, | |
| provider: lease.providerAddress | |
| provider: lease.providerAddress, | |
| bseq: 0 // Default value since bseq is not available in the database lease | |
| }, | |
| id: { | |
| owner: lease.owner, | |
| dseq: lease.dseq, | |
| gseq: lease.gseq, | |
| oseq: lease.oseq, | |
| provider: lease.providerAddress, | |
| bseq: lease.bseq | |
| }, |
🤖 Prompt for AI Agents
In
apps/api/src/deployment/services/fallback-lease-reader/fallback-lease-reader.service.ts
around lines 41 to 48, the code hardcodes id.bseq = 0 which can misidentify
leases because the DB stores lease.bseq; replace the hardcoded 0 with the actual
lease.bseq value from the database (e.g., id.bseq = lease.bseq), and defensively
fall back to 0 only if lease.bseq is null/undefined to preserve existing
behavior.
| typeUrl: `${MsgCreateDeployment.$type}`, | ||
| value: MsgCreateDeployment.fromPartial({ |
There was a problem hiding this comment.
🧩 Analysis chain
typeUrl missing leading slash breaks registry matching.
EncodeObject.typeUrl must match the registry keys (usually /${Msg.$type}). Add the slash for both create and close messages.
Apply this diff:
- typeUrl: `${MsgCreateDeployment.$type}`,
+ typeUrl: `/${MsgCreateDeployment.$type}`,
...
- typeUrl: `${MsgCloseDeployment.$type}`,
+ typeUrl: `/${MsgCloseDeployment.$type}`,Run to catch any other missing slashes:
Also applies to: 156-158
🏁 Script executed:
#!/bin/bash
# Find EncodeObjects whose typeUrl uses ${Msg.$type} without a leading slash
rg -nP --type=ts --type=tsx 'typeUrl:\s*`(?!/)\$\{[A-Za-z0-9_]+\.\$type\}`' -C2Length of output: 27
I'll verify this by inspecting the file and running corrected shell scripts.Now let me run corrected verification scripts:
🏁 Script executed:
#!/bin/bash
# First, directly inspect the target file at the mentioned lines
echo "=== Checking lines 134-135 and 156-158 ==="
cat apps/api/src/deployment/services/gpu-bids-creator/gpu-bids-creator.service.ts | sed -n '130,160p'Length of output: 888
Now let me search for other instances of typeUrl patterns in the codebase:
Now let me search for other instances of typeUrl patterns in the codebase:
🏁 Script executed:
#!/bin/bash
# Find all typeUrl patterns in the codebase (using basic grep first)
rg -n 'typeUrl:' --type=ts -C2Length of output: 47073
Add leading slashes to typeUrl for MsgCreateDeployment and MsgCloseDeployment in gpu-bids-creator.service.ts.
Both lines 134 and 157 are missing the leading slash required for registry matching. The rest of the codebase consistently uses the /${Msg.$type} pattern (seen in rpc-message-service, TransactionMessageData, and test files). Apply the suggested diff:
- typeUrl: `${MsgCreateDeployment.$type}`,
+ typeUrl: `/${MsgCreateDeployment.$type}`,
...
- typeUrl: `${MsgCloseDeployment.$type}`,
+ typeUrl: `/${MsgCloseDeployment.$type}`,📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| typeUrl: `${MsgCreateDeployment.$type}`, | |
| value: MsgCreateDeployment.fromPartial({ | |
| typeUrl: `/${MsgCreateDeployment.$type}`, | |
| value: MsgCreateDeployment.fromPartial({ |
🤖 Prompt for AI Agents
In apps/api/src/deployment/services/gpu-bids-creator/gpu-bids-creator.service.ts
around lines 134 and 157, the typeUrl values for MsgCreateDeployment and
MsgCloseDeployment are missing the leading slash required for registry matching;
update both occurrences to prefix the message type with a slash (i.e. use
`/${MsgCreateDeployment.$type}` and `/${MsgCloseDeployment.$type}`) to match the
rest of the codebase and tests.
| "@akashnetwork/logging": "*", | ||
| "@akashnetwork/net": "*", | ||
| "@cosmjs/encoding": "^0.32.4", | ||
| "@cosmjs/encoding": "~0.36.1", |
There was a problem hiding this comment.
🧩 Analysis chain
Verify cosmjs version compatibility and rationale for tighter version pinning.
The changes shift from caret (^) to tilde (~) version specifiers for both @cosmjs/encoding and @cosmjs/amino, and bump the versions significantly (0.32→0.36, 0.33→0.36). While the alignment to ~0.36.1 is good, this stricter pinning strategy needs verification:
- Confirm that chain-sdk alpha.12 is compatible with cosmjs 0.36.1.
- Clarify why the version specifier was made more restrictive (was this to resolve breaking changes or other incompatibilities?).
- Verify that all cosmjs-related packages in the codebase are consistently updated (e.g., @cosmjs/stargate, @cosmjs/proto-signing, etc.).
Run the following script to audit the full cosmjs dependency tree and check for any other cosmjs packages that may need alignment:
Also applies to: 44-44
🏁 Script executed:
#!/bin/bash
# Description: Search for all cosmjs-related dependencies in the workspace
# Expected: Confirm all cosmjs packages are at 0.36.1 or understand version rationale
# Find package.json files
fd -e package.json --exec rg -A 50 '"dependencies"' {} + | rg '@cosmjs' -A 2 -B 2
# List all @cosmjs packages in this specific file for confirmation
echo "=== Current cosmjs versions in provider-proxy/package.json ==="
rg '@cosmjs' apps/provider-proxy/package.jsonLength of output: 129
Need to expand the search to find all cosmjs packages and chain-sdk dependency across the workspace.
---
🏁 Script executed:
```shell
#!/bin/bash
# Comprehensive search for all cosmjs packages and chain-sdk in workspace
echo "=== All cosmjs packages in workspace ==="
fd -e package.json -exec grep -l '@cosmjs' {} \; | while read f; do
echo "File: $f"
grep '@cosmjs' "$f"
done
echo ""
echo "=== Chain-sdk version in workspace ==="
fd -e package.json -exec grep -l 'chain-sdk' {} \; | while read f; do
echo "File: $f"
grep 'chain-sdk' "$f"
done
echo ""
echo "=== All cosmjs references in entire workspace ==="
rg '@cosmjs' --type json
Length of output: 41786
Need to locate chain-sdk version and understand provider-proxy's actual cosmjs usage.
---
🏁 Script executed:
```shell
#!/bin/bash
# Find chain-sdk version
echo "=== Chain-SDK version ==="
grep -r '@akashnetwork/chain-sdk' package.json packages/*/package.json apps/*/package.json 2>/dev/null
echo ""
echo "=== Provider-proxy imports ==="
# Check what provider-proxy actually imports from cosmjs
find apps/provider-proxy -type f \( -name '*.ts' -o -name '*.tsx' -o -name '*.js' \) ! -path '*/node_modules/*' -exec grep -h "@cosmjs" {} + | sort -u
echo ""
echo "=== Provider-proxy package.json dependencies section ==="
sed -n '/"dependencies"/,/^ }/p' apps/provider-proxy/package.json | head -30
Length of output: 1285
Found a critical issue: provider-proxy imports from @cosmjs/amino but doesn't declare it as a direct dependency. Let me verify where this is coming from.
---
🏁 Script executed:
```shell
#!/bin/bash
# Check chain-sdk dependencies to see if it provides @cosmjs/amino
echo "=== Chain-SDK dependencies (from lock file) ==="
grep -A 20 '"@akashnetwork/chain-sdk"' package-lock.json | grep -E '("version"|"@cosmjs)' | head -20
echo ""
echo "=== Verify: does provider-proxy have @cosmjs/amino in node_modules? ==="
if [ -d "apps/provider-proxy/node_modules/@cosmjs/amino" ]; then
echo "YES - @cosmjs/amino exists in provider-proxy node_modules"
# Check what provides it
grep -B 5 '"@cosmjs/amino"' apps/provider-proxy/package.json || echo "NOT in direct dependencies"
else
echo "NO - @cosmjs/amino NOT in provider-proxy node_modules"
fi
Length of output: 969
Add missing direct dependency for @cosmjs/amino in provider-proxy.
The code imports Secp256k1HdWallet from @cosmjs/amino, but @cosmjs/amino is not declared as a direct dependency in apps/provider-proxy/package.json. While it's available transitively through @akashnetwork/chain-sdk, direct imports require explicit declaration. Add "@cosmjs/amino": "~0.36.1" to align with the current cosmjs version and best practices.
Verification summary:
- Chain-SDK 1.0.0-alpha.12 declares cosmjs 0.36.1 packages
- provider-proxy imports from both @cosmjs/amino and @cosmjs/encoding
- Only @cosmjs/encoding is explicitly listed; @cosmjs/amino is missing from direct dependencies
🤖 Prompt for AI Agents
In apps/provider-proxy/package.json around line 28, package.json is missing a
direct dependency on @cosmjs/amino while the code imports Secp256k1HdWallet from
it; add "@cosmjs/amino": "~0.36.1" to the dependencies section (aligned with the
existing @cosmjs/encoding version) so the package explicitly declares the direct
import and avoids relying on transitive availability.
| }, | ||
| "dependencies": { | ||
| "@akashnetwork/chain-sdk": "1.0.0-alpha.9", | ||
| "@akashnetwork/chain-sdk": "1.0.0-alpha.12", |
There was a problem hiding this comment.
🧩 Analysis chain
Verify @akashnetwork/chain-sdk v1.0.0-alpha.12 is available and compatible.
The update to an exact alpha version (1.0.0-alpha.12) is appropriate for reproducibility. However, ensure this pre-release version is officially available and that the codebase has been updated to handle any API changes introduced in v1.0.0-alpha.12 compared to v1.0.0-alpha.9.
🏁 Script executed:
#!/bin/bash
# Description: Verify @akashnetwork/chain-sdk v1.0.0-alpha.12 is available and check its release date
# Check if the package version exists on npm
npm info @akashnetwork/chain-sdk@1.0.0-alpha.12 --json | jq '.version, .time'Length of output: 803
I've confirmed that @akashnetwork/chain-sdk v1.0.0-alpha.12 is available and officially released on npm (2025-10-23). However, the original review comment identifies two dependency updates that need verification. Let me check the second dependency before finalizing:
@cosmjs/encoding v0.36.1 does not exist on npm; this dependency cannot be installed and will cause build failure.
The latest version of @cosmjs/encoding is 0.33.1. The tilde pinning (~0.36.1) references a non-existent version that will fail during npm install. Update to an available version (recommend 0.33.1 or verify the intended version compatible with this SDK53 upgrade).
🤖 Prompt for AI Agents
In apps/stats-web/package.json around line 16, the dependency "@cosmjs/encoding"
was pinned as ~0.36.1 which does not exist on npm and will break installs;
update the package.json to use an actual published version (change to "0.33.1"
or another verified compatible version) and remove or adjust the tilde if exact
pinning is required, then run npm install and tests to confirm compatibility
with the SDK53 upgrade.
| import { MAINNET_ID, SANDBOX_ID } from "@akashnetwork/chain-sdk/web"; | ||
| import type { SupportedChainNetworks } from "@akashnetwork/net"; |
There was a problem hiding this comment.
🧩 Analysis chain
Verify the new import sources are correct.
The import reorganization looks consistent with the SDK53 upgrade. However, please verify that:
- The old import source (
@akashnetwork/network-store) is deprecated or replaced - These new import paths are the canonical locations going forward
🏁 Script executed:
#!/bin/bash
# Verify that the old import source no longer exports these constants
# and confirm the new sources are correct
# Check if MAINNET_ID and SANDBOX_ID are still exported from the old location
rg -n "export.*MAINNET_ID|export.*SANDBOX_ID" --type ts -g '**/network-store/**'
# Check the new import sources
rg -n "export.*MAINNET_ID|export.*SANDBOX_ID" --type ts -g '**/chain-sdk/**'
# Check for SupportedChainNetworks type definition
ast-grep --pattern 'export type SupportedChainNetworks = $$$'Length of output: 255
---
🏁 Script executed:
```shell
#!/bin/bash
# Search for MAINNET_ID and SANDBOX_ID exports without path restrictions
echo "=== Searching for MAINNET_ID and SANDBOX_ID exports ==="
rg -n "export.*MAINNET_ID|export.*SANDBOX_ID" --type ts
echo ""
echo "=== Searching for network-store references ==="
rg -n "network-store" --type ts
echo ""
echo "=== Searching for chain-sdk/web references ==="
rg -n "chain-sdk/web" --type ts
echo ""
echo "=== Checking package.json for @akashnetwork dependencies ==="
fd "package.json" --exec cat {} \; 2>/dev/null | grep -A 20 "@akashnetwork" | head -50
Length of output: 5222
---
🏁 Script executed:
```shell
#!/bin/bash
# View the complete denom.config.ts file under review
echo "=== apps/stats-web/src/config/denom.config.ts ==="
cat apps/stats-web/src/config/denom.config.ts
echo ""
echo "=== Compare with deploy-web version ==="
cat apps/deploy-web/src/config/denom.config.ts
echo ""
echo "=== Verify SupportedChainNetworks definition and usage ==="
rg -n "SupportedChainNetworks" --type ts -C 3
Length of output: 23982
---
🏁 Script executed:
```shell
#!/bin/bash
# Check how USDC_IBC_DENOMS is used in stats-web
echo "=== Usages of USDC_IBC_DENOMS in stats-web ==="
rg -n "USDC_IBC_DENOMS" apps/stats-web --type ts -C 3
echo ""
echo "=== Check if READABLE_DENOMS pattern exists in stats-web ==="
rg -n "READABLE_DENOMS" apps/stats-web --type ts -C 3
echo ""
echo "=== Verify type compatibility: is MAINNET_ID/SANDBOX_ID valid keys for SupportedChainNetworks? ==="
rg -n "netConfigData" packages/net/src/generated/netConfigData.ts 2>/dev/null | head -20
cat packages/net/src/generated/netConfigData.ts 2>/dev/null | head -50
Length of output: 3175
---
🏁 Script executed:
```shell
#!/bin/bash
# Find the actual values of MAINNET_ID and SANDBOX_ID constants
echo "=== Search for MAINNET_ID and SANDBOX_ID definitions in chain-sdk ==="
find . -path "*/chain-sdk/*" -name "*.ts" -type f 2>/dev/null | xargs grep -l "MAINNET_ID\|SANDBOX_ID" | head -5
echo ""
echo "=== Look for the definitions (not just imports) ==="
rg -n "const.*MAINNET_ID|const.*SANDBOX_ID" --type ts -A 1 | head -30
echo ""
echo "=== Check in node_modules if accessible, or look for SDK exports ==="
rg -n "MAINNET_ID.*=" --type ts -B 2 -A 2 | grep -v "import" | head -40
echo ""
echo "=== Check what chain-sdk/web might be exporting ==="
fd "index" packages/*/src --type f | xargs grep -l "MAINNET_ID\|SANDBOX_ID" 2>/dev/null
Length of output: 245
---
🌐 Web query:
```web
@akashnetwork/chain-sdk/web MAINNET_ID SANDBOX_ID constants values
💡 Result:
MAINNET_ID = "akashnet-2". [1]
SANDBOX_ID = "sandbox-01". [2]
Sources:
- Akash network repo (net) — chain-id for mainnet. [1]
- Akash Sandbox docs (chain id shown as sandbox-01). [2]
---
🏁 Script executed:
```shell
#!/bin/bash
# Verify the type of selectedNetworkId in networkStore
echo "=== Check networkStore type for selectedNetworkId ==="
cat apps/stats-web/src/store/network.store.ts | head -50
echo ""
echo "=== Check useDenom.ts full context ==="
cat apps/stats-web/src/hooks/useDenom.ts
echo ""
echo "=== Look for type definition of useSelectedNetworkId ==="
rg -n "useSelectedNetworkId" apps/stats-web --type ts -B 5 -A 5 | head -50
Length of output: 3477
Fix type annotation in USDC_IBC_DENOMS to use NetworkId instead of SupportedChainNetworks.
The type annotation is incorrect. The object uses MAINNET_ID and SANDBOX_ID as keys, which are "akashnet-2" and "sandbox-01" respectively—not values from SupportedChainNetworks. The type should match the actual keys being used.
Update line 2 and line 5:
- Import
NetworkIdfrom@akashnetwork/chain-sdk/web - Change type from
Partial<Record<SupportedChainNetworks, string>>toPartial<Record<NetworkId, string>>
This matches the pattern used in deploy-web and aligns the type with actual runtime values.
🤖 Prompt for AI Agents
In apps/stats-web/src/config/denom.config.ts around lines 1 to 2 and line 5, the
type annotation for USDC_IBC_DENOMS is wrong: import NetworkId from
"@akashnetwork/chain-sdk/web" instead of only importing MAINNET_ID and
SANDBOX_ID, and change the type from Partial<Record<SupportedChainNetworks,
string>> to Partial<Record<NetworkId, string>> so the keys (MAINNET_ID /
SANDBOX_ID) match the NetworkId type used at runtime.
|
|
||
| export const UAKT_DENOM = "uakt"; | ||
| export const USDC_IBC_DENOMS: Record<Exclude<NetworkId, "testnet">, string> = { | ||
| export const USDC_IBC_DENOMS: Partial<Record<SupportedChainNetworks, string>> = { |
There was a problem hiding this comment.
🧩 Analysis chain
Consider aligning types with deploy-web for consistency.
There's a type inconsistency: this file uses Partial<Record<SupportedChainNetworks, string>> while apps/deploy-web/src/config/denom.config.ts uses Partial<Record<NetworkId, string>> for the same USDC_IBC_DENOMS constant. Using different types across apps for the same concept can make the codebase harder to maintain.
Additionally, since the type is Partial, accessing values could return undefined. The AI summary mentions that "READABLE_DENOMS indexing now uses non-null assertions" - please ensure all indexing into this object is properly guarded against undefined values or that non-null assertions are only used where the key is guaranteed to exist.
🏁 Script executed:
#!/bin/bash
# Check how USDC_IBC_DENOMS is indexed throughout the codebase
# to verify safe usage with Partial type
# Find all usages of USDC_IBC_DENOMS indexing
rg -n "USDC_IBC_DENOMS\[" --type ts -A 2 -B 2
# Check for non-null assertions
rg -n "USDC_IBC_DENOMS.*!" --type ts -A 2 -B 2Length of output: 3298
---
🏁 Script executed:
```shell
#!/bin/bash
# Find type definitions for SupportedChainNetworks and NetworkId
rg -n "type SupportedChainNetworks|interface SupportedChainNetworks" --type ts -A 5
# Find NetworkId definition
rg -n "type NetworkId|interface NetworkId|enum NetworkId" --type ts -A 5
# Check stats-web's selectedNetworkId type
rg -n "useSelectedNetworkId" apps/stats-web/src --type ts -A 3 -B 1
# Verify stats-web USDC_IBC_DENOMS definition
cat apps/stats-web/src/config/denom.config.ts
Length of output: 5167
---
🏁 Script executed:
```shell
#!/bin/bash
# Find stats-web denom config with recursive search
fd -n "denom.config.ts" -x cat {}
# Also check stats-web hooks directly to see type usage
fd -n "useDenom.ts" apps/stats-web -x cat {}
Length of output: 461
---
🏁 Script executed:
```shell
#!/bin/bash
# Find denom config files
fd "denom.config.ts" --exec cat {}
# Also check stats-web hooks
fd "useDenom.ts" --exec cat {}
# Check what's in netConfigData to understand SupportedChainNetworks
rg -n "netConfigData" --type ts -A 10 | head -50
Length of output: 6250
Type inconsistency confirmed; stats-web needs defensive access pattern.
The review comment's concerns are substantiated:
-
Type mismatch is real: stats-web uses
Partial<Record<SupportedChainNetworks, string>>while deploy-web usesPartial<Record<NetworkId, string>>— these are fundamentally different types (SupportedChainNetworks is dynamically keyed from netConfigData, while NetworkId comes from an external package). -
Incomplete config: stats-web's USDC_IBC_DENOMS only has MAINNET_ID and SANDBOX_ID, while deploy-web's includes TESTNET_ID. This compounds the issue if selectedNetworkId is TESTNET_ID.
-
Unsafe access pattern: stats-web directly accesses
USDC_IBC_DENOMS[selectedNetworkId]without type casts or null checks, whereas deploy-web defensively usesas keyof typeof USDC_IBC_DENOMSandas string— critical given the Partial type can return undefined.
The review comment should be acted upon. Either align types across apps or add defensive casts/assertions in stats-web's indexing to handle potential undefined returns from the Partial type.
🤖 Prompt for AI Agents
In apps/stats-web/src/config/denom.config.ts around line 5, the USDC_IBC_DENOMS
map uses Partial<Record<SupportedChainNetworks, string>> and is missing
TESTNET_ID while code later indexes it unsafely with
USDC_IBC_DENOMS[selectedNetworkId]; update this file to either: (A) change the
map type to match deploy-web (Partial<Record<NetworkId, string>>) and add the
TESTNET_ID entry so the keyset aligns, or (B) keep SupportedChainNetworks but
make access defensive — add a runtime check/fallback when reading
USDC_IBC_DENOMS[selectedNetworkId] (e.g., verify the key exists, use a default
string or throw a clear error), and narrow types with a safe cast only after the
existence check; implement one of these fixes and ensure call sites do not index
the Partial map without checking for undefined.
| "peerDependencies": { | ||
| "@cosmjs/proto-signing": "^0.36.1", | ||
| "@cosmjs/stargate": "^0.36.1" | ||
| } |
There was a problem hiding this comment.
🧩 Analysis chain
Peer dependency migration may require consumer updates.
Moving @cosmjs/proto-signing and @cosmjs/stargate from devDependencies to peerDependencies is architecturally correct for a library package, as it prevents version conflicts. However, this is a breaking change that requires all consumers to:
- Install these dependencies explicitly at version
^0.36.1 - Ensure compatibility with the upgraded CosmJS version
Verify that:
- All consuming packages in the monorepo have been updated to include these peer dependencies
- The version
^0.36.1is compatible with the chain-sdk private-types being used throughout the codebase
🏁 Script executed:
#!/bin/bash
# Check if consuming packages declare these dependencies
fd -t f 'package.json' apps/ packages/ --exec jq -r 'select(.dependencies["@akashnetwork/http-sdk"]) | .name, .dependencies["@cosmjs/proto-signing"], .dependencies["@cosmjs/stargate"]'
# Check for version consistency across the monorepo
fd -t f 'package.json' --exec jq -r 'select(.dependencies["@cosmjs/proto-signing"] or .dependencies["@cosmjs/stargate"]) | {name: .name, proto: .dependencies["@cosmjs/proto-signing"], stargate: .dependencies["@cosmjs/stargate"]}'Length of output: 614
🏁 Script executed:
#!/bin/bash
# Check if log-collector and provider-console depend on http-sdk
echo "=== Checking log-collector dependencies ==="
fd -t f 'package.json' packages/log-collector --exec jq -r '{name: .name, httpSdk: .dependencies["@akashnetwork/http-sdk"], devHttpSdk: .devDependencies["@akashnetwork/http-sdk"], peerHttpSdk: .peerDependencies["@akashnetwork/http-sdk"]}'
echo -e "\n=== Checking provider-console dependencies ==="
fd -t f 'package.json' apps/provider-console --exec jq -r '{name: .name, httpSdk: .dependencies["@akashnetwork/http-sdk"], devHttpSdk: .devDependencies["@akashnetwork/http-sdk"], peerHttpSdk: .peerDependencies["@akashnetwork/http-sdk"]}'
# Also check if http-sdk itself depends on specific cosmjs versions
echo -e "\n=== Checking http-sdk dependencies ==="
fd -t f 'package.json' packages/http-sdk --exec jq -r '{name: .name, proto: .dependencies["@cosmjs/proto-signing"], stargate: .dependencies["@cosmjs/stargate"], peerProto: .peerDependencies["@cosmjs/proto-signing"], peerStargate: .peerDependencies["@cosmjs/stargate"]}'Length of output: 483
🏁 Script executed:
#!/bin/bash
# Check if log-collector and provider-console depend on http-sdk
echo "=== Checking log-collector dependencies ==="
fd -t f 'package.json' packages/log-collector --exec jq -r '{name: .name, httpSdk: .dependencies["@akashnetwork/http-sdk"], devHttpSdk: .devDependencies["@akashnetwork/http-sdk"], peerHttpSdk: .peerDependencies["@akashnetwork/http-sdk"]}'
echo -e "\n=== Checking provider-console dependencies ==="
fd -t f 'package.json' apps/provider-console --exec jq -r '{name: .name, httpSdk: .dependencies["@akashnetwork/http-sdk"], devHttpSdk: .devDependencies["@akashnetwork/http-sdk"], peerHttpSdk: .peerDependencies["@akashnetwork/http-sdk"]}'
# Also check if http-sdk itself depends on specific cosmjs versions
echo -e "\n=== Checking http-sdk dependencies ==="
fd -t f 'package.json' packages/http-sdk --exec jq -r '{name: .name, proto: .dependencies["@cosmjs/proto-signing"], stargate: .dependencies["@cosmjs/stargate"], peerProto: .peerDependencies["@cosmjs/proto-signing"], peerStargate: .peerDependencies["@cosmjs/stargate"]}'Length of output: 483
🏁 Script executed:
#!/bin/bash
# Find log-collector package location
echo "=== Finding log-collector package ==="
fd -t f 'package.json' -x grep -l '"name".*"@akashnetwork/log-collector"'
# Get all packages that depend on http-sdk (regardless of dependency type)
echo -e "\n=== All packages consuming http-sdk ==="
fd -t f 'package.json' --exec jq -r 'select(.dependencies["@akashnetwork/http-sdk"] or .devDependencies["@akashnetwork/http-sdk"] or .peerDependencies["@akashnetwork/http-sdk"]) | {name: .name, httpSdk: (.dependencies["@akashnetwork/http-sdk"] // .devDependencies["@akashnetwork/http-sdk"] // .peerDependencies["@akashnetwork/http-sdk"]), proto: (.dependencies["@cosmjs/proto-signing"] // "not declared"), stargate: (.dependencies["@cosmjs/stargate"] // "not declared")}'Length of output: 554
🏁 Script executed:
#!/bin/bash
# Examine log-collector's full dependency declarations
echo "=== log-collector package.json dependencies ==="
cat apps/log-collector/package.json | jq '.dependencies, .devDependencies, .peerDependencies'
# Search for any cosmjs imports/references in log-collector
echo -e "\n=== Checking for cosmjs references in log-collector ==="
fd -t f '\.(ts|tsx|js|jsx)$' apps/log-collector --exec grep -l '@cosmjs' {} \; 2>/dev/null | head -20Length of output: 1055
🏁 Script executed:
#!/bin/bash
# Examine log-collector's full dependency declarations
echo "=== log-collector package.json dependencies ==="
cat apps/log-collector/package.json | jq '.dependencies, .devDependencies, .peerDependencies'
# Search for any cosmjs imports/references in log-collector
echo -e "\n=== Checking for cosmjs references in log-collector ==="
fd -t f '\.(ts|tsx|js|jsx)$' apps/log-collector --exec grep -l '@cosmjs' {} \; 2>/dev/null | head -20Length of output: 1055
Add @cosmjs peer dependencies to log-collector package.json.
The peer dependency migration to http-sdk is partially implemented but incomplete. While three direct consumers (console-api, notifications, console-web) correctly declare @cosmjs dependencies at ~0.36.1, log-collector depends on http-sdk without declaring the required peer dependencies.
Since log-collector's source code does not directly use @cosmjs (verified via code search), the peer dependency declarations should be added to ensure proper dependency resolution and avoid installation failures in non-monorepo contexts:
- Add
"@cosmjs/proto-signing": "^0.36.1"to log-collector dependencies - Add
"@cosmjs/stargate": "^0.36.1"to log-collector dependencies
🤖 Prompt for AI Agents
In packages/http-sdk/package.json around lines 30 to 33, the peerDependencies
for @cosmjs are declared in http-sdk but log-collector (a direct consumer of
http-sdk) lacks those peer dependencies; update log-collector's package.json to
add "@cosmjs/proto-signing": "^0.36.1" and "@cosmjs/stargate": "^0.36.1" under
its dependencies (or peerDependencies if you prefer to mirror http-sdk), then
run a quick install/test to verify resolution in non-monorepo contexts.
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes
Chores