Fixed backup note bug

This commit is contained in:
Ayanami 2022-01-14 22:16:10 +09:00
parent a08c6dbfb9
commit 5e79fec40d
No known key found for this signature in database
GPG Key ID: 0CABDF03077D92E4

2
cli.js
View File

@ -123,7 +123,7 @@ function createDeposit({ nullifier, secret }) {
async function backupNote({ currency, amount, netId, note, noteString }) { async function backupNote({ currency, amount, netId, note, noteString }) {
try { try {
await fs.writeFileSync(`./backup-tornado-${currency}-${amount}-${netId}-${note.slice(0, 10)}.txt`, noteString, 'utf8'); await fs.writeFileSync(`./backup-tornado-${currency}-${amount}-${netId}-${note.slice(0, 10)}.txt`, noteString, 'utf8');
console.log("Backed up deposit note as",fileName) console.log("Backed up deposit note as",`./backup-tornado-${currency}-${amount}-${netId}-${note.slice(0, 10)}.txt`)
} catch (e) { } catch (e) {
throw new Error('Writing backup note failed:',e) throw new Error('Writing backup note failed:',e)
} }