@atomiqlabs/sdk 8.7.5 → 8.7.6
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
|
@@ -221,7 +221,7 @@ class FromBTCLNWrapper extends IFromBTCLNWrapper_1.IFromBTCLNWrapper {
|
|
|
221
221
|
if (decodedPr.timeExpireDate == null)
|
|
222
222
|
throw new IntermediaryError_1.IntermediaryError("Invalid returned swap invoice, no expiry date field");
|
|
223
223
|
const amountIn = (BigInt(decodedPr.millisatoshis) + 999n) / 1000n;
|
|
224
|
-
const swapFeeBtc = resp.swapFee * amountIn / (resp.total
|
|
224
|
+
const swapFeeBtc = resp.swapFee * amountIn / (resp.total + resp.swapFee);
|
|
225
225
|
try {
|
|
226
226
|
this.verifyReturnedData(resp, amountData, lp, _options, decodedPr, paymentHash);
|
|
227
227
|
const [pricingInfo] = await Promise.all([
|
|
@@ -335,7 +335,7 @@ class FromBTCWrapper extends IFromBTCWrapper_1.IFromBTCWrapper {
|
|
|
335
335
|
}, undefined, e => e instanceof RequestError_1.RequestError, abortController.signal);
|
|
336
336
|
const data = new (this._swapDataDeserializer(version))(resp.data);
|
|
337
337
|
data.setClaimer(recipient);
|
|
338
|
-
const swapFeeBtc = resp.swapFee * resp.amount / (data.getAmount()
|
|
338
|
+
const swapFeeBtc = resp.swapFee * resp.amount / (data.getAmount() + resp.swapFee);
|
|
339
339
|
this.verifyReturnedData(recipient, resp, amountData, lp, _options, data, sequence, (await claimerBountyPrefetchPromise[version]), nativeTokenAddress);
|
|
340
340
|
const [pricingInfo, signatureExpiry] = await Promise.all([
|
|
341
341
|
//Get intermediary's liquidity
|
package/package.json
CHANGED
|
@@ -342,7 +342,7 @@ export class FromBTCLNWrapper<
|
|
|
342
342
|
if(decodedPr.timeExpireDate==null) throw new IntermediaryError("Invalid returned swap invoice, no expiry date field");
|
|
343
343
|
const amountIn = (BigInt(decodedPr.millisatoshis) + 999n) / 1000n;
|
|
344
344
|
|
|
345
|
-
const swapFeeBtc = resp.swapFee * amountIn / (resp.total
|
|
345
|
+
const swapFeeBtc = resp.swapFee * amountIn / (resp.total + resp.swapFee);
|
|
346
346
|
|
|
347
347
|
try {
|
|
348
348
|
this.verifyReturnedData(resp, amountData, lp, _options, decodedPr, paymentHash);
|
|
@@ -528,7 +528,7 @@ export class FromBTCWrapper<
|
|
|
528
528
|
const data: T["Data"] = new (this._swapDataDeserializer(version))(resp.data);
|
|
529
529
|
data.setClaimer(recipient);
|
|
530
530
|
|
|
531
|
-
const swapFeeBtc = resp.swapFee * resp.amount / (data.getAmount()
|
|
531
|
+
const swapFeeBtc = resp.swapFee * resp.amount / (data.getAmount() + resp.swapFee);
|
|
532
532
|
|
|
533
533
|
this.verifyReturnedData(recipient, resp, amountData, lp, _options, data, sequence, (await claimerBountyPrefetchPromise[version])!, nativeTokenAddress);
|
|
534
534
|
const [pricingInfo, signatureExpiry] = await Promise.all([
|