Skip to content

Commit

Permalink
Write file as synchonously
Browse files Browse the repository at this point in the history
  • Loading branch information
kim201212 authored and rootwarp committed Feb 24, 2023
1 parent 3949dcf commit f493410
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ program
const receipt = await sequencer.contribute(sessionID, newContributions);
const receiptJson = JSON.stringify(receipt, null, '\t');

fs.writeFile('receipt.json', receiptJson, (err) => {
fs.writeFileSync('receipt.json', receiptJson, (err) => {
if (err) throw err;
console.log(receipt);
});
Expand Down Expand Up @@ -132,7 +132,7 @@ program
const receipt = await runCeremony(sequencer, sessionID, entropy, prevContributions);
const receiptJson = JSON.stringify(receipt, null, '\t');

fs.writeFile('receipt.json', receiptJson, (err) => {
fs.writeFileSync('receipt.json', receiptJson, (err) => {
if (err) throw err;
console.log(receipt);
});
Expand Down

0 comments on commit f493410

Please sign in to comment.