@rabby-wallet/rabby-swap 0.0.27-alpha.1 → 0.0.27

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.
Files changed (2) hide show
  1. package/dist/utils.js +5 -1
  2. package/package.json +1 -1
package/dist/utils.js CHANGED
@@ -8,6 +8,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  import { CHAINS, CHAINS_ENUM } from "@debank/common";
11
+ import { DEX_ENUM } from "./consts";
12
+ import { DEX_SPENDER_WHITELIST } from "./list";
11
13
  export const isSameAddress = (addr1, addr2) => {
12
14
  if (typeof addr1 !== "string" || typeof addr2 !== "string")
13
15
  return false;
@@ -42,6 +44,8 @@ export const generateGetQuote = ({ SUPPORT_CHAINS, id, dex, }) => (options, api)
42
44
  toToken: data.receive_token.id,
43
45
  toTokenAmount: data.receive_token_raw_amount + "",
44
46
  toTokenDecimals: data.receive_token.decimals,
45
- spender: data.dex_swap_to,
47
+ spender: dex === DEX_ENUM.PARASWAP
48
+ ? DEX_SPENDER_WHITELIST[DEX_ENUM.PARASWAP][options.chain]
49
+ : data.dex_swap_to,
46
50
  };
47
51
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rabby-wallet/rabby-swap",
3
- "version": "0.0.27-alpha.1",
3
+ "version": "0.0.27",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {