Skip to content

Commit

Permalink
remove deprecated cltv delta value for swap out
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbosworth committed Oct 23, 2020
1 parent b80aa3e commit 2803b1c
Show file tree
Hide file tree
Showing 13 changed files with 6,107 additions and 44 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Versions

## 8.0.0

- `getSwapOutQuote`: remove `cltv_delta` from response

### Breaking Change

- `getSwapOutQuote`: `cltv_delta` is undefined, use the `cltv_delta` from the request instead

## 7.1.2

- `decodeSwapRecovery`: Pull out version field from recovery details
Expand Down
2 changes: 1 addition & 1 deletion chain/subscribe_to_blocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const tickDelayMs = 20;
{
[delay]: <Poll Delay Milliseconds Number> // default 10 minutes
[lnd]: <Authenticated LND gRPC Object>
[lnd]: <Authenticated LND API Object>
[network]: <Network Name String>
[request]: <Request Function>
}
Expand Down
2 changes: 1 addition & 1 deletion lightninglabs/create_swap_in.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const preimageLen = 32;
[private_key]: <Refund Private Key Hex String>
[public_key]: <Refund Public Key Hex String>
request: <BOLT 11 Payment Request String>
service: <gRPC Swap Service API Object>
service: <Swap Service API Object>
}
@returns via cbk or Promise
Expand Down
5 changes: 0 additions & 5 deletions lightninglabs/get_swap_out_quote.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,6 @@ module.exports = (args, cbk) => {

// Loop out quote
quote: ['getQuote', ({getQuote}, cbk) => {
if (!getQuote.cltv_delta) {
return cbk([503, 'ExpectedCltvDeltaInSwapQuoteResponse']);
}

if (!getQuote.prepay_amt) {
return cbk([503, 'ExpectedPrepayAmountInSwapQuoteResponse']);
}
Expand All @@ -107,7 +103,6 @@ module.exports = (args, cbk) => {
}

return cbk(null, {
cltv_delta: getQuote.cltv_delta,
deposit: Number(getQuote.prepay_amt),
destination: getQuote.swap_payment_dest,
fee: Number(getQuote.swap_fee),
Expand Down
Loading

0 comments on commit 2803b1c

Please sign in to comment.