Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

addresses & QR codes not always being displayed when creating wallet #11589

Closed
kjozwiak opened this issue Oct 18, 2017 · 5 comments · Fixed by #11771
Closed

addresses & QR codes not always being displayed when creating wallet #11589

kjozwiak opened this issue Oct 18, 2017 · 5 comments · Fixed by #11771
Assignees
Labels
0.19.x issue first seen in 0.19.x bug design A design change, especially one which needs input from the design team. feature/rewards initiative/bat-payments priority/P4 Minor loss of function. Workaround usually present. QA/checked-Linux QA/checked-macOS QA/checked-Win64 QA/test-plan-specified regression release-notes/include

Comments

@kjozwiak
Copy link
Member

Description

It looks like the funding address are appearing instantly under 0.19.48. Under 0.19.53, the addresses appear once Brave has contacted the payment service and retrieves the rates which seems like a regression.

If you have a really slow internet connection or our backend payment service is slow for some reason, new users will see a blank address/QR code when attempting to fund their wallets. The first case where a users internet/network is slow isn't the end of the world, but if our servers are having issues, new users won't be getting addresses nor QR codes. When we were having issues earlier in the week with the servers, it took a while for funding address and QR codes to appear.

Steps to Reproduce

  1. start bogging down the network to simulate a slow internet connection... I usually start syncing the ethereum mainnet and download an Ubuntu ISO at the same time
  2. launch 0.19.53 with a new profile and visit about:preferences#payments
  3. enable payments and quickly click on "Add Funds" -> "Next" and select a funding option

Once Brave starts pulling the rates from the payment service, the address and QR codes will appear.

Actual result:

Funding addresses not appearing under Brave with a new profile until contact with the payment service has been made and the rates have been pulled into the browser.

qr

Expected result:

Funding addresses should be generated and appear right after the wallet has been created.

Reproduces how often: [What percentage of the time does it reproduce?]

100% reproducible when

Brave Version

about:brave info:

Brave: 0.19.53 - Reproducible
rev: e09025b
Muon: 4.4.29
libchromiumcontent: 61.0.3163.100

Reproducible on current live release:

No, not reproducible in the latest released version:

Brave: 0.19.48 - Couldn't Reproduce
rev: de939f6
Muon: 4.4.28
libchromiumcontent: 61.0.3163.100

@cezaraugusto
Copy link
Contributor

I think this is a very common case like fast connections/machines are not the norms, plus data transfer between browser/back-end may be slow at a given time as Kamil reported. We could either ensure that this information is stored at the payment-enabled time or make a placeholder/other UI mechanisms to alert the user that data is still fetching. However, I'm wondering why the QR code is loaded in time and not the wallet address.

cc @evq @bradleyrichter for thoughts

@evq
Copy link
Member

evq commented Oct 20, 2017

I haven't looked at the browser side of this yet, however as far as the other parts involved go - I believe:

  • The ledger server is sending the addresses in the response to wallet creation
  • The bat-client persists returned wallet information (including addresses) into state.properties.wallet during successful wallet registration, before the callback is made

I would therefore expect the address to be available immediately to the browser after wallet creation is complete.

Also, the QR code is generated client side from the address information, it isn't retrieved from the server.

@cezaraugusto
Copy link
Contributor

ok since this is unassigned by now I'm going to take and make a way to avoid blank inputs. I'm not familiar w/ server-side ledger but am w/ client-side so my work will start in there.

@evq feel free to jump in too if you want and thanks for the input

@alexwykoff
Copy link
Contributor

Design needs to consider UX for poor network conditions which cause this.

@kjozwiak
Copy link
Member Author

kjozwiak commented Nov 9, 2017

Ensured that Loading wallet address… is displayed as a placeholder when a user visits the wallet before Brave can fetch the address. Example:

screen shot 2017-11-09 at 10 41 56 am

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
0.19.x issue first seen in 0.19.x bug design A design change, especially one which needs input from the design team. feature/rewards initiative/bat-payments priority/P4 Minor loss of function. Workaround usually present. QA/checked-Linux QA/checked-macOS QA/checked-Win64 QA/test-plan-specified regression release-notes/include
Projects
None yet
Development

Successfully merging a pull request may close this issue.