Paymetheus icon indicating copy to clipboard operation
Paymetheus copied to clipboard

Rename dialog exits before rename is complete

Open davecgh opened this issue 9 years ago • 3 comments

The account rename dialog appears to make an asynchronous RPC call to rename the account and close itself immediately without waiting for a response.

This causes an issue because it leads to the account name in accounts list not being updating for a couple of seconds after the dialog closes when the RPC is slow to respond with btcwallet is under heavy load (such as during initial sync). The result is it appears like the rename was simply ignored which leads to the user attempting to rename it again, except this time the dialog won't do anything when you click rename (no errors or anything), likely because it's trying to rename an account that no longer exists.

I believe the correct way to handle this is simply to have the rename dialog wait for the RPC to complete with a standard "please wait...." message.

davecgh avatar Feb 15 '16 23:02 davecgh

While the RPC is performed asynchronously as to not block the UI thread, it does wait for the completion of the RPC before the dialog is closed. However, the actual update to the rest of the GUI is done asynchronously as part of the normal wallet notifications.

Account name changes are notified this way so that if the name is changed by another process, all clients will become aware of the change.

jrick avatar Feb 15 '16 23:02 jrick

Ah, well maybe a UI update should be triggered immediately?

davecgh avatar Feb 15 '16 23:02 davecgh

Yeah, that would be ideal here.

jrick avatar Feb 15 '16 23:02 jrick