Skip to content

Commit

Permalink
spend unconfirmed utxos
Browse files Browse the repository at this point in the history
  • Loading branch information
loon3 committed Apr 5, 2019
1 parent e1ea67b commit 9ccd441
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions Chrome Extension/js/btc.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,19 @@ function getutxos(add_from, mnemonic, amountremaining, callback){

$.getJSON( source_html, function( data ) {

data = data.txrefs

if(!data.txrefs){
if(data.unconfirmed_txrefs){
data = data.unconfirmed_txrefs
} else {
callback(total_utxo, satoshi_change);
}
} else {
data = data.txrefs
}

console.log(amountremaining);

console.log(data);

if(!data){
callback(total_utxo, satoshi_change);
}
Expand Down

0 comments on commit 9ccd441

Please sign in to comment.