@atomiqlabs/lp-lib 17.3.0 → 17.3.1
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/plugins/IPlugin.d.ts +2 -2
- package/dist/plugins/PluginManager.d.ts +2 -2
- package/dist/swaps/assertions/FromBtcAmountAssertions.js +2 -2
- package/dist/swaps/assertions/ToBtcAmountAssertions.js +2 -2
- package/package.json +1 -1
- package/src/plugins/IPlugin.ts +2 -2
- package/src/plugins/PluginManager.ts +2 -2
- package/src/swaps/assertions/FromBtcAmountAssertions.ts +2 -2
- package/src/swaps/assertions/ToBtcAmountAssertions.ts +2 -2
|
@@ -59,8 +59,8 @@ export interface IPlugin {
|
|
|
59
59
|
author: string;
|
|
60
60
|
description: string;
|
|
61
61
|
onEnable(chainsData: MultichainData, bitcoinRpc: BitcoinRpc<any>, bitcoinWallet: IBitcoinWallet, lightningWallet: ILightningWallet, swapPricing: ISwapPrice, tokens: {
|
|
62
|
-
[
|
|
63
|
-
[
|
|
62
|
+
[chainId: string]: {
|
|
63
|
+
[ticker: string]: {
|
|
64
64
|
address: string;
|
|
65
65
|
decimals: number;
|
|
66
66
|
};
|
|
@@ -28,8 +28,8 @@ export declare class PluginManager {
|
|
|
28
28
|
static registerPlugin(name: string, plugin: IPlugin): void;
|
|
29
29
|
static unregisterPlugin(name: string): boolean;
|
|
30
30
|
static enable<T extends SwapData>(chainsData: MultichainData, bitcoinRpc: BitcoinRpc<any>, bitcoinWallet: IBitcoinWallet, lightningWallet: ILightningWallet, swapPricing: ISwapPrice, tokens: {
|
|
31
|
-
[
|
|
32
|
-
[
|
|
31
|
+
[chainId: string]: {
|
|
32
|
+
[ticker: string]: {
|
|
33
33
|
address: string;
|
|
34
34
|
decimals: number;
|
|
35
35
|
};
|
|
@@ -24,8 +24,8 @@ class FromBtcAmountAssertions extends AmountAssertions_1.AmountAssertions {
|
|
|
24
24
|
AmountAssertions_1.AmountAssertions.handlePluginErrorResponses(res);
|
|
25
25
|
if ((0, IPlugin_1.isQuoteSetFees)(res)) {
|
|
26
26
|
return {
|
|
27
|
-
baseFee: res.baseFee
|
|
28
|
-
feePPM: res.feePPM
|
|
27
|
+
baseFee: res.baseFee ?? this.config.baseFee,
|
|
28
|
+
feePPM: res.feePPM ?? this.config.feePPM,
|
|
29
29
|
securityDepositApyPPM: res.securityDepositApyPPM,
|
|
30
30
|
securityDepositBaseMultiplierPPM: res.securityDepositBaseMultiplierPPM
|
|
31
31
|
};
|
|
@@ -19,8 +19,8 @@ class ToBtcAmountAssertions extends AmountAssertions_1.AmountAssertions {
|
|
|
19
19
|
AmountAssertions_1.AmountAssertions.handlePluginErrorResponses(res);
|
|
20
20
|
if ((0, IPlugin_1.isQuoteSetFees)(res)) {
|
|
21
21
|
return {
|
|
22
|
-
baseFee: res.baseFee
|
|
23
|
-
feePPM: res.feePPM
|
|
22
|
+
baseFee: res.baseFee ?? this.config.baseFee,
|
|
23
|
+
feePPM: res.feePPM ?? this.config.feePPM
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
26
|
}
|
package/package.json
CHANGED
package/src/plugins/IPlugin.ts
CHANGED
|
@@ -55,8 +55,8 @@ export class FromBtcAmountAssertions extends AmountAssertions {
|
|
|
55
55
|
AmountAssertions.handlePluginErrorResponses(res);
|
|
56
56
|
if(isQuoteSetFees(res)) {
|
|
57
57
|
return {
|
|
58
|
-
baseFee: res.baseFee
|
|
59
|
-
feePPM: res.feePPM
|
|
58
|
+
baseFee: res.baseFee ?? this.config.baseFee,
|
|
59
|
+
feePPM: res.feePPM ?? this.config.feePPM,
|
|
60
60
|
securityDepositApyPPM: res.securityDepositApyPPM,
|
|
61
61
|
securityDepositBaseMultiplierPPM: res.securityDepositBaseMultiplierPPM
|
|
62
62
|
}
|
|
@@ -33,8 +33,8 @@ export class ToBtcAmountAssertions extends AmountAssertions {
|
|
|
33
33
|
AmountAssertions.handlePluginErrorResponses(res);
|
|
34
34
|
if(isQuoteSetFees(res)) {
|
|
35
35
|
return {
|
|
36
|
-
baseFee: res.baseFee
|
|
37
|
-
feePPM: res.feePPM
|
|
36
|
+
baseFee: res.baseFee ?? this.config.baseFee,
|
|
37
|
+
feePPM: res.feePPM ?? this.config.feePPM
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
}
|