Conversation
🦋 Changeset detectedLatest commit: e0fce8d The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
📝 WalkthroughWalkthroughUpdates development tooling (Node.js 24, Biome 1.8+, TypeScript build configs), refactors generated API schema types by consolidating nested Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/api/schemas/transactionDto.ts`:
- Around line 36-37: The JSDoc for the property unsignedTransaction was left
without the `@nullable` tag while its type TransactionDtoUnsignedTransaction
allows null, causing inconsistent schema docs; update the JSDoc comment for the
unsignedTransaction property to include the `@nullable` annotation so the schema
documentation matches the nullable type (i.e., add `@nullable` to the comment
block above unsignedTransaction in the TransactionDto definition).
In `@src/api/schemas/transactionDtoUnsignedTransaction.ts`:
- Around line 4-7: The exported TransactionDtoUnsignedTransaction type currently
uses a catch-all `{ [key: string]: unknown }` which erases schema guarantees for
TransactionDto.unsignedTransaction; restore explicit schema variants instead of
the generic object. Replace the `{ [key: string]: unknown }` branch in
TransactionDtoUnsignedTransaction with the concrete one-of union members that
reflect the unsigned-transaction shapes used by the API (e.g., named
interfaces/types like UnsignedLegacyTransaction, UnsignedEIP1559Transaction,
UnsignedTypedData, etc.), ensure each variant lists its required fields and
discriminators to allow safe narrowing, and update any referenced code that
constructs/parses TransactionDto.unsignedTransaction to match the restored typed
variants.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 27526097-e038-476a-b436-162a6e313ae0
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (92)
.changeset/shiny-cycles-strive.mdbiome.jsonmise.tomlorval.config.tspackage.jsonsrc/api/index.msw.tssrc/api/schemas/actionArgumentsDtoExecutionMode.tssrc/api/schemas/actionArgumentsDtoInputTokenNetwork.tssrc/api/schemas/actionArgumentsDtoOutputTokenNetwork.tssrc/api/schemas/actionArgumentsDtoTronResource.tssrc/api/schemas/actionDto.tssrc/api/schemas/actionDtoExecutionPattern.tssrc/api/schemas/actionDtoIntent.tssrc/api/schemas/actionDtoRawArguments.tssrc/api/schemas/actionDtoStatus.tssrc/api/schemas/actionDtoType.tssrc/api/schemas/actionsControllerGetActions200.tssrc/api/schemas/actionsControllerGetActions200AllOf.tssrc/api/schemas/actionsControllerGetActionsIntent.tssrc/api/schemas/actionsControllerGetActionsNetwork.tssrc/api/schemas/actionsControllerGetActionsStatus.tssrc/api/schemas/actionsControllerGetActionsStatusesItem.tssrc/api/schemas/actionsControllerGetActionsType.tssrc/api/schemas/actionsQueryDtoIntent.tssrc/api/schemas/actionsQueryDtoNetwork.tssrc/api/schemas/actionsQueryDtoStatus.tssrc/api/schemas/actionsQueryDtoStatusesItem.tssrc/api/schemas/actionsQueryDtoType.tssrc/api/schemas/allocationDto.tssrc/api/schemas/allocationDtoNetwork.tssrc/api/schemas/allocationDtoRewardRate.tssrc/api/schemas/argumentFieldDtoName.tssrc/api/schemas/argumentFieldDtoType.tssrc/api/schemas/balanceDto.tssrc/api/schemas/balanceDtoValidator.tssrc/api/schemas/balanceType.tssrc/api/schemas/createManageActionDtoAction.tssrc/api/schemas/eRCStandards.tssrc/api/schemas/healthStatus.tssrc/api/schemas/index.tssrc/api/schemas/networkDtoCategory.tssrc/api/schemas/networkDtoId.tssrc/api/schemas/networks.tssrc/api/schemas/pendingActionDto.tssrc/api/schemas/pendingActionDtoArguments.tssrc/api/schemas/pendingActionDtoIntent.tssrc/api/schemas/pendingActionDtoType.tssrc/api/schemas/providerDtoType.tssrc/api/schemas/providersControllerGetProviders200.tssrc/api/schemas/providersControllerGetProviders200AllOf.tssrc/api/schemas/rewardClaiming.tssrc/api/schemas/rewardDtoYieldSource.tssrc/api/schemas/rewardRateHistoryResponseDtoInterval.tssrc/api/schemas/rewardSchedule.tssrc/api/schemas/tokenDtoNetwork.tssrc/api/schemas/transactionDto.tssrc/api/schemas/transactionDtoNetwork.tssrc/api/schemas/transactionDtoStatus.tssrc/api/schemas/transactionDtoType.tssrc/api/schemas/transactionDtoUnsignedTransaction.tssrc/api/schemas/transactionDtoUnsignedTransactionOneOf.tssrc/api/schemas/tvlHistoryResponseDtoInterval.tssrc/api/schemas/validatorProviderDtoType.tssrc/api/schemas/yieldBalancesDto.tssrc/api/schemas/yieldBalancesDtoOutputTokenBalance.tssrc/api/schemas/yieldBalancesDtoRewardRate.tssrc/api/schemas/yieldDtoNetwork.tssrc/api/schemas/yieldMechanicsDtoExtraTransactionFormatsSupportedItem.tssrc/api/schemas/yieldQueryDtoNetwork.tssrc/api/schemas/yieldQueryDtoSort.tssrc/api/schemas/yieldQueryDtoType.tssrc/api/schemas/yieldQueryDtoTypesItem.tssrc/api/schemas/yieldType.tssrc/api/schemas/yieldsControllerGetBalanceHistory200.tssrc/api/schemas/yieldsControllerGetBalanceHistory200AllOf.tssrc/api/schemas/yieldsControllerGetBalanceHistoryInterval.tssrc/api/schemas/yieldsControllerGetBalanceHistorySort.tssrc/api/schemas/yieldsControllerGetYieldRewardRateHistoryInterval.tssrc/api/schemas/yieldsControllerGetYieldRewardRateHistoryPeriod.tssrc/api/schemas/yieldsControllerGetYieldRewardsSort.tssrc/api/schemas/yieldsControllerGetYieldTvlHistoryInterval.tssrc/api/schemas/yieldsControllerGetYieldTvlHistoryPeriod.tssrc/api/schemas/yieldsControllerGetYieldValidators200.tssrc/api/schemas/yieldsControllerGetYieldValidators200AllOf.tssrc/api/schemas/yieldsControllerGetYields200.tssrc/api/schemas/yieldsControllerGetYields200AllOf.tssrc/api/schemas/yieldsControllerGetYieldsNetwork.tssrc/api/schemas/yieldsControllerGetYieldsSort.tssrc/api/schemas/yieldsControllerGetYieldsType.tssrc/api/schemas/yieldsControllerGetYieldsTypesItem.tstsconfig.build.jsontsconfig.node.json
💤 Files with no reviewable changes (72)
- src/api/schemas/allocationDtoNetwork.ts
- src/api/schemas/actionsQueryDtoStatusesItem.ts
- src/api/schemas/actionsQueryDtoType.ts
- src/api/schemas/actionsControllerGetActionsStatus.ts
- src/api/schemas/pendingActionDtoType.ts
- src/api/schemas/actionArgumentsDtoExecutionMode.ts
- src/api/schemas/networkDtoId.ts
- src/api/schemas/rewardRateHistoryResponseDtoInterval.ts
- src/api/schemas/actionDtoType.ts
- src/api/schemas/healthStatus.ts
- src/api/schemas/actionsControllerGetActionsStatusesItem.ts
- src/api/schemas/balanceType.ts
- src/api/schemas/actionArgumentsDtoInputTokenNetwork.ts
- src/api/schemas/actionsQueryDtoIntent.ts
- src/api/schemas/argumentFieldDtoName.ts
- src/api/schemas/actionsQueryDtoStatus.ts
- src/api/schemas/actionArgumentsDtoTronResource.ts
- src/api/schemas/transactionDtoNetwork.ts
- src/api/schemas/yieldMechanicsDtoExtraTransactionFormatsSupportedItem.ts
- src/api/schemas/transactionDtoStatus.ts
- src/api/schemas/yieldType.ts
- src/api/schemas/actionArgumentsDtoOutputTokenNetwork.ts
- src/api/schemas/transactionDtoType.ts
- src/api/schemas/rewardDtoYieldSource.ts
- src/api/schemas/rewardSchedule.ts
- src/api/schemas/actionDtoExecutionPattern.ts
- src/api/schemas/actionsControllerGetActionsIntent.ts
- src/api/schemas/tokenDtoNetwork.ts
- src/api/schemas/validatorProviderDtoType.ts
- src/api/schemas/networks.ts
- src/api/schemas/yieldsControllerGetYieldRewardRateHistoryPeriod.ts
- src/api/schemas/actionDtoRawArguments.ts
- src/api/schemas/transactionDtoUnsignedTransactionOneOf.ts
- src/api/schemas/yieldsControllerGetYieldTvlHistoryInterval.ts
- src/api/schemas/createManageActionDtoAction.ts
- src/api/schemas/pendingActionDtoIntent.ts
- src/api/schemas/balanceDtoValidator.ts
- src/api/schemas/actionsControllerGetActionsType.ts
- src/api/schemas/argumentFieldDtoType.ts
- src/api/schemas/yieldsControllerGetYieldsTypesItem.ts
- src/api/schemas/allocationDtoRewardRate.ts
- src/api/schemas/tvlHistoryResponseDtoInterval.ts
- src/api/schemas/yieldQueryDtoSort.ts
- src/api/schemas/actionsControllerGetActions200AllOf.ts
- src/api/schemas/yieldQueryDtoTypesItem.ts
- src/api/schemas/yieldBalancesDtoRewardRate.ts
- src/api/schemas/yieldQueryDtoType.ts
- src/api/schemas/providersControllerGetProviders200AllOf.ts
- src/api/schemas/yieldsControllerGetYieldTvlHistoryPeriod.ts
- src/api/schemas/actionDtoStatus.ts
- src/api/schemas/yieldsControllerGetYieldRewardRateHistoryInterval.ts
- src/api/schemas/yieldsControllerGetYieldsNetwork.ts
- src/api/schemas/yieldsControllerGetBalanceHistorySort.ts
- src/api/schemas/yieldDtoNetwork.ts
- src/api/schemas/eRCStandards.ts
- src/api/schemas/yieldQueryDtoNetwork.ts
- src/api/schemas/pendingActionDtoArguments.ts
- src/api/schemas/yieldsControllerGetYieldRewardsSort.ts
- src/api/schemas/yieldBalancesDtoOutputTokenBalance.ts
- src/api/schemas/yieldsControllerGetBalanceHistory200AllOf.ts
- src/api/schemas/actionDtoIntent.ts
- src/api/schemas/yieldsControllerGetYieldsSort.ts
- src/api/schemas/yieldsControllerGetYieldsType.ts
- src/api/schemas/providerDtoType.ts
- src/api/schemas/actionsControllerGetActionsNetwork.ts
- src/api/schemas/networkDtoCategory.ts
- src/api/schemas/yieldsControllerGetYieldValidators200AllOf.ts
- src/api/schemas/yieldsControllerGetYields200AllOf.ts
- src/api/schemas/actionsQueryDtoNetwork.ts
- src/api/schemas/rewardClaiming.ts
- src/api/schemas/yieldsControllerGetBalanceHistoryInterval.ts
- src/api/schemas/index.ts
| /** The unsigned transaction data to be signed by the wallet */ | ||
| unsignedTransaction: TransactionDtoUnsignedTransaction; |
There was a problem hiding this comment.
Keep nullability docs consistent for unsignedTransaction.
unsignedTransaction can be null via TransactionDtoUnsignedTransaction, but on Line 36 the @nullable annotation was removed while other nullable fields keep it. This creates inconsistent schema docs.
Proposed doc fix
- /** The unsigned transaction data to be signed by the wallet */
+ /**
+ * The unsigned transaction data to be signed by the wallet
+ * `@nullable`
+ */
unsignedTransaction: TransactionDtoUnsignedTransaction;🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/api/schemas/transactionDto.ts` around lines 36 - 37, The JSDoc for the
property unsignedTransaction was left without the `@nullable` tag while its type
TransactionDtoUnsignedTransaction allows null, causing inconsistent schema docs;
update the JSDoc comment for the unsignedTransaction property to include the
`@nullable` annotation so the schema documentation matches the nullable type
(i.e., add `@nullable` to the comment block above unsignedTransaction in the
TransactionDto definition).
| export type TransactionDtoUnsignedTransaction = | ||
| | string | ||
| | TransactionDtoUnsignedTransactionOneOf | ||
| | { [key: string]: unknown } | ||
| | null; |
There was a problem hiding this comment.
Public API typing is now too generic and drops schema guarantees.
On Line 6, replacing the structured unsigned-transaction variant(s) with { [key: string]: unknown } weakens the exported SDK contract. Downstream consumers of TransactionDto.unsignedTransaction lose safe narrowing and field-level typing, which is a high-impact TypeScript API regression.
Please keep explicit schema variants (one-of union or equivalent named variants) instead of a catch-all object type.
Suggested direction
export type TransactionDtoUnsignedTransaction =
| string
- | { [key: string]: unknown }
+ | TransactionDtoUnsignedTransactionVariantA
+ | TransactionDtoUnsignedTransactionVariantB
| null;🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/api/schemas/transactionDtoUnsignedTransaction.ts` around lines 4 - 7, The
exported TransactionDtoUnsignedTransaction type currently uses a catch-all `{
[key: string]: unknown }` which erases schema guarantees for
TransactionDto.unsignedTransaction; restore explicit schema variants instead of
the generic object. Replace the `{ [key: string]: unknown }` branch in
TransactionDtoUnsignedTransaction with the concrete one-of union members that
reflect the unsigned-transaction shapes used by the API (e.g., named
interfaces/types like UnsignedLegacyTransaction, UnsignedEIP1559Transaction,
UnsignedTypedData, etc.), ensure each variant lists its required fields and
discriminators to allow safe narrowing, and update any referenced code that
constructs/parses TransactionDto.unsignedTransaction to match the restored typed
variants.
Summary by CodeRabbit