Skip to content

Commit

Permalink
feat: add logs for debug
Browse files Browse the repository at this point in the history
  • Loading branch information
serezhaolshan committed Jul 9, 2024
1 parent 81cd31b commit 42a94aa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/watcher/watcher.network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export class WatcherNetwork {
try {
const { pushToken } = req.params;
const { threshold, txNotification, priceNotification, addresses } = req.body;
console.log("UPDATE", { pushToken, threshold, txNotification, priceNotification, addresses });
await this.service.updateWatcher(pushToken, {
addresses,
threshold,
Expand Down
5 changes: 5 additions & 0 deletions src/watcher/watcher.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,20 @@ export class WatcherService {
}

if (threshold !== undefined) {
console.log("threshold", threshold);
updates.threshold = threshold;
}
if (txNotification !== undefined) {
console.log("txNotification", txNotification);
updates.txNotification = txNotification;
}
if (priceNotification !== undefined) {
console.log("priceNotification", priceNotification);
updates.priceNotification = priceNotification;
}

console.log("Updates", updates);

if (Object.keys(updates).length > 0) {
await this.watcherRepository.updateWatcher({ pushToken }, updates);
}
Expand Down

0 comments on commit 42a94aa

Please sign in to comment.