Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Commit

Permalink
Fix how bitcoin payins are shown on history page
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitpaulk committed Apr 9, 2015
1 parent 7e06d0e commit 30fad5d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
8 changes: 6 additions & 2 deletions gratipay/utils/history.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,12 @@ def iter_payday_events(db, participant, year=None):

username = participant.username
exchanges = db.all("""
SELECT *
FROM exchanges
SELECT *,
( SELECT r.*::exchange_routes
FROM exchange_routes r
WHERE r.id = e.route
) AS route
FROM exchanges e
WHERE participant=%(username)s
AND extract(year from timestamp) = %(year)s
""", locals(), back_as=dict)
Expand Down
6 changes: 5 additions & 1 deletion www/%username/history/index.html.spt
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,11 @@ else:
<td class="status">{{ translated_status[event['status']] }}</td>
<td class="notes">
{% if event['recorder'] == None %}
{{ _("Automatic Charge").lower() }}
{% if event['route'].network == 'balanced-cc' %}
{{ _("Automatic Charge").lower() }}
{% elif event['route'].network == 'coinbase-payin' %}
{{ _("Bitcoin Payin").lower() }}
{% endif %}
{% if event['note'] %}&mdash;{{ event['note'] }}{% endif %}
{% elif event['note'] %}
&ldquo;{{ event['note'] }}&rdquo;&mdash;
Expand Down

0 comments on commit 30fad5d

Please sign in to comment.