Skip to content

Commit

Permalink
Update wallet.js
Browse files Browse the repository at this point in the history
  • Loading branch information
f-r00t committed Feb 19, 2024
1 parent f659a56 commit 5d53943
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions utils/wallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,15 @@ async function openWallet(daemon) {
*/
async function saveWallet(wallet) {
log.info(getTimestamp() + ' INFO: Saving wallet...')

let encrypted_wallet
let mnemonicSeed
let walletExists

try {
const encrypted_wallet = await wallet.encryptWalletToString('hugin')
const mnemonicSeed = await wallet.getMnemonicSeed()
const walletExists = await walletExistsInDb();
encrypted_wallet = await wallet.encryptWalletToString('hugin')
mnemonicSeed = await wallet.getMnemonicSeed()
walletExists = await walletExistsInDb();
} catch (err) {
log.info(getTimestamp() + 'Error:' + err);
}
Expand Down

0 comments on commit 5d53943

Please sign in to comment.