@rango-dev/widget-embedded 0.28.3-next.2 → 0.28.3-next.3

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": "@rango-dev/widget-embedded",
3
- "version": "0.28.3-next.2",
3
+ "version": "0.28.3-next.3",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "source": "./src/index.ts",
@@ -25,7 +25,7 @@
25
25
  "@lingui/core": "4.2.1",
26
26
  "@lingui/react": "4.2.1",
27
27
  "@rango-dev/logging-core": "^0.3.1-next.1",
28
- "@rango-dev/provider-all": "^0.33.3-next.1",
28
+ "@rango-dev/provider-all": "^0.33.3-next.2",
29
29
  "@rango-dev/queue-manager-core": "^0.26.0",
30
30
  "@rango-dev/queue-manager-rango-preset": "^0.33.3-next.0",
31
31
  "@rango-dev/queue-manager-react": "^0.26.0",
@@ -38,6 +38,9 @@ function Main(props: PropsWithChildren<PropTypes>) {
38
38
 
39
39
  const walletOptions: ProvidersOptions = {
40
40
  walletConnectProjectId: props.config?.walletConnectProjectId,
41
+ walletConnectListedDesktopWalletLink:
42
+ props.config.__UNSTABLE_OR_INTERNAL__
43
+ ?.walletConnectListedDesktopWalletLink,
41
44
  };
42
45
  const { providers } = useWalletProviders(config.wallets, walletOptions);
43
46
  const { connectWallet, disconnectWallet } = useWalletsStore();
@@ -45,6 +45,8 @@ export function useWalletList(params: Params) {
45
45
  const listAvailableWalletTypes =
46
46
  configWalletsToWalletName(config?.wallets, {
47
47
  walletConnectProjectId: config?.walletConnectProjectId,
48
+ walletConnectListedDesktopWalletLink:
49
+ config.__UNSTABLE_OR_INTERNAL__?.walletConnectListedDesktopWalletLink,
48
50
  }) || ALL_SUPPORTED_WALLETS;
49
51
 
50
52
  let wallets = mapWalletTypesToWalletInfo(
@@ -14,16 +14,12 @@ export function useWalletProviders(
14
14
  const clearConnectedWallet = useWalletsStore.use.clearConnectedWallet();
15
15
  let generateProviders: ProviderInterface[] = matchAndGenerateProviders(
16
16
  providers,
17
- {
18
- walletConnectProjectId: options?.walletConnectProjectId,
19
- }
17
+ options
20
18
  );
21
19
 
22
20
  useEffect(() => {
23
21
  clearConnectedWallet();
24
- generateProviders = matchAndGenerateProviders(providers, {
25
- walletConnectProjectId: options?.walletConnectProjectId,
26
- });
22
+ generateProviders = matchAndGenerateProviders(providers, options);
27
23
  }, [providers?.length]);
28
24
 
29
25
  return {
@@ -214,4 +214,9 @@ export type WidgetConfig = {
214
214
  variant?: WidgetVariant;
215
215
  enableCentralizedSwappers?: boolean;
216
216
  signers?: SignersConfig;
217
+
218
+ // These are likely to change or remove at anytime. Please use with a caution.
219
+ __UNSTABLE_OR_INTERNAL__?: {
220
+ walletConnectListedDesktopWalletLink?: string;
221
+ };
217
222
  };
@@ -5,6 +5,9 @@ import { allProviders } from '@rango-dev/provider-all';
5
5
 
6
6
  export interface ProvidersOptions {
7
7
  walletConnectProjectId?: WidgetConfig['walletConnectProjectId'];
8
+ walletConnectListedDesktopWalletLink?: NonNullable<
9
+ WidgetConfig['__UNSTABLE_OR_INTERNAL__']
10
+ >['walletConnectListedDesktopWalletLink'];
8
11
  }
9
12
 
10
13
  /**
@@ -20,6 +23,8 @@ export function matchAndGenerateProviders(
20
23
  const all = allProviders({
21
24
  walletconnect2: {
22
25
  WC_PROJECT_ID: options?.walletConnectProjectId || '',
26
+ DISABLE_MODAL_AND_OPEN_LINK:
27
+ options?.walletConnectListedDesktopWalletLink,
23
28
  },
24
29
  selectedProviders: providers,
25
30
  });