aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2014-08-18 00:10:33 -0700
committerAdam Soltys <[email protected]>2014-08-18 00:10:33 -0700
commit29db9e09f36f492bc02a64f56f756c21fdcc5037 (patch)
treec154cc5cbefa8c4f2acbd3d74d11a12be1b8e8e7
parent9bbf7e9fb27678abe9833a08c2a51f7c819dcc5c (diff)
downloadcoinos-server-29db9e09f36f492bc02a64f56f756c21fdcc5037.tar.gz
coinos-server-29db9e09f36f492bc02a64f56f756c21fdcc5037.zip
Keep amount in BTC units for calculations
-rw-r--r--public/js/calculator.coffee2
1 files changed, 1 insertions, 1 deletions
diff --git a/public/js/calculator.coffee b/public/js/calculator.coffee
index fde28652..4acb0f50 100644
--- a/public/js/calculator.coffee
+++ b/public/js/calculator.coffee
@@ -151,7 +151,7 @@ updateTotal = ->
precision = 9 - multiplier().toString().length
amount = parseFloat($('#amount').val() * g.tip)
total = (amount * multiplier() / g.exchange).toFixed(precision)
- g.amount_requested = total
+ g.amount_requested = (amount / g.exchange).toFixed(8)
unless $.isNumeric(total)
total = ''