Skip to content

Commit

Permalink
Fix getAddress() so it correctly finds the address to which the first…
Browse files Browse the repository at this point in the history
… input was sent.
  • Loading branch information
dooglus committed Oct 28, 2015
1 parent e714724 commit 6b26cd2
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions script.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,7 @@ function getAddress($trans)
die("Error with getting transaction details.\nYou should add 'txindex=1' to your .conf file and then run the daemon with the -reindex parameter.");
}

if ($vinvout == 1)
$vinvout = 0;
else
$vinvout = 1;

$address = $transactionin['vout'][!$vinvout]['scriptPubKey']['addresses'][0];
$address = $transactionin['vout'][$vinvout]['scriptPubKey']['addresses'][0];
return $address;
}

Expand Down

0 comments on commit 6b26cd2

Please sign in to comment.