Merge pull request #593 from klever-io/chore/remove-sc-24h-txs (#594)#595
Merge pull request #593 from klever-io/chore/remove-sc-24h-txs (#594)#595samufacanha2 merged 1 commit intomasterfrom
Conversation
chore: remove sc 24h txs
WalkthroughThe changes remove a 24-hour variation indicator from the smart contract data card UI and refactor the backend transaction statistics request, replacing relative timestamp parameters with absolute ISO-formatted timestamps and updating how transaction count values are computed from API responses. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 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 unit tests (beta)
Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #595 +/- ##
======================================
Coverage 0.46% 0.46%
======================================
Files 530 530
Lines 20954 20951 -3
Branches 5253 5280 +27
======================================
Hits 97 97
+ Misses 20044 20042 -2
+ Partials 813 812 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/services/requests/smartContracts/index.ts (1)
160-163:beforeYesterdayTxsnaming no longer matches the current data semantics.With a last-24h filter in the query,
beforeYesterdayTxsnow reads as a last-day count. Consider renaming the field (and callers) to avoid misleading downstream usage.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/services/requests/smartContracts/index.ts` around lines 160 - 163, The field name beforeYesterdayTxs on the returned data object no longer matches its semantics (it holds a last-24h count); rename this property to a clear name like last24hTxs (or lastDayTxs) wherever it is produced (the data const in the function that builds the response) and update all callers, types/interfaces, and tests that reference beforeYesterdayTxs to use the new name (ensure you update any destructuring, mapping, or serialization code that expects the old property).
🤖 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/services/requests/smartContracts/index.ts`:
- Around line 153-155: The name smartContractBeforeYesterdayTransactionsCall and
variable beforeYesterdayTxs are semantically incorrect because the filter uses
Date.now() - 24*60*60*1000 (last 24 hours); rename the function and variable to
reflect the actual window (e.g., smartContractLast24hTransactionsCall and
last24hTxs or smartContractYesterdayTransactionsCall and yesterdayTxs), update
all usages/exports/imports/tests accordingly, and keep the startdate calculation
as-is so names match the implemented time range.
---
Nitpick comments:
In `@src/services/requests/smartContracts/index.ts`:
- Around line 160-163: The field name beforeYesterdayTxs on the returned data
object no longer matches its semantics (it holds a last-24h count); rename this
property to a clear name like last24hTxs (or lastDayTxs) wherever it is produced
(the data const in the function that builds the response) and update all
callers, types/interfaces, and tests that reference beforeYesterdayTxs to use
the new name (ensure you update any destructuring, mapping, or serialization
code that expects the old property).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 02d32754-c2ae-42e9-8773-db43ff9fee12
📒 Files selected for processing (2)
src/pages/smart-contract/[address].tsxsrc/services/requests/smartContracts/index.ts
💤 Files with no reviewable changes (1)
- src/pages/smart-contract/[address].tsx
chore: remove sc 24h txs
Summary by CodeRabbit
Bug Fixes
Refactor