@xswap-link/sdk 0.11.2 → 0.11.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xswap-link/sdk",
3
- "version": "0.11.2",
3
+ "version": "0.11.4",
4
4
  "description": "JavaScript SDK for XSwap platform",
5
5
  "homepage": "https://github.com/xswap-link/xswap-sdk",
6
6
  "repository": {
@@ -59,7 +59,7 @@
59
59
  "react-virtuoso": "^4.7.12",
60
60
  "stream": "npm:stream-browserify@latest",
61
61
  "url": "npm:url-browserify@latest",
62
- "viem": "~2.29.1",
62
+ "viem": "~2.40.0",
63
63
  "wagmi": "^2.14.9",
64
64
  "zlib": "npm:zlib-browserify@latest"
65
65
  },
@@ -36,6 +36,7 @@ export const SOLANA_MAINNET_RPC_URL =
36
36
  export const JUPITER_V6_PROGRAM_ID = new PublicKey(
37
37
  "JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4",
38
38
  );
39
+ export const DEPLOYER_ADDRESS = "0x8ebD04b2fbA00418Be00329146837dcE51F02c00";
39
40
  export const DEFAULT_ECOSYSTEM = Ecosystem.EVM;
40
41
  export const NUMBER_INPUT_REGEX = /^[0-9]*[.,]?[0-9]*$/;
41
42
  export const SLIPPAGE_PRESETS: number[] = [0.5, 1.5, 3.0];
@@ -3,6 +3,7 @@ import {
3
3
  DEFAULT_DESTINATION_CHAIN_ID,
4
4
  DEFAULT_REQUEST_ABORT_MSG,
5
5
  DEFAULT_SOURCE_CHAIN_ID,
6
+ DEPLOYER_ADDRESS,
6
7
  SOLANA_NATIVE_TOKEN_ADDRESS,
7
8
  SOLANA_TOKEN_2022_PROGRAM_ID,
8
9
  SOLANA_TOKEN_PROGRAM_ID,
@@ -600,13 +601,17 @@ export const SwapProvider = ({
600
601
  fromChain: srcChain.chainId,
601
602
  toChain: dstChain.chainId,
602
603
  fromAddress:
603
- evmAddress || ADDRESSES[srcChain.chainId]?.FeeCollector || "",
604
+ evmAddress ||
605
+ ADDRESSES[srcChain.chainId]?.FeeCollector ||
606
+ DEPLOYER_ADDRESS,
604
607
  toAddress:
605
608
  dstChain.ecosystem === Ecosystem.SOLANA
606
609
  ? solanaAddress ||
607
610
  ADDRESSES[dstChain.chainId]?.FeeCollector ||
608
611
  ""
609
- : evmAddress || ADDRESSES[dstChain.chainId]?.FeeCollector || "",
612
+ : evmAddress ||
613
+ ADDRESSES[dstChain.chainId]?.FeeCollector ||
614
+ DEPLOYER_ADDRESS,
610
615
  fromToken: srcToken.address,
611
616
  toToken: dstToken.address,
612
617
  fromAmount: srcValueWei,
@@ -28,8 +28,9 @@ export const openTransactionModal = async ({
28
28
  highlightedDstTokens,
29
29
  }: ModalIntegrationPayload) => {
30
30
  const supportedChains: Chain[] = (await getChains()).filter(
31
- ({ web3Environment, swapSupported }) =>
32
- web3Environment === Web3Environment.MAINNET && swapSupported,
31
+ ({ web3Environment, swapSupported, bridgeSupported }) =>
32
+ web3Environment === Web3Environment.MAINNET &&
33
+ (swapSupported || bridgeSupported),
33
34
  );
34
35
 
35
36
  validateSwapTxData(