Add copyToClipboard to bitcore-cli#4196
Open
kajoseph wants to merge 4 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves the bitcore-cli Threshold Signature (TSS) wallet setup UX by adding a cross-platform copyToClipboard utility and integrating “Copy to clipboard” actions into TSS create/join flows, alongside a handful of CLI robustness tweaks (formatting, error handling, help/options, and proposal/transaction parameter handling).
Changes:
- Added
Utils.copyToClipboard()and integrated “Copy to clipboard” actions into TSS create/join prompts. - Adjusted CLI formatting and error logging (bold/dim reset handling; clearer TSS signing error log).
- Hardened some command flows (tx proposal actions optionality; transaction fee/tag handling; CLI help/usage tweaks) and updated tests accordingly.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/bitcore-cli/test/create.test.ts | Updates TSS flow tests to account for the new clipboard option in prompt navigation. |
| packages/bitcore-cli/src/utils.ts | Adds clipboard support and improves ANSI formatting helpers for bold/dim interactions. |
| packages/bitcore-cli/src/tss.ts | Updates TSS signing error logging behavior. |
| packages/bitcore-cli/src/prompts.ts | Adjusts bold rendering in a dimmed prompt context. |
| packages/bitcore-cli/src/commands/txproposals.ts | Makes txp action checks more null-safe (but contains a new optional-chaining .length bug). |
| packages/bitcore-cli/src/commands/transaction.ts | Tightens destination tag validation and adjusts fee/nonce handling. |
| packages/bitcore-cli/src/commands/join/joinThresholdSig.ts | Adds “Copy to clipboard” loop to the join flow for sharing the auth pubkey. |
| packages/bitcore-cli/src/commands/create/createThresholdSig.ts | Adds “Copy to clipboard” loop to the create flow for sharing join codes. |
| packages/bitcore-cli/src/cli.ts | Updates help/usage text and removes non-working --list option in favor of walletName === 'list'. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Copying public keys and invite codes during the TSS wallet setup can be cumbersome since the @clack/prompts cli interface adds formatting for multi-line outputs. This PR adds a copyToClipboard utility function that's implemented in the TSS wallet creation flow.
Changelog
Testing Notes
Checklist