Browse Source

Fix Bitcoin donation QR code

master
Sven Slootweg 6 years ago
parent
commit
ee2986fde3
  1. 8
      frontend/lib/donate.coffee
  2. 17936
      public/js/bundle.js

8
frontend/lib/donate.coffee

@ -20,14 +20,16 @@ $ ->
block.find(".loaded-content").hide()
$.get "/donate/convert/btc?amount=#{selectedAmount}", (btcAmount) ->
$.get "/donate/bip21?amount=#{btcAmount}", (uri) ->
roundedAmount = Math.round(btcAmount * 100000000) / 100000000
$.get "/donate/bip21?amount=#{roundedAmount}", (uri) ->
$(".bip21").attr("href", uri)
block.find(".loading-message").hide()
block.find(".loaded-content").show()
$(".bip21-qr").attr("src", "/donate/bip21/qr?amount=#{btcAmount}")
$(".btc-amount").text(Math.round(btcAmount * 100000000) / 100000000)
$(".bip21-qr").attr("src", "/donate/bip21/qr?amount=#{roundedAmount}")
$(".btc-amount").text(roundedAmount)
setCustomValue = (value) ->
value = parseFloat(value)

17936
public/js/bundle.js
File diff suppressed because it is too large
View File

Loading…
Cancel
Save