@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.
@@ -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
- [ticker: string]: {
63
- [chainId: string]: {
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
- [ticker: string]: {
32
- [chainId: string]: {
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 || this.config.baseFee,
28
- feePPM: res.feePPM || this.config.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 || this.config.baseFee,
23
- feePPM: res.feePPM || this.config.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atomiqlabs/lp-lib",
3
- "version": "17.3.0",
3
+ "version": "17.3.1",
4
4
  "description": "Main functionality implementation for atomiq LP node",
5
5
  "main": "./dist/index.js",
6
6
  "types:": "./dist/index.d.ts",
@@ -96,8 +96,8 @@ export interface IPlugin {
96
96
 
97
97
  swapPricing: ISwapPrice,
98
98
  tokens: {
99
- [ticker: string]: {
100
- [chainId: string]: {
99
+ [chainId: string]: {
100
+ [ticker: string]: {
101
101
  address: string,
102
102
  decimals: number
103
103
  }
@@ -74,8 +74,8 @@ export class PluginManager {
74
74
 
75
75
  swapPricing: ISwapPrice,
76
76
  tokens: {
77
- [ticker: string]: {
78
- [chainId: string]: {
77
+ [chainId: string]: {
78
+ [ticker: string]: {
79
79
  address: string,
80
80
  decimals: number
81
81
  }
@@ -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 || this.config.baseFee,
59
- feePPM: res.feePPM || this.config.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 || this.config.baseFee,
37
- feePPM: res.feePPM || this.config.feePPM
36
+ baseFee: res.baseFee ?? this.config.baseFee,
37
+ feePPM: res.feePPM ?? this.config.feePPM
38
38
  }
39
39
  }
40
40
  }