Comparing version 0.4.0-alpha-1 to 0.4.0
@@ -29,4 +29,2 @@ 'use strict'; | ||
function Credentials() { | ||
var _this = this; | ||
var settings = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | ||
@@ -39,13 +37,11 @@ | ||
if (!this.settings.registry) { | ||
(function () { | ||
var registry = (0, _uportLite2.default)({ networks: _this.settings.networks }); | ||
_this.settings.registry = function (address) { | ||
return new Promise(function (resolve, reject) { | ||
registry(address, function (error, profile) { | ||
if (error) return reject(error); | ||
resolve(profile); | ||
}); | ||
var registry = (0, _uportLite2.default)({ networks: this.settings.networks }); | ||
this.settings.registry = function (address) { | ||
return new Promise(function (resolve, reject) { | ||
registry(address, function (error, profile) { | ||
if (error) return reject(error); | ||
resolve(profile); | ||
}); | ||
}; | ||
})(); | ||
}); | ||
}; | ||
} | ||
@@ -83,3 +79,3 @@ } | ||
value: function receive(token) { | ||
var _this2 = this; | ||
var _this = this; | ||
@@ -95,3 +91,3 @@ var callbackUrl = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; | ||
return Promise.all(payload.verified.map(function (token) { | ||
return (0, _JWT.verifyJWT)(_this2.settings, token); | ||
return (0, _JWT.verifyJWT)(_this.settings, token); | ||
})).then(function (verified) { | ||
@@ -98,0 +94,0 @@ return _extends({}, credentials, { verified: verified.map(function (v) { |
{ | ||
"name": "uport", | ||
"version": "0.4.0-alpha-1", | ||
"version": "0.4.0", | ||
"description": "Library for interacting with uport profiles and attestations", | ||
@@ -15,3 +15,3 @@ "main": "lib/index.js", | ||
"build:browser": "./node_modules/.bin/webpack --config webpack.config.js", | ||
"build": "yarn test && yarn build:es5 && yarn build:browser" | ||
"build": "yarn build:es5 && yarn test && yarn build:browser" | ||
}, | ||
@@ -25,3 +25,3 @@ "author": "Pelle Braendgaard <pelle.braendgaard@consensys.net>", | ||
"nets": "^3.2.0", | ||
"uport-lite": "next" | ||
"uport-lite": "^1.0.0" | ||
}, | ||
@@ -28,0 +28,0 @@ "jest": { |
Sorry, the diff of this file is too big to display
650033
19001
+ Addeduport-lite@1.0.5(transitive)
- Removedbase-x-bytearray@0.1.3(transitive)
- Removeduport-lite@1.0.0-alpha-6(transitive)
Updateduport-lite@^1.0.0