From 1d004965c005f7a19e75333460cbf2eca4d8f7d6 Mon Sep 17 00:00:00 2001 From: Jakub Zajac Date: Wed, 9 Oct 2024 20:03:58 +0100 Subject: [PATCH] Temp: Only send zapier notification when running in QA or prod --- src/utils/expenditures.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/utils/expenditures.ts b/src/utils/expenditures.ts index 34bd3c71..ca0304aa 100644 --- a/src/utils/expenditures.ts +++ b/src/utils/expenditures.ts @@ -54,12 +54,14 @@ export const getUpdatedExpenditureBalances = ( ); updatedAmount = BigNumber.from(0); - fetch('https://hooks.zapier.com/hooks/catch/20362233/2mnk4h2', { - method: 'POST', - body: JSON.stringify({ - message: `Balance of expenditure ${expenditure.id} for token ${tokenAddress} would go negative. This is a bug and needs investigating.`, - }), - }); + if (process.env.NODE_ENV !== 'development') { + fetch('https://hooks.zapier.com/hooks/catch/20362233/2mnk4h2', { + method: 'POST', + body: JSON.stringify({ + message: `Balance of expenditure ${expenditure.id} for token ${tokenAddress} would go negative. This is a bug and needs investigating.`, + }), + }); + } } const updatedBalance = {