uport-core
Advanced tools
Comparing version 0.0.17 to 0.0.18
@@ -57,3 +57,2 @@ 'use strict'; | ||
uriHandler(uri, { cancel: cancel }); | ||
console.log(uri); | ||
var returnVal = poll(cb, pollingInterval, function () { | ||
@@ -77,3 +76,3 @@ return isCancelled; | ||
var messageParse = function messageParse(res) { | ||
if (res.message) return res.message['access_token']; | ||
if (res.message) return res.message['access_token'] || res.message['tx']; | ||
}; | ||
@@ -80,0 +79,0 @@ var errorParse = function errorParse(res) { |
@@ -48,3 +48,2 @@ 'use strict'; | ||
var message = messageParse(body); | ||
console.log(body); | ||
if (messageError) { | ||
@@ -51,0 +50,0 @@ clearInterval(interval); |
{ | ||
"name": "uport-core", | ||
"version": "0.0.17", | ||
"version": "0.0.18", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -32,3 +32,2 @@ import { paramsToQueryString } from './../message/util.js' | ||
uriHandler(uri, { cancel }) | ||
console.log(uri) | ||
const returnVal = poll(cb, pollingInterval, () => isCancelled) | ||
@@ -49,3 +48,3 @@ returnVal.cancel = cancel | ||
const poll = (url, pollingInterval, cancelled ) => { | ||
const messageParse = (res) => { if (res.message) return res.message['access_token'] } | ||
const messageParse = (res) => { if (res.message) return res.message['access_token'] || res.message['tx'] } | ||
const errorParse = (res) => { if (res.message) return res.message.error } | ||
@@ -52,0 +51,0 @@ return generalPoll(url, messageParse, errorParse, cancelled, pollingInterval).then(res => { |
@@ -34,3 +34,2 @@ import nets from 'nets' | ||
const message = messageParse(body) | ||
console.log(body) | ||
if (messageError) { | ||
@@ -37,0 +36,0 @@ clearInterval(interval) |
176721
2610