Skip to content

Commit

Permalink
Array index out of range
Browse files Browse the repository at this point in the history
  • Loading branch information
cyyber authored and dabura667 committed Apr 19, 2020
1 parent b35693d commit d17b822
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions js/coin.js
Original file line number Diff line number Diff line change
Expand Up @@ -1381,10 +1381,10 @@

r.getInputValues = function() {
var self = this;
for (var i = 0; i < self.ins.length; i++) {
var utxo_txid = self.ins[i].outpoint.hash;
var utxo_index = self.ins[i].outpoint.index;
var utxo_address = self.extractAddress(i);
for (var k = 0; k < self.ins.length; k++) {
var utxo_txid = self.ins[k].outpoint.hash;
var utxo_index = self.ins[k].outpoint.index;
var utxo_address = self.extractAddress(k);
$.ajax ({
type: "GET",
cache: false,
Expand All @@ -1403,7 +1403,7 @@
for(var i in data){
if (utxo_txid == data[i].txid
&& utxo_index == data[i].vout) {
self.ins[i].value = new BigInteger('' + Math.round((data[i].amount*1) * 1e8), 10);
self.ins[k].value = new BigInteger('' + Math.round((data[i].amount*1) * 1e8), 10);
}
}
} else {
Expand Down

0 comments on commit d17b822

Please sign in to comment.