From 2a4d77abb99a0cc48a922ab5cab7c55ce5a45207 Mon Sep 17 00:00:00 2001 From: sairajzero Date: Tue, 1 Aug 2023 22:21:36 +0530 Subject: [PATCH] fix: read loan data --- scripts/btcMortgage.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/btcMortgage.js b/scripts/btcMortgage.js index 8607a6b..3d15696 100644 --- a/scripts/btcMortgage.js +++ b/scripts/btcMortgage.js @@ -240,14 +240,14 @@ //function to read all loan details of the user function readAllLoans() { return new Promise((resolve, reject) => { - const LASTTX_IDB_KEY = "U#" + floDapps.user.id; + let user_floID = floCrypto.toFloID(floDapps.user.id); + const LASTTX_IDB_KEY = "U#" + user_floID; compactIDB.readData("lastTx", LASTTX_IDB_KEY).then(lastTx => { - var query_options = { sentOnly: true, tx: true, filter: d => typeof d == 'string' && d.includes(APP_IDENTIFIER) }; + var query_options = { tx: true, filter: d => typeof d == 'string' && d.includes(APP_IDENTIFIER) }; if (typeof lastTx == 'number') //lastTx is tx count (*backward support) query_options.ignoreOld = lastTx; else if (typeof lastTx == 'string') //lastTx is txid of last tx query_options.after = lastTx; - let user_floID = floCrypto.toFloID(floDapps.user.id); floBlockchainAPI.readData(user_floID, query_options).then(result => { let p = []; for (var i = result.items.length - 1; i >= 0; i--) {