@rabby-wallet/rabby-swap 0.0.9 → 0.0.10

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.
@@ -72,7 +72,7 @@ export const getQuote = (options) => __awaiter(void 0, void 0, void 0, function*
72
72
  slippagePercentage: options.slippage / 100,
73
73
  skipValidation: true,
74
74
  };
75
- if (options.feeRate) {
75
+ if (options.feeRate !== null && options.feeRate !== undefined) {
76
76
  params.buyTokenPercentageFee = options.feeRate / 100;
77
77
  params.feeRecipient = options.feeAddress;
78
78
  params.affiliateAddress = options.feeAddress;
@@ -63,7 +63,7 @@ export const getQuote = (options) => __awaiter(void 0, void 0, void 0, function*
63
63
  slippage: options.slippage,
64
64
  disableEstimate: true,
65
65
  };
66
- if (options.feeRate) {
66
+ if (options.feeRate !== null && options.feeRate !== undefined) {
67
67
  params.fee = options.feeRate;
68
68
  params.referrerAddress = options.feeAddress;
69
69
  }
@@ -84,7 +84,7 @@ export const getQuote = (options) => __awaiter(void 0, void 0, void 0, function*
84
84
  priceRoute: priceRoute,
85
85
  partner: 'Rabby',
86
86
  };
87
- if (options.feeRate) {
87
+ if (options.feeRate !== null && options.feeRate !== undefined) {
88
88
  params.partnerFeeBps = (options.feeRate * 100).toString();
89
89
  params.partnerAddress = options.feeAddress;
90
90
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rabby-wallet/rabby-swap",
3
- "version": "0.0.9",
3
+ "version": "0.0.10",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
package/src/dexs/0xapi.ts CHANGED
@@ -98,7 +98,7 @@ export const getQuote = async (options: QuoteParams): Promise<QuoteResult> => {
98
98
  skipValidation: true,
99
99
  };
100
100
 
101
- if (options.feeRate) {
101
+ if (options.feeRate !== null && options.feeRate !== undefined) {
102
102
  params.buyTokenPercentageFee = options.feeRate / 100;
103
103
  params.feeRecipient = options.feeAddress;
104
104
  params.affiliateAddress = options.feeAddress;
package/src/dexs/1inch.ts CHANGED
@@ -99,7 +99,7 @@ export const getQuote = async (options: QuoteParams): Promise<QuoteResult> => {
99
99
  disableEstimate: true,
100
100
  };
101
101
 
102
- if (options.feeRate) {
102
+ if (options.feeRate !== null && options.feeRate !== undefined) {
103
103
  params.fee = options.feeRate;
104
104
  params.referrerAddress = options.feeAddress;
105
105
  }
@@ -147,7 +147,7 @@ export const getQuote = async (options: QuoteParams): Promise<QuoteResult> => {
147
147
  partner: 'Rabby',
148
148
  };
149
149
 
150
- if (options.feeRate) {
150
+ if (options.feeRate !== null && options.feeRate !== undefined) {
151
151
  params.partnerFeeBps = (options.feeRate * 100).toString();
152
152
  params.partnerAddress = options.feeAddress;
153
153
  }