aboutsummaryrefslogtreecommitdiffstats
path: root/public/js/calculator.coffee
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2014-09-03 14:34:22 -0700
committerAdam Soltys <[email protected]>2014-09-03 14:34:22 -0700
commitcd55bb01756ba97fe808c5818e29b0a516737afb (patch)
treebc2b093464e58a5b4a1f40e163c29351f9dda0e5 /public/js/calculator.coffee
parent2f65c2ad5d2c4b9fd2ec143aedf60cce01eef660 (diff)
downloadcoinos-server-cd55bb01756ba97fe808c5818e29b0a516737afb.tar.gz
coinos-server-cd55bb01756ba97fe808c5818e29b0a516737afb.zip
Separate account profile settings
Diffstat (limited to 'public/js/calculator.coffee')
-rw-r--r--public/js/calculator.coffee12
1 files changed, 7 insertions, 5 deletions
diff --git a/public/js/calculator.coffee b/public/js/calculator.coffee
index 64a26a65..edbd4fa9 100644
--- a/public/js/calculator.coffee
+++ b/public/js/calculator.coffee
@@ -54,14 +54,15 @@ setup = ->
g.user.symbol or= 'quadrigacx'
g.user.unit or= 'BTC'
+ if g.user.title
+ $('#title').html("<a href='/#{g.user.username}/edit'>#{g.user.title}</a>").show()
+
if g.user.logo
$('#logo').attr('src', g.user.logo).show()
- else if g.user.title
- $('#title').html("<a href='/#{g.user.username}/edit'>#{g.user.title}</a>").show()
getAddress() if g.user.bip32
- $('#symbol').html(g.user.symbol + " bid")
+ $('#symbol').html(g.user.currency)
$('#currency').html(g.user.currency)
$('#unit').html(g.user.unit)
$('#received').hide()
@@ -80,8 +81,8 @@ fetchExchangeRate = ->
fail(EXCHANGE_FAIL)
return
- g.exchange = exchange - exchange * g.user.commission * 0.01
- $('#exchange').val(g.exchange.toFixed(2))
+ g.exchange = (exchange - exchange * g.user.commission * 0.01).toFixed(2)
+ $('#exchange').html(g.exchange)
updateTotal()
unless g.setupComplete
@@ -232,6 +233,7 @@ multiplier = ->
when 'BTC' then 1
when 'mBTC' then 1000
when 'µBTC' then 1000000
+ when 'bits' then 1000000
when 'satoshis' then 100000000