PR #290 MERGED: Server-Side History Filtering & Pagination in Steemit Wallet (Next.js)
Hello community and fellow developers,
Great news! PR #290 has been merged into the Next.js version of the Steemit Wallet:
🔗 https://github.com/steemit/wallet/pull/290
This milestone delivers production-ready, server-optimized history query pipeline—reducing payload sizes, simplifying client logic, and improving scroll performance for wallet users worldwide.

Architecture overview: Server handles op-type filtering, batching & cursor pagination - Thanks ChatGPT
On Surface of PR 290
✅ Server-Side Op-Type Filtering (/api/query/history)
opsparameter active: Filter history by operation types (transfer,vote,comment, etc.) at the API layer—reducing client payload by up to 70% for focused views.- Smart batching:
BATCH_SIZEandMAX_BATCHESsafeguards prevent resource exhaustion while maintaining responsive infinite scroll. - Cursor pagination:
nextFrom/exhaustedmetadata enables efficient, offset-free navigation through account history. - Redis resilience: Automatic fallback to cached history during node latency spikes ensures consistent UX.
✅ Streamlined Client Hooks
apiClient.getHistory: Now returns pre-filtered, normalizedSteemHistoryItem[]with server-provided pagination state.- Hooks refactored:
use-batch-history.tsuse-rewards-history.tsuse-activity-history.ts
All consume server-processed data—eliminating redundant client filtering and reducing re-renders.
- Cleaner codebase: Legacy client-side filters marked
@deprecated; migration path documented in-code.
✅ Centralized Operation Constants (src/lib/steem/history-ops.ts)
export const WALLET_OPS = ['transfer', 'transfer_to_vesting', 'withdraw_vesting', ...];
export const ACTIVITY_OPS = ['comment', 'vote', 'reblog', ...];
export const REWARD_OPS = ['author_reward', 'curation_reward', ...];
- Single source of truth for op-type filtering across client/server.
normalizeHistoryItem()and cache-key utilities ensure consistent data shaping.
✅ Enhanced Security & Coverage
- Redux DevTools sanitization: Extended to redact sensitive fields (
auth_key,posting_key) in history payloads—continuing the security-first approach from PR #282. - Test suite expanded: Coverage for server filtering logic, cursor edge cases, Redis fallbacks, and hook integration.
✅ UI Polish
- Removed unused icons from
recent-activitycomponents. - Snapshot tests updated; zero visual regressions.
🔄 For Developers: Quick Integration Note
Existing components continue to work unchanged. To leverage server filtering:
// Before: client-side filtering
const { data } = useActivityHistory({ account, types: ['transfer'] });
// After: server-side filtering (more efficient)
const { data, nextFrom, exhausted } = useActivityHistory({
account,
ops: ['transfer'],
nextFrom,
exhausted
});
No breaking changes—opt-in enhancement only.
✅ Validation Complete
- [x] All tests passing (Jest + React Testing Library)
- [x] Server filtering validated against live Steem nodes
- [x] Cursor pagination edge cases covered
- [x] Redis fallback behavior verified
- [x] Redux DevTools sanitization confirmed
- [x] Zero visual/functional regressions in activity/rewards tabs
📚 Contribution Series Recap
This merge continues a focused series of stability, security, and performance improvements to the Steemit Wallet:
| PR | Status | Focus |
|---|---|---|
| PR #290 | ✅ MERGED | Server-side history filtering, pagination, hook refactor |
| PR #285 | 🟡 Open | RPC node failover system + accessibility fixes |
| PR #282 | ✅ Merged | Redux DevTools credential masking |
| PR #274 | ✅ Merged | SSR Redux store isolation fix |
| Issue #275 | 🔍 Resolved | Private key exposure audit |
Every contribution is designed to harden the wallet's foundation while keeping the developer experience smooth and the user experience fast.
Support Secure Steem Development
If you value proactive engineering, performance optimizations, and security-first contributions to the STEEM ecosystem, please consider supporting my witness: blaze.apps
🗳️ Vote Here:
Vote for blaze.apps Witness