- corretto saldi pendenti sulla lista circuiti e anche il calcolo
This commit is contained in:
@@ -1149,16 +1149,19 @@ sendNotifSchema.statics.getSumPendingTransactionsMittente = async function (idap
|
||||
const SendNotif = this;
|
||||
|
||||
try {
|
||||
const query = {
|
||||
let query = {
|
||||
idapp,
|
||||
sender: username,
|
||||
sendergroup: groupname,
|
||||
typedir: shared_consts.TypeNotifs.TYPEDIR_CIRCUITS,
|
||||
typeid: shared_consts.TypeNotifs.ID_CIRCUIT_SENDCOINSREQ,
|
||||
status: 0,
|
||||
'extrarec.circuitname': circuitname,
|
||||
};
|
||||
|
||||
if (groupname) {
|
||||
query.sendergroup = groupname;
|
||||
}
|
||||
|
||||
return await SendNotif.find(query).lean();
|
||||
|
||||
} catch (e) {
|
||||
@@ -1171,18 +1174,21 @@ sendNotifSchema.statics.getSumPendingTransactionsDest = async function (idapp, u
|
||||
const SendNotif = this;
|
||||
|
||||
try {
|
||||
const query = {
|
||||
let query = {
|
||||
idapp,
|
||||
sender: username,
|
||||
sendergroup: groupname,
|
||||
typedir: shared_consts.TypeNotifs.TYPEDIR_CIRCUITS,
|
||||
typeid: shared_consts.TypeNotifs.ID_CIRCUIT_SENDCOINSREQ,
|
||||
status: 0,
|
||||
'extrarec.circuitname': circuitname,
|
||||
'extrarec.dest': username,
|
||||
'extrarec.groupdest': groupname,
|
||||
};
|
||||
|
||||
if (groupname) {
|
||||
query.sendergroup = groupname;
|
||||
query.extrarec.groupdest = groupname;
|
||||
}
|
||||
|
||||
return await SendNotif.find(query).lean();
|
||||
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user