aboutsummaryrefslogtreecommitdiffstats
path: root/public
diff options
context:
space:
mode:
Diffstat (limited to 'public')
-rw-r--r--public/js/wallet.coffee7
1 files changed, 7 insertions, 0 deletions
diff --git a/public/js/wallet.coffee b/public/js/wallet.coffee
index 7399973d..606c1f7d 100644
--- a/public/js/wallet.coffee
+++ b/public/js/wallet.coffee
@@ -45,6 +45,13 @@ $(->
$(this).html('BTC')
)
+
+ $('#max').click(->
+ if $('#currency_toggle').html() is 'BTC'
+ $('#amount').val(g.balance)
+ else
+ $('#amount').val((g.balance * g.exchange).toFixed(2))
+ )
)