migration fix + removed some old incoming checking
This commit is contained in:
parent
d9a9c9f4eb
commit
71aa425dd1
5 changed files with 20 additions and 53 deletions
|
|
@ -254,19 +254,6 @@ function reapOutgoingTx(session, tx) {
|
|||
});
|
||||
}
|
||||
|
||||
function reapIncomingTx(session, tx) {
|
||||
infoPlugin.checkAddress(tx.toAddress, tx.satoshis, function(err, status,
|
||||
satoshisReceived, txHash) {
|
||||
if (err) return logger.error(err);
|
||||
if (status === 'notSeen') return;
|
||||
var newTx = _.clone(tx);
|
||||
newTx.txHash = txHash;
|
||||
db.addIncomingTx(session, newTx, status, satoshisReceived, function(err) {
|
||||
if (err) logger.error(err);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function reapTx(row) {
|
||||
var session = {fingerprint: row.device_fingerprint, id: row.session_id};
|
||||
var tx = {
|
||||
|
|
@ -276,8 +263,7 @@ function reapTx(row) {
|
|||
currencyCode: row.currency_code,
|
||||
incoming: row.incoming
|
||||
};
|
||||
if (row.incoming) reapIncomingTx(session, tx);
|
||||
else reapOutgoingTx(session, tx);
|
||||
if (!row.incoming) reapOutgoingTx(session, tx);
|
||||
}
|
||||
|
||||
function reapTxs() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue