fix: commented out some logs

pull/2971/head
William Grant 2 years ago
parent 93b450ce56
commit e6257f3cbc

@ -189,11 +189,11 @@ async function expireOnNodes(
);
}
window.log.debug(
`WIP: [expireOnNodes] Success!\nHere are the results from one of the snodes.\nmessageHash: ${messageHash} \nexpiry: ${expiry} \nexpires at: ${new Date(
expiry
).toUTCString()}\nnow: ${new Date(GetNetworkTime.getNowWithNetworkOffset()).toUTCString()}`
);
// window.log.debug(
// `WIP: [expireOnNodes] Success!\nHere are the results from one of the snodes.\nmessageHash: ${messageHash} \nexpiry: ${expiry} \nexpires at: ${new Date(
// expiry
// ).toUTCString()}\nnow: ${new Date(GetNetworkTime.getNowWithNetworkOffset()).toUTCString()}`
// );
return expiry;
} catch (e) {
@ -240,11 +240,11 @@ async function buildExpireRequest(
}
const expiry = GetNetworkTime.getNowWithNetworkOffset() + expireTimer;
window.log.debug(
`WIP: [buildExpireRequest]\nmessageHash: ${messageHash} should expire at ${new Date(
expiry
).toUTCString()}`
);
// window.log.debug(
// `WIP: [buildExpireRequest]\nmessageHash: ${messageHash} should expire at ${new Date(
// expiry
// ).toUTCString()}`
// );
const signResult = await SnodeSignature.generateUpdateExpirySignature({
shortenOrExtend,
timestamp: expiry,
@ -271,7 +271,7 @@ async function buildExpireRequest(
},
};
window.log.debug(`WIP: [buildExpireRequest] ${messageHash}\n${JSON.stringify(expireParams)}`);
// window.log.debug(`WIP: [buildExpireRequest] ${messageHash}\n${JSON.stringify(expireParams)}`);
return expireParams;
}

@ -190,11 +190,11 @@ async function send(
}
await foundMessage.commit();
window?.log?.info(
`updated message ${foundMessage.get('id')} with hash: ${foundMessage.get(
'messageHash'
)}`
);
// window?.log?.info(
// `updated message ${foundMessage.get('id')} with hash: ${foundMessage.get(
// 'messageHash'
// )}`
// );
}
}

@ -668,25 +668,25 @@ export async function updateMessageExpiryOnSwarm(
expires_at: newTTL,
});
window.log.debug(
`WIP: [updateMessageExpiryOnSwarm] messageHash ${messageHash} has a new TTL of ${newTTL} which expires at ${new Date(
newTTL
).toUTCString()}`
);
// window.log.debug(
// `WIP: [updateMessageExpiryOnSwarm] messageHash ${messageHash} has a new TTL of ${newTTL} which expires at ${new Date(
// newTTL
// ).toUTCString()}`
// );
if (shouldCommit) {
await message.commit();
}
} else {
window.log.warn(
`WIP: [updateMessageExpiryOnSwarm]\nmessageHash ${messageHash} has no new TTL.${
expiresAt
? `\nKeeping the old one ${expiresAt}which expires at ${new Date(
expiresAt
).toUTCString()}`
: ''
}`
);
// window.log.warn(
// `WIP: [updateMessageExpiryOnSwarm]\nmessageHash ${messageHash} has no new TTL.${
// expiresAt
// ? `\nKeeping the old one ${expiresAt}which expires at ${new Date(
// expiresAt
// ).toUTCString()}`
// : ''
// }`
// );
}
return message;

Loading…
Cancel
Save