Skip to content

Fix contract detail balance display#50

Merged
libai0610 merged 2 commits into
crossagentfrom
codex/contract-balance-issue-48
Jun 11, 2026
Merged

Fix contract detail balance display#50
libai0610 merged 2 commits into
crossagentfrom
codex/contract-balance-issue-48

Conversation

@YoshiyukiSakura

Copy link
Copy Markdown
Collaborator

Summary

  • Fix contract detail balance lookup by allowing /api/plugin/evm/accounts to include contracts when explicitly requested.
  • For single contract balance display, read contract-native balance and AA/paymaster getDeposit() balance when supported, so deposited HEI does not render as 0 HEI.
  • Update cursor typings and API docs for the new include_contracts parameter.

Fixes #48

Verification

  • go test ./plugins/evm/http
  • npm run build

Notes

  • Full go test ./plugins/evm/dao is blocked locally by the existing dao_test init path requiring ../../../configs/config.yaml plus MySQL/Redis.
  • This replaces the earlier fork-based PR Fix contract detail balance display #49 now that upstream push permissions are available.

@YoshiyukiSakura YoshiyukiSakura changed the base branch from master to crossagent June 10, 2026 13:35
@YoshiyukiSakura YoshiyukiSakura force-pushed the codex/contract-balance-issue-48 branch from b5390ca to c1c0101 Compare June 10, 2026 16:32
@vercel

vercel Bot commented Jun 10, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
subscan-essentials Ready Ready Preview, Comment Jun 11, 2026 3:00am
subscan-essentials-ui-react Ready Ready Preview, Comment Jun 11, 2026 3:00am

Request Review

@libai0610

Copy link
Copy Markdown
Collaborator

Do not include getDeposit() in the Contract Balance value. Contract detail Balance should reflect only the current native balance from eth_getBalance/latest native balance source. If getDeposit is useful, expose it as a separate field in a future issue.

@YoshiyukiSakura

Copy link
Copy Markdown
Collaborator Author

Updated in d3d79af: Contract detail Balance now uses only the latest native balance path (eth_getBalance when available, otherwise the indexed native balance fallback). Removed the getDeposit() aggregation from this field; deposit can be exposed separately in a follow-up issue if needed.

@libai0610 libai0610 merged commit fb84c2a into crossagent Jun 11, 2026
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.

Show Native Balance on Contract Detail Page

2 participants