Skip to content

Fix EVM account lookup without balance rows#19

Open
crossagent-production-app[bot] wants to merge 1 commit into
crossagentfrom
worktree/task_079945b6c77a411e
Open

Fix EVM account lookup without balance rows#19
crossagent-production-app[bot] wants to merge 1 commit into
crossagentfrom
worktree/task_079945b6c77a411e

Conversation

@crossagent-production-app
Copy link
Copy Markdown

Relates to #17

Change:

  • Fix ApiSrv.AccountsCursor so EVM account lookups use evm_accounts as the source of truth and left join balance_accounts; accounts without a balance row now return with balance 0 instead of being filtered out.
  • Normalize filtered EVM addresses before querying and fix cursor ordering to use the same COALESCE(balance_accounts.balance, 0) expression.
  • Add a regression test for 0x63c4545ac01c77cc74044f25b8edea3880224577 with no balance row and another unrelated EVM account row.

Objective Evidence:

  • go test $(rg --files plugins/evm/dao -g'*.go' -g'!*_test.go') plugins/evm/dao/api_accounts_test.go -run TestAccountsCursorIncludesAccountWithoutBalance -count=1 -> passed.
  • Live https://test-explorer.heima.network/api/plugin/evm/accounts access from this environment returns HTTP 401 Vercel Authentication, so external browser/API reproduction is blocked by deployment protection; the local regression reproduces the backend request shape.

Visual Evidence:

  • n.a. Backend DAO/API query behavior only; no UI/browser/visual code changed.

Reviewer:

Risks / Not Covered:

  • Full go test ./plugins/evm/dao is blocked in this worktree by existing integration test bootstrap requiring configs/config.yaml, MySQL, and Redis.
  • No known runtime risk beyond the intended query behavior change: zero-balance EVM accounts are now included, which may increase account-list results that were previously hidden.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 22, 2026

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

Project Deployment Actions Updated (UTC)
subscan-essentials Ready Ready Preview, Comment May 22, 2026 5:33am

Request Review

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