How can I refresh a user profile?
Looking at the code I see it reads the profile once when logging in and save it to localstorage and then it simply reads it from there. never checking if anything changed.
You can use the
lookupProfile() method to refresh a user’s profile: http://blockstack.github.io/blockstack.js/#lookupprofile
10x found that myself.
Don’t you guys think reloading should be part of the core blockstack.js? or should this be left to the developer to implement? in any case this should probably be mentioned in the docs.
on the margin case that the profile was initiated without a username first, using lookupprofile using userData.username will fail. in case the user registers without a username (which is a possible), how should the username be updated?