Skip to content

Commit

Permalink
fix: rate of reverse swaps (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
michael1011 committed Jan 13, 2019
1 parent 7ecbd84 commit c5466e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/swap/SwapManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ class SwapManager {
const outputScript = p2shP2wshOutput(redeemScript);
const address = sendingCurrency.wallet.encodeAddress(outputScript);

const sendingAmount = this.calculateExpectedAmount(amount, this.getRate(rate, orderSide));
const sendingAmount = this.calculateExpectedAmount(amount, 1 / this.getRate(rate, orderSide));

this.logger.debug(`Sending ${sendingAmount} on ${sendingCurrency.symbol} to swap address: ${address}`);

Expand Down

0 comments on commit c5466e6

Please sign in to comment.