Connect multi-address Bitcoin wallets from a Crypto account

VL
11d ago
+2026-106

Part 5 of #5620. Stacked on #5673. The public-key layer is already on main via #4615.

up/bitcoin-publishing ← up/bitcoin-ui · Previous discussion #5622 · Fork diff.

An admin with Preview enabled can open Manage Bitcoin wallet from an existing Crypto account, supply public addresses or a supported account public key, and inspect the BTC quantity before starting tracking. The same dialog supports adding a source, reading again and disconnecting. Disconnecting preserves the position and its imported entries.

The account menu and controller enforce owner or full-control access. The dialog keeps typed input across sync refreshes and supports narrow screens. The existing single-address connection remains available during Preview. Earlier design discussion.

Screenshots

Fixture wallet before and after connection.

Bitcoin wallet quantity preview

Connected Bitcoin wallet

Validation

The full Rails suite passed on 238acd591 (18,680 tests, 9 skips). The Chromium suite passed (464 tests). RuboCop, ERB lint, Biome and Brakeman passed.


Summary by cubic

The existing Bitcoin wallet flow creates separate accounts per asset; this adds watch-only Bitcoin tracking to an existing Crypto account, so multiple addresses can update its BTC position. Admins with Preview enabled can inspect the quantity before connecting, and the existing single-address connection remains available.

  • Add public addresses or a supported account public key, then sync, add sources, or disconnect from the wallet dialog.
  • Polling is overlap-safe and pauses when the dialog closes; receive addresses are filtered from request logs.
  • Access is limited to account owners and users with full control; disconnecting preserves the position, and the shared provider connection cannot be deleted while any wallet references it.

Summary by CodeRabbit

  • New Features

    • Added preview Bitcoin wallet tracking for eligible crypto accounts, including read-only address or extended public key setup, address discovery, balances, and sync status.
    • Wallet screens show discovery progress, pricing notices, and relevant management actions. Trade history can identify pending activity and internal transfers.
    • Added translated Bitcoin wallet interface text in multiple languages.
  • Bug Fixes

    • Improved account visibility and wallet deletion safeguards when Bitcoin wallets are connected.
    • Wallet status updates now avoid overlapping polls and refresh related details together.
    • Manual account balance and activity controls display according to accounting type.

Feedback carried over from earlier PRs

The original comments are linked below, including follow-ups addressed by a later layer.

  • Already addressed in this layer: Use the per-holding deletion policy. #5621 review
  • Already addressed in this layer: Use the account's accounting strategy when updating holdings. #5621 review
  • Reviewer suggestion: Provide localized recovery text for rejected managed-position remaps. #5622 review
  • Reviewer suggestion: Retain the HD input type when sanitizing a rejected key so its error stays visible. #5622 review
  • Reviewer suggestion: Show the wallet quantity in the replacement explainer. #5622 review
  • Reviewer suggestion: Limit the single-address documentation restriction to the legacy setup. #5622 review