Skip to content

Commit

Permalink
debug webhook post data
Browse files Browse the repository at this point in the history
  • Loading branch information
ewansheldon committed Jun 25, 2024
1 parent c902dbc commit 01df41b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/liquidation.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ const postToDiscord = async content => {
content,
});

console.log(data)

const options = {
hostname: 'discord.com',
port: 443,
Expand All @@ -28,10 +30,9 @@ const postToDiscord = async content => {
'Content-Length': data.length,
},
};
console.log(options.path);

const req = https.request(options, (res) => {
console.log(`statusCode: ${res.statusCode}`);

res.on('data', (d) => {
process.stdout.write(d);
});
Expand All @@ -44,6 +45,7 @@ const postToDiscord = async content => {

req.write(data);
req.end();
console.log('posted liquidation data to discord')
resolve();
});
};
Expand Down Expand Up @@ -85,7 +87,7 @@ const scheduleLiquidation = async _ => {
});

// posts liquidation info to discord
schedule.scheduleJob('30 * * * *', async _ => {
schedule.scheduleJob('40 * * * *', async _ => {
console.log('logging liquidation info');
const { manager, wallet, provider } = await getVaultManager();
const EUROs = await getContract(network.name, 'EUROs');
Expand Down

0 comments on commit 01df41b

Please sign in to comment.