Closed yellowHatpro closed 1 year ago
@darkvoid32 I have made the required change, but I doubt it won't be effective until the address changes, which as of now, doesn't change.
@darkvoid32 the Generate a new address
button does not seem to generate new address. Is it intentional, or a bug?
Good question, the Generate a New Address
button is using the BDKWallet's getLastUnusedAddress()
, so it is not actually generating a new address but simply retrieving one I think. So you are right in that it does not actually create a new QR Code since it is not creating a new address.
This is probably intentional, but I am not too sure why. Will have to wait for @thunderbiscuit 's thoughts on this!
Yes the "generate new address" button will pull an unused address from the wallet. As long as a given address at a given index has not been used, the wallet will keep giving you that address. If you send coins to this address and sync the wallet, your next call will generate a brand new address.
If you wish to test your progress bar locally, you can fix up the code in theWallet
object to generate a brand new address every time using getAddress(AddressIndex.New)
.
Ok got it. In that case, we should show a toast/snackbar, that will tell the user that the address is unused, and new won't be generated until this one is used, or something like that. Does that sound good?
I think simply renaming it would suffice for now, something like Retrieve Last Unused Address
? What do you think @thunderbiscuit .
Yeah that looks like a clean fix
I can't seem to see the effect of this on my emulator or device. Is it because it's happening too fast? Lots about this screen is wrong, but I don't know if this is the fix we need.
I will close this for now because it's mostly inactive but feel free to reopen if you're interested in working on this @yellowHatpro! What I would need is basically to hardcode a waiting period (not long, maybe 200ms) to show the progress bar and give a standard UX for different devices (the fast ones and the slow ones).
Fixed: #289