-
Notifications
You must be signed in to change notification settings - Fork 36.8k
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
[Qt][WIP] allow possibility to add a comment to a WalletTx #5905
Conversation
@@ -65,3 +65,8 @@ CReserveKey *WalletModelTransaction::getPossibleKeyChange() | |||
{ | |||
return keyChange; | |||
} | |||
|
|||
void WalletModelTransaction::setComment(QString comment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be a const reference?
Agree on the idea. Maybe we can make the comment editable too in the details view? As the information is purely local, there is no reason why it shouldn't be possible to add comments in retrospect. |
@laanwj Yes. This is a good idea. Let me try to extend the editable comment to the transaction details window. What about adding a possibility to change the comment over RPC (without adding a new rpc call)? |
How is this any different from the Label? Seems redundant. |
@luke-jr comments already exists in RPC world and are per walletTx. |
@laanwj making the local comment editable within the TransactionDetailDialog looks after a big diff. It needs changes here and there and may be hard to review. It would also require changes within |
7db577d
to
6b1360d
Compare
@jonasschnelli Addresses are per walletTx generally as well (at least in proper use, which should be encouraged). RPC "comments" are basically just the deprecated accounting stuff which didn't have addresses associated. |
@luke-jr "comments" are not directly related with "accounts". By now they where not deprecated. |
Hm, interesting. Surprised that isn't using the label stuff. It would make sense to deprecate labels for comments, in that case, except that it's impossible to assign a comment to an incoming request right now. Labels work better in that regard. But having both is just confusing since they serve the same purpose... |
Looks like a lot of people are making the label-comment confusion, even in #2086. Personally I'd say the distinction is the following:
The annoying/user-surprising thing about these comments, though, is that they apply to a network-level transaction, so they would seem to be associated with multiple UI transactions if there are multiple outputs. |
It also means you can't add comments to incoming transactions until after they're received (and confirm?). Maybe comment should be a text-area in the UI rather than a single line, and in the new wallet associated with an address so it has the same flexibility? |
+1 I somehow assumed that'd already be the case. |
This PR will add a multiline text-area for adding comments to outgoing transactions.
I think adding comments to a wtx is something different to a address label. Lets say if i do ONE wtx to serval recipients it is nice then to give that ONE wtx a comment and not every receiving address. But i'm also not completely sure what would be best for handling labels and comments. |
@@ -65,3 +65,8 @@ CReserveKey *WalletModelTransaction::getPossibleKeyChange() | |||
{ | |||
return keyChange; | |||
} | |||
|
|||
void WalletModelTransaction::setComment(const QString comment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could also use a pass-by-reference here ;)?
const QString& comment
6b1360d
to
16c0fc4
Compare
rebased and fixed @Diapolo 's nit |
ut ACK |
16c0fc4
to
1dcdd42
Compare
Rebased. It will slightly reduce the space in the already very packed |
utACK. But can we also add an RPC to set these? |
@gmaxwell: Thanks for the review. Some test would be required, I agree. I'm also not fully happy with the UI look and feel. Consider the PR as WIP (changed title). |
lightly tested ACK 1dcdd42 |
Concept ACK |
Concept ACK RPC first please. |
@paveljanik: It's already possible in RPC I don't think the current GUI UX makes sense... |
@jonasschnelli Hmm, it is not possible to use |
@paveljanik: this PR only allows to set the comment during GUI tx creation (which is also a point that makes this PR currently not ready). |
Ah, then yes :-) |
Try to sync rpc/qt wallets implementations.
Solves #2086.