txdb: fix getMember.
This commit is contained in:
parent
e8cb71447c
commit
de55c82227
@ -3212,7 +3212,7 @@ RPC.prototype._toListTX = function _toListTX(tx, callback) {
|
||||
account: member.path.name,
|
||||
address: member.address.toBase58(self.network),
|
||||
category: receive ? 'receive' : 'send',
|
||||
amount: +utils.btc(member.value),
|
||||
amount: +utils.btc(details.getValue()),
|
||||
label: member.path.name,
|
||||
vout: 0,
|
||||
confirmations: details.confirmations,
|
||||
|
||||
@ -2135,17 +2135,13 @@ Details.prototype.getValue = function getValue() {
|
||||
|
||||
Details.prototype.getMember = function getMember() {
|
||||
var receive = this.isReceive();
|
||||
var vector = receive ? this.outputs : this.inputs;
|
||||
var i, member;
|
||||
|
||||
for (i = 0; i < this.outputs.length; i++) {
|
||||
member = this.outputs[i];
|
||||
if (receive) {
|
||||
if (!member.path)
|
||||
continue;
|
||||
} else {
|
||||
if (member.path)
|
||||
continue;
|
||||
}
|
||||
for (i = 0; i < vector.length; i++) {
|
||||
member = vector[i];
|
||||
if (!member.path)
|
||||
continue;
|
||||
return member;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user