Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
at 20:09 of 2017-02-11
  • Loading branch information
nrobinson2000 committed Nov 3, 2017
1 parent 7839111 commit e6483a2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 6 additions & 0 deletions index.html
Expand Up @@ -27,6 +27,12 @@

<script>
document.getElementById("donatemessage").innerHTML = "<h1>Donate Bitcoin to " + organization +"</h1>";

if (!isNaN(parseFloat(params.amount)))
{
document.getElementById("donatebox").value = parseFloat(params.amount);
}

</script>
</body>
<html>
3 changes: 1 addition & 2 deletions index.js
Expand Up @@ -49,7 +49,6 @@ if (params.qrcode == "false"){qrcode = false};
if (params.link == "true"){link = true};
if (params.link == "false"){link = false};
if (params.name){organization = turnName(params.name);}
if (params.amount){defaultAmountToDonate = params.amount;}

if (params.mbits == "true"){mbits = true};
if (params.mbits == "false"){mbits = false};
Expand Down Expand Up @@ -98,7 +97,7 @@ function handlePricingError(currencyExchangeResponse) {
}

function computeBitcoinAmount(fiatDonationAmount, bitcoin_price) {
var bitcoinAmountToDonate = (fiatDonationAmount / bitcoin_price).toFixed(5);
var bitcoinAmountToDonate = (fiatDonationAmount / bitcoin_price).toFixed(8);
return bitcoinAmountToDonate;
}

Expand Down

0 comments on commit e6483a2

Please sign in to comment.