uport-connect
Advanced tools
Comparing version 0.8.12-alpha-12 to 0.8.13-alpha-13
@@ -83,7 +83,6 @@ 'use strict'; | ||
this.PubSub = _pubsubJs2.default; | ||
_uportCore.transport.url.listenResponse(function (err, res) { | ||
if (res) _this.PubSub.publish(res.id, { res: res.res, data: res.data }); // TODO pass errors | ||
_uportCore.transport.url.listenResponse(function (err, payload) { | ||
if (payload) _this.PubSub.publish(payload.id, { res: payload.res, data: payload.data }); | ||
}); | ||
// TODO | ||
// State | ||
@@ -197,2 +196,3 @@ this.did = null; | ||
var parseResponse = function parseResponse(payload) { | ||
if (payload.error) return Promise.reject(Object.assign({ id: id }, payload)); | ||
if (_uportCore.message.util.isJWT(payload.res)) { | ||
@@ -199,0 +199,0 @@ var jwt = payload.res; |
{ | ||
"name": "uport-connect", | ||
"version": "0.8.12-alpha-12", | ||
"version": "0.8.13-alpha-13", | ||
"description": "Library for integrating uPort into your app frontend", | ||
@@ -106,3 +106,3 @@ "main": "lib/Connect.js", | ||
"store": "^2.0.12", | ||
"uport": "^0.7.0-alpha-4", | ||
"uport": "^0.7.0-alpha-5", | ||
"uport-core": "^0.0.36", | ||
@@ -109,0 +109,0 @@ "uport-did-resolver": "^0.0.2", |
@@ -46,7 +46,6 @@ import { Credentials, ContractFactory } from 'uport' | ||
this.PubSub = PubSub | ||
transport.url.listenResponse((err, res) => { | ||
if (res) this.PubSub.publish(res.id, {res: res.res, data: res.data}) // TODO pass errors | ||
transport.url.listenResponse((err, payload) => { | ||
if (payload) this.PubSub.publish(payload.id, {res: payload.res, data: payload.data}) | ||
}) | ||
// TODO | ||
// State | ||
@@ -139,2 +138,3 @@ this.did = null | ||
const parseResponse = (payload) => { | ||
if (payload.error) return Promise.reject(Object.assign({id}, payload)) | ||
if (message.util.isJWT(payload.res)) { | ||
@@ -141,0 +141,0 @@ const jwt = payload.res |
2567521
Updateduport@^0.7.0-alpha-5