From 34f7f23ae82c5f1af44b851ef6b530e2b4f51272 Mon Sep 17 00:00:00 2001 From: MrTuxedo Date: Fri, 21 Apr 2023 22:20:09 -0700 Subject: [PATCH] remove unnecessary await --- src/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/index.ts b/src/index.ts index a6d3879..ddaa369 100644 --- a/src/index.ts +++ b/src/index.ts @@ -24,7 +24,7 @@ const client = new DiscordClient({ intents: [GatewayIntentBits.Guilds, GatewayIn const doAlerts = createGasAlertChecker(client); -const setDiscordStatus = async ({ average, fast, slow }: GasPrices) => { +const setDiscordStatus = ({ average, fast, slow }: GasPrices) => { if (client.user) { client.user.setActivity( `⚡ ${fast} ⦚🚶 ${average} ⦚ 🐢 ${slow}` @@ -74,12 +74,12 @@ client.login(token) await redisClient.connect() .catch((reason) => console.log("Error connecting to redis!\n", reason)) }) - .then(async () => { + .then(() => { // Start listening to blockchain averageGasPricesObservable.subscribe({ next: async (averageGasPrices) => { + setDiscordStatus(averageGasPrices); await redisClient.set('current-prices', JSON.stringify(averageGasPrices)) - await setDiscordStatus(averageGasPrices); await doAlerts(averageGasPrices); }, error: console.error,