aboutsummaryrefslogtreecommitdiffstats
path: root/public/js/calculator.coffee
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2014-06-14 23:07:26 -0700
committerAdam Soltys <[email protected]>2014-06-14 23:07:26 -0700
commiteeb39fc0d0f3c47faf6a4a721ce0c203a7832dc9 (patch)
tree019a98ab99002e750328e8e2546ce4b2b8a0d421 /public/js/calculator.coffee
parent26a8814cb9a267e3d44fb9d09f02da4c70af8600 (diff)
downloadcoinos-server-eeb39fc0d0f3c47faf6a4a721ce0c203a7832dc9.tar.gz
coinos-server-eeb39fc0d0f3c47faf6a4a721ce0c203a7832dc9.zip
Get rates from bitcoinaverage.com
Diffstat (limited to 'public/js/calculator.coffee')
-rw-r--r--public/js/calculator.coffee12
1 files changed, 6 insertions, 6 deletions
diff --git a/public/js/calculator.coffee b/public/js/calculator.coffee
index 72af1987..b0c69300 100644
--- a/public/js/calculator.coffee
+++ b/public/js/calculator.coffee
@@ -20,6 +20,7 @@ $(->
g.title = get('title')
g.address = get('address')
g.symbol = get('symbol')
+ g.currency = get('currency')
g.commission = parseFloat(get('commission'))
g.logo = get('logo')
g.errors = []
@@ -33,6 +34,7 @@ $(->
if data?
g.title = data.title
g.address = data.address
+ g.currency = data.currency
g.symbol = data.symbol
g.commission = data.commission
g.logo = data.logo
@@ -64,7 +66,7 @@ activateTip = (p) ->
setup = ->
g.address or= '1VAnbtCAnYccECnjaMCPnWwt81EHCVgNr'
g.commission or= 0
- g.symbol or= 'mtgoxUSD'
+ g.symbol or= 'quadrigacx'
if g.title
$('#title').html(g.title).show()
@@ -83,10 +85,8 @@ setup = ->
else
fail(ADDRESS_FAIL)
- symbol = g.symbol
-
- $('#symbol').html(symbol)
- $('#currency').html(g.symbol.slice(-3))
+ $('#symbol').html(g.currency)
+ $('#currency').html(g.currency)
$('#received').hide()
setupSocket()
@@ -94,7 +94,7 @@ setup = ->
fetchExchangeRate = ->
$.ajax(
- url: "ticker?symbol=#{g.symbol}&type=bid&amount=1000",
+ url: "ticker?currency=#{g.currency}&symbol=#{g.symbol}&type=bid",
success: (exchange) ->
if exchange?
clear(EXCHANGE_FAIL)