fix: wallet file checking

This commit is contained in:
Sérgio Salgado 2022-02-03 22:08:44 +00:00
parent 2da14d64b3
commit 7a4aba4869
2 changed files with 3 additions and 4 deletions

View file

@ -8,7 +8,7 @@ const binanceus = require('../exchange/binanceus')
const cex = require('../exchange/cex') const cex = require('../exchange/cex')
const ftx = require('../exchange/ftx') const ftx = require('../exchange/ftx')
const bitpay = require('../ticker/bitpay') const bitpay = require('../ticker/bitpay')
const { BTC, BCH, DASH, ETH, LTC, ZEC, USDT, XMR } = COINS const { BTC, BCH, DASH, ETH, LTC, ZEC, USDT } = COINS
const ALL = { const ALL = {
cex: cex, cex: cex,
@ -19,7 +19,7 @@ const ALL = {
itbit: itbit, itbit: itbit,
bitpay: bitpay, bitpay: bitpay,
coinbase: { coinbase: {
CRYPTO: [BTC, ETH, LTC, DASH, ZEC, BCH, USDT, XMR], CRYPTO: [BTC, ETH, LTC, DASH, ZEC, BCH, USDT],
FIAT: 'ALL_CURRENCIES' FIAT: 'ALL_CURRENCIES'
} }
} }

View file

@ -42,8 +42,7 @@ function handleError (error) {
{ {
if ( if (
fs.existsSync(path.resolve(walletDir, 'Wallet')) && fs.existsSync(path.resolve(walletDir, 'Wallet')) &&
fs.existsSync(path.resolve(walletDir, 'Wallet.keys')) && fs.existsSync(path.resolve(walletDir, 'Wallet.keys'))
fs.existsSync(path.resolve(walletDir, 'Wallet.address.txt'))
) { ) {
logger.debug('Found wallet! Opening wallet...') logger.debug('Found wallet! Opening wallet...')
return openWallet() return openWallet()