diff --git a/lib/cash-in/cash-in-tx.js b/lib/cash-in/cash-in-tx.js index 0e7b71ef..2da9f8da 100644 --- a/lib/cash-in/cash-in-tx.js +++ b/lib/cash-in/cash-in-tx.js @@ -223,7 +223,8 @@ function cancel (txId) { const updateRec = { error: 'Operator cancel', error_code: 'operatorCancel', - operator_completed: true + operator_completed: true, + batch_id: null } return Promise.resolve() diff --git a/lib/tx-batching-processing.js b/lib/tx-batching-processing.js index 1e7045d1..94f4791d 100644 --- a/lib/tx-batching-processing.js +++ b/lib/tx-batching-processing.js @@ -6,7 +6,8 @@ const wallet = require('./wallet') function submitBatch (settings, batch) { txBatching.getBatchTransactions(batch) .then(txs => { - wallet.sendCoinsBatch(settings, txs, batch.crypto_code) + if (_.isEmpty(txs)) return Promise.resolve() + return wallet.sendCoinsBatch(settings, txs, batch.crypto_code) .then(res => txBatching.confirmSentBatch(batch, res)) .catch(err => txBatching.setErroredBatch(batch, err.message)) }) diff --git a/new-lamassu-admin/src/pages/Transactions/DetailsCard.js b/new-lamassu-admin/src/pages/Transactions/DetailsCard.js index a8577237..fe0e208c 100644 --- a/new-lamassu-admin/src/pages/Transactions/DetailsCard.js +++ b/new-lamassu-admin/src/pages/Transactions/DetailsCard.js @@ -383,7 +383,8 @@ const DetailsRow = ({ it: tx, timezone }) => { ) : ( errorElements )} - {tx.txClass === 'cashOut' && getStatus(tx) === 'Pending' && ( + {((tx.txClass === 'cashOut' && getStatus(tx) === 'Pending') || + (tx.txClass === 'cashIn' && getStatus(tx) === 'Batched')) && (