@rabby-wallet/rabby-swap 0.0.23 → 0.0.24

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.
@@ -71,7 +71,8 @@ export const getQuote = (options) => __awaiter(void 0, void 0, void 0, function*
71
71
  params,
72
72
  });
73
73
  return {
74
- tx: data.tx,
74
+ tx: Object.assign(Object.assign({}, data.tx), { data: `${data.tx.data}5257` // add specific 4 bytes for identify rabby swap
75
+ }),
75
76
  fromToken: data.fromToken.address === NATIVE_TOKEN
76
77
  ? CHAINS[options.chain].nativeTokenAddress
77
78
  : data.fromToken.address,
@@ -112,9 +112,11 @@ export const getQuote = (options) => __awaiter(void 0, void 0, void 0, function*
112
112
  gasPrice: options.gasPrice || 1,
113
113
  account: options.userAddress,
114
114
  };
115
+ if (options.feeAddress) {
116
+ params.referrer = options.feeAddress;
117
+ }
115
118
  if (options.feeRate !== null && options.feeRate !== undefined) {
116
119
  params.referrerFee = options.feeRate;
117
- params.referrer = options.feeAddress;
118
120
  }
119
121
  const { data } = yield request.get("/swap_quote", {
120
122
  params,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rabby-wallet/rabby-swap",
3
- "version": "0.0.23",
3
+ "version": "0.0.24",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {