From a474b6b94e70d3ec11e587b3e71f01d785dd4260 Mon Sep 17 00:00:00 2001 From: keyan Date: Fri, 6 Oct 2023 19:28:05 -0500 Subject: [PATCH] temp remove broken rewards notifications --- worker/earn.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/worker/earn.js b/worker/earn.js index 5b7471cc..009dc465 100644 --- a/worker/earn.js +++ b/worker/earn.js @@ -1,7 +1,7 @@ import serialize from '../api/resolvers/serial.js' -import { sendUserNotification } from '../api/webPush/index.js' +// import { sendUserNotification } from '../api/webPush/index.js' import { ANON_USER_ID } from '../lib/constants.js' -import { msatsToSats, numWithUnits } from '../lib/format.js' +// import { msatsToSats, numWithUnits } from '../lib/format.js' const ITEM_EACH_REWARD = 4.0 const UPVOTE_EACH_REWARD = 4.0 @@ -162,10 +162,10 @@ export function earn ({ models }) { await serialize(models, models.$executeRaw`SELECT earn(${earner.userId}::INTEGER, ${earnings}, ${now}::timestamp without time zone, ${earner.type}::"EarnType", ${earner.id}::INTEGER, ${earner.rank}::INTEGER)`) - sendUserNotification(earner.userId, { - title: `you stacked ${numWithUnits(msatsToSats(earnings), { abbreviate: false })} in rewards`, - tag: 'EARN' - }).catch(console.error) + // sendUserNotification(earner.userId, { + // title: `you stacked ${numWithUnits(msatsToSats(earnings), { abbreviate: false })} in rewards`, + // tag: 'EARN' + // }).catch(console.error) } })