diff --git a/gratipay/utils/history.py b/gratipay/utils/history.py index 166d53a6fc..0e0cc45184 100644 --- a/gratipay/utils/history.py +++ b/gratipay/utils/history.py @@ -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) diff --git a/www/%username/history/index.html.spt b/www/%username/history/index.html.spt index 74dccf0368..c47fca72f1 100644 --- a/www/%username/history/index.html.spt +++ b/www/%username/history/index.html.spt @@ -118,7 +118,11 @@ else: {{ translated_status[event['status']] }} {% 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'] %}—{{ event['note'] }}{% endif %} {% elif event['note'] %} “{{ event['note'] }}”—