Skip to content

Commit

Permalink
fix: pushToken in watcher api
Browse files Browse the repository at this point in the history
  • Loading branch information
serezhaolshan committed Sep 2, 2024
1 parent 0854a43 commit 7f9bb41
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/watcher/watcher.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ export class WatcherService {

const { _doc } = watcher as unknown as { _doc: Watcher };

this.decodeWatcherToken(_doc);

return camelToSnake({
..._doc,
addresses,
Expand Down Expand Up @@ -304,4 +306,8 @@ export class WatcherService {

await this.explorerService.subscribeAddresses(addresses);
}

private decodeWatcherToken(watcher: Watcher) {
watcher.pushToken = Buffer.from(watcher.pushToken, "base64").toString("utf-8");
}
}

0 comments on commit 7f9bb41

Please sign in to comment.