2

I'm trying to read a profile via uport-persona. In doc it sounds easy but I can't access to my persona.

export function loginUser() {
  return function(dispatch) {
    web3.eth.getCoinbase(function (err, address) {
      if (err) { throw err }
      web3.eth.defaultAccount = address;

      uport.getUserPersona().then((userPersona) => {

        registry.getPublicProfile(userPersona.profileAddress).then((profile) => {
        console.log(profile);
      });
        return dispatch(userLoggedIn(userPersona.profile))
      })
    })
  }
} 

First I get my userPersona, and after I try to get my public profile (with my address) from registry. But in console I have:

Uncaught (in promise) Error: Failed to get value from registry

5

I'm the Engineering Lead for uport. We are about to deprecate some of our libraries as they weren't as straightforward to use as we wanted.

Our new library for browser use is: https://github.com/uport-project/uport-connect

import { Connect } from 'uport-connect'

const uport = new Connect('MyDApp')
uport.requestCredentials().then((credentials) => {
  console.log(credentials)
})

We are working on updating documentation and example code, so please be patient but the above code should work without a problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.