Fix locked and vested account balances#34
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Superseded by corrected evidence for the 3 vs 9.5 locked-balance question: #34 (comment) This earlier evidence comment used mock fixture values and should not be treated as final visual evidence. |
|
Operator follow-up instruction: please do not merge this PR until the balance mismatch question is resolved. The open question is here: #34 (comment) For the same account, total balance is 12 on both sides, but the locked value appears as 3 in one place and 9.5 in another. Please investigate the source of the mismatch and either:
Completion standard: PR #34 should not be treated as ready until the 3 vs 9.5 question is answered or fixed with evidence. |
|
Reworked PR #34 for the 3 vs 9.5 balance question. Resolution:
Fix pushed in |
Delivery Evidence SummaryChange:
Objective Evidence:
Visual Evidence:
Reviewer:
Risks / Not Covered:
Generated at: 2026-05-25T05:45:30.000Z |


Addresses #32
Delivery Evidence Summary
Change:
lockedsourced fromSystem.Account.data.frozen/ maxBalances.Locksamount.vestedis now derived fromVesting.Vestingschedules at the indexed current block, instead of reusing the vesting balance lock amount.Vesting.Vestingentries alongsideBalances.Locksso refreshed and backfilled accounts use the same field semantics.Why the 3 vs 9.5 screenshot mismatch happened:
locked: 3,vested: 2,reserved: 1) and was not a live-data reproduction.49VYuGkjdmZprGpb4jU313RdSffxSVHixojzmafdFYGpVYXbshowsSystem.Account.data.frozen = 9505083444444445904195000andBalances.Locks[vesting].amount = 9505083444444445904195000, which corresponds to the reference locked value around9.5050.vestedvalue around18.7120comes fromVesting.Vestingprogress (locked,perBlock,startingBlock) and is a different field from balance-locklocked.Objective Evidence:
wss://rpc.heima-parachain.heima.networkconfirmed:system.account(...).data.free = 12064779000000000000000000system.account(...).data.frozen = 9505083444444445904195000balances.locks(...)[0].id = vesting,amount = 9505083444444445904195000vesting.vesting(...)[0].locked = 24102589000000000000000000,perBlock = 5555555555555555000,startingBlock = 6282695go test ./plugins/balance/model ./plugins/balance/daoexited 0.npm test -- --runTestsByPath src/__tests__/utils/text.test.ts --runInBandexited 0.npm run lint -- --file 'src/pages/sub/account/[id].tsx' --file src/utils/api.tsexited 0 with no warnings.E2E_SCREENSHOT=/tmp/account-balance-e2e-rework.png ./node_modules/.bin/playwright test tmp/evidence/account-balance-e2e.spec.js --reporter=lineexited 0 and verified Total, Transferrable, Locked, Vested, Reserved, and tab rendering.git diff --checkexited 0.Visual Evidence:
Reviewer:
Risks / Not Covered:
vestedfield only after this branch is deployed and account data is refreshed/backfilled.vestedis block-height dependent; it will continue to increase according to the vesting schedule until capped by the schedulelockedamount.NextRouter was not mountedprerender errors across unchanged routes. Focused backend tests, frontend lint/Jest, and Playwright E2E passed.