Skip to content

GUI: allow withdrawing Bitcoin to Taproot addresses#1153

Open
pokefan77 wants to merge 1 commit into
eigenwallet:masterfrom
pokefan77:feat/gui-taproot-withdrawal
Open

GUI: allow withdrawing Bitcoin to Taproot addresses#1153
pokefan77 wants to merge 1 commit into
eigenwallet:masterfrom
pokefan77:feat/gui-taproot-withdrawal

Conversation

@pokefan77

Copy link
Copy Markdown

What

Allow entering Taproot (bc1p… / tb1p…) destination addresses in the GUI Bitcoin withdrawal dialog.

Why

The withdrawal address field rejected Taproot addresses, so users couldn't sweep the internal wallet to a Taproot address. The block was purely in the frontend: isBtcAddressValid capped the bech32 body at 49 characters, while a Taproot address is ~59 characters after the bc1/tb1 prefix, so the Withdraw button never enabled.

The backend already supports it — the withdrawal path only validates the network and builds the recipient output from address.script_pubkey(), which works for any address type. No Rust changes are required.

How

  • isBtcAddressValid gains an opt-in allowTaproot flag that widens the length cap (49 → 87) so Taproot/longer bech32(m) addresses pass.
  • BitcoinAddressTextField forwards a new optional allowTaproot prop.
  • The withdrawal AddressInputPage enables allowTaproot.

Scoped to withdrawal only: the swap External Bitcoin refund address field is intentionally left unchanged.

Testing

Manually tested end-to-end on Windows: withdrawing (sweeping) the internal wallet to a mainnet Taproot (bc1p…) address succeeded.

The withdrawal address field previously rejected Taproot (bc1p.../tb1p...)
addresses because isBtcAddressValid capped the bech32 body at 49 chars.
Add an opt-in allowTaproot flag (widens the cap to 87) and enable it on
the withdrawal AddressInputPage. The swap refund-address field is left
unchanged. The backend already sends to any recipient script type, so no
Rust changes are required.
@pokefan77

pokefan77 commented Jul 4, 2026

Copy link
Copy Markdown
Author

allowtaproot is intended so we can allow it later for the refund address too but this is a bigger change which should be done while also upgrading alice to taproot and the whole atomic swap setup.

as a quick QOL improvement this PR to let users withdraw to taproot

this has been tested and is ready to merge

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