Skip to content

refactor: simplifies multiple trx version support#2052

Merged
stalniy merged 1 commit intomainfrom
refactor/upgrade-stats
Oct 14, 2025
Merged

refactor: simplifies multiple trx version support#2052
stalniy merged 1 commit intomainfrom
refactor/upgrade-stats

Conversation

@stalniy
Copy link
Contributor

@stalniy stalniy commented Oct 14, 2025

Why

To support new messages after chain sdk upgrade. Fixes #1922

Summary by CodeRabbit

  • New Features

    • Rich, version-aware views for many Akash transaction types consolidated (bids, leases, deployments, provider actions, account deposits).
    • Deposit detail view and improved AKT amount display (accepts numeric or string inputs).
  • Improvements

    • Faster transaction pages via client-side lazy loading of time displays.
    • Safer message rendering using version-aware selection with a graceful JSON fallback.
    • USDC denom mapping typing updated.
  • Chores

    • SDK dependency bumped and a deprecated dev dependency removed.

@stalniy stalniy requested a review from a team as a code owner October 14, 2025 10:20
"name": "@akashnetwork/console-web",
"version": "2.115.0",
"license": "Apache-2.0",
"dependencies": {
Copy link
Contributor

@github-actions github-actions bot Oct 14, 2025

Choose a reason for hiding this comment

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

🔄 Carefully review the package-lock.json diff

Resolve the comment if everything is ok

+ apps/stats-web/node_modules/@akashnetwork/chain-sdk                                      1.0.0-alpha.8
+ apps/stats-web/node_modules/@cosmjs/crypto                                               0.33.1  
+ apps/stats-web/node_modules/@cosmjs/json-rpc                                             0.33.1  
+ apps/stats-web/node_modules/@cosmjs/math                                                 0.33.1  
+ apps/stats-web/node_modules/@cosmjs/proto-signing                                        0.33.1  
+ apps/stats-web/node_modules/@cosmjs/socket                                               0.33.1  
+ apps/stats-web/node_modules/@cosmjs/stargate/node_modules/@cosmjs/amino                  0.33.1  
+ apps/stats-web/node_modules/@cosmjs/stargate                                             0.33.1  
+ apps/stats-web/node_modules/@cosmjs/stream                                               0.33.1  
+ apps/stats-web/node_modules/@cosmjs/tendermint-rpc/node_modules/@cosmjs/encoding         0.33.1  
+ apps/stats-web/node_modules/@cosmjs/tendermint-rpc                                       0.33.1  
+ apps/stats-web/node_modules/@cosmjs/utils                                                0.33.1  
+ apps/stats-web/node_modules/ws                                                           7.5.10  

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 14, 2025

Walkthrough

Refactors transaction message rendering to a version-gated HOC and lookup registry, consolidates Akash message views into a barrel, removes per-version duplicate files, migrates network/type imports to @akashnetwork/chain-sdk, lazy-loads react-intl in TransactionInfo, and widens AKTAmount uakt prop to accept string.

Changes

Cohort / File(s) Summary of changes
Dependency & package files
apps/stats-web/package.json, apps/deploy-web/package.json
Add/upgrade @akashnetwork/chain-sdk (added in stats-web; bumped in deploy-web), remove @akashnetwork/akashjs devDep in stats-web.
Network/type import updates
apps/stats-web/src/config/denom.config.ts, apps/stats-web/src/services/api-url/api-url.service.ts
Replace imports of network types from @akashnetwork/akashjs/... with @akashnetwork/chain-sdk/web; adjust USDC_IBC_DENOMS key type to use NetworkId (exclude "testnet").
Transaction orchestration & HOC
apps/stats-web/src/components/transactions/TxMessageRow.tsx, apps/stats-web/src/components/transactions/createMsgView.tsx
Replace large per-type switch with namespace/version/name lookup; add createMsgView HOC that renders a supported-version component or falls back to JSON viewer.
Akash message views (new consolidated set)
apps/stats-web/src/components/transactions/akash/*, apps/stats-web/src/components/transactions/akash/index.ts, apps/stats-web/src/components/transactions/akash/helpers/DepositDetail.tsx
Add many Akash Msg* components implemented via createMsgView, add DepositDetail helper, and an akash barrel export aggregating the message components.
Remove per-version Akash files
apps/stats-web/src/components/transactions/akash/v1beta*/**/*.tsx
Delete many per-version Msg* implementations (v1beta1–v1beta4/v1beta5) now superseded by consolidated views.
Generic messages barrel
apps/stats-web/src/components/transactions/generic/index.ts
Add barrel file re-exporting generic Cosmos/IBC Msg* view modules.
UI lazy-loading
apps/stats-web/src/app/transactions/[hash]/TransactionInfo.tsx
Lazy/dynamic (client-side) import of FormattedDate and FormattedRelativeTime via next/dynamic with ssr: false.
Component API tweak
apps/stats-web/src/components/AKTAmount.tsx
Widen uakt prop type from number to `number
Math helper simplification
apps/stats-web/src/lib/mathHelpers.ts
Simplified coinsToAmount return path (removed redundant else branch; behavior unchanged).

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant TxRow as TxMessageRow
  participant AkashIdx as Akash index (./akash/index)
  participant GenericIdx as Generic index (./generic/index)
  participant MsgComp as MsgComponent (createMsgView)
  participant Fallback as DynamicReactJson

  User->>TxRow: pass tx type + message
  TxRow->>TxRow: parse type -> {namespace, version, name}
  alt namespace == "akash"
    TxRow->>AkashIdx: lookup component by name
  else
    TxRow->>GenericIdx: lookup component by name
  end
  alt component found
    TxRow->>MsgComp: render({message, version})
  else
    TxRow->>Fallback: render(deep-cloned message JSON)
  end
Loading
sequenceDiagram
  autonumber
  participant Parent as ParentRenderer
  participant Wrapper as createMsgView
  participant Inner as InnerView
  participant Fallback as DynamicReactJson

  Parent->>Wrapper: render({version, message})
  alt version in supportedVersions
    Wrapper->>Inner: render(props)
  else
    Wrapper->>Fallback: render(cloned props)
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Suggested reviewers

  • ygrishajev
  • baktun14

Poem

A twitch of whiskers, keys that clack,
I hop through code and stitch the track.
One view to bind the versions new,
If types misstep, JSON will do.
Carrots and commits — hop, deploy! 🥕🐇

Pre-merge checks and finishing touches

❌ Failed checks (3 warnings)
Check name Status Explanation Resolution
Linked Issues Check ⚠️ Warning This PR refactors transaction components as needed, replacing hardcoded v1beta mappings and adding missing message components per issue #1922, but it does not include any changes related to a maintenance page for the chain upgrade. Add or update the maintenance page component and configure the app to display it during the chain upgrade as specified in issue #1922 to fully satisfy the linked issue requirements.
Out of Scope Changes Check ⚠️ Warning The PR includes unrelated updates such as lazy loading of react-intl in TransactionInfo, widening the uakt prop type in AKTAmount, and minor utility tweaks (mathHelpers and denom config changes) that do not address removing hardcoded v1beta versions or adding transaction components per issue #1922. Separate these unrelated refactors into dedicated PRs or isolate them from the main version-support and missing-component changes to keep this PR focused on the linked issue objectives.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ 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 succinctly describes the core refactor to simplify support for multiple transaction versions, reflecting the primary change of replacing hardcoded version mappings with a more generic solution without extraneous details or ambiguity.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor/upgrade-stats

Comment @coderabbitai help to get the list of available commands and usage tips.

@socket-security
Copy link

socket-security bot commented Oct 14, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​akashnetwork/​chain-sdk@​1.0.0-alpha.87710010096100

View full report

@codecov
Copy link

codecov bot commented Oct 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 46.09%. Comparing base (3c9b8f3) to head (f6217ba).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2052      +/-   ##
==========================================
- Coverage   46.10%   46.09%   -0.02%     
==========================================
  Files        1020     1020              
  Lines       28786    28786              
  Branches     7530     7511      -19     
==========================================
- Hits        13273    13270       -3     
+ Misses      15128    14317     -811     
- Partials      385     1199     +814     
Flag Coverage Δ
api 82.26% <ø> (-0.04%) ⬇️
deploy-web 24.15% <ø> (ø)
log-collector 75.35% <ø> (ø)
notifications 88.16% <ø> (ø)
provider-console 81.48% <ø> (ø)
provider-proxy 85.00% <ø> (ø)
see 202 files with indirect coverage changes
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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: 6

Caution

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

⚠️ Outside diff range comments (2)
apps/stats-web/src/components/transactions/akash/MsgUpdateProvider.tsx (1)

13-13: Fix potential crash: JSON.parse on undefined attributes

JSON.parse(JSON.stringify(message?.data?.attributes)) throws if attributes is undefined. Pass the object directly and guard.

Apply:

-      <LabelValue label="Attributes" value={<DynamicReactJson src={JSON.parse(JSON.stringify(message?.data?.attributes))} />} />
+      <LabelValue label="Attributes" value={message?.data?.attributes ? <DynamicReactJson src={message.data.attributes} /> : undefined} />
apps/stats-web/src/components/transactions/akash/MsgCreateProvider.tsx (1)

13-13: Fix potential crash: JSON.parse on undefined attributes

Same issue as MsgUpdateProvider. Guard and avoid deep-clone.

Apply:

-      <LabelValue label="Attributes" value={<DynamicReactJson src={JSON.parse(JSON.stringify(message?.data?.attributes))} />} />
+      <LabelValue label="Attributes" value={message?.data?.attributes ? <DynamicReactJson src={message.data.attributes} /> : undefined} />
🧹 Nitpick comments (10)
apps/stats-web/src/lib/mathHelpers.ts (1)

46-46: Consider replacing any cast with proper type guard.

As per coding guidelines, avoid casting to any. Use a type guard to check if coins is an array.

Apply this diff to improve type safety:

 export function coinsToAmount(coins: Coin[] | Coin, denom: string) {
-  const currentCoin = (coins as any).length !== undefined ? (coins as Coin[]).find(c => c.denom === denom) : (coins as Coin);
+  const currentCoin = Array.isArray(coins) ? coins.find(c => c.denom === denom) : coins;
   if (!currentCoin) return 0;
   return currentCoin.amount;
 }
apps/stats-web/src/components/transactions/createMsgView.tsx (1)

5-12: Safer fallback and minor perf tweak

  • Prefer showing message.data; avoid deep-cloning entire props.
  • JSON.stringify can throw (cycles/BigInt). Use raw value; fall back only if needed.
  • Precompute a Set for versions.

Apply:

-export function createMsgView<T extends { message: TransactionMessage; version: string }>(supportedVersions: string[], Component: React.FunctionComponent<T>) {
-  return (props: T) => {
-    if (supportedVersions.includes(props.version)) {
-      return <Component {...props} />;
-    }
-
-    return <DynamicReactJson src={JSON.parse(JSON.stringify(props))} />;
-  };
-}
+export function createMsgView<T extends { message: TransactionMessage; version: string }>(supportedVersions: string[], Component: React.FunctionComponent<T>) {
+  const supported = new Set(supportedVersions);
+  return (props: T) => {
+    if (supported.has(props.version)) {
+      return <Component {...props} />;
+    }
+    return <DynamicReactJson src={props.message?.data ?? props} />;
+  };
+}
apps/stats-web/src/components/transactions/akash/MsgRevokeCertificate.tsx (1)

7-14: Avoid repeating version arrays across Msg files*

Centralize common version lists (e.g., AKASH_CERT_VERSIONS) to reduce drift and ease future upgrades.

apps/stats-web/src/components/transactions/akash/MsgCloseLease.tsx (1)

10-24: Deduplicate supported versions

Extract a shared AKASH_LEASE_VERSIONS constant to avoid manual updates across multiple Msg* components.

apps/stats-web/src/services/api-url/api-url.service.ts (1)

1-1: Add explicit return type and unreachable-case guard

Make return type explicit and fail fast if config shape is unexpected.

-  getBaseApiUrlFor(network: NetworkId) {
+  getBaseApiUrlFor(network: NetworkId): string {
@@
-    if ("NEXT_PUBLIC_BASE_API_MAINNET_URL" in this.config) {
+    if ("NEXT_PUBLIC_BASE_API_MAINNET_URL" in this.config) {
@@
-    }
+    }
+    throw new Error("ApiUrlService: no base API URL configured for provided config");
   }

Also applies to: 13-35

apps/stats-web/src/components/transactions/TxMessageRow.tsx (1)

31-47: Harden parsing and simplify fallback; consider typed registries

  • Defensive parsing for atypical type strings.
  • Avoid JSON stringify; pass raw data.
  • Optional: expose explicit registries from barrels to avoid dynamic indexing implicit-any.
-  const [namespace, ...typeDetails] = message.type.split(".");
-  const version = typeDetails[typeDetails.length - 2];
-  const name = typeDetails[typeDetails.length - 1];
-  let MsgComponent: React.FunctionComponent<TxMessageProps & { version: string }>;
+  const parts = message.type?.split(".") ?? [];
+  const namespace = parts[0];
+  const typeDetails = parts.slice(1);
+  const version = typeDetails.length >= 2 ? typeDetails[typeDetails.length - 2] : "";
+  const name = typeDetails[typeDetails.length - 1];
+  let MsgComponent: React.FunctionComponent<TxMessageProps & { version: string }> | undefined;
@@
-  if (!MsgComponent) {
-    return <DynamicReactJson src={JSON.parse(JSON.stringify(message?.data))} />;
+  if (!MsgComponent) {
+    return <DynamicReactJson src={message?.data ?? { type: message.type }} />;
   }

Optionally, export a registry from "./akash" and "./generic" (Record<MsgName, FC>) and use it here to avoid dynamic namespace indexing.

apps/stats-web/src/components/transactions/akash/MsgDeleteProviderAttributes.tsx (1)

14-14: Reminder: Address the TODO comment.

The TODO comment indicates that a link to the provider page is needed.

Do you want me to generate the implementation for the provider page link or open a new issue to track this task?

apps/stats-web/src/components/transactions/akash/MsgCreateLease.tsx (1)

10-22: Approve with reminder to address TODO.

The component correctly uses the createMsgView wrapper to support multiple transaction versions (v1beta1–v1beta5). The fallback pattern on Line 11 appropriately handles version differences in the bid ID structure.

However, Line 15 contains a TODO comment about adding a link to the provider page.

Do you want me to generate the implementation for the provider page link or open a new issue to track this task?

apps/stats-web/src/components/transactions/akash/MsgWithdrawLease.tsx (1)

10-21: Consider extracting shared lease rendering logic.

The component correctly uses the createMsgView wrapper to support multiple transaction versions. However, Lines 11-20 are nearly identical to MsgCreateLease.tsx (Lines 11-20), suggesting an opportunity to reduce code duplication.

Consider extracting the shared bid ID rendering logic into a reusable component:

// helpers/BidIdDetails.tsx
export const BidIdDetails: React.FC<{ bidId: any }> = ({ bidId }) => (
  <>
    <LabelValue label="Owner" value={<AddressLink address={bidId?.owner} />} />
    <LabelValue label="Provider" value={<Link href={UrlService.address(bidId?.provider)}>{bidId?.provider}</Link>} />
    <LabelValue label="dseq" value={<Link href={UrlService.deployment(bidId?.owner, bidId?.dseq)}>{bidId?.dseq}</Link>} />
    <LabelValue label="gseq" value={bidId?.gseq} />
    <LabelValue label="oseq" value={bidId?.oseq} />
  </>
);

Then use it in both components:

 export const MsgWithdrawLease = createMsgView(["v1beta1", "v1beta2", "v1beta3", "v1beta4", "v1beta5"], ({ message }) => {
   const bidId = message?.data?.id || message?.data?.bidId;
-  return (
-    <>
-      <LabelValue label="Owner" value={<AddressLink address={bidId?.owner} />} />
-      <LabelValue label="Provider" value={<Link href={UrlService.address(bidId?.provider)}>{bidId?.provider}</Link>} />
-      <LabelValue label="dseq" value={<Link href={UrlService.deployment(bidId?.owner, bidId?.dseq)}>{bidId?.dseq}</Link>} />
-      <LabelValue label="gseq" value={bidId?.gseq} />
-      <LabelValue label="oseq" value={bidId?.oseq} />
-    </>
-  );
+  return <BidIdDetails bidId={bidId} />;
 });
apps/stats-web/src/components/transactions/akash/MsgCreateBid.tsx (1)

26-30: Drop deep-clone for DynamicReactJson and remove stray whitespace

  • JSON.parse(JSON.stringify(...)) is unnecessary here; pass the object directly.
  • Remove the trailing {" "} artifact.

Apply:

-      {message?.data?.resourcesOffer && (
-        <LabelValue label="Resources Offer" value={<DynamicReactJson src={JSON.parse(JSON.stringify(message?.data?.resourcesOffer))} />} />
-      )}{" "}
+      {message?.data?.resourcesOffer && (
+        <LabelValue label="Resources Offer" value={<DynamicReactJson src={message.data.resourcesOffer} />} />
+      )}
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3c9b8f3 and 692232c.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (80)
  • apps/stats-web/package.json (1 hunks)
  • apps/stats-web/src/app/transactions/[hash]/TransactionInfo.tsx (2 hunks)
  • apps/stats-web/src/components/AKTAmount.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/TxMessageRow.tsx (2 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgAccountDeposit.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgCloseBid.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgCloseDeployment.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgCloseGroup.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgCloseLease.tsx (2 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgCreateBid.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgCreateCertificate.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgCreateDeployment.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgCreateLease.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgCreateProvider.tsx (2 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgDeleteProviderAttributes.tsx (2 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgDepositDeployment.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgPauseGroup.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgRevokeCertificate.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgSignProviderAttributes.tsx (2 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgStartGroup.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgUpdateDeployment.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgUpdateProvider.tsx (2 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgWithdrawLease.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/helpers/DepositDetail.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/index.ts (1 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCloseBid.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCloseDeployment.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCloseGroup.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCloseLease.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCreateBid.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCreateCertificate.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCreateDeployment.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCreateLease.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgDeleteProvider.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgDeleteProviderAttributes.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgRevokeCertificate.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgSignProviderAttributes.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgStartGroup.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgUpdateDeployment.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgUpdateProvider.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgWithdrawLease.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCloseBid.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCloseGroup.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCloseLease.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCreateBid.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCreateDeployment.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCreateLease.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCreateProvider.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgDeleteProvider.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgDepositDeployment.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgPauseGroup.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgRevokeCertificate.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgSignProviderAttributes.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgUpdateDeployment.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgUpdateProvider.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgWithdrawLease.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCloseBid.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCloseDeployment.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCreateBid.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCreateCertificate.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCreateDeployment.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCreateLease.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCreateProvider.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgDeleteProvider.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgDeleteProviderAttributes.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgDepositDeployment.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgPauseGroup.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgStartGroup.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgUpdateDeployment.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgWithdrawLease.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta4/MsgCloseBid.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta4/MsgCloseLease.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta4/MsgCreateBid.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta4/MsgCreateLease.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta4/MsgWithdrawLease.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/createMsgView.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/generic/index.ts (1 hunks)
  • apps/stats-web/src/config/denom.config.ts (1 hunks)
  • apps/stats-web/src/lib/mathHelpers.ts (1 hunks)
  • apps/stats-web/src/services/api-url/api-url.service.ts (1 hunks)
💤 Files with no reviewable changes (50)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCloseDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgWithdrawLease.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgDepositDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgRevokeCertificate.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCloseBid.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta4/MsgCloseLease.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta4/MsgCreateLease.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCloseGroup.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgDeleteProvider.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCreateBid.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCreateCertificate.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgUpdateDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCreateBid.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCloseBid.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgWithdrawLease.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCloseBid.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCloseGroup.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCreateProvider.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta4/MsgWithdrawLease.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta4/MsgCreateBid.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCloseDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgDeleteProviderAttributes.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta4/MsgCloseBid.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgDepositDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgDeleteProvider.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCreateBid.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgSignProviderAttributes.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCreateLease.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCreateProvider.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCreateCertificate.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgUpdateProvider.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCloseLease.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCloseLease.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCreateDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCreateDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgPauseGroup.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgStartGroup.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgStartGroup.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgRevokeCertificate.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCreateDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgWithdrawLease.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgUpdateDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgUpdateProvider.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCreateLease.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgSignProviderAttributes.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgUpdateDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgDeleteProvider.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCreateLease.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgPauseGroup.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgDeleteProviderAttributes.tsx
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/general.mdc)

Never use type any or cast to type any. Always define the proper TypeScript types.

Files:

  • apps/stats-web/src/components/transactions/createMsgView.tsx
  • apps/stats-web/src/lib/mathHelpers.ts
  • apps/stats-web/src/components/transactions/akash/helpers/DepositDetail.tsx
  • apps/stats-web/src/components/AKTAmount.tsx
  • apps/stats-web/src/components/transactions/TxMessageRow.tsx
  • apps/stats-web/src/services/api-url/api-url.service.ts
  • apps/stats-web/src/components/transactions/akash/MsgCreateLease.tsx
  • apps/stats-web/src/components/transactions/akash/MsgPauseGroup.tsx
  • apps/stats-web/src/components/transactions/akash/MsgCloseLease.tsx
  • apps/stats-web/src/components/transactions/akash/MsgCreateBid.tsx
  • apps/stats-web/src/components/transactions/akash/MsgAccountDeposit.tsx
  • apps/stats-web/src/components/transactions/akash/MsgCreateProvider.tsx
  • apps/stats-web/src/components/transactions/akash/MsgStartGroup.tsx
  • apps/stats-web/src/components/transactions/akash/MsgWithdrawLease.tsx
  • apps/stats-web/src/components/transactions/akash/MsgUpdateDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/MsgRevokeCertificate.tsx
  • apps/stats-web/src/components/transactions/akash/MsgSignProviderAttributes.tsx
  • apps/stats-web/src/components/transactions/akash/MsgDeleteProviderAttributes.tsx
  • apps/stats-web/src/components/transactions/akash/MsgDepositDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/MsgCreateCertificate.tsx
  • apps/stats-web/src/components/transactions/akash/index.ts
  • apps/stats-web/src/components/transactions/akash/MsgCloseBid.tsx
  • apps/stats-web/src/app/transactions/[hash]/TransactionInfo.tsx
  • apps/stats-web/src/components/transactions/akash/MsgUpdateProvider.tsx
  • apps/stats-web/src/components/transactions/akash/MsgCloseDeployment.tsx
  • apps/stats-web/src/components/transactions/generic/index.ts
  • apps/stats-web/src/config/denom.config.ts
  • apps/stats-web/src/components/transactions/akash/MsgCreateDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/MsgCloseGroup.tsx
**/*.{js,ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/general.mdc)

**/*.{js,ts,tsx}: Never use deprecated methods from libraries.
Don't add unnecessary comments to the code

Files:

  • apps/stats-web/src/components/transactions/createMsgView.tsx
  • apps/stats-web/src/lib/mathHelpers.ts
  • apps/stats-web/src/components/transactions/akash/helpers/DepositDetail.tsx
  • apps/stats-web/src/components/AKTAmount.tsx
  • apps/stats-web/src/components/transactions/TxMessageRow.tsx
  • apps/stats-web/src/services/api-url/api-url.service.ts
  • apps/stats-web/src/components/transactions/akash/MsgCreateLease.tsx
  • apps/stats-web/src/components/transactions/akash/MsgPauseGroup.tsx
  • apps/stats-web/src/components/transactions/akash/MsgCloseLease.tsx
  • apps/stats-web/src/components/transactions/akash/MsgCreateBid.tsx
  • apps/stats-web/src/components/transactions/akash/MsgAccountDeposit.tsx
  • apps/stats-web/src/components/transactions/akash/MsgCreateProvider.tsx
  • apps/stats-web/src/components/transactions/akash/MsgStartGroup.tsx
  • apps/stats-web/src/components/transactions/akash/MsgWithdrawLease.tsx
  • apps/stats-web/src/components/transactions/akash/MsgUpdateDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/MsgRevokeCertificate.tsx
  • apps/stats-web/src/components/transactions/akash/MsgSignProviderAttributes.tsx
  • apps/stats-web/src/components/transactions/akash/MsgDeleteProviderAttributes.tsx
  • apps/stats-web/src/components/transactions/akash/MsgDepositDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/MsgCreateCertificate.tsx
  • apps/stats-web/src/components/transactions/akash/index.ts
  • apps/stats-web/src/components/transactions/akash/MsgCloseBid.tsx
  • apps/stats-web/src/app/transactions/[hash]/TransactionInfo.tsx
  • apps/stats-web/src/components/transactions/akash/MsgUpdateProvider.tsx
  • apps/stats-web/src/components/transactions/akash/MsgCloseDeployment.tsx
  • apps/stats-web/src/components/transactions/generic/index.ts
  • apps/stats-web/src/config/denom.config.ts
  • apps/stats-web/src/components/transactions/akash/MsgCreateDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/MsgCloseGroup.tsx
🧠 Learnings (1)
📚 Learning: 2025-09-04T04:27:50.638Z
Learnt from: stalniy
PR: akash-network/console#1868
File: apps/api/src/billing/services/managed-signer/managed-signer.service.ts:1-1
Timestamp: 2025-09-04T04:27:50.638Z
Learning: In the akash-network/console project, importing MsgCreateLease from "akashnetwork/akash-api/v1beta3" instead of v1beta4 is considered non-critical by the maintainers, likely due to backward compatibility or project-specific requirements.

Applied to files:

  • apps/stats-web/src/components/transactions/akash/MsgCreateLease.tsx
  • apps/stats-web/src/components/transactions/akash/MsgCloseLease.tsx
🧬 Code graph analysis (22)
apps/stats-web/src/components/transactions/createMsgView.tsx (2)
apps/provider-console/src/types/transaction.ts (1)
  • TransactionMessage (16-22)
apps/stats-web/src/components/DynamicJsonView.tsx (1)
  • DynamicReactJson (20-23)
apps/stats-web/src/components/transactions/akash/helpers/DepositDetail.tsx (3)
apps/provider-console/src/types/coin.ts (1)
  • Coin (1-4)
apps/deploy-web/src/components/shared/LabelValue.tsx (1)
  • LabelValue (11-22)
apps/stats-web/src/components/AKTAmount.tsx (1)
  • AKTAmount (18-57)
apps/stats-web/src/components/transactions/TxMessageRow.tsx (1)
apps/stats-web/src/components/DynamicJsonView.tsx (1)
  • DynamicReactJson (20-23)
apps/stats-web/src/components/transactions/akash/MsgCreateLease.tsx (2)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/deploy-web/src/components/shared/LabelValue.tsx (1)
  • LabelValue (11-22)
apps/stats-web/src/components/transactions/akash/MsgPauseGroup.tsx (1)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/stats-web/src/components/transactions/akash/MsgCloseLease.tsx (1)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/stats-web/src/components/transactions/akash/MsgCreateBid.tsx (6)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/deploy-web/src/components/shared/LabelValue.tsx (1)
  • LabelValue (11-22)
apps/stats-web/src/components/AKTAmount.tsx (1)
  • AKTAmount (18-57)
apps/stats-web/src/lib/mathHelpers.ts (1)
  • coinsToAmount (45-49)
apps/stats-web/src/components/transactions/akash/helpers/DepositDetail.tsx (1)
  • DepositDetail (9-20)
apps/stats-web/src/components/DynamicJsonView.tsx (1)
  • DynamicReactJson (20-23)
apps/stats-web/src/components/transactions/akash/MsgAccountDeposit.tsx (4)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/deploy-web/src/components/shared/LabelValue.tsx (1)
  • LabelValue (11-22)
apps/stats-web/src/components/DynamicJsonView.tsx (1)
  • DynamicReactJson (20-23)
apps/stats-web/src/components/transactions/akash/helpers/DepositDetail.tsx (1)
  • DepositDetail (9-20)
apps/stats-web/src/components/transactions/akash/MsgCreateProvider.tsx (1)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/stats-web/src/components/transactions/akash/MsgStartGroup.tsx (1)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/stats-web/src/components/transactions/akash/MsgWithdrawLease.tsx (2)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/deploy-web/src/components/shared/LabelValue.tsx (1)
  • LabelValue (11-22)
apps/stats-web/src/components/transactions/akash/MsgUpdateDeployment.tsx (3)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/deploy-web/src/components/shared/LabelValue.tsx (1)
  • LabelValue (11-22)
apps/stats-web/src/components/DynamicJsonView.tsx (1)
  • DynamicReactJson (20-23)
apps/stats-web/src/components/transactions/akash/MsgRevokeCertificate.tsx (1)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/stats-web/src/components/transactions/akash/MsgSignProviderAttributes.tsx (1)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/stats-web/src/components/transactions/akash/MsgDeleteProviderAttributes.tsx (1)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/stats-web/src/components/transactions/akash/MsgDepositDeployment.tsx (3)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/stats-web/src/components/AKTAmount.tsx (1)
  • AKTAmount (18-57)
apps/stats-web/src/lib/mathHelpers.ts (1)
  • coinsToAmount (45-49)
apps/stats-web/src/components/transactions/akash/MsgCreateCertificate.tsx (1)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/stats-web/src/components/transactions/akash/MsgCloseBid.tsx (2)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/deploy-web/src/components/shared/LabelValue.tsx (1)
  • LabelValue (11-22)
apps/stats-web/src/components/transactions/akash/MsgUpdateProvider.tsx (1)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/stats-web/src/components/transactions/akash/MsgCloseDeployment.tsx (2)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/deploy-web/src/components/shared/LabelValue.tsx (1)
  • LabelValue (11-22)
apps/stats-web/src/components/transactions/akash/MsgCreateDeployment.tsx (4)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/deploy-web/src/components/shared/LabelValue.tsx (1)
  • LabelValue (11-22)
apps/stats-web/src/components/transactions/akash/helpers/DepositDetail.tsx (1)
  • DepositDetail (9-20)
apps/stats-web/src/components/DynamicJsonView.tsx (1)
  • DynamicReactJson (20-23)
apps/stats-web/src/components/transactions/akash/MsgCloseGroup.tsx (1)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (13)
  • GitHub Check: validate (apps/indexer) / validate-unsafe
  • GitHub Check: validate (apps/provider-proxy) / validate-unsafe
  • GitHub Check: validate (apps/provider-console) / validate-unsafe
  • GitHub Check: validate / validate-app
  • GitHub Check: test-build
  • GitHub Check: test-build
  • GitHub Check: validate / validate-app
  • GitHub Check: test-build
  • GitHub Check: test-build
  • GitHub Check: validate / validate-app
  • GitHub Check: validate / validate-app
  • GitHub Check: test-build
  • GitHub Check: test-build
🔇 Additional comments (20)
apps/stats-web/src/lib/mathHelpers.ts (1)

48-48: LGTM! Clean simplification.

The removal of the else branch is a valid simplification. The early return on line 47 ensures currentCoin is truthy, so directly returning currentCoin.amount is correct.

apps/stats-web/src/components/AKTAmount.tsx (1)

11-11: LGTM; helper accepts string | number inputs The udenomToDenom signature is _amount: string | number and correctly parses string values.

apps/stats-web/src/app/transactions/[hash]/TransactionInfo.tsx (1)

18-20: Approve dynamic react-intl imports; verify hydration

Client-only dynamic imports reduce SSR bundle—manually check for any flicker or hydration mismatch on initial render of the time component.

apps/stats-web/src/components/transactions/akash/MsgDeleteProviderAttributes.tsx (1)

4-5: LGTM!

Import paths correctly updated to align with the new component structure and multi-version support pattern.

apps/stats-web/src/components/transactions/akash/MsgUpdateDeployment.tsx (1)

11-20: LGTM!

The component correctly uses the createMsgView wrapper to support multiple transaction versions (v1beta1–v1beta4). The fallback pattern on Line 16 (message?.data?.version || message?.data?.hash) appropriately handles version differences in the message data structure.

apps/stats-web/src/components/transactions/akash/MsgAccountDeposit.tsx (1)

10-19: LGTM!

The component correctly uses the createMsgView wrapper and cleanly renders account deposit information. The data extraction to a local constant improves readability.

apps/stats-web/src/components/transactions/akash/MsgDepositDeployment.tsx (1)

4-5: Verify version support scope.

The component correctly uses the createMsgView wrapper. However, this component supports versions v1beta1–v1beta3, while other similar deployment-related components (e.g., MsgUpdateDeployment, MsgCloseGroup) support up to v1beta4.

Please confirm whether the exclusion of v1beta4 is intentional due to API schema changes in that version, or if it should be added to the supported versions list.

Also applies to: 12-21

apps/stats-web/src/components/transactions/akash/MsgCloseGroup.tsx (1)

4-5: LGTM!

Import paths correctly updated and the component properly uses the createMsgView wrapper to support multiple transaction versions (v1beta1–v1beta4).

Also applies to: 10-18

apps/stats-web/src/components/transactions/akash/MsgCreateDeployment.tsx (1)

12-12: Ensure consistent v1beta5 support for deployment messages
MsgCreateDeployment currently lists ["v1beta1", "v1beta2", "v1beta3", "v1beta4"] (as does MsgUpdateDeployment), while other Akash views include "v1beta5". Confirm whether the v1beta5 deployment messages exist in the protobuf registry and, if so, add "v1beta5" here.

apps/stats-web/src/components/transactions/akash/MsgPauseGroup.tsx (1)

10-10: Leave MsgPauseGroup versions as-is: it mirrors MsgStartGroup and MsgCloseGroup, which don’t support v1beta5.

Likely an incorrect or invalid review comment.

apps/stats-web/src/components/transactions/akash/MsgCreateCertificate.tsx (1)

7-7: MsgCreateCertificate version list is correct – it matches MsgRevokeCertificate and MsgSignProviderAttributes, and no v1beta4 or v1beta5 variants are present for certificate messages.

apps/stats-web/src/components/transactions/akash/MsgCloseDeployment.tsx (2)

4-5: LGTM: Import paths correctly updated.

The import path adjustments align with the refactored directory structure, and the createMsgView import introduces the version-gating pattern central to this PR.


10-17: LGTM: Version-gating wrapper correctly applied.

The createMsgView wrapper cleanly supports multiple transaction versions (v1beta1-v1beta4) while preserving the original rendering logic. This aligns with the PR's goal to simplify multi-version transaction support.

apps/stats-web/src/config/denom.config.ts (2)

5-8: LGTM: Type refinement using Exclude utility.

The type change to Record<Exclude<NetworkId, "testnet">, string> is more concise and maintainable than the explicit union type. It correctly expresses that USDC denoms are defined for mainnet and sandbox networks only.


1-1: Verify chain-sdk dependency and NetworkId export

  • Ensure @akashnetwork/chain-sdk is listed in package.json dependencies.
  • Confirm NetworkId is exported from @akashnetwork/chain-sdk/web and includes the expected union (mainnet | sandbox | testnet).
apps/stats-web/src/components/transactions/akash/MsgSignProviderAttributes.tsx (2)

4-5: LGTM: Import paths correctly updated.

The import adjustments are consistent with the refactored structure across all Akash message components.


11-20: LGTM: Version-gating wrapper correctly applied with v1 stable API support.

The wrapper correctly supports versions v1beta1-v1beta3 plus the stable "v1" API. This differs from other components that support v1beta4, which is appropriate as different message types may have different version progressions based on when they were promoted to stable.

apps/stats-web/src/components/transactions/akash/MsgStartGroup.tsx (1)

4-18: LGTM: Consistent refactoring pattern applied.

The component successfully adopts the createMsgView wrapper pattern with support for versions v1beta1-v1beta4, maintaining the original rendering logic for Owner, dseq, and gseq fields.

apps/stats-web/src/components/transactions/akash/index.ts (1)

1-19: LGTM: Well-organized barrel exports.

This barrel module consolidates all Akash transaction message components into a single entry point, improving import ergonomics and maintainability. The pattern is consistent and follows best practices.

apps/stats-web/src/components/transactions/generic/index.ts (1)

1-34: LGTM: Comprehensive barrel exports for generic transactions.

This barrel module consolidates generic Cosmos SDK transaction message components, providing a centralized import point for IBC, staking, governance, distribution, and other standard transaction types. The organization complements the Akash-specific barrel.

@stalniy stalniy force-pushed the refactor/upgrade-stats branch from 692232c to 4a0c74a Compare October 14, 2025 10:48
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

Caution

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

⚠️ Outside diff range comments (4)
apps/stats-web/src/components/transactions/akash/MsgCloseLease.tsx (1)

10-24: Add explicit TypeScript types for the component props.

The component function destructures { message } without type annotations, which may result in implicit any type inference. According to the coding guidelines, you must always define proper TypeScript types and never use type any.

Apply this diff to add proper typing:

-export const MsgCloseLease = createMsgView(["v1beta1", "v1beta2", "v1beta3", "v1beta4", "v1beta5"], ({ message }) => {
+export const MsgCloseLease = createMsgView(["v1beta1", "v1beta2", "v1beta3", "v1beta4", "v1beta5"], ({ message }: { message: { data: { leaseId: { owner: string; dseq: string; gseq: string; oseq: string; provider: string } } } }) => {

Alternatively, define a proper interface for better maintainability:

interface MsgCloseLeaseData {
  data: {
    leaseId: {
      owner: string;
      dseq: string;
      gseq: string;
      oseq: string;
      provider: string;
    };
  };
}

export const MsgCloseLease = createMsgView(["v1beta1", "v1beta2", "v1beta3", "v1beta4", "v1beta5"], ({ message }: { message: MsgCloseLeaseData }) => {
  // ...
});

As per coding guidelines.

apps/stats-web/src/components/transactions/akash/MsgCreateProvider.tsx (1)

11-15: Avoid JSON.parse on maybe-undefined and guard AddressLink

JSON.parse(JSON.stringify(message?.data?.attributes)) throws when attributes is undefined. Also guard AddressLink from receiving undefined.

-      <LabelValue label="Owner" value={<AddressLink address={message?.data?.owner} />} />
+      <LabelValue label="Owner" value={message?.data?.owner ? <AddressLink address={message.data.owner} /> : undefined} />
@@
-      <LabelValue label="Attributes" value={<DynamicReactJson src={JSON.parse(JSON.stringify(message?.data?.attributes))} />} />
+      <LabelValue
+        label="Attributes"
+        value={message?.data?.attributes ? <DynamicReactJson src={message.data.attributes} /> : undefined}
+      />
apps/stats-web/src/components/transactions/akash/MsgSignProviderAttributes.tsx (1)

11-18: Same pattern: guard Links/AddressLink and avoid JSON.parse

Protect href construction and avoid JSON.parse on optional attributes.

-      <LabelValue label="Provider" value={<Link href={UrlService.address(message?.data?.owner)}>{message?.data?.owner}</Link>} />
+      <LabelValue
+        label="Provider"
+        value={message?.data?.owner ? <Link href={UrlService.address(message.data.owner)}>{message.data.owner}</Link> : undefined}
+      />
@@
-      <LabelValue label="Auditor" value={<AddressLink address={message?.data?.auditor} />} />
+      <LabelValue label="Auditor" value={message?.data?.auditor ? <AddressLink address={message.data.auditor} /> : undefined} />
-      <LabelValue label="Attributes" value={<DynamicReactJson src={JSON.parse(JSON.stringify(message?.data?.attributes))} />} />
+      <LabelValue
+        label="Attributes"
+        value={message?.data?.attributes ? <DynamicReactJson src={message.data.attributes} /> : undefined}
+      />
apps/stats-web/src/components/transactions/akash/MsgDeleteProviderAttributes.tsx (1)

10-17: Guard optional fields and simplify JSON rendering

  • Provider/Auditor: check message.data?.owner/message.data?.auditor before calling UrlService.address to avoid undefined hrefs.
  • Keys: remove JSON.parse(JSON.stringify(...)); render <DynamicReactJson src={message.data.keys} /> only if message.data?.keys exists.
  • Confirm that ["v1beta1", "v1beta2", "v1beta3", "v1"] matches the Chain SDK versions for this message type.
-      <LabelValue label="Provider" value={<Link href={UrlService.address(message?.data?.owner)}>{message?.data?.owner}</Link>} />
+      <LabelValue
+        label="Provider"
+        value={message.data?.owner ? <Link href={UrlService.address(message.data.owner)}>{message.data.owner}</Link> : undefined}
+      />
@@
-      <LabelValue label="Auditor" value={<Link href={UrlService.address(message?.data?.auditor)}>{message?.data?.auditor}</Link>} />
+      <LabelValue
+        label="Auditor"
+        value={message.data?.auditor ? <Link href={UrlService.address(message.data.auditor)}>{message.data.auditor}</Link> : undefined}
+      />
@@
-      <LabelValue label="Keys" value={<DynamicReactJson src={JSON.parse(JSON.stringify(message?.data?.keys))} />} />
+      <LabelValue
+        label="Keys"
+        value={message.data?.keys ? <DynamicReactJson src={message.data.keys} /> : undefined}
+      />
♻️ Duplicate comments (3)
apps/stats-web/package.json (1)

16-16: Verify SDK migration completeness across the monorepo.

The dependency update in this package is correct. However, ensure that @akashnetwork/akashjs has been removed from all packages in the monorepo and that all code imports have been migrated to @akashnetwork/chain-sdk.

Run this script to verify the migration is complete:

#!/bin/bash
# Find any remaining akashjs references in package.json files
fd -e json package.json --exec grep -l '@akashnetwork/akashjs'

# Find any remaining akashjs imports in code
rg -n '@akashnetwork/akashjs' --type ts --type tsx --type js
apps/stats-web/src/components/transactions/akash/helpers/DepositDetail.tsx (1)

8-11: Fix the type guard to prevent null pointer exceptions.

The type guard contains a critical flaw. The condition !value returns true for null, undefined, false, 0, "", etc. If value is null or undefined, isCoin will return true, but then Line 11 attempts to access value.amount, causing a runtime null pointer exception.

Apply this diff to fix the type guard:

-const isCoin = (value: unknown): value is Coin => !value || (typeof value === "object" && "denom" in value && "amount" in value);
+const isCoin = (value: unknown): value is Coin => value != null && typeof value === "object" && "denom" in value && "amount" in value;
apps/stats-web/src/components/transactions/akash/MsgCreateDeployment.tsx (1)

21-26: Fix crashes: guard Links/AddressLink, conditionally render Deposit/Groups, drop JSON.parse(JSON.stringify(...))

JSON.parse on undefined throws; Link/AddressLink with undefined props or hrefs can crash. This was flagged previously and remains. Please guard and pass raw objects to DynamicReactJson.

-      <LabelValue label="Owner" value={<AddressLink address={data?.id?.owner} />} />
-      <LabelValue label="dseq" value={<Link href={UrlService.deployment(data?.id?.owner, data?.id?.dseq)}>{data?.id?.dseq}</Link>} />
+      <LabelValue
+        label="Owner"
+        value={data?.id?.owner ? <AddressLink address={data.id.owner} /> : undefined}
+      />
+      <LabelValue
+        label="dseq"
+        value={
+          data?.id?.owner && data?.id?.dseq
+            ? <Link href={UrlService.deployment(data.id.owner, data.id.dseq)}>{data.id.dseq}</Link>
+            : undefined
+        }
+      />
@@
-      {data?.depositor && <LabelValue label="Depositor" value={<Link href={UrlService.address(data?.depositor)}>{data?.depositor}</Link>} />}
-      <DepositDetail value={data?.deposit} />
-      <LabelValue label="Groups" value={<DynamicReactJson src={JSON.parse(JSON.stringify(data?.groups))} />} />
+      {data?.depositor && <LabelValue label="Depositor" value={<AddressLink address={data.depositor} />} />}
+      {data?.deposit && <DepositDetail value={data.deposit} />}
+      {data?.groups && <LabelValue label="Groups" value={<DynamicReactJson src={data.groups} />} />}
🧹 Nitpick comments (6)
apps/stats-web/src/components/transactions/akash/MsgCloseLease.tsx (1)

21-21: Address the TODO comment.

There's a pending task to add a link to the provider page. This enhancement would improve navigation for users viewing transaction details.

Do you want me to generate the implementation for linking to a provider detail page, or should I open a new issue to track this task?

apps/stats-web/src/components/transactions/akash/helpers/DepositDetail.tsx (1)

14-19: Add defensive checks for nested property access.

Lines 16-17 assume that value.amount.amount and value.sources exist and are well-formed. If the Deposit object is malformed or missing nested properties, this will throw runtime errors.

Consider adding optional chaining or validation:

-      <LabelValue label="Deposit Amount" value={<AKTAmount uakt={value.amount.amount} showAKTLabel showUSD />} />
-      <LabelValue label="Deposit Sources" value={value.sources.map(source => DepositSource[source]).join(", ")} />
+      <LabelValue label="Deposit Amount" value={<AKTAmount uakt={value.amount?.amount ?? 0} showAKTLabel showUSD />} />
+      <LabelValue label="Deposit Sources" value={value.sources?.map(source => DepositSource[source]).join(", ") ?? "N/A"} />
apps/stats-web/src/components/transactions/akash/MsgUpdateDeployment.tsx (1)

17-17: Consider removing unnecessary deep clone.

The JSON.parse(JSON.stringify(...)) pattern creates a deep clone before passing data to DynamicReactJson. Unless DynamicReactJson mutates its input (which is unlikely for a JSON viewer component), this deep clone is unnecessary and adds performance overhead.

Simplify to:

-      {message?.data?.groups && <LabelValue label="Groups" value={<DynamicReactJson src={JSON.parse(JSON.stringify(message?.data?.groups))} />} />}
+      {message?.data?.groups && <LabelValue label="Groups" value={<DynamicReactJson src={message.data.groups} />} />}

Note: This same pattern appears in other Msg components (see MsgUpdateProvider.tsx Line 13). If you confirm the deep clone is unnecessary, consider removing it consistently across all components.

apps/stats-web/src/components/transactions/akash/MsgCreateDeployment.tsx (1)

13-15: Track TODO or scope it behind issue

The TODO about grouping resources from base64 is unresolved. Convert to an issue and link it, or define a follow-up task.

I can draft a helper to decode and present grouped resources neatly; want me to propose it?

apps/stats-web/src/components/transactions/akash/MsgDepositDeployment.tsx (1)

12-19: Guard Owner and DSEQ rendering in MsgDepositDeployment.tsx

  • Wrap AddressLink and Link in conditional checks on message.data.id.owner (and .dseq) to avoid undefined values:
-      <LabelValue label="Owner" value={<AddressLink address={message?.data?.id?.owner} />} />
-      <LabelValue label="DSEQ" value={<Link href={UrlService.deployment(message?.data?.id?.owner, message?.data?.id?.dseq)}>{message?.data?.id?.dseq}</Link>} />
+      <LabelValue
+        label="Owner"
+        value={message?.data?.id?.owner ? <AddressLink address={message.data.id.owner} /> : undefined}
+      />
+      <LabelValue
+        label="DSEQ"
+        value={
+          message?.data?.id?.owner && message?.data?.id?.dseq
+            ? <Link href={UrlService.deployment(message.data.id.owner, message.data.id.dseq)}>{message.data.id.dseq}</Link>
+            : undefined
+        }
+      />
  • Optional: confirm the version array includes all supported protocol versions (e.g., should v1beta4/v1beta5 be added)
apps/stats-web/src/components/transactions/generic/index.ts (1)

1-34: LGTM! Clean barrel file consolidation.

The barrel file correctly consolidates all generic transaction message components into a single export point, which aligns well with the PR's goal of simplifying multi-version transaction support. The exports are alphabetically sorted, making them easy to maintain.

Consider adding a brief JSDoc comment at the top to document the purpose of this barrel file:

+/**
+ * Generic transaction message components.
+ * Re-exports all Msg* components for consolidated imports.
+ */
 export * from "./MsgAcknowledgement";
 export * from "./MsgBeginRedelegate";
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 692232c and 4a0c74a.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (80)
  • apps/stats-web/package.json (1 hunks)
  • apps/stats-web/src/app/transactions/[hash]/TransactionInfo.tsx (2 hunks)
  • apps/stats-web/src/components/AKTAmount.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/TxMessageRow.tsx (2 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgAccountDeposit.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgCloseBid.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgCloseDeployment.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgCloseGroup.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgCloseLease.tsx (2 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgCreateBid.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgCreateCertificate.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgCreateDeployment.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgCreateLease.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgCreateProvider.tsx (2 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgDeleteProviderAttributes.tsx (2 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgDepositDeployment.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgPauseGroup.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgRevokeCertificate.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgSignProviderAttributes.tsx (2 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgStartGroup.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgUpdateDeployment.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgUpdateProvider.tsx (2 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgWithdrawLease.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/helpers/DepositDetail.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/index.ts (1 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCloseBid.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCloseDeployment.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCloseGroup.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCloseLease.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCreateBid.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCreateCertificate.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCreateDeployment.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCreateLease.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgDeleteProvider.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgDeleteProviderAttributes.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgRevokeCertificate.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgSignProviderAttributes.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgStartGroup.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgUpdateDeployment.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgUpdateProvider.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgWithdrawLease.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCloseBid.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCloseGroup.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCloseLease.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCreateBid.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCreateDeployment.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCreateLease.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCreateProvider.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgDeleteProvider.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgDepositDeployment.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgPauseGroup.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgRevokeCertificate.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgSignProviderAttributes.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgUpdateDeployment.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgUpdateProvider.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgWithdrawLease.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCloseBid.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCloseDeployment.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCreateBid.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCreateCertificate.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCreateDeployment.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCreateLease.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCreateProvider.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgDeleteProvider.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgDeleteProviderAttributes.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgDepositDeployment.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgPauseGroup.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgStartGroup.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgUpdateDeployment.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgWithdrawLease.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta4/MsgCloseBid.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta4/MsgCloseLease.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta4/MsgCreateBid.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta4/MsgCreateLease.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta4/MsgWithdrawLease.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/createMsgView.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/generic/index.ts (1 hunks)
  • apps/stats-web/src/config/denom.config.ts (1 hunks)
  • apps/stats-web/src/lib/mathHelpers.ts (1 hunks)
  • apps/stats-web/src/services/api-url/api-url.service.ts (1 hunks)
💤 Files with no reviewable changes (50)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgUpdateDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgUpdateDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCreateLease.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCreateCertificate.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta4/MsgCloseLease.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgSignProviderAttributes.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgWithdrawLease.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgDeleteProvider.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCloseDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCreateProvider.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgStartGroup.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCreateDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCreateLease.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgUpdateProvider.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCloseLease.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgDeleteProvider.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCloseBid.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCloseDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCreateBid.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgStartGroup.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCreateBid.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgDeleteProvider.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCreateCertificate.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgDeleteProviderAttributes.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCloseLease.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta4/MsgCloseBid.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgRevokeCertificate.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCloseBid.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCreateProvider.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgDepositDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCreateDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCloseGroup.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgWithdrawLease.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgRevokeCertificate.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgPauseGroup.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCreateBid.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgDeleteProviderAttributes.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgUpdateProvider.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgSignProviderAttributes.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCloseGroup.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCreateDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgDepositDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgWithdrawLease.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta4/MsgCreateLease.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgPauseGroup.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta4/MsgCreateBid.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCloseBid.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCreateLease.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgUpdateDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta4/MsgWithdrawLease.tsx
🚧 Files skipped from review as they are similar to previous changes (12)
  • apps/stats-web/src/components/transactions/akash/MsgAccountDeposit.tsx
  • apps/stats-web/src/components/transactions/TxMessageRow.tsx
  • apps/stats-web/src/components/transactions/akash/MsgRevokeCertificate.tsx
  • apps/stats-web/src/components/transactions/akash/MsgCreateBid.tsx
  • apps/stats-web/src/components/transactions/akash/MsgCreateLease.tsx
  • apps/stats-web/src/lib/mathHelpers.ts
  • apps/stats-web/src/components/transactions/akash/MsgCloseBid.tsx
  • apps/stats-web/src/components/transactions/akash/MsgWithdrawLease.tsx
  • apps/stats-web/src/components/transactions/akash/index.ts
  • apps/stats-web/src/components/transactions/createMsgView.tsx
  • apps/stats-web/src/components/transactions/akash/MsgCloseDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/MsgPauseGroup.tsx
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/general.mdc)

Never use type any or cast to type any. Always define the proper TypeScript types.

Files:

  • apps/stats-web/src/components/transactions/akash/MsgCloseLease.tsx
  • apps/stats-web/src/components/AKTAmount.tsx
  • apps/stats-web/src/services/api-url/api-url.service.ts
  • apps/stats-web/src/components/transactions/akash/MsgCloseGroup.tsx
  • apps/stats-web/src/components/transactions/akash/MsgCreateCertificate.tsx
  • apps/stats-web/src/components/transactions/akash/MsgUpdateProvider.tsx
  • apps/stats-web/src/components/transactions/akash/MsgDepositDeployment.tsx
  • apps/stats-web/src/config/denom.config.ts
  • apps/stats-web/src/components/transactions/akash/MsgCreateProvider.tsx
  • apps/stats-web/src/app/transactions/[hash]/TransactionInfo.tsx
  • apps/stats-web/src/components/transactions/akash/MsgUpdateDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/MsgDeleteProviderAttributes.tsx
  • apps/stats-web/src/components/transactions/akash/MsgStartGroup.tsx
  • apps/stats-web/src/components/transactions/akash/MsgCreateDeployment.tsx
  • apps/stats-web/src/components/transactions/generic/index.ts
  • apps/stats-web/src/components/transactions/akash/helpers/DepositDetail.tsx
  • apps/stats-web/src/components/transactions/akash/MsgSignProviderAttributes.tsx
**/*.{js,ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/general.mdc)

**/*.{js,ts,tsx}: Never use deprecated methods from libraries.
Don't add unnecessary comments to the code

Files:

  • apps/stats-web/src/components/transactions/akash/MsgCloseLease.tsx
  • apps/stats-web/src/components/AKTAmount.tsx
  • apps/stats-web/src/services/api-url/api-url.service.ts
  • apps/stats-web/src/components/transactions/akash/MsgCloseGroup.tsx
  • apps/stats-web/src/components/transactions/akash/MsgCreateCertificate.tsx
  • apps/stats-web/src/components/transactions/akash/MsgUpdateProvider.tsx
  • apps/stats-web/src/components/transactions/akash/MsgDepositDeployment.tsx
  • apps/stats-web/src/config/denom.config.ts
  • apps/stats-web/src/components/transactions/akash/MsgCreateProvider.tsx
  • apps/stats-web/src/app/transactions/[hash]/TransactionInfo.tsx
  • apps/stats-web/src/components/transactions/akash/MsgUpdateDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/MsgDeleteProviderAttributes.tsx
  • apps/stats-web/src/components/transactions/akash/MsgStartGroup.tsx
  • apps/stats-web/src/components/transactions/akash/MsgCreateDeployment.tsx
  • apps/stats-web/src/components/transactions/generic/index.ts
  • apps/stats-web/src/components/transactions/akash/helpers/DepositDetail.tsx
  • apps/stats-web/src/components/transactions/akash/MsgSignProviderAttributes.tsx
🧠 Learnings (1)
📚 Learning: 2025-09-04T04:27:50.638Z
Learnt from: stalniy
PR: akash-network/console#1868
File: apps/api/src/billing/services/managed-signer/managed-signer.service.ts:1-1
Timestamp: 2025-09-04T04:27:50.638Z
Learning: In the akash-network/console project, importing MsgCreateLease from "akashnetwork/akash-api/v1beta3" instead of v1beta4 is considered non-critical by the maintainers, likely due to backward compatibility or project-specific requirements.

Applied to files:

  • apps/stats-web/src/components/transactions/akash/MsgCloseLease.tsx
🧬 Code graph analysis (12)
apps/stats-web/src/components/transactions/akash/MsgCloseLease.tsx (1)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/stats-web/src/components/transactions/akash/MsgCloseGroup.tsx (2)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/deploy-web/src/components/shared/LabelValue.tsx (1)
  • LabelValue (11-22)
apps/stats-web/src/components/transactions/akash/MsgCreateCertificate.tsx (2)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/deploy-web/src/components/shared/LabelValue.tsx (1)
  • LabelValue (11-22)
apps/stats-web/src/components/transactions/akash/MsgUpdateProvider.tsx (1)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/stats-web/src/components/transactions/akash/MsgDepositDeployment.tsx (3)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/stats-web/src/components/AKTAmount.tsx (1)
  • AKTAmount (18-57)
apps/stats-web/src/lib/mathHelpers.ts (1)
  • coinsToAmount (45-49)
apps/stats-web/src/components/transactions/akash/MsgCreateProvider.tsx (1)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/stats-web/src/components/transactions/akash/MsgUpdateDeployment.tsx (3)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/deploy-web/src/components/shared/LabelValue.tsx (1)
  • LabelValue (11-22)
apps/stats-web/src/components/DynamicJsonView.tsx (1)
  • DynamicReactJson (20-23)
apps/stats-web/src/components/transactions/akash/MsgDeleteProviderAttributes.tsx (1)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/stats-web/src/components/transactions/akash/MsgStartGroup.tsx (2)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/deploy-web/src/components/shared/LabelValue.tsx (1)
  • LabelValue (11-22)
apps/stats-web/src/components/transactions/akash/MsgCreateDeployment.tsx (4)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/deploy-web/src/components/shared/LabelValue.tsx (1)
  • LabelValue (11-22)
apps/stats-web/src/components/transactions/akash/helpers/DepositDetail.tsx (1)
  • DepositDetail (9-20)
apps/stats-web/src/components/DynamicJsonView.tsx (1)
  • DynamicReactJson (20-23)
apps/stats-web/src/components/transactions/akash/helpers/DepositDetail.tsx (3)
apps/provider-console/src/types/coin.ts (1)
  • Coin (1-4)
apps/deploy-web/src/components/shared/LabelValue.tsx (1)
  • LabelValue (11-22)
apps/stats-web/src/components/AKTAmount.tsx (1)
  • AKTAmount (18-57)
apps/stats-web/src/components/transactions/akash/MsgSignProviderAttributes.tsx (1)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (12)
  • GitHub Check: validate / validate-app
  • GitHub Check: test-build
  • GitHub Check: validate / validate-app
  • GitHub Check: validate / validate-app
  • GitHub Check: validate / validate-app
  • GitHub Check: test-build
  • GitHub Check: validate / validate-app
  • GitHub Check: test-build
  • GitHub Check: validate / validate-app
  • GitHub Check: test-build
  • GitHub Check: test-build
  • GitHub Check: test-build
🔇 Additional comments (10)
apps/stats-web/src/components/transactions/akash/MsgCloseLease.tsx (1)

13-20: AI summary inconsistency detected.

The AI-generated summary mentions bidId fields (owner, provider, dseq, gseq, oseq), but the actual code uses leaseId fields. For a MsgCloseLease message, leaseId is semantically correct, so the code is accurate but the summary is misleading.

apps/stats-web/src/config/denom.config.ts (2)

1-1: LGTM! Consistent migration to chain-sdk.

The import source migration is consistent with the broader refactor across the codebase (e.g., api-url.service.ts).


5-8: Verify NetworkId compatibility with MAINNET_ID / SANDBOX_ID

NetworkId is imported from an external package (not present in this repo). I confirmed MAINNET_ID and SANDBOX_ID are typed as MainnetNetworkId / SandboxNetworkId in packages/network-store/src/network.config.ts and apps/stats-web uses Record<Exclude<NetworkId, "testnet">, string> (apps/stats-web/src/config/denom.config.ts).

  • Verify that NetworkId (from @akashnetwork/chain-sdk or @akashnetwork/akashjs) is a string-literal union that includes "mainnet" and "sandbox" so MAINNET_ID/SANDBOX_ID satisfy Exclude<NetworkId, "testnet">.
  • If not, make the type explicit (e.g., Record<MainnetNetworkId | SandboxNetworkId, string>) or update the external type definitions.
apps/stats-web/src/services/api-url/api-url.service.ts (1)

1-1: Verify NetworkId type compatibility after chain-sdk migration. Confirm that NetworkId imported from @akashnetwork/chain-sdk/web includes the same set of network identifiers (e.g. TESTNET_ID, SANDBOX_ID) required by getBaseApiUrlFor (lines 13–35).

apps/stats-web/src/app/transactions/[hash]/TransactionInfo.tsx (1)

18-19: Verify the need for ssr: false in dynamic imports.

Disabling server-side rendering for FormattedRelativeTime and FormattedDate will cause the Time label to render incompletely until client-side hydration finishes. This can degrade the initial user experience with a flash of missing content.

react-intl generally supports SSR. Unless there's a specific technical constraint (e.g., reliance on browser-only APIs in your setup), consider enabling SSR for these components to improve perceived performance and SEO.

If SSR must remain disabled, verify that:

  1. The Time label renders a skeleton or placeholder during hydration
  2. The flash of missing content is acceptable for your UX requirements

Otherwise, remove { ssr: false } to enable SSR:

-const FormattedRelativeTime = dynamic(() => import("react-intl").then(mod => mod.FormattedRelativeTime), { ssr: false });
-const FormattedDate = dynamic(() => import("react-intl").then(mod => mod.FormattedDate), { ssr: false });
+const FormattedRelativeTime = dynamic(() => import("react-intl").then(mod => mod.FormattedRelativeTime));
+const FormattedDate = dynamic(() => import("react-intl").then(mod => mod.FormattedDate));
apps/stats-web/src/components/transactions/akash/MsgUpdateProvider.tsx (1)

8-18: LGTM!

The migration to createMsgView wrapper is correctly implemented with proper version support and defensive property access using optional chaining.

apps/stats-web/src/components/transactions/akash/MsgStartGroup.tsx (1)

10-18: LGTM!

The migration to createMsgView wrapper is correctly implemented with proper version support and defensive property access.

apps/stats-web/src/components/transactions/akash/MsgCreateCertificate.tsx (1)

7-15: LGTM!

The migration to createMsgView wrapper is correctly implemented with proper version support (including stable v1) and defensive property access.

apps/stats-web/src/components/transactions/akash/MsgUpdateDeployment.tsx (1)

11-20: LGTM with optional refactor suggestion!

The migration to createMsgView wrapper is correctly implemented with proper version support and defensive property access. The version fallback pattern (version || hash) is a good approach for handling multiple proto versions.

apps/stats-web/src/components/AKTAmount.tsx (1)

11-11: Widened uakt prop is safe
udenomToDenom in apps/stats-web/src/lib/mathHelpers.ts already accepts and parses string | number, so no additional coercion is needed.

@stalniy stalniy force-pushed the refactor/upgrade-stats branch from 4a0c74a to 145561f Compare October 14, 2025 11:14
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: 6

Caution

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

⚠️ Outside diff range comments (3)
apps/stats-web/src/components/transactions/akash/MsgCloseLease.tsx (1)

13-21: Guard Links/AddressLink to prevent invalid hrefs and "undefined" rendering

Wrap Link/AddressLink creation in conditionals; pass undefined when missing so LabelValue omits the value.

-      <LabelValue label="Owner" value={<AddressLink address={message?.data?.leaseId?.owner} />} />
+      <LabelValue label="Owner" value={message?.data?.leaseId?.owner ? <AddressLink address={message.data.leaseId.owner} /> : undefined} />
@@
-        value={<Link href={UrlService.deployment(message?.data?.leaseId?.owner, message?.data?.leaseId?.dseq)}>{message?.data?.leaseId?.dseq}</Link>}
+        value={
+          message?.data?.leaseId?.owner && message?.data?.leaseId?.dseq ? (
+            <Link href={UrlService.deployment(message.data.leaseId.owner, message.data.leaseId.dseq)}>{message.data.leaseId.dseq}</Link>
+          ) : undefined
+        }
@@
-      <LabelValue label="gseq" value={message?.data?.leaseId?.gseq} />
-      <LabelValue label="oseq" value={message?.data?.leaseId?.oseq} />
+      <LabelValue label="gseq" value={message?.data?.leaseId?.gseq ?? undefined} />
+      <LabelValue label="oseq" value={message?.data?.leaseId?.oseq ?? undefined} />
@@
-      <LabelValue label="Provider" value={<Link href={UrlService.address(message?.data?.leaseId?.provider)}>{message?.data?.leaseId?.provider}</Link>} />
+      <LabelValue
+        label="Provider"
+        value={message?.data?.leaseId?.provider ? <Link href={UrlService.address(message.data.leaseId.provider)}>{message.data.leaseId.provider}</Link> : undefined}
+      />
apps/stats-web/src/components/transactions/akash/MsgCreateProvider.tsx (1)

11-16: Fix potential runtime crash and guard AddressLink

  • JSON.parse(JSON.stringify(message?.data?.attributes)) throws when attributes is undefined.
  • Guard Owner AddressLink to avoid rendering with undefined.
-      <LabelValue label="Owner" value={<AddressLink address={message?.data?.owner} />} />
+      <LabelValue label="Owner" value={message?.data?.owner ? <AddressLink address={message.data.owner} /> : undefined} />
@@
-      <LabelValue label="Attributes" value={<DynamicReactJson src={JSON.parse(JSON.stringify(message?.data?.attributes))} />} />
+      <LabelValue
+        label="Attributes"
+        value={message?.data?.attributes ? <DynamicReactJson src={message.data.attributes} /> : undefined}
+      />
apps/stats-web/src/components/transactions/akash/MsgDeleteProviderAttributes.tsx (1)

13-17: Fix potential runtime crash and guard Links

  • JSON.parse(JSON.stringify(message?.data?.keys)) throws when keys is undefined.
  • Guard Link creation for owner/auditor to avoid invalid hrefs.
-      <LabelValue label="Provider" value={<Link href={UrlService.address(message?.data?.owner)}>{message?.data?.owner}</Link>} />
+      <LabelValue
+        label="Provider"
+        value={message?.data?.owner ? <Link href={UrlService.address(message.data.owner)}>{message.data.owner}</Link> : undefined}
+      />
@@
-      <LabelValue label="Auditor" value={<Link href={UrlService.address(message?.data?.auditor)}>{message?.data?.auditor}</Link>} />
+      <LabelValue
+        label="Auditor"
+        value={message?.data?.auditor ? <Link href={UrlService.address(message.data.auditor)}>{message.data.auditor}</Link> : undefined}
+      />
@@
-      <LabelValue label="Keys" value={<DynamicReactJson src={JSON.parse(JSON.stringify(message?.data?.keys))} />} />
+      <LabelValue label="Keys" value={message?.data?.keys ? <DynamicReactJson src={message.data.keys} /> : undefined} />
♻️ Duplicate comments (3)
apps/stats-web/src/components/transactions/akash/helpers/DepositDetail.tsx (1)

8-8: Fix the type guard to prevent null pointer exceptions.

The type guard contains a critical flaw already flagged in previous reviews. The condition !value returns true for null, undefined, false, 0, "", etc. If value is null or undefined, isCoin will return true, but then Line 11 attempts to access value.amount, causing a runtime null pointer exception.

Apply this diff to fix the type guard:

-const isCoin = (value: unknown): value is Coin => !value || (typeof value === "object" && "denom" in value && "amount" in value);
+const isCoin = (value: unknown): value is Coin => value != null && typeof value === "object" && "denom" in value && "amount" in value;
apps/stats-web/src/components/transactions/akash/MsgPauseGroup.tsx (1)

14-14: Guard dseq Link to avoid invalid hrefs.

This issue was previously flagged: building a deployment link when owner or dseq is missing creates an invalid href.

Apply this diff:

-      <LabelValue label="dseq" value={<Link href={UrlService.deployment(message?.data?.id?.owner, message?.data?.id?.dseq)}>{message?.data?.id?.dseq}</Link>} />
+      <LabelValue
+        label="dseq"
+        value={
+          message?.data?.id?.owner && message?.data?.id?.dseq
+            ? <Link href={UrlService.deployment(message.data.id.owner, message.data.id.dseq)}>{message.data.id.dseq}</Link>
+            : message?.data?.id?.dseq
+        }
+      />
apps/stats-web/src/components/transactions/akash/MsgCloseBid.tsx (1)

14-19: Guard Links/values to avoid "undefined" text and invalid hrefs

Create Link/AddressLink only when underlying values exist. Otherwise pass undefined to value (LabelValue omits it).

-      <LabelValue label="Provider" value={<Link href={UrlService.address(bidId?.provider)}>{bidId?.provider}</Link>} />
+      <LabelValue
+        label="Provider"
+        value={bidId?.provider ? <Link href={UrlService.address(bidId.provider)}>{bidId.provider}</Link> : undefined}
+      />
@@
-      <LabelValue label="Owner" value={<AddressLink address={bidId?.owner} />} />
+      <LabelValue label="Owner" value={bidId?.owner ? <AddressLink address={bidId.owner} /> : undefined} />
@@
-      <LabelValue label="dseq" value={<Link href={UrlService.deployment(bidId?.owner, bidId?.dseq)}>{bidId?.dseq}</Link>} />
+      <LabelValue
+        label="dseq"
+        value={bidId?.owner && bidId?.dseq ? <Link href={UrlService.deployment(bidId.owner, bidId.dseq)}>{bidId.dseq}</Link> : undefined}
+      />
@@
-      <LabelValue label="gseq" value={bidId?.gseq} />
-      <LabelValue label="oseq" value={bidId?.oseq} />
+      <LabelValue label="gseq" value={bidId?.gseq ?? undefined} />
+      <LabelValue label="oseq" value={bidId?.oseq ?? undefined} />
🧹 Nitpick comments (5)
apps/stats-web/src/app/transactions/[hash]/TransactionInfo.tsx (1)

18-19: Consider adding loading fallbacks for dynamic imports.

The dynamic imports lack loading fallbacks, which may cause the Time label to briefly render empty content until the react-intl module loads. While not critical, this could create a minor visual glitch.

Apply this diff to add loading placeholders:

-const FormattedRelativeTime = dynamic(() => import("react-intl").then(mod => mod.FormattedRelativeTime), { ssr: false });
-const FormattedDate = dynamic(() => import("react-intl").then(mod => mod.FormattedDate), { ssr: false });
+const FormattedRelativeTime = dynamic(() => import("react-intl").then(mod => mod.FormattedRelativeTime), { 
+  ssr: false,
+  loading: () => <span>Loading...</span>
+});
+const FormattedDate = dynamic(() => import("react-intl").then(mod => mod.FormattedDate), { 
+  ssr: false,
+  loading: () => <span>Loading...</span>
+});
apps/stats-web/src/components/transactions/akash/MsgUpdateDeployment.tsx (1)

17-17: Guard JSON operations against undefined.

When message?.data?.groups is undefined, JSON.parse(JSON.stringify(undefined)) will produce undefined, but it's safer to check explicitly before rendering.

Apply this diff:

-      {message?.data?.groups && <LabelValue label="Groups" value={<DynamicReactJson src={JSON.parse(JSON.stringify(message?.data?.groups))} />} />}
+      {message?.data?.groups && <LabelValue label="Groups" value={<DynamicReactJson src={JSON.parse(JSON.stringify(message.data.groups))} />} />}
apps/stats-web/src/components/transactions/akash/MsgUpdateProvider.tsx (1)

13-13: Guard JSON operations against undefined.

When message?.data?.attributes is undefined, the JSON operations are unnecessary. Although optional chaining prevents errors, an explicit check improves clarity.

Apply this diff:

-      <LabelValue label="Attributes" value={<DynamicReactJson src={JSON.parse(JSON.stringify(message?.data?.attributes))} />} />
+      {message?.data?.attributes && <LabelValue label="Attributes" value={<DynamicReactJson src={JSON.parse(JSON.stringify(message.data.attributes))} />} />}
apps/stats-web/src/components/transactions/akash/MsgCreateLease.tsx (1)

15-15: Address TODO: Provider page link.

The TODO comment indicates a missing feature for linking to the provider page. The current implementation already uses UrlService.address(bidId?.provider) which should navigate to the provider address page.

Verify whether UrlService.address() provides the intended provider page link, or if a dedicated UrlService.provider() method is needed. If the current implementation is sufficient, the TODO can be removed.

apps/stats-web/src/components/transactions/akash/MsgSignProviderAttributes.tsx (1)

17-17: Consider using structured clone or passing the object directly.

The pattern JSON.parse(JSON.stringify(message?.data?.attributes)) performs a deep clone but is inefficient. Since DynamicReactJson likely handles object serialization internally, consider passing the object directly unless deep cloning is explicitly required for mutation safety.

If deep cloning is unnecessary, apply this diff:

-      <LabelValue label="Attributes" value={<DynamicReactJson src={JSON.parse(JSON.stringify(message?.data?.attributes))} />} />
+      <LabelValue label="Attributes" value={<DynamicReactJson src={message?.data?.attributes} />} />

If deep cloning is required, consider using structuredClone() (available in modern environments) for better performance:

-      <LabelValue label="Attributes" value={<DynamicReactJson src={JSON.parse(JSON.stringify(message?.data?.attributes))} />} />
+      <LabelValue label="Attributes" value={<DynamicReactJson src={structuredClone(message?.data?.attributes)} />} />
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4a0c74a and 145561f.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (80)
  • apps/stats-web/package.json (1 hunks)
  • apps/stats-web/src/app/transactions/[hash]/TransactionInfo.tsx (2 hunks)
  • apps/stats-web/src/components/AKTAmount.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/TxMessageRow.tsx (2 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgAccountDeposit.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgCloseBid.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgCloseDeployment.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgCloseGroup.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgCloseLease.tsx (2 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgCreateBid.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgCreateCertificate.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgCreateDeployment.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgCreateLease.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgCreateProvider.tsx (2 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgDeleteProviderAttributes.tsx (2 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgDepositDeployment.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgPauseGroup.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgRevokeCertificate.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgSignProviderAttributes.tsx (2 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgStartGroup.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgUpdateDeployment.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgUpdateProvider.tsx (2 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgWithdrawLease.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/helpers/DepositDetail.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/index.ts (1 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCloseBid.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCloseDeployment.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCloseGroup.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCloseLease.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCreateBid.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCreateCertificate.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCreateDeployment.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCreateLease.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgDeleteProvider.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgDeleteProviderAttributes.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgRevokeCertificate.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgSignProviderAttributes.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgStartGroup.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgUpdateDeployment.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgUpdateProvider.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgWithdrawLease.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCloseBid.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCloseGroup.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCloseLease.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCreateBid.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCreateDeployment.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCreateLease.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCreateProvider.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgDeleteProvider.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgDepositDeployment.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgPauseGroup.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgRevokeCertificate.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgSignProviderAttributes.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgUpdateDeployment.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgUpdateProvider.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgWithdrawLease.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCloseBid.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCloseDeployment.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCreateBid.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCreateCertificate.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCreateDeployment.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCreateLease.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCreateProvider.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgDeleteProvider.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgDeleteProviderAttributes.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgDepositDeployment.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgPauseGroup.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgStartGroup.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgUpdateDeployment.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgWithdrawLease.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta4/MsgCloseBid.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta4/MsgCloseLease.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta4/MsgCreateBid.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta4/MsgCreateLease.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta4/MsgWithdrawLease.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/createMsgView.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/generic/index.ts (1 hunks)
  • apps/stats-web/src/config/denom.config.ts (1 hunks)
  • apps/stats-web/src/lib/mathHelpers.ts (1 hunks)
  • apps/stats-web/src/services/api-url/api-url.service.ts (1 hunks)
💤 Files with no reviewable changes (50)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCloseBid.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgRevokeCertificate.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCloseBid.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgUpdateDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta4/MsgCloseLease.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgStartGroup.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta4/MsgCreateLease.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCreateCertificate.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgDeleteProviderAttributes.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgDeleteProviderAttributes.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgSignProviderAttributes.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgDeleteProvider.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCreateDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgDepositDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgUpdateDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgDeleteProvider.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgSignProviderAttributes.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgUpdateProvider.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgStartGroup.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCreateDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCreateDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCloseGroup.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCreateBid.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgWithdrawLease.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCreateBid.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgRevokeCertificate.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta4/MsgWithdrawLease.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta4/MsgCloseBid.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCreateLease.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgDepositDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCreateProvider.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCloseLease.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgUpdateDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgUpdateProvider.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCloseDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCreateProvider.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCreateLease.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgWithdrawLease.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCreateCertificate.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgDeleteProvider.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCloseLease.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCreateBid.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgPauseGroup.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgPauseGroup.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCreateLease.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgWithdrawLease.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCloseBid.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta4/MsgCreateBid.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCloseDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCloseGroup.tsx
🚧 Files skipped from review as they are similar to previous changes (10)
  • apps/stats-web/package.json
  • apps/stats-web/src/components/transactions/akash/MsgAccountDeposit.tsx
  • apps/stats-web/src/components/transactions/akash/MsgCreateBid.tsx
  • apps/stats-web/src/lib/mathHelpers.ts
  • apps/stats-web/src/components/transactions/akash/MsgCreateDeployment.tsx
  • apps/stats-web/src/components/AKTAmount.tsx
  • apps/stats-web/src/components/transactions/TxMessageRow.tsx
  • apps/stats-web/src/components/transactions/createMsgView.tsx
  • apps/stats-web/src/components/transactions/akash/MsgCreateCertificate.tsx
  • apps/stats-web/src/components/transactions/generic/index.ts
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/general.mdc)

Never use type any or cast to type any. Always define the proper TypeScript types.

Files:

  • apps/stats-web/src/components/transactions/akash/MsgCreateLease.tsx
  • apps/stats-web/src/components/transactions/akash/MsgDepositDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/MsgSignProviderAttributes.tsx
  • apps/stats-web/src/components/transactions/akash/MsgCreateProvider.tsx
  • apps/stats-web/src/components/transactions/akash/MsgUpdateDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/MsgRevokeCertificate.tsx
  • apps/stats-web/src/components/transactions/akash/MsgCloseGroup.tsx
  • apps/stats-web/src/services/api-url/api-url.service.ts
  • apps/stats-web/src/components/transactions/akash/MsgWithdrawLease.tsx
  • apps/stats-web/src/components/transactions/akash/index.ts
  • apps/stats-web/src/components/transactions/akash/MsgCloseLease.tsx
  • apps/stats-web/src/components/transactions/akash/MsgCloseBid.tsx
  • apps/stats-web/src/config/denom.config.ts
  • apps/stats-web/src/components/transactions/akash/MsgStartGroup.tsx
  • apps/stats-web/src/components/transactions/akash/MsgPauseGroup.tsx
  • apps/stats-web/src/components/transactions/akash/helpers/DepositDetail.tsx
  • apps/stats-web/src/components/transactions/akash/MsgUpdateProvider.tsx
  • apps/stats-web/src/components/transactions/akash/MsgCloseDeployment.tsx
  • apps/stats-web/src/app/transactions/[hash]/TransactionInfo.tsx
  • apps/stats-web/src/components/transactions/akash/MsgDeleteProviderAttributes.tsx
**/*.{js,ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/general.mdc)

**/*.{js,ts,tsx}: Never use deprecated methods from libraries.
Don't add unnecessary comments to the code

Files:

  • apps/stats-web/src/components/transactions/akash/MsgCreateLease.tsx
  • apps/stats-web/src/components/transactions/akash/MsgDepositDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/MsgSignProviderAttributes.tsx
  • apps/stats-web/src/components/transactions/akash/MsgCreateProvider.tsx
  • apps/stats-web/src/components/transactions/akash/MsgUpdateDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/MsgRevokeCertificate.tsx
  • apps/stats-web/src/components/transactions/akash/MsgCloseGroup.tsx
  • apps/stats-web/src/services/api-url/api-url.service.ts
  • apps/stats-web/src/components/transactions/akash/MsgWithdrawLease.tsx
  • apps/stats-web/src/components/transactions/akash/index.ts
  • apps/stats-web/src/components/transactions/akash/MsgCloseLease.tsx
  • apps/stats-web/src/components/transactions/akash/MsgCloseBid.tsx
  • apps/stats-web/src/config/denom.config.ts
  • apps/stats-web/src/components/transactions/akash/MsgStartGroup.tsx
  • apps/stats-web/src/components/transactions/akash/MsgPauseGroup.tsx
  • apps/stats-web/src/components/transactions/akash/helpers/DepositDetail.tsx
  • apps/stats-web/src/components/transactions/akash/MsgUpdateProvider.tsx
  • apps/stats-web/src/components/transactions/akash/MsgCloseDeployment.tsx
  • apps/stats-web/src/app/transactions/[hash]/TransactionInfo.tsx
  • apps/stats-web/src/components/transactions/akash/MsgDeleteProviderAttributes.tsx
🧠 Learnings (1)
📚 Learning: 2025-09-04T04:27:50.638Z
Learnt from: stalniy
PR: akash-network/console#1868
File: apps/api/src/billing/services/managed-signer/managed-signer.service.ts:1-1
Timestamp: 2025-09-04T04:27:50.638Z
Learning: In the akash-network/console project, importing MsgCreateLease from "akashnetwork/akash-api/v1beta3" instead of v1beta4 is considered non-critical by the maintainers, likely due to backward compatibility or project-specific requirements.

Applied to files:

  • apps/stats-web/src/components/transactions/akash/MsgCreateLease.tsx
  • apps/stats-web/src/components/transactions/akash/MsgCloseLease.tsx
🧬 Code graph analysis (16)
apps/stats-web/src/components/transactions/akash/MsgCreateLease.tsx (2)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/deploy-web/src/components/shared/LabelValue.tsx (1)
  • LabelValue (11-22)
apps/stats-web/src/components/transactions/akash/MsgDepositDeployment.tsx (4)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/deploy-web/src/components/shared/LabelValue.tsx (1)
  • LabelValue (11-22)
apps/stats-web/src/components/AKTAmount.tsx (1)
  • AKTAmount (18-57)
apps/stats-web/src/lib/mathHelpers.ts (1)
  • coinsToAmount (45-49)
apps/stats-web/src/components/transactions/akash/MsgSignProviderAttributes.tsx (1)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/stats-web/src/components/transactions/akash/MsgCreateProvider.tsx (1)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/stats-web/src/components/transactions/akash/MsgUpdateDeployment.tsx (3)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/deploy-web/src/components/shared/LabelValue.tsx (1)
  • LabelValue (11-22)
apps/stats-web/src/components/DynamicJsonView.tsx (1)
  • DynamicReactJson (20-23)
apps/stats-web/src/components/transactions/akash/MsgRevokeCertificate.tsx (2)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/deploy-web/src/components/shared/LabelValue.tsx (1)
  • LabelValue (11-22)
apps/stats-web/src/components/transactions/akash/MsgCloseGroup.tsx (1)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/stats-web/src/components/transactions/akash/MsgWithdrawLease.tsx (2)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/deploy-web/src/components/shared/LabelValue.tsx (1)
  • LabelValue (11-22)
apps/stats-web/src/components/transactions/akash/MsgCloseLease.tsx (1)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/stats-web/src/components/transactions/akash/MsgCloseBid.tsx (2)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/deploy-web/src/components/shared/LabelValue.tsx (1)
  • LabelValue (11-22)
apps/stats-web/src/components/transactions/akash/MsgStartGroup.tsx (2)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/deploy-web/src/components/shared/LabelValue.tsx (1)
  • LabelValue (11-22)
apps/stats-web/src/components/transactions/akash/MsgPauseGroup.tsx (2)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/deploy-web/src/components/shared/LabelValue.tsx (1)
  • LabelValue (11-22)
apps/stats-web/src/components/transactions/akash/helpers/DepositDetail.tsx (2)
apps/deploy-web/src/components/shared/LabelValue.tsx (1)
  • LabelValue (11-22)
apps/stats-web/src/components/AKTAmount.tsx (1)
  • AKTAmount (18-57)
apps/stats-web/src/components/transactions/akash/MsgUpdateProvider.tsx (1)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/stats-web/src/components/transactions/akash/MsgCloseDeployment.tsx (2)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/deploy-web/src/components/shared/LabelValue.tsx (1)
  • LabelValue (11-22)
apps/stats-web/src/components/transactions/akash/MsgDeleteProviderAttributes.tsx (1)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
  • GitHub Check: validate / validate-app
  • GitHub Check: test-build
  • GitHub Check: validate / validate-app
  • GitHub Check: test-build
  • GitHub Check: validate / validate-app
  • GitHub Check: validate / validate-app
  • GitHub Check: test-build
  • GitHub Check: test-build
  • GitHub Check: test-build
🔇 Additional comments (7)
apps/stats-web/src/config/denom.config.ts (2)

1-1: Import migration aligns with chain-sdk adoption.

The change from @akashnetwork/akashjs/build/types/network to @akashnetwork/chain-sdk/web is consistent with the broader migration strategy.


5-5: Verify NetworkId includes “testnet” as a literal
Exclude<NetworkId, "testnet"> relies on NetworkId being a string-literal union containing "testnet"; please confirm its definition covers exactly that before merging.

apps/stats-web/src/services/api-url/api-url.service.ts (1)

1-1: Confirm NetworkId union from chain-sdk
Import change aligns with migration strategy; manually verify that NetworkId from @akashnetwork/chain-sdk/web matches the union of MAINNET_ID, TESTNET_ID, and SANDBOX_ID from @akashnetwork/network-store and type-checks in api-url.service.ts and denom.config.ts.

apps/stats-web/src/components/transactions/akash/MsgRevokeCertificate.tsx (1)

7-12: Remove guard suggestion; createMsgView handles version filtering and “v1” is valid.

Likely an incorrect or invalid review comment.

apps/stats-web/src/components/transactions/akash/MsgStartGroup.tsx (1)

10-18: LGTM!

The wrapper conversion follows the established pattern correctly. The component now supports multiple transaction versions (v1beta1 through v1beta4) and falls back to JSON rendering for unsupported versions.

apps/stats-web/src/components/transactions/akash/index.ts (1)

1-19: LGTM!

This barrel export file consolidates Akash transaction message components, making imports cleaner across the codebase. The structure is straightforward and follows standard practices.

apps/stats-web/src/components/transactions/akash/MsgSignProviderAttributes.tsx (1)

11-11: No change needed for version array: MsgSignProviderAttributes aligns with other provider-attribute and certificate messages that support v1 only.

return (
<>
<LabelValue label="Owner" value={<AddressLink address={message?.data?.id?.owner} />} />
<LabelValue label="dseq" value={<Link href={UrlService.deployment(message?.data?.id?.owner, message?.data?.id?.dseq)}>{message?.data?.id?.dseq}</Link>} />
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Guard dseq Link to avoid invalid hrefs.

Building a deployment link when owner or dseq is missing creates an invalid href, consistent with similar issues in other message components.

Apply this diff:

-      <LabelValue label="dseq" value={<Link href={UrlService.deployment(message?.data?.id?.owner, message?.data?.id?.dseq)}>{message?.data?.id?.dseq}</Link>} />
+      <LabelValue
+        label="dseq"
+        value={
+          message?.data?.id?.owner && message?.data?.id?.dseq
+            ? <Link href={UrlService.deployment(message.data.id.owner, message.data.id.dseq)}>{message.data.id.dseq}</Link>
+            : message?.data?.id?.dseq
+        }
+      />
📝 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.

Suggested change
<LabelValue label="dseq" value={<Link href={UrlService.deployment(message?.data?.id?.owner, message?.data?.id?.dseq)}>{message?.data?.id?.dseq}</Link>} />
<LabelValue
label="dseq"
value={
message?.data?.id?.owner && message?.data?.id?.dseq
? <Link href={UrlService.deployment(message.data.id.owner, message.data.id.dseq)}>{message.data.id.dseq}</Link>
: message?.data?.id?.dseq
}
/>
🤖 Prompt for AI Agents
In apps/stats-web/src/components/transactions/akash/MsgCloseDeployment.tsx
around line 14, the Link is built unconditionally using UrlService.deployment
with message?.data?.id?.owner and message?.data?.id?.dseq which can produce
invalid hrefs when owner or dseq is missing; update the JSX to first check both
owner and dseq are present and non-null/undefined and only render the Link when
they are, otherwise render the dseq value (or a fallback like '-') as plain text
so no invalid href is produced.

Comment on lines 13 to 16
<LabelValue label="Owner" value={<AddressLink address={message?.data?.id?.owner} />} />
<LabelValue label="dseq" value={<Link href={UrlService.deployment(message?.data?.id?.owner, message?.data?.id?.dseq)}>{message?.data?.id?.dseq}</Link>} />
<LabelValue label="gseq" value={message?.data?.id?.gseq} />
</>
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Guard Links/AddressLink to avoid invalid hrefs and "undefined" text

Conditionally construct Link/AddressLink; otherwise pass undefined so LabelValue omits value.

-      <LabelValue label="Owner" value={<AddressLink address={message?.data?.id?.owner} />} />
-      <LabelValue label="dseq" value={<Link href={UrlService.deployment(message?.data?.id?.owner, message?.data?.id?.dseq)}>{message?.data?.id?.dseq}</Link>} />
-      <LabelValue label="gseq" value={message?.data?.id?.gseq} />
+      <LabelValue label="Owner" value={message?.data?.id?.owner ? <AddressLink address={message.data.id.owner} /> : undefined} />
+      <LabelValue
+        label="dseq"
+        value={
+          message?.data?.id?.owner && message?.data?.id?.dseq ? (
+            <Link href={UrlService.deployment(message.data.id.owner, message.data.id.dseq)}>{message.data.id.dseq}</Link>
+          ) : undefined
+        }
+      />
+      <LabelValue label="gseq" value={message?.data?.id?.gseq ?? undefined} />
📝 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.

Suggested change
<LabelValue label="Owner" value={<AddressLink address={message?.data?.id?.owner} />} />
<LabelValue label="dseq" value={<Link href={UrlService.deployment(message?.data?.id?.owner, message?.data?.id?.dseq)}>{message?.data?.id?.dseq}</Link>} />
<LabelValue label="gseq" value={message?.data?.id?.gseq} />
</>
<LabelValue
label="Owner"
value={
message?.data?.id?.owner
? <AddressLink address={message.data.id.owner} />
: undefined
}
/>
<LabelValue
label="dseq"
value={
message?.data?.id?.owner && message?.data?.id?.dseq
? (
<Link href={UrlService.deployment(message.data.id.owner, message.data.id.dseq)}>
{message.data.id.dseq}
</Link>
)
: undefined
}
/>
<LabelValue
label="gseq"
value={message?.data?.id?.gseq ?? undefined}
/>

Comment on lines +14 to +17
<LabelValue label="Provider" value={<Link href={UrlService.address(bidId?.provider)}>{bidId?.provider}</Link>} />
{/* TODO: Add link to provider page */}
<LabelValue label="Owner" value={<AddressLink address={bidId?.owner} />} />
<LabelValue label="dseq" value={<Link href={UrlService.deployment(bidId?.owner, bidId?.dseq)}>{bidId?.dseq}</Link>} />
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Guard Link hrefs to avoid invalid URLs.

Lines 14 and 17 build links with potentially undefined values. When bidId, bidId.provider, bidId.owner, or bidId.dseq are missing, invalid hrefs are created.

Apply this diff:

-      <LabelValue label="Provider" value={<Link href={UrlService.address(bidId?.provider)}>{bidId?.provider}</Link>} />
+      <LabelValue 
+        label="Provider" 
+        value={bidId?.provider ? <Link href={UrlService.address(bidId.provider)}>{bidId.provider}</Link> : undefined} 
+      />
       {/* TODO: Add link to provider page */}
       <LabelValue label="Owner" value={<AddressLink address={bidId?.owner} />} />
-      <LabelValue label="dseq" value={<Link href={UrlService.deployment(bidId?.owner, bidId?.dseq)}>{bidId?.dseq}</Link>} />
+      <LabelValue
+        label="dseq"
+        value={
+          bidId?.owner && bidId?.dseq
+            ? <Link href={UrlService.deployment(bidId.owner, bidId.dseq)}>{bidId.dseq}</Link>
+            : bidId?.dseq
+        }
+      />
📝 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.

Suggested change
<LabelValue label="Provider" value={<Link href={UrlService.address(bidId?.provider)}>{bidId?.provider}</Link>} />
{/* TODO: Add link to provider page */}
<LabelValue label="Owner" value={<AddressLink address={bidId?.owner} />} />
<LabelValue label="dseq" value={<Link href={UrlService.deployment(bidId?.owner, bidId?.dseq)}>{bidId?.dseq}</Link>} />
<LabelValue
label="Provider"
value={bidId?.provider
? <Link href={UrlService.address(bidId.provider)}>{bidId.provider}</Link>
: undefined
}
/>
{/* TODO: Add link to provider page */}
<LabelValue label="Owner" value={<AddressLink address={bidId?.owner} />} />
<LabelValue
label="dseq"
value={
bidId?.owner && bidId?.dseq
? <Link href={UrlService.deployment(bidId.owner, bidId.dseq)}>{bidId.dseq}</Link>
: bidId?.dseq
}
/>
🤖 Prompt for AI Agents
In apps/stats-web/src/components/transactions/akash/MsgCreateLease.tsx around
lines 14 to 17, the Link hrefs are built from possibly undefined bidId
properties which can produce invalid URLs; guard these by only calling
UrlService.address/UrlService.deployment when the underlying values exist and
otherwise render a safe fallback (e.g., plain text, disabled link, or '#' href).
Concretely: check bidId and bidId.provider before creating the Provider Link,
check bidId and bidId.dseq and bidId.owner before creating the dseq Link, and
for missing values render the raw value or a placeholder without using
UrlService; ensure AddressLink receives a valid address or is replaced with a
fallback display when bidId.owner is missing.

Comment on lines +12 to 19
export const MsgDepositDeployment = createMsgView(["v1beta1", "v1beta2", "v1beta3"], ({ message }) => {
return (
<>
<LabelValue label="Owner" value={<AddressLink address={message?.data?.id?.owner} />} />
<LabelValue label="DSEQ" value={<Link href={UrlService.deployment(message?.data?.id?.owner, message?.data?.id?.dseq)}>{message?.data?.id?.dseq}</Link>} />
{message?.data?.depositor && <LabelValue label="Depositor" value={<AddressLink address={message?.data?.depositor} />} />}
<LabelValue label="Deposit" value={<AKTAmount uakt={coinsToAmount(message?.data?.amount, "uakt")} showAKTLabel showUSD />} />
</>
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Guard Links/AddressLink and include v1beta4 support

  • Prevent invalid hrefs and "undefined" text by guarding before creating Link/AddressLink.
  • Likely need v1beta4 in supported versions for SDK upgrade.

Apply:

-export const MsgDepositDeployment = createMsgView(["v1beta1", "v1beta2", "v1beta3"], ({ message }) => {
+export const MsgDepositDeployment = createMsgView(["v1beta1", "v1beta2", "v1beta3", "v1beta4"], ({ message }) => {
   return (
     <>
-      <LabelValue label="Owner" value={<AddressLink address={message?.data?.id?.owner} />} />
-      <LabelValue label="DSEQ" value={<Link href={UrlService.deployment(message?.data?.id?.owner, message?.data?.id?.dseq)}>{message?.data?.id?.dseq}</Link>} />
+      <LabelValue label="Owner" value={message?.data?.id?.owner ? <AddressLink address={message.data.id.owner} /> : undefined} />
+      <LabelValue
+        label="DSEQ"
+        value={
+          message?.data?.id?.owner && message?.data?.id?.dseq ? (
+            <Link href={UrlService.deployment(message.data.id.owner, message.data.id.dseq)}>{message.data.id.dseq}</Link>
+          ) : undefined
+        }
+      />
       {message?.data?.depositor && <LabelValue label="Depositor" value={<AddressLink address={message?.data?.depositor} />} />}
       <LabelValue label="Deposit" value={<AKTAmount uakt={coinsToAmount(message?.data?.amount, "uakt")} showAKTLabel showUSD />} />
     </>
   );
 });

🏁 Script executed:

#!/bin/bash
rg -n "createMsgView" -C2 --glob '**/*.ts*'

Length of output: 21049


Add v1beta4 support and guard AddressLink/Link in MsgDepositDeployment

  • Include "v1beta4" in the createMsgView versions array.
  • Wrap AddressLink and Link values in guards to avoid rendering with undefined props:
-export const MsgDepositDeployment = createMsgView(["v1beta1", "v1beta2", "v1beta3"], ({ message }) => {
+export const MsgDepositDeployment = createMsgView(["v1beta1", "v1beta2", "v1beta3", "v1beta4"], ({ message }) => {
   return (
     <>
-      <LabelValue label="Owner" value={<AddressLink address={message?.data?.id?.owner} />} />
-      <LabelValue label="DSEQ" value={<Link href={UrlService.deployment(message?.data?.id?.owner, message?.data?.id?.dseq)}>{message?.data?.id?.dseq}</Link>} />
+      <LabelValue
+        label="Owner"
+        value={message?.data?.id?.owner ? <AddressLink address={message.data.id.owner} /> : undefined}
+      />
+      <LabelValue
+        label="DSEQ"
+        value={
+          message?.data?.id?.owner && message?.data?.id?.dseq
+            ? <Link href={UrlService.deployment(message.data.id.owner, message.data.id.dseq)}>{message.data.id.dseq}</Link>
+            : undefined
+        }
+      />
       {message?.data?.depositor && <LabelValue label="Depositor" value={<AddressLink address={message.data.depositor} />} />}
       <LabelValue label="Deposit" value={<AKTAmount uakt={coinsToAmount(message.data.amount, "uakt")} showAKTLabel showUSD />} />
     </>
   );
 });

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In apps/stats-web/src/components/transactions/akash/MsgDepositDeployment.tsx
around lines 12 to 19, the version list passed to createMsgView needs to include
"v1beta4" and the AddressLink/Link props must be guarded to avoid passing
undefined values; update the versions array to ["v1beta1", "v1beta2", "v1beta3",
"v1beta4"] and change the LabelValue renderings to only render AddressLink and
Link when the underlying values exist (e.g., check message?.data?.id?.owner and
message?.data?.id?.dseq before rendering the Owner and DSEQ LabelValue, and
check message?.data?.depositor before rendering Depositor) so no undefined props
are passed.

return (
<>
<LabelValue label="Owner" value={<AddressLink address={message?.data?.id?.owner} />} />
<LabelValue label="dseq" value={<Link href={UrlService.deployment(message?.data?.id?.owner, message?.data?.id?.dseq)}>{message?.data?.id?.dseq}</Link>} />
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Guard dseq Link to avoid invalid hrefs.

Building a deployment link when owner or dseq is missing creates an invalid href. This issue is similar to concerns raised in MsgPauseGroup.

Apply this diff:

-      <LabelValue label="dseq" value={<Link href={UrlService.deployment(message?.data?.id?.owner, message?.data?.id?.dseq)}>{message?.data?.id?.dseq}</Link>} />
+      <LabelValue
+        label="dseq"
+        value={
+          message?.data?.id?.owner && message?.data?.id?.dseq
+            ? <Link href={UrlService.deployment(message.data.id.owner, message.data.id.dseq)}>{message.data.id.dseq}</Link>
+            : message?.data?.id?.dseq
+        }
+      />
📝 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.

Suggested change
<LabelValue label="dseq" value={<Link href={UrlService.deployment(message?.data?.id?.owner, message?.data?.id?.dseq)}>{message?.data?.id?.dseq}</Link>} />
<LabelValue
label="dseq"
value={
message?.data?.id?.owner && message?.data?.id?.dseq
? <Link href={UrlService.deployment(message.data.id.owner, message.data.id.dseq)}>
{message.data.id.dseq}
</Link>
: message?.data?.id?.dseq
}
/>
🤖 Prompt for AI Agents
In apps/stats-web/src/components/transactions/akash/MsgUpdateDeployment.tsx
around line 15, the Link for dseq is built unguarded and can produce an invalid
href when message?.data?.id?.owner or message?.data?.id?.dseq is missing; change
the JSX to check both owner and dseq before rendering the Link (e.g., render
Link only when owner && dseq are truthy), and if either is missing render a safe
fallback such as the raw dseq value or a plain text/placeholder so no invalid
href is produced.

Comment on lines +15 to +17
<LabelValue label="Provider" value={<Link href={UrlService.address(bidId?.provider)}>{bidId?.provider}</Link>} />
<LabelValue label="dseq" value={<Link href={UrlService.deployment(bidId?.owner, bidId?.dseq)}>{bidId?.dseq}</Link>} />
<LabelValue label="gseq" value={bidId?.gseq} />
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Guard Link hrefs to avoid invalid URLs.

Lines 15-17 build links with potentially undefined values. When bidId, bidId.provider, bidId.owner, or bidId.dseq are missing, invalid hrefs are created.

Apply this diff:

-      <LabelValue label="Provider" value={<Link href={UrlService.address(bidId?.provider)}>{bidId?.provider}</Link>} />
+      <LabelValue 
+        label="Provider" 
+        value={bidId?.provider ? <Link href={UrlService.address(bidId.provider)}>{bidId.provider}</Link> : undefined} 
+      />
       <LabelValue label="Owner" value={<AddressLink address={bidId?.owner} />} />
-      <LabelValue label="dseq" value={<Link href={UrlService.deployment(bidId?.owner, bidId?.dseq)}>{bidId?.dseq}</Link>} />
+      <LabelValue
+        label="dseq"
+        value={
+          bidId?.owner && bidId?.dseq
+            ? <Link href={UrlService.deployment(bidId.owner, bidId.dseq)}>{bidId.dseq}</Link>
+            : bidId?.dseq
+        }
+      />

Committable suggestion skipped: line range outside the PR's diff.

@stalniy stalniy force-pushed the refactor/upgrade-stats branch from 145561f to f6217ba Compare October 14, 2025 11:45
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

♻️ Duplicate comments (11)
apps/stats-web/package.json (1)

16-16: Duplicate: SDK migration already flagged.

A previous review comment already identified the need to verify complete removal of @akashnetwork/akashjs imports across the codebase.

apps/stats-web/src/components/transactions/akash/MsgWithdrawLease.tsx (1)

15-16: Guard Link hrefs to prevent invalid URLs.

Lines 15-16 construct Links with potentially undefined values. When bidId?.provider, bidId?.owner, or bidId?.dseq are missing, invalid hrefs are created.

Apply this diff:

-      <LabelValue label="Provider" value={<Link href={UrlService.address(bidId?.provider)}>{bidId?.provider}</Link>} />
-      <LabelValue label="dseq" value={<Link href={UrlService.deployment(bidId?.owner, bidId?.dseq)}>{bidId?.dseq}</Link>} />
+      <LabelValue 
+        label="Provider" 
+        value={bidId?.provider ? <Link href={UrlService.address(bidId.provider)}>{bidId.provider}</Link> : undefined} 
+      />
+      <LabelValue
+        label="dseq"
+        value={
+          bidId?.owner && bidId?.dseq
+            ? <Link href={UrlService.deployment(bidId.owner, bidId.dseq)}>{bidId.dseq}</Link>
+            : bidId?.dseq
+        }
+      />
apps/stats-web/src/components/transactions/akash/MsgPauseGroup.tsx (1)

14-14: Guard the dseq Link to avoid invalid hrefs.

Line 14 constructs a deployment link when owner or dseq might be missing, resulting in an invalid href.

Apply this diff:

-      <LabelValue label="dseq" value={<Link href={UrlService.deployment(message?.data?.id?.owner, message?.data?.id?.dseq)}>{message?.data?.id?.dseq}</Link>} />
+      <LabelValue
+        label="dseq"
+        value={
+          message?.data?.id?.owner && message?.data?.id?.dseq
+            ? <Link href={UrlService.deployment(message.data.id.owner, message.data.id.dseq)}>{message.data.id.dseq}</Link>
+            : message?.data?.id?.dseq
+        }
+      />
apps/stats-web/src/components/transactions/akash/MsgCreateDeployment.tsx (2)

21-22: Guard the dseq Link to prevent invalid hrefs.

Line 22 creates a deployment link without checking if owner or dseq are present, which can produce an invalid href.

Apply this diff:

-      <LabelValue label="dseq" value={<Link href={UrlService.deployment(data?.id?.owner, data?.id?.dseq)}>{data?.id?.dseq}</Link>} />
+      <LabelValue
+        label="dseq"
+        value={
+          data?.id?.owner && data?.id?.dseq
+            ? <Link href={UrlService.deployment(data.id.owner, data.id.dseq)}>{data.id.dseq}</Link>
+            : data?.id?.dseq
+        }
+      />

25-26: Conditionally render DepositDetail and guard JSON operations.

Lines 25-26 can crash when optional fields are absent:

  • DepositDetail expects a non-undefined value but receives data?.deposit which can be undefined.
  • JSON.parse(JSON.stringify(data?.groups)) throws when groups is undefined.

Apply this diff:

-      <DepositDetail value={data?.deposit} />
-      <LabelValue label="Groups" value={<DynamicReactJson src={JSON.parse(JSON.stringify(data?.groups))} />} />
+      {data?.deposit && <DepositDetail value={data.deposit} />}
+      {data?.groups && <LabelValue label="Groups" value={<DynamicReactJson src={data.groups} />} />}
apps/stats-web/src/components/transactions/akash/MsgDepositDeployment.tsx (2)

12-12: Add v1beta4 support to the versions array.

Line 12 is missing "v1beta4" in the supported versions array, which is likely needed to support messages after the chain SDK upgrade.

Apply this diff:

-export const MsgDepositDeployment = createMsgView(["v1beta1", "v1beta2", "v1beta3"], ({ message }) => {
+export const MsgDepositDeployment = createMsgView(["v1beta1", "v1beta2", "v1beta3", "v1beta4"], ({ message }) => {

15-16: Guard AddressLink and Link to prevent invalid hrefs.

Lines 15-16 pass potentially undefined values to AddressLink and Link, which can result in invalid hrefs or render "undefined" as text.

Apply this diff:

-      <LabelValue label="Owner" value={<AddressLink address={message?.data?.id?.owner} />} />
-      <LabelValue label="DSEQ" value={<Link href={UrlService.deployment(message?.data?.id?.owner, message?.data?.id?.dseq)}>{message?.data?.id?.dseq}</Link>} />
+      <LabelValue
+        label="Owner"
+        value={message?.data?.id?.owner ? <AddressLink address={message.data.id.owner} /> : undefined}
+      />
+      <LabelValue
+        label="DSEQ"
+        value={
+          message?.data?.id?.owner && message?.data?.id?.dseq
+            ? <Link href={UrlService.deployment(message.data.id.owner, message.data.id.dseq)}>{message.data.id.dseq}</Link>
+            : undefined
+        }
+      />
apps/stats-web/src/components/transactions/akash/MsgCreateBid.tsx (3)

18-18: Guard the Provider Link to avoid invalid hrefs.

Line 18 constructs a Link with UrlService.address(message?.data?.provider) without checking if provider is defined, which can produce an invalid href.

Apply this diff:

-      <LabelValue label="Provider" value={<Link href={UrlService.address(message?.data?.provider)}>{message?.data?.provider}</Link>} />
+      <LabelValue
+        label="Provider"
+        value={message?.data?.provider ? <Link href={UrlService.address(message.data.provider)}>{message.data.provider}</Link> : undefined}
+      />

20-21: Guard Owner and dseq Links to prevent invalid hrefs.

Lines 20-21 pass potentially undefined values to AddressLink and Link, resulting in invalid hrefs when owner or dseq are missing.

Apply this diff:

-      <LabelValue label="Owner" value={<AddressLink address={order?.owner} />} />
-      <LabelValue label="dseq" value={<Link href={UrlService.deployment(order?.owner, order?.dseq)}>{order?.dseq}</Link>} />
+      <LabelValue label="Owner" value={order?.owner ? <AddressLink address={order.owner} /> : undefined} />
+      <LabelValue
+        label="dseq"
+        value={order?.owner && order?.dseq ? <Link href={UrlService.deployment(order.owner, order.dseq)}>{order.dseq}</Link> : undefined}
+      />

25-25: Conditionally render DepositDetail to avoid passing undefined.

Line 25 passes message?.data?.deposit directly to DepositDetail, which expects a Coin | Deposit value. When deposit is undefined, this can cause a crash inside DepositDetail.

Apply this diff:

-      <DepositDetail value={message?.data?.deposit} />
+      {message?.data?.deposit && <DepositDetail value={message.data.deposit} />}
apps/stats-web/src/components/transactions/akash/MsgCloseDeployment.tsx (1)

14-14: Guard the dseq Link to avoid invalid hrefs.

Line 14 builds a deployment link when owner or dseq may be missing, creating an invalid href.

Apply this diff:

-      <LabelValue label="dseq" value={<Link href={UrlService.deployment(message?.data?.id?.owner, message?.data?.id?.dseq)}>{message?.data?.id?.dseq}</Link>} />
+      <LabelValue
+        label="dseq"
+        value={
+          message?.data?.id?.owner && message?.data?.id?.dseq
+            ? <Link href={UrlService.deployment(message.data.id.owner, message.data.id.dseq)}>{message.data.id.dseq}</Link>
+            : message?.data?.id?.dseq
+        }
+      />
🧹 Nitpick comments (3)
apps/stats-web/src/app/transactions/[hash]/TransactionInfo.tsx (1)

18-19: Consider SSR implications of client-only date formatting.

The FormattedRelativeTime and FormattedDate components are now dynamically loaded with ssr: false, meaning they won't render during SSR. This will cause:

  • A hydration delay where these components appear blank initially
  • Potential layout shift as they populate on the client

If the goal is to avoid timezone mismatches between server and client, consider using a loading skeleton or alternative approach.

apps/stats-web/src/components/transactions/TxMessageRow.tsx (1)

31-34: Initialize MsgComponent or use const with type assertion.

The variable MsgComponent is declared with let but not initialized, and TypeScript will infer it as undefined before the conditional assignments. Consider initializing it to undefined explicitly or restructuring the logic.

Apply this diff:

-  let MsgComponent: React.FunctionComponent<TxMessageProps & { version: string }>;
+  let MsgComponent: React.FunctionComponent<TxMessageProps & { version: string }> | undefined;
apps/stats-web/src/components/transactions/createMsgView.tsx (1)

11-11: Consider performance impact of JSON deep clone.

The fallback uses JSON.parse(JSON.stringify(props)) to deep clone props before passing to DynamicReactJson. While this sanitizes the data for JSON viewing:

  • It's computationally expensive for large message objects
  • It strips functions, undefined values, and non-enumerable properties

If DynamicReactJson can handle the raw props object, consider passing props directly. Otherwise, this is acceptable for fallback scenarios.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 145561f and f6217ba.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (81)
  • apps/deploy-web/package.json (1 hunks)
  • apps/stats-web/package.json (1 hunks)
  • apps/stats-web/src/app/transactions/[hash]/TransactionInfo.tsx (2 hunks)
  • apps/stats-web/src/components/AKTAmount.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/TxMessageRow.tsx (2 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgAccountDeposit.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgCloseBid.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgCloseDeployment.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgCloseGroup.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgCloseLease.tsx (2 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgCreateBid.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgCreateCertificate.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgCreateDeployment.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgCreateLease.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgCreateProvider.tsx (2 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgDeleteProviderAttributes.tsx (2 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgDepositDeployment.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgPauseGroup.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgRevokeCertificate.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgSignProviderAttributes.tsx (2 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgStartGroup.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgUpdateDeployment.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgUpdateProvider.tsx (2 hunks)
  • apps/stats-web/src/components/transactions/akash/MsgWithdrawLease.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/helpers/DepositDetail.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/akash/index.ts (1 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCloseBid.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCloseDeployment.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCloseGroup.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCloseLease.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCreateBid.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCreateCertificate.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCreateDeployment.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCreateLease.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgDeleteProvider.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgDeleteProviderAttributes.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgRevokeCertificate.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgSignProviderAttributes.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgStartGroup.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgUpdateDeployment.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgUpdateProvider.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgWithdrawLease.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCloseBid.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCloseGroup.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCloseLease.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCreateBid.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCreateDeployment.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCreateLease.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCreateProvider.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgDeleteProvider.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgDepositDeployment.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgPauseGroup.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgRevokeCertificate.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgSignProviderAttributes.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgUpdateDeployment.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgUpdateProvider.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgWithdrawLease.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCloseBid.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCloseDeployment.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCreateBid.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCreateCertificate.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCreateDeployment.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCreateLease.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCreateProvider.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgDeleteProvider.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgDeleteProviderAttributes.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgDepositDeployment.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgPauseGroup.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgStartGroup.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgUpdateDeployment.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgWithdrawLease.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta4/MsgCloseBid.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta4/MsgCloseLease.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta4/MsgCreateBid.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta4/MsgCreateLease.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/akash/v1beta4/MsgWithdrawLease.tsx (0 hunks)
  • apps/stats-web/src/components/transactions/createMsgView.tsx (1 hunks)
  • apps/stats-web/src/components/transactions/generic/index.ts (1 hunks)
  • apps/stats-web/src/config/denom.config.ts (1 hunks)
  • apps/stats-web/src/lib/mathHelpers.ts (1 hunks)
  • apps/stats-web/src/services/api-url/api-url.service.ts (1 hunks)
💤 Files with no reviewable changes (50)
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgDepositDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCloseGroup.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgWithdrawLease.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCloseLease.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCreateDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta4/MsgCreateBid.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta4/MsgCreateLease.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgRevokeCertificate.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCreateProvider.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCloseBid.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta4/MsgCloseLease.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgRevokeCertificate.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCloseBid.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCloseDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCreateCertificate.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgWithdrawLease.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgDepositDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCreateLease.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgDeleteProvider.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgUpdateDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgPauseGroup.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCloseGroup.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgUpdateProvider.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCreateBid.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgDeleteProviderAttributes.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgDeleteProvider.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgSignProviderAttributes.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgPauseGroup.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCreateDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCreateCertificate.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgUpdateProvider.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgDeleteProvider.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCreateProvider.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta4/MsgWithdrawLease.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgWithdrawLease.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgCreateLease.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCloseBid.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCreateDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgDeleteProviderAttributes.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCreateBid.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgUpdateDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgCloseDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgUpdateDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCloseLease.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta1/MsgStartGroup.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCreateBid.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgSignProviderAttributes.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta3/MsgStartGroup.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta2/MsgCreateLease.tsx
  • apps/stats-web/src/components/transactions/akash/v1beta4/MsgCloseBid.tsx
🚧 Files skipped from review as they are similar to previous changes (11)
  • apps/stats-web/src/lib/mathHelpers.ts
  • apps/stats-web/src/services/api-url/api-url.service.ts
  • apps/stats-web/src/components/transactions/akash/helpers/DepositDetail.tsx
  • apps/stats-web/src/components/transactions/akash/MsgUpdateDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/MsgCreateLease.tsx
  • apps/stats-web/src/components/transactions/akash/MsgCloseLease.tsx
  • apps/stats-web/src/components/transactions/akash/MsgUpdateProvider.tsx
  • apps/stats-web/src/components/transactions/generic/index.ts
  • apps/stats-web/src/components/transactions/akash/MsgCloseBid.tsx
  • apps/stats-web/src/components/transactions/akash/index.ts
  • apps/stats-web/src/components/transactions/akash/MsgCloseGroup.tsx
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/general.mdc)

Never use type any or cast to type any. Always define the proper TypeScript types.

Files:

  • apps/stats-web/src/components/transactions/akash/MsgCloseDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/MsgAccountDeposit.tsx
  • apps/stats-web/src/components/transactions/akash/MsgCreateDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/MsgDeleteProviderAttributes.tsx
  • apps/stats-web/src/components/transactions/createMsgView.tsx
  • apps/stats-web/src/components/transactions/akash/MsgPauseGroup.tsx
  • apps/stats-web/src/components/transactions/akash/MsgStartGroup.tsx
  • apps/stats-web/src/config/denom.config.ts
  • apps/stats-web/src/components/transactions/akash/MsgCreateCertificate.tsx
  • apps/stats-web/src/components/transactions/akash/MsgSignProviderAttributes.tsx
  • apps/stats-web/src/components/transactions/akash/MsgWithdrawLease.tsx
  • apps/stats-web/src/components/transactions/akash/MsgDepositDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/MsgCreateBid.tsx
  • apps/stats-web/src/components/transactions/akash/MsgCreateProvider.tsx
  • apps/stats-web/src/components/transactions/TxMessageRow.tsx
  • apps/stats-web/src/app/transactions/[hash]/TransactionInfo.tsx
  • apps/stats-web/src/components/AKTAmount.tsx
  • apps/stats-web/src/components/transactions/akash/MsgRevokeCertificate.tsx
**/*.{js,ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/general.mdc)

**/*.{js,ts,tsx}: Never use deprecated methods from libraries.
Don't add unnecessary comments to the code

Files:

  • apps/stats-web/src/components/transactions/akash/MsgCloseDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/MsgAccountDeposit.tsx
  • apps/stats-web/src/components/transactions/akash/MsgCreateDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/MsgDeleteProviderAttributes.tsx
  • apps/stats-web/src/components/transactions/createMsgView.tsx
  • apps/stats-web/src/components/transactions/akash/MsgPauseGroup.tsx
  • apps/stats-web/src/components/transactions/akash/MsgStartGroup.tsx
  • apps/stats-web/src/config/denom.config.ts
  • apps/stats-web/src/components/transactions/akash/MsgCreateCertificate.tsx
  • apps/stats-web/src/components/transactions/akash/MsgSignProviderAttributes.tsx
  • apps/stats-web/src/components/transactions/akash/MsgWithdrawLease.tsx
  • apps/stats-web/src/components/transactions/akash/MsgDepositDeployment.tsx
  • apps/stats-web/src/components/transactions/akash/MsgCreateBid.tsx
  • apps/stats-web/src/components/transactions/akash/MsgCreateProvider.tsx
  • apps/stats-web/src/components/transactions/TxMessageRow.tsx
  • apps/stats-web/src/app/transactions/[hash]/TransactionInfo.tsx
  • apps/stats-web/src/components/AKTAmount.tsx
  • apps/stats-web/src/components/transactions/akash/MsgRevokeCertificate.tsx
🧬 Code graph analysis (15)
apps/stats-web/src/components/transactions/akash/MsgCloseDeployment.tsx (2)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/deploy-web/src/components/shared/LabelValue.tsx (1)
  • LabelValue (11-22)
apps/stats-web/src/components/transactions/akash/MsgAccountDeposit.tsx (4)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/deploy-web/src/components/shared/LabelValue.tsx (1)
  • LabelValue (11-22)
apps/stats-web/src/components/DynamicJsonView.tsx (1)
  • DynamicReactJson (20-23)
apps/stats-web/src/components/transactions/akash/helpers/DepositDetail.tsx (1)
  • DepositDetail (9-20)
apps/stats-web/src/components/transactions/akash/MsgCreateDeployment.tsx (4)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/deploy-web/src/components/shared/LabelValue.tsx (1)
  • LabelValue (11-22)
apps/stats-web/src/components/transactions/akash/helpers/DepositDetail.tsx (1)
  • DepositDetail (9-20)
apps/stats-web/src/components/DynamicJsonView.tsx (1)
  • DynamicReactJson (20-23)
apps/stats-web/src/components/transactions/akash/MsgDeleteProviderAttributes.tsx (1)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/stats-web/src/components/transactions/createMsgView.tsx (2)
apps/provider-console/src/types/transaction.ts (1)
  • TransactionMessage (16-22)
apps/stats-web/src/components/DynamicJsonView.tsx (1)
  • DynamicReactJson (20-23)
apps/stats-web/src/components/transactions/akash/MsgPauseGroup.tsx (2)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/deploy-web/src/components/shared/LabelValue.tsx (1)
  • LabelValue (11-22)
apps/stats-web/src/components/transactions/akash/MsgStartGroup.tsx (2)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/deploy-web/src/components/shared/LabelValue.tsx (1)
  • LabelValue (11-22)
apps/stats-web/src/components/transactions/akash/MsgCreateCertificate.tsx (2)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/deploy-web/src/components/shared/LabelValue.tsx (1)
  • LabelValue (11-22)
apps/stats-web/src/components/transactions/akash/MsgSignProviderAttributes.tsx (1)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/stats-web/src/components/transactions/akash/MsgWithdrawLease.tsx (2)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/deploy-web/src/components/shared/LabelValue.tsx (1)
  • LabelValue (11-22)
apps/stats-web/src/components/transactions/akash/MsgDepositDeployment.tsx (4)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/deploy-web/src/components/shared/LabelValue.tsx (1)
  • LabelValue (11-22)
apps/stats-web/src/components/AKTAmount.tsx (1)
  • AKTAmount (18-57)
apps/stats-web/src/lib/mathHelpers.ts (1)
  • coinsToAmount (45-49)
apps/stats-web/src/components/transactions/akash/MsgCreateBid.tsx (6)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/deploy-web/src/components/shared/LabelValue.tsx (1)
  • LabelValue (11-22)
apps/stats-web/src/components/AKTAmount.tsx (1)
  • AKTAmount (18-57)
apps/stats-web/src/lib/mathHelpers.ts (1)
  • coinsToAmount (45-49)
apps/stats-web/src/components/transactions/akash/helpers/DepositDetail.tsx (1)
  • DepositDetail (9-20)
apps/stats-web/src/components/DynamicJsonView.tsx (1)
  • DynamicReactJson (20-23)
apps/stats-web/src/components/transactions/akash/MsgCreateProvider.tsx (1)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
apps/stats-web/src/components/transactions/TxMessageRow.tsx (1)
apps/stats-web/src/components/DynamicJsonView.tsx (1)
  • DynamicReactJson (20-23)
apps/stats-web/src/components/transactions/akash/MsgRevokeCertificate.tsx (1)
apps/stats-web/src/components/transactions/createMsgView.tsx (1)
  • createMsgView (5-13)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (13)
  • GitHub Check: validate / validate-app
  • GitHub Check: test-build
  • GitHub Check: validate / validate-app
  • GitHub Check: test-build
  • GitHub Check: test-build
  • GitHub Check: test-build
  • GitHub Check: validate / validate-app
  • GitHub Check: test-build
  • GitHub Check: validate / validate-app
  • GitHub Check: test-build
  • GitHub Check: validate / validate-app
  • GitHub Check: test-build
  • GitHub Check: validate / validate-app
🔇 Additional comments (16)
apps/stats-web/src/components/transactions/akash/MsgAccountDeposit.tsx (1)

10-19: LGTM!

The component correctly uses createMsgView for version gating and handles data access safely with optional chaining.

apps/stats-web/src/components/transactions/akash/MsgCreateCertificate.tsx (1)

7-15: LGTM!

The refactor successfully wraps the certificate message view with createMsgView to support multiple proto versions (v1beta1 through v1), aligning with the PR's objectives.

apps/stats-web/src/components/transactions/createMsgView.tsx (1)

5-12: Well-designed version-gating HOC.

The createMsgView utility provides a clean pattern for supporting multiple transaction proto versions with fallback to JSON rendering. This aligns perfectly with the PR objectives.

apps/stats-web/src/components/AKTAmount.tsx (1)

11-11: uakt prop widening is safe udenomToDenom accepts both string and number (parsing strings internally), so no changes are required.

apps/stats-web/src/components/transactions/TxMessageRow.tsx (1)

31-33: Verify message type parsing assumptions. Parsing assumes dot-separated types with ≥3 segments, version always the penultimate segment, and name the last—confirm this holds for all message.type values.

apps/deploy-web/package.json (1)

30-30: Include breaking changes and migration steps for alpha.8.

Please summarize any breaking changes and migration steps from @akashnetwork/chain-sdk v1.0.0-alpha.7 to v1.0.0-alpha.8 in the PR description to verify compatibility.

apps/stats-web/src/config/denom.config.ts (1)

1-8: LGTM! Clean migration to chain-sdk types.

The import path has been correctly updated from @akashnetwork/akashjs to @akashnetwork/chain-sdk/web, and the type signature for USDC_IBC_DENOMS now uses the new NetworkId type with proper exclusion of "testnet".

apps/stats-web/src/components/transactions/akash/MsgRevokeCertificate.tsx (1)

1-14: LGTM! Clean migration to createMsgView wrapper.

The refactor correctly applies the multi-version wrapper pattern via createMsgView with versions ["v1beta1", "v1beta2", "v1beta3", "v1"]. The render logic is preserved, and import paths are updated appropriately.

apps/stats-web/src/components/transactions/akash/MsgCreateProvider.tsx (2)

2-3: LGTM! Import path updates are correct.

The import path changes align with the refactoring to consolidate transaction components. The LabelValue import is correctly updated to reflect the new relative path, and createMsgView is properly imported for the version-aware wrapper pattern.


8-18: LGTM! Version-aware wrapper pattern correctly applied.

The component is properly wrapped with createMsgView to support multiple transaction versions. The version array ["v1beta1", "v1beta2", "v1beta3", "v1beta4"] enables rendering for all supported versions, with automatic fallback to JSON display for unsupported versions. The rendering logic is preserved correctly.

apps/stats-web/src/components/transactions/akash/MsgDeleteProviderAttributes.tsx (2)

4-5: LGTM! Import updates are correct.

The import path changes properly reflect the directory structure refactoring, moving LabelValue up one level and adding the createMsgView import.


10-19: No change needed to version array for MsgDeleteProviderAttributes. It correctly ends with "v1", matching MsgSignProviderAttributes, MsgRevokeCertificate, and MsgCreateCertificate.

apps/stats-web/src/components/transactions/akash/MsgStartGroup.tsx (2)

4-5: LGTM! Import changes are correct.

The import updates properly reflect the refactored directory structure and add the necessary createMsgView wrapper.


10-18: LGTM! Version-aware wrapper correctly implemented.

The component is properly wrapped with createMsgView using the version array ["v1beta1", "v1beta2", "v1beta3", "v1beta4"]. The rendering logic for Owner, dseq, and gseq is preserved correctly.

apps/stats-web/src/components/transactions/akash/MsgSignProviderAttributes.tsx (2)

4-5: LGTM! Import updates are correct.

The import path changes properly reflect the directory structure refactoring.


11-20: No changes needed for version array: The ["v1beta1","v1beta2","v1beta3","v1"] array correctly maps to the current akash.provider.v1 message types.

@baktun14
Copy link
Contributor

Merge in main-sdk-next?

@stalniy
Copy link
Contributor Author

stalniy commented Oct 14, 2025

Merge in main-sdk-next?

No, into main :) because it only affects how transactions are displayed. The current version of blockchain doesn't have these transactions and they won't be displayed. So, it's safe to merge into main

@stalniy stalniy merged commit ebe8897 into main Oct 14, 2025
63 checks passed
@stalniy stalniy deleted the refactor/upgrade-stats branch October 14, 2025 13:04
@coderabbitai coderabbitai bot mentioned this pull request Oct 14, 2025
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.

Integrate ChainSDK into Stats-Web (Stats Page)

3 participants

Comments