clifordsymack / Electron-Cash

Electrum; Bitcoin thin client
MIT License
6 stars 3 forks source link

Automatic receiving address renewal #101

Closed imaginaryusername closed 5 years ago

imaginaryusername commented 5 years ago

If an address received an incoming tx while the cashshuffle plugin is on, the "receive" tab should automatically renew itself without being prompted.

This might be pushable to regular EC without cashshuffle activated too if we do:

This is probably one of the last UX gaps to cover and avoid address reuse after #94. Without this, multiple coins on the same address could be dicey even with proper coin control - especially when multi-input shuffling is not in place.

cculianu commented 5 years ago

Yeah it kinda bugged me too that user had to hit "new" in the receive tab. Most users probably don't bother... Makes sense for regular EC (cashshuffle plugin unloaded) too given the two points you said.

cculianu commented 5 years ago

So I'm thinking:

I'm still a little nervous about the pathologically newbish user that doesn't know about the address tab and wonders why "their address" changed (some users actually think they only get one address!).

Maybe we don't auto-renew the address but instead urge them to use a new one with a yellow exclamation mark icon and a stern talking-to?

Hmm...

imaginaryusername commented 5 years ago

I'll actually recommend renewing under all circumstances without asking as the default behavior - perhaps with a little yellow exclaimation mark and prompt that says "previous address used, refreshing to new address!" in the blank space under the UI when that happens. The user doesn't have to do anything, just be notified about why the change happened. More action needed from users = more room for errors and more frustration, this behavior doesn't do any harm (other than when they disable "use change address", which indicates explicit single address and we should respect) anyway.

This actually aligns the expectation with Bitcoincom/Copay wallet (which covers up the whole receive UI with "received!" when coins come in, then when you go back to receive screen it's a new address). I'm sure bitcoincom/copay is more newbie friendly than EC ;D

Don't think we need to be concerned about the hypothetical newbie user, especially when the address changes every time they restart the wallet anyway :P

cculianu commented 5 years ago

more newbie friendly than EC ;D

Heh. True. But EC is a "transaction studio" :)

Ah, if they do it -- and got away with it -- then the fears about newbie antagonism go away. Sounds good.

Don't think we need to be concerned about the hypothetical newbie user, especially when the address changes every time they restart the wallet anyway :P

Ha ha true, this is a good point. I'm doin' it. Probably will put it in base EC first then merge it forward to CashShuffle + SLP (after clearing it with jscramer)

markblundeberg commented 5 years ago

Related: https://github.com/Electron-Cash/Electron-Cash/issues/968

markblundeberg commented 5 years ago

I'd agree with @imaginaryusername that the tab's first field "Receiving address" should be auto-updated. Saved addresses should not have their address modified, of course.

On second thought.... Maybe that field shouldn't even be shown at all before the address is saved, i.e., until it is reserved. This may be a more intuitive mechanics:

imaginaryusername commented 5 years ago

If nothing shows up unless you click "new", that makes receiving a two click affair instead of one click (status quo). I'd prefer auto-updating but keep the status quo where address is always shown.

But yes, perhaps the "new" button's role can be expanded.

cculianu commented 5 years ago

Ok, this is done in latest git head. Take it for a spin and let me know if what I came up with works for you guys.

The basic rule is:

Let me know!

cculianu commented 5 years ago

So one caveat is the code I just committed creates a new address (potentially past gap limit if and only if you have many unpaid requests).

Possible approaches:

Not sure what to do....