Skip to content

Introduce Coin Selection page #448

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

johnny9
Copy link
Contributor

@johnny9 johnny9 commented Mar 25, 2025

This PR depends on #445

This is the first iteration of the Coin Selection menu

The option to open the Coin Selection menu is a QSetting that is toggled on/off in the ellipsis menu on the Send page. When enabled, the user can click on the Select inputs button and the Coin Selection menu will be push on the stack from below. The Coin Selection menu will list possible inputs and a checkbox is used to select the coins. Locked coins
are not selectable and instead of a check box, they have a locked icon.

Screencast.from.2025-03-25.00-49-26.mp4

johnny9 added 7 commits March 19, 2025 16:18
The coins list model will be used to list out of the locked and
selectable coins in the coin selection form. A toggle method is
provided that will select or unselect the coin in the associated
WalletQmlModel.
The CoinSelection page is opened up from the Send page. The
button to push CoinSelection on the Send page stack is enabled
in the ellipsis menu. The toggle in the ellipsis menu can set a
QSetting for enabled/disabled. All of these components are added
to the DesktopWallets and Send page.
Copy link
Contributor

@MarnixCroes MarnixCroes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

first testing round

  • it always tells me I have 80 sats selected, while no coin is selected
qml-coinselection.webm
  • nit: vertical scrollbar at the coinlist when having many coins
  • when switching the Amount entry to sats, the coin amounts are still in BTC

@yashrajd
Copy link

Oh great to see this page being built!

Suggestion (I did not test build): the Total Selected and Over required amount list items should be sticky/Freezed and should always be on the top. This will help the user track these numbers while they're scrolling and selecting coins. Otherwise they have to scroll to the top to check...

@johnny9
Copy link
Contributor Author

johnny9 commented Mar 25, 2025

Suggestion (I did not test build): the Total Selected and Over required amount list items should be sticky/Freezed and should always be on the top.

Yeah I agree on this. I'll move that component outside of the scroll view.

@johnny9
Copy link
Contributor Author

johnny9 commented Mar 25, 2025

first testing round

* it always tells me I have 80 sats selected, while no coin is selected

Interesting, ill try to reproduce and fix this.

qml-coinselection.webm

* nit: vertical scrollbar at the coinlist when having many coins

I'll add the scroll bar to the list

* when switching the _Amount_ entry to sats, the coin amounts are still in BTC

All amount inputs and labels aren't going to look great right now. I need to create the components to display these values properly as well as the state to hold the preferences but i will be getting there soon.

@johnny9
Copy link
Contributor Author

johnny9 commented Mar 28, 2025

Updates were made to address all comments outside of the issues with the amounts and the amount resetting after send. These are related issues and will be addressed when I circle back around to solve the BitcoinAmount formatting feature.

Copy link
Contributor

@MarnixCroes MarnixCroes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

12aa84c
some other things I noticed while testing (maybe as notes for follow-up)

  • the over or remaining to select is not displaying the right value in case the review button doesn't work (this happens sometimes, was mentioned in previous PR)
Screencast.from.2025-03-31.16-55-52.webm
  • the coinlist shouldn't be open-enable in case the user has no coins?
  • sometimes when a re-index is needed it displays a random number (which I have not been able to repro using qt)

Screenshot from 2025-03-31 17-07-39

Screenshot from 2025-03-31 17-07-00

text: if (root.wallet.coinsListModel.overRequiredAmount) {
qsTr("Over required amount")
} else {
qsTr("Remaining to select")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit, if exact amount is selected is it good UX to have Remaining to select 0.000000?

@@ -0,0 +1,48 @@
// Copyright (c) 2024 The Bitcoin Core developers
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit; some are 2025, same added files are 2024 or 2023

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.

3 participants