Merge pull request #760 from matiu/bug/bch-monitor2

fix amount
This commit is contained in:
Matias Alejo Garcia 2018-01-19 18:31:31 -03:00 committed by GitHub
commit 41683bf10a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -158,6 +158,7 @@ BlockchainMonitor.prototype._handleIncomingPayments = function(coin, network, da
var outs = _.compact(_.map(data.vout, function(v) {
var addr = _.keys(v)[0];
var amount = +v[addr];
// This is because a bug on insight, that always return no copay addr
if (coin == 'bch' && Utils.getAddressCoin(addr) !='bch') {
@ -166,7 +167,7 @@ BlockchainMonitor.prototype._handleIncomingPayments = function(coin, network, da
return {
address: addr,
amount: +v[addr]
amount: amount,
};
}));
if (_.isEmpty(outs)) return;