Get new address from selected wallet in receive tab#496
Open
pinheadmz wants to merge 3 commits intobitcoin-core:qt6from
Open
Get new address from selected wallet in receive tab#496pinheadmz wants to merge 3 commits intobitcoin-core:qt6from
pinheadmz wants to merge 3 commits intobitcoin-core:qt6from
Conversation
MarnixCroes
approved these changes
Aug 8, 2025
Contributor
MarnixCroes
left a comment
There was a problem hiding this comment.
tested,
I did not encounter any issues✅
goqusan
reviewed
Aug 28, 2025
| } | ||
| } | ||
|
|
||
| function clear() { |
Contributor
There was a problem hiding this comment.
Move to the root? It is a reasonable function at the component level.
| } | ||
| } | ||
|
|
||
| Connections { |
Contributor
There was a problem hiding this comment.
Try to not rely on walletController, move this to DesktopWallets where walletController is already referenced, add an id to RequestPayment and call clear().
goqusan
reviewed
Aug 28, 2025
| background: null | ||
|
|
||
| property int requestCounter: 0 | ||
| property WalletQmlModel wallet: walletController.selectedWallet |
Contributor
There was a problem hiding this comment.
Make required and move binding to DesktopWallets:
RequestPayment {
wallet: walletController.selectedWallet
}| return QString::fromStdString(m_wallet->getWalletName()); | ||
| } | ||
|
|
||
| QString WalletQmlModel::newAddress(QString label) |
Contributor
There was a problem hiding this comment.
Maybe rename to getNewAddress.
| title.text = qsTr("Payment request #" + requestCounter) | ||
| address.text = "bc1q f5xe y2tf 89k9 zy6k gnru wszy 5fsa truy 9te1 bu" | ||
| qrImage.code = "bc1qf5xey2tf89k9zy6kgnruwszy5fsatruy9te1bu" | ||
| var newAddress = root.wallet.newAddress(label.text) |
Contributor
There was a problem hiding this comment.
const address = root.wallet.getNewAddress(label.text)
qrImage.code = address
address.text = address.replace(/(.{4})/g, "$1 ").trim()
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.
Closes #491
"Create bitcoin address" button now connects to the wallet interface and gets a new address. It generates a QR code and everything clears when switching wallets. It should also save the label if used.