|
|
@ -71,9 +71,11 @@ BlockchainMonitor._handleIncommingTx = function(data) { |
|
|
|
if (_.isEmpty(outs)) return; |
|
|
|
|
|
|
|
async.each(outs, function(out, next) { |
|
|
|
storage.fetchWalletIdByAddress(out.address, function(err, walletId) { |
|
|
|
if (err || !walletId) return next(err); |
|
|
|
storage.fetchAddress(out.address, function(err, address) { |
|
|
|
if (err || !address) return next(err); |
|
|
|
if (address.isChange) return next(); |
|
|
|
|
|
|
|
var walletId = address.walletId; |
|
|
|
log.info('Incoming tx for wallet ' + walletId + ' (' + out.address + ' -> ' + out.amount + ')'); |
|
|
|
BlockchainMonitor._createNotification(walletId, data.txid, out.address, out.amount, next); |
|
|
|
}); |
|
|
|