diff --git a/src/database.js b/src/database.js index 8c55372..efcc11d 100644 --- a/src/database.js +++ b/src/database.js @@ -298,6 +298,8 @@ function Database(user, password, dbname, host = 'localhost') { if (request.type) conditionArr.push(`${H_struct.TYPE} = '${request.type}'`); if (request.senderID) { + if (typeof request.senderID === "string" && request.senderID.includes(',')) + request.senderID = request.senderID.split(','); if (Array.isArray(request.senderID)) conditionArr.push(`${H_struct.SENDER_ID} IN ('${request.senderID.join("', '")}')`); else diff --git a/src/floBlockchainAPI.js b/src/floBlockchainAPI.js index 5db40df..d76470f 100644 --- a/src/floBlockchainAPI.js +++ b/src/floBlockchainAPI.js @@ -1,6 +1,6 @@ 'use strict'; /* FLO Blockchain Operator to send/receive data from blockchain using API calls*/ -//version 2.2.1 +//version 2.2.1a (function(GLOBAL) { const floBlockchainAPI = GLOBAL.floBlockchainAPI = { @@ -436,7 +436,8 @@ for (let i = 0; i < numToRead && filteredData.length < options.limit; i++) { if (!response.items[i].confirmations) { //unconfirmed transactions unconfirmedCount++; - numToRead++; + if (numToRead < response.items[i].length) + numToRead++; continue; } if (options.pattern) {