aboutsummaryrefslogtreecommitdiffstats
path: root/public/js
diff options
context:
space:
mode:
Diffstat (limited to 'public/js')
-rw-r--r--public/js/calculator.coffee16
1 files changed, 8 insertions, 8 deletions
diff --git a/public/js/calculator.coffee b/public/js/calculator.coffee
index 6861bb16..01523d9a 100644
--- a/public/js/calculator.coffee
+++ b/public/js/calculator.coffee
@@ -7,7 +7,7 @@ g = exports ? this
$(->
g.websocket = null
- g.client = $('#client').val()
+ g.user = $('#user').val()
g.title = get('title')
g.address = get('address')
g.commission = get('commission')
@@ -18,8 +18,8 @@ $(->
setupQR()
setupSocket()
- if client? and client
- $.getJSON('client/' + client, (data) ->
+ if user? and user
+ $.getJSON(user + '.json', (data) ->
g.title = data.name
g.address = data.address
g.commission = data.commission
@@ -124,11 +124,11 @@ setupSocket = ->
$('#payment').hide()
$('#received').fadeIn('slow')
- $.get('record_transaction.php',
- address: from_address,
- date: moment().format("YYYY-MM-DD HH:mm:ss"),
- received: received,
- exchange: g.exchange
+ $.post("/#{g.user}/transactions",
+ address: from_address,
+ date: moment().format("YYYY-MM-DD HH:mm:ss"),
+ received: received,
+ exchange: g.exchange
)
get = (name) ->