Skip to content

fixed calls to rpc when typing in campaign page#603

Merged
aunali8812 merged 1 commit intostagingfrom
fix/excessive-rpc-calls
Feb 24, 2026
Merged

fixed calls to rpc when typing in campaign page#603
aunali8812 merged 1 commit intostagingfrom
fix/excessive-rpc-calls

Conversation

@aunali8812
Copy link
Copy Markdown
Collaborator

@aunali8812 aunali8812 commented Feb 24, 2026

Summary by CodeRabbit

  • Refactor
    • Optimized account validation to reduce redundant checks and improve response times for validation requests.

@aunali8812 aunali8812 requested a review from Ebube111 as a code owner February 24, 2026 18:59
@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
potlock-next-app Ready Ready Preview, Comment Feb 24, 2026 7:01pm

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 24, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e041fbc and 4414fe0.

📒 Files selected for processing (1)
  • src/common/blockchains/near-protocol/utils/validations.ts

Walkthrough

The NEAR account validation function now implements internal caching and debouncing mechanisms to reduce redundant RPC calls. The public API remains unchanged; the function adds a length guard, checks cached results, debounces RPC invocations by 300ms, and stores results for subsequent lookups.

Changes

Cohort / File(s) Summary
NEAR Account Validation Optimization
src/common/blockchains/near-protocol/utils/validations.ts
Added internal caching mechanism (accountValidationCache) and debounce strategy (300ms) to reduce redundant RPC calls. Includes early length guard, cache lookup, debounced RPC execution with timestamp tracking, and result caching for future invocations.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~18 minutes

Suggested reviewers

  • Ebube111

Poem

🐰 Cache it, cache it, quick and fast,
Debounce the calls, make validation last,
No more knocking at RPC's door,
We've got memories to help us soar!

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/excessive-rpc-calls

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.

❤️ Share

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

@aunali8812 aunali8812 merged commit b7c1c90 into staging Feb 24, 2026
3 of 4 checks passed
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.

1 participant