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

Commit

Permalink
feat(Buy): set trade amounts
Browse files Browse the repository at this point in the history
  • Loading branch information
Philip Welber committed Jan 11, 2018
1 parent 2037e62 commit dacb349
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/trade.js
Expand Up @@ -48,6 +48,10 @@ class Trade extends Exchange.Trade {
this._feeAmount = obj.fee_amount;
this._feeCurrency = obj.fee_currency;
this._receiveAmount = obj.quote_amount - obj.fee_amount;
} else if (obj.quote_currency === 'usd' && obj.action === 'buy') {
this._inAmount = obj.quote_amount;
this._sendAmount = obj.quote_amount;
this._receiveAmount = obj.base_amount;
} else {
this._inAmount = toSatoshi(obj.quote_amount);
this._sendAmount = toSatoshi(obj.quote_amount);
Expand Down

0 comments on commit dacb349

Please sign in to comment.