aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--public/js/wallet.coffee7
-rw-r--r--views/users/wallet.html2
2 files changed, 8 insertions, 1 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))
+ )
)
diff --git a/views/users/wallet.html b/views/users/wallet.html
index 0ea2d187..fac7ac4b 100644
--- a/views/users/wallet.html
+++ b/views/users/wallet.html
@@ -30,7 +30,7 @@
<button id="currency_toggle" type="button" class="btn">BTC</button>
</span>
<span class="input-group-btn">
- <button type="button" class="btn">Max</button>
+ <button id="max" type="button" class="btn">Max</button>
</span>
</div>
</div>