Skip to content

Commit

Permalink
Temp: Only send zapier notification when running in QA or prod
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubcolony committed Oct 9, 2024
1 parent 333fe02 commit 1d00496
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/utils/expenditures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 1d00496

Please sign in to comment.