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

Commit

Permalink
Fix negative sign
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitpaulk committed Apr 9, 2015
1 parent daae691 commit 7e06d0e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/py/test_callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def test_coinbase_success_callback(self, re):
assert re.call_count == 1
assert re.call_args[0][0] == self.db
assert re.call_args[0][1].id == route.id
assert re.call_args[0][2:4] == (D('-0.99'), D('0.01')) # Amount, Fee
assert re.call_args[0][2:4] == (D('0.99'), D('0.01')) # Amount, Fee
assert re.call_args[0][4].id == alice.id
assert re.call_args[0][5] == 'succeeded' # Status

2 changes: 1 addition & 1 deletion www/callbacks/coinbase.spt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ if order:
amount = int(order['total_payout']['cents']) * D('0.01')
fee = int(order['total_native']['cents']) * D('0.01') - amount

record_exchange(website.db, route, -amount, fee, participant, 'succeeded')
record_exchange(website.db, route, amount, fee, participant, 'succeeded')
# TODO - handle mispayments

[---] text/plain

0 comments on commit 7e06d0e

Please sign in to comment.