File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 2727
2828< script >
2929document . getElementById ( "donatemessage" ) . innerHTML = "<h1>Donate Bitcoin to " + organization + "</h1>" ;
30+
31+ if ( ! isNaN ( parseFloat ( params . amount ) ) )
32+ {
33+ document . getElementById ( "donatebox" ) . value = parseFloat ( params . amount ) ;
34+ }
35+
3036</ script >
3137</ body >
3238< html >
Original file line number Diff line number Diff line change @@ -49,7 +49,6 @@ if (params.qrcode == "false"){qrcode = false};
4949if ( params . link == "true" ) { link = true } ;
5050if ( params . link == "false" ) { link = false } ;
5151if ( params . name ) { organization = turnName ( params . name ) ; }
52- if ( params . amount ) { defaultAmountToDonate = params . amount ; }
5352
5453if ( params . mbits == "true" ) { mbits = true } ;
5554if ( params . mbits == "false" ) { mbits = false } ;
@@ -98,7 +97,7 @@ function handlePricingError(currencyExchangeResponse) {
9897}
9998
10099function computeBitcoinAmount ( fiatDonationAmount , bitcoin_price ) {
101- var bitcoinAmountToDonate = ( fiatDonationAmount / bitcoin_price ) . toFixed ( 5 ) ;
100+ var bitcoinAmountToDonate = ( fiatDonationAmount / bitcoin_price ) . toFixed ( 8 ) ;
102101 return bitcoinAmountToDonate ;
103102}
104103
You can’t perform that action at this time.
0 commit comments