@atomiqlabs/sdk 8.6.8 → 8.6.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/swaps/escrow_swaps/frombtc/ln/FromBTCLNWrapper.js +1 -1
- package/dist/swaps/escrow_swaps/frombtc/onchain/FromBTCWrapper.js +1 -1
- package/package.json +1 -1
- package/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNWrapper.ts +1 -1
- package/src/swaps/escrow_swaps/frombtc/onchain/FromBTCWrapper.ts +1 -1
|
@@ -217,7 +217,7 @@ class FromBTCLNWrapper extends IFromBTCLNWrapper_1.IFromBTCLNWrapper {
|
|
|
217
217
|
if (decodedPr.timeExpireDate == null)
|
|
218
218
|
throw new IntermediaryError_1.IntermediaryError("Invalid returned swap invoice, no expiry date field");
|
|
219
219
|
const amountIn = (BigInt(decodedPr.millisatoshis) + 999n) / 1000n;
|
|
220
|
-
const swapFeeBtc = resp.swapFee * amountIn / (resp.total
|
|
220
|
+
const swapFeeBtc = resp.swapFee * amountIn / (resp.total + resp.swapFee);
|
|
221
221
|
try {
|
|
222
222
|
this.verifyReturnedData(resp, amountData, lp, _options, decodedPr, paymentHash);
|
|
223
223
|
const [pricingInfo] = await Promise.all([
|
|
@@ -309,7 +309,7 @@ class FromBTCWrapper extends IFromBTCWrapper_1.IFromBTCWrapper {
|
|
|
309
309
|
}, undefined, e => e instanceof RequestError_1.RequestError, abortController.signal);
|
|
310
310
|
const data = new this._swapDataDeserializer(resp.data);
|
|
311
311
|
data.setClaimer(recipient);
|
|
312
|
-
const swapFeeBtc = resp.swapFee * resp.amount / (data.getAmount()
|
|
312
|
+
const swapFeeBtc = resp.swapFee * resp.amount / (data.getAmount() + resp.swapFee);
|
|
313
313
|
this.verifyReturnedData(recipient, resp, amountData, lp, _options, data, sequence, (await claimerBountyPrefetchPromise), nativeTokenAddress);
|
|
314
314
|
const [pricingInfo, signatureExpiry] = await Promise.all([
|
|
315
315
|
//Get intermediary's liquidity
|
package/package.json
CHANGED
|
@@ -334,7 +334,7 @@ export class FromBTCLNWrapper<
|
|
|
334
334
|
if(decodedPr.timeExpireDate==null) throw new IntermediaryError("Invalid returned swap invoice, no expiry date field");
|
|
335
335
|
const amountIn = (BigInt(decodedPr.millisatoshis) + 999n) / 1000n;
|
|
336
336
|
|
|
337
|
-
const swapFeeBtc = resp.swapFee * amountIn / (resp.total
|
|
337
|
+
const swapFeeBtc = resp.swapFee * amountIn / (resp.total + resp.swapFee);
|
|
338
338
|
|
|
339
339
|
try {
|
|
340
340
|
this.verifyReturnedData(resp, amountData, lp, _options, decodedPr, paymentHash);
|
|
@@ -487,7 +487,7 @@ export class FromBTCWrapper<
|
|
|
487
487
|
const data: T["Data"] = new this._swapDataDeserializer(resp.data);
|
|
488
488
|
data.setClaimer(recipient);
|
|
489
489
|
|
|
490
|
-
const swapFeeBtc = resp.swapFee * resp.amount / (data.getAmount()
|
|
490
|
+
const swapFeeBtc = resp.swapFee * resp.amount / (data.getAmount() + resp.swapFee);
|
|
491
491
|
|
|
492
492
|
this.verifyReturnedData(recipient, resp, amountData, lp, _options, data, sequence, (await claimerBountyPrefetchPromise)!, nativeTokenAddress);
|
|
493
493
|
const [pricingInfo, signatureExpiry] = await Promise.all([
|