Skip to content

Commit

Permalink
fix: improve logging of reverse swaps (#66)
Browse files Browse the repository at this point in the history
* fix: improve logging of reverse swaps
  • Loading branch information
michael1011 authored and ImmanuelSegol committed Jan 15, 2019
1 parent 3abca51 commit cd700c5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/swap/SwapManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ class SwapManager {
const { sendingCurrency, receivingCurrency } = this.getCurrencies(baseCurrency, quoteCurrency, orderSide);

this.logger.silly(`Sending ${sendingCurrency.symbol} on the chain and receiving ${receivingCurrency.symbol} on Lightning`);
this.logger.verbose(`Creating new reverse Swap from ${receivingCurrency.symbol} to ${sendingCurrency.symbol}` +
this.logger.verbose(`Creating new reverse Swap from ${receivingCurrency.symbol} to ${sendingCurrency.symbol} ` +
`for public key: ${getHexString(claimPublicKey)}`);

const { blocks } = await sendingCurrency.chainClient.getInfo();
Expand All @@ -159,9 +159,9 @@ class SwapManager {

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

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

const { tx, vout } = await sendingCurrency.wallet.sendToAddress(address, OutputType.Compatibility, true, sendingAmount);
this.logger.debug(`Sending ${sendingAmount} on ${sendingCurrency.symbol} to swap address ${address}: ${tx.getId()}`);

const rawTx = tx.toHex();

await sendingCurrency.chainClient.sendRawTransaction(rawTx);
Expand Down

0 comments on commit cd700c5

Please sign in to comment.