Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
📝 WalkthroughWalkthroughUpdated tc-abacus protobuf dependency and added referrer management: three new TcAbacusGrpcApi methods, corresponding gRPC->SDK transformers, and new TypeScript referrer-related types; also extended CurrentEpochResponse and marked bignumber.js as external in tsdown config. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Api as TcAbacusGrpcApi
participant GRPC as TcAbacus gRPC Service
participant Tx as Transformer
Client->>Api: fetchReferrerCodes(address, cursor?, limit?)
Api->>GRPC: ListReferrerCodesRequest{address, cursor, limit}
GRPC-->>Api: ListReferrerCodesResponse
Api->>Tx: grpcListReferrerCodesToListReferrerCodes(response)
Tx-->>Api: ListReferrerCodesResponse (SDK types)
Api-->>Client: ListReferrerCodesResponse
Client->>Api: createReferrerCode(address, code)
Api->>GRPC: CreateReferrerCodeRequest{address, code}
GRPC-->>Api: CreateReferrerCodeResponse / OK
Api-->>Client: void
Client->>Api: fetchReferrerEligibility(address)
Api->>GRPC: GetReferrerElegibilityRequest{address}
GRPC-->>Api: GetReferrerElegibilityResponse
Api->>Tx: grpcReferrerEligibilityToReferrerEligibility(response)
Tx-->>Api: ReferrerEligibilityResponse
Api-->>Client: ReferrerEligibilityResponse
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/sdk-ts/src/client/tcAbacus/grpc/TcAbacusGrpcApi.ts (1)
110-120: Return the response fromcreateReferrerCodeto maintain consistency with other API methods.This method awaits the gRPC response but doesn't return it, deviating from the pattern used by all other methods in this class (e.g.,
fetchCurrentEpoch,fetchAccountStats,fetchReferrerCodes), which store and return transformed responses. IfCreateReferrerCodeResponsecontains meaningful data, it should be captured and returned to the caller.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/sdk-ts/src/client/tcAbacus/grpc/TcAbacusGrpcApi.ts` around lines 110 - 120, The createReferrerCode method currently awaits executeGrpcCall but doesn't return its result; modify createReferrerCode to capture the response from executeGrpcCall (which returns a TcAbacusPb.CreateReferrerCodeResponse) and return it to the caller to match the pattern used by other methods (e.g., fetchCurrentEpoch, fetchAccountStats, fetchReferrerCodes); locate the method named createReferrerCode, the request creation using TcAbacusPb.CreateReferrerCodeRequest, and the call to this.executeGrpcCall to store its result and return that value (or a transformed version if other methods map responses).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@packages/sdk-ts/src/client/tcAbacus/grpc/TcAbacusGrpcApi.ts`:
- Around line 110-120: The createReferrerCode method currently awaits
executeGrpcCall but doesn't return its result; modify createReferrerCode to
capture the response from executeGrpcCall (which returns a
TcAbacusPb.CreateReferrerCodeResponse) and return it to the caller to match the
pattern used by other methods (e.g., fetchCurrentEpoch, fetchAccountStats,
fetchReferrerCodes); locate the method named createReferrerCode, the request
creation using TcAbacusPb.CreateReferrerCodeRequest, and the call to
this.executeGrpcCall to store its result and return that value (or a transformed
version if other methods map responses).
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 153db388-3173-4bbc-8689-4d3e477a2791
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (4)
packages/sdk-ts/package.jsonpackages/sdk-ts/src/client/tcAbacus/grpc/TcAbacusGrpcApi.tspackages/sdk-ts/src/client/tcAbacus/grpc/transformers/index.tspackages/sdk-ts/src/client/tcAbacus/types/tcAbacus.ts
Summary by CodeRabbit
New Features
Chores