Skip to content

Commit

Permalink
documentation and removed debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
grandsmarquis committed Jun 5, 2019
1 parent 7420760 commit 4b3e0cd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
4 changes: 4 additions & 0 deletions packages/client/lib/Swap.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,11 @@ export default class Swap {
/**
* Refund the swap
* @param {!string} initiationTxHash - The transaction hash of the swap initiation.
* @param {!string} recipientAddress - Recepient address for the swap in hex.
* @param {!string} refundAddress - Refund address for the swap in hex.
* @param {!string} secretHash - Secret hash for the swap in hex.
* @param {!number} expiration - Expiration time for the swap.
* @param {!number} startBlock - The minimum block to start the search from
* @return {Promise<string, TypeError>} Resolves with refund swap transaction hash.
* Rejects with InvalidProviderResponseError if provider's response is invalid.
*/
Expand Down
8 changes: 0 additions & 8 deletions packages/ethereum-swap-provider/lib/EthereumSwapProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,6 @@ export default class EthereumSwapProvider extends Provider {
while (!refundSwapTransaction) {
const block = await this.getMethod('getBlockByNumber')(blockNumber, true)
if (block) {
console.log(block.transactions)
for (const transaction of block.transactions) {
console.log( transaction.to === initiationTransaction.contractAddress,initiationTransaction.contractAddress, transaction.to)
console.log( transaction.input === '');
console.log(block.timestamp >= expiration);
console.log(block.timestamp, expiration)
}
refundSwapTransaction = block.transactions.find(transaction =>
transaction.to === initiationTransaction.contractAddress &&
transaction.input === '' &&
Expand All @@ -198,7 +191,6 @@ export default class EthereumSwapProvider extends Provider {

blockNumber++
}
console.log(refundSwapTransaction)
await sleep(5000)
}
return refundSwapTransaction
Expand Down

0 comments on commit 4b3e0cd

Please sign in to comment.