Skip to content

Fix restored wallet discovery and include rewards in dashboard balance - #25

Closed
satran004 wants to merge 3 commits into
mainfrom
fix/wallet-discovery-and-rewards
Closed

satran004 wants to merge 3 commits into
mainfrom
fix/wallet-discovery-and-rewards

Conversation

@satran004

Copy link
Copy Markdown
Member

Restored Shelley wallets, including older Yoroi accounts, could show an understated balance because discovery only scanned the first 100 receive addresses and omitted change addresses. This PR scans both chains, uses discovered addresses for software payment inputs and signing, and shows withdrawable rewards in the dashboard total.

Changes

  • Scan receive and change chains independently until 20 consecutive unused addresses, using transaction history so spent addresses still count as used. Apply a configurable safety ceiling and report incomplete discovery explicitly.
  • When Yano address history is unavailable, recover known funds through a configurable UTxO-only scan (200 addresses per chain by default). Display the scanned ranges and an incomplete-balance warning; preserve errors for transport failures and malformed responses.
  • Include discovered payment credentials in transaction previews, mark previews unchecked when discovery is incomplete, and prevent overlapping dashboard refreshes.
  • Display UTxO balance plus withdrawable rewards, with a separate Rewards line. Keep UTxO-only amounts for spending calculations and represent unavailable rewards explicitly.
  • Document discovery behavior, configuration and recovery limitations.

Scope and limitations

UTxO-only recovery cannot establish balance completeness beyond the scanned range. Byron and enterprise-address recovery, hardware payment expansion, and broader staking/governance/minting or CIP-30 address handling are outside this change. ADR 047 and the other local untracked ADRs are excluded.

Validation

  • ./gradlew :wallet-core:test :wallet-node-client:test :wallet-app:test :wallet-ui:test — passed on the PR branch.
  • git diff --check origin/main...HEAD — passed.
  • The reported affected mainnet wallet's UTxO balance was confirmed correct by the user during development.

@satran004 satran004 closed this Sep 7, 2026
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