From b2b8eeaa85c21e5319f903002b73c571d81b54f5 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 18 Nov 2015 17:21:46 -0800 Subject: Max button --- public/js/wallet.coffee | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'public') 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)) + ) ) -- cgit v1.2.3