app/scripts/lib/sovrin/sovrin-keyring-controller.js
// On success, returns the resulting @Keyring instance.
On success, returns the resulting @Keyring instance.
On success returns the resulting @Keyring instance .
restoreKeyring (serialized) {
    const { type, data } = serialized
    const Keyring = this.getKeyringClassForType(type)
    const keyring = new Keyring()
    return keyring.deserialize(data)
    .then(() => {
      return keyring.getAccounts()
    })
    .then((accounts) => {
      return this.setupAccounts(accounts)
    })
    .then(() => {
      this.keyrings.push(keyring)
      this._updateMemStoreKeyrings()
      return keyring
    })
  }
restoreKeyring ( serialized ) { const { type , data } = serialized const Keyring = this . getKeyringClassForType ( type ) const keyring = new Keyring ( ) return keyring . deserialize ( data ) . then ( ( ) => { return keyring . getAccounts ( ) } ) . then ( ( accounts ) => { return this . setupAccounts ( accounts ) } ) . then ( ( ) => { this . keyrings . push ( keyring ) this . _updateMemStoreKeyrings ( ) return keyring } ) }
On success, returns the resulting @Keyring instance.
On success returns the resulting @Keyring instance .