remove unnecessary await
This commit is contained in:
parent
b16ef7c368
commit
aa33fb0966
@ -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}`
|
||||
@ -78,8 +78,8 @@ client.login(token)
|
||||
// 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,
|
||||
|
Loading…
Reference in New Issue
Block a user