rwallet-online/backlog/tasks/task-6 - Fix-balance-river-...

2.2 KiB

id title status assignee created_date labels dependencies references priority
TASK-6 Fix balance river accuracy, scaling, and waterfall flow direction Done
@claude
2026-02-18 19:54
fix
visualization
blockchain
js/safe-api.js
wallet-timeline-visualization.html
js/data-transform.js
high

Description

Fixed three issues with the wallet balance river visualization:

  1. Transaction accuracy — Switched fetchChainData from separate getAllMultisigTransactions + getAllIncomingTransfers endpoints to the unified getAllTransactions endpoint. This returns enriched transfers[] arrays with proper tokenInfo including correct decimals (e.g., USDC=6 decimals, not hardcoded 18). Eliminates the inaccurate dataDecoded fallback parsing.

  2. Flow scaling — Flow widths are now sankey-proportional: each waterfall's width at the river is proportional to tx.usd / balance, so flows visually represent their share of the river. Far ends taper to 30% for dramatic effect.

  3. Waterfall direction — Inflows now flow diagonally from upper-left down-right into the river (like a tributary waterfall). Outflows flow diagonally from the river down-right away (like water cascading off). Gradients updated to diagonal to follow flow direction.

Acceptance Criteria

  • #1 ERC20 token amounts use correct decimals from tokenInfo
  • #2 Flow widths are proportional to their share of the river balance
  • #3 Inflows flow diagonally down-right into the river from above-left
  • #4 Outflows flow diagonally down-right away from the river below

Final Summary

Committed and pushed to main as f197a20. Changes span js/safe-api.js (all-transactions endpoint, sequential rate-limited fetching) and wallet-timeline-visualization.html (diagonal bezier waterfall paths, proportional widths, diagonal gradients). Resolved merge conflict with upstream eb5f93e that had introduced sankey-proportional widths and sequential API calls — merged both improvements together.