Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

Not selecting an avatar returns a TypeError #1613

Closed
dav1app opened this issue Jan 21, 2020 · 2 comments · Fixed by #1633
Closed

Not selecting an avatar returns a TypeError #1613

dav1app opened this issue Jan 21, 2020 · 2 comments · Fixed by #1633
Labels
Type: Bug The issue relates to broken or incorrect behaviour.

Comments

@dav1app
Copy link
Contributor

dav1app commented Jan 21, 2020

The smallest user flow into the app (Next > Next > Next) returns a TypeError.

Expected Behavior

No errors.

Current Behavior

Return errors. Restarting the wallet seems to make everything work as expected.

image

Possible Solution

Either select a default avatar, prevent users from starting the wallet without an avatar or accept starting without an avatar.

Steps to Reproduce (for bugs)

  1. Reset the configurations of your wallet (Config > Reset Data)
  2. Main Screen from Onboarding > Click Next.
  3. Skip
  4. Provide a Profile Name.
  5. Next
  6. Next
  7. Done
  8. See the errors.

Your Environment

  • Version used: develop branch.
  • Environment name and version : Firefor 72.0.1
  • Operating System and version: Debian 10
@dav1app dav1app added the Type: Bug The issue relates to broken or incorrect behaviour. label Jan 21, 2020
@dav1app dav1app changed the title Not selecting an avatar returns an TypeError Not selecting an avatar returns a TypeError Jan 22, 2020
@dav1app
Copy link
Contributor Author

dav1app commented Jan 22, 2020

It seems that AppSidemenu is called before finishing the request by the last step of ProfileNew page, when session_profile is still undefined.

This happens right after this.$store.dispatch('profile/create', this.schema) is called. Meaning that the component is hearing for changes on the state before it is displayed to the customer.

Need to check if this happens due to an incorrect phase to mount the AppSidemenu.

@brenopolanski
Copy link
Contributor

Hey @davimello28

Selecting an avatar when creating a new profile also returns the same errors.

The solution to this would be in the computed property hasAnyProfile (in the App.vue file).

Use:

hasAnyProfile () {
  return this.$store.getters['session/profile']
}

instead of:

hasAnyProfile () {
  return !!this.$store.getters['profile/all'].length
}

Then the component <AppSidemenu /> is only rendered if there is a profile.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Bug The issue relates to broken or incorrect behaviour.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants