@reown/appkit-react-native 0.0.0-feat-deeplink-provider-20250812191340 → 0.0.0-fix-height-calc-20250814203104

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 (64) hide show
  1. package/lib/commonjs/hooks/useRouteTransition.js +10 -4
  2. package/lib/commonjs/hooks/useRouteTransition.js.map +1 -1
  3. package/lib/commonjs/partials/w3m-connecting-qrcode/components/ReownButton.js +36 -0
  4. package/lib/commonjs/partials/w3m-connecting-qrcode/components/ReownButton.js.map +1 -0
  5. package/lib/commonjs/partials/w3m-connecting-qrcode/index.js +6 -23
  6. package/lib/commonjs/partials/w3m-connecting-qrcode/index.js.map +1 -1
  7. package/lib/commonjs/partials/w3m-connecting-qrcode/styles.js +3 -0
  8. package/lib/commonjs/partials/w3m-connecting-qrcode/styles.js.map +1 -1
  9. package/lib/commonjs/utils/HelpersUtil.js +6 -0
  10. package/lib/commonjs/utils/HelpersUtil.js.map +1 -1
  11. package/lib/commonjs/utils/UiUtil.js +4 -0
  12. package/lib/commonjs/utils/UiUtil.js.map +1 -1
  13. package/lib/commonjs/views/w3m-all-wallets-view/index.js +2 -2
  14. package/lib/commonjs/views/w3m-all-wallets-view/index.js.map +1 -1
  15. package/lib/commonjs/views/w3m-connect-view/components/custom-wallet-list.js +4 -1
  16. package/lib/commonjs/views/w3m-connect-view/components/custom-wallet-list.js.map +1 -1
  17. package/lib/commonjs/views/w3m-connect-view/index.js +2 -2
  18. package/lib/commonjs/views/w3m-connect-view/index.js.map +1 -1
  19. package/lib/commonjs/views/w3m-connecting-external-view/index.js +19 -5
  20. package/lib/commonjs/views/w3m-connecting-external-view/index.js.map +1 -1
  21. package/lib/module/hooks/useRouteTransition.js +10 -4
  22. package/lib/module/hooks/useRouteTransition.js.map +1 -1
  23. package/lib/module/partials/w3m-connecting-qrcode/components/ReownButton.js +32 -0
  24. package/lib/module/partials/w3m-connecting-qrcode/components/ReownButton.js.map +1 -0
  25. package/lib/module/partials/w3m-connecting-qrcode/index.js +7 -24
  26. package/lib/module/partials/w3m-connecting-qrcode/index.js.map +1 -1
  27. package/lib/module/partials/w3m-connecting-qrcode/styles.js +3 -0
  28. package/lib/module/partials/w3m-connecting-qrcode/styles.js.map +1 -1
  29. package/lib/module/utils/HelpersUtil.js +6 -0
  30. package/lib/module/utils/HelpersUtil.js.map +1 -1
  31. package/lib/module/utils/UiUtil.js +4 -0
  32. package/lib/module/utils/UiUtil.js.map +1 -1
  33. package/lib/module/views/w3m-all-wallets-view/index.js +2 -2
  34. package/lib/module/views/w3m-all-wallets-view/index.js.map +1 -1
  35. package/lib/module/views/w3m-connect-view/components/custom-wallet-list.js +4 -1
  36. package/lib/module/views/w3m-connect-view/components/custom-wallet-list.js.map +1 -1
  37. package/lib/module/views/w3m-connect-view/index.js +2 -2
  38. package/lib/module/views/w3m-connect-view/index.js.map +1 -1
  39. package/lib/module/views/w3m-connecting-external-view/index.js +21 -7
  40. package/lib/module/views/w3m-connecting-external-view/index.js.map +1 -1
  41. package/lib/typescript/hooks/useRouteTransition.d.ts.map +1 -1
  42. package/lib/typescript/partials/w3m-connecting-qrcode/components/ReownButton.d.ts +7 -0
  43. package/lib/typescript/partials/w3m-connecting-qrcode/components/ReownButton.d.ts.map +1 -0
  44. package/lib/typescript/partials/w3m-connecting-qrcode/index.d.ts.map +1 -1
  45. package/lib/typescript/partials/w3m-connecting-qrcode/styles.d.ts +3 -0
  46. package/lib/typescript/partials/w3m-connecting-qrcode/styles.d.ts.map +1 -1
  47. package/lib/typescript/utils/HelpersUtil.d.ts +1 -0
  48. package/lib/typescript/utils/HelpersUtil.d.ts.map +1 -1
  49. package/lib/typescript/utils/UiUtil.d.ts.map +1 -1
  50. package/lib/typescript/views/w3m-all-wallets-view/index.d.ts.map +1 -1
  51. package/lib/typescript/views/w3m-connect-view/components/custom-wallet-list.d.ts.map +1 -1
  52. package/lib/typescript/views/w3m-connect-view/index.d.ts.map +1 -1
  53. package/lib/typescript/views/w3m-connecting-external-view/index.d.ts.map +1 -1
  54. package/package.json +5 -5
  55. package/src/hooks/useRouteTransition.ts +11 -4
  56. package/src/partials/w3m-connecting-qrcode/components/ReownButton.tsx +20 -0
  57. package/src/partials/w3m-connecting-qrcode/index.tsx +5 -13
  58. package/src/partials/w3m-connecting-qrcode/styles.ts +3 -0
  59. package/src/utils/HelpersUtil.ts +12 -0
  60. package/src/utils/UiUtil.ts +4 -0
  61. package/src/views/w3m-all-wallets-view/index.tsx +3 -4
  62. package/src/views/w3m-connect-view/components/custom-wallet-list.tsx +7 -1
  63. package/src/views/w3m-connect-view/index.tsx +3 -4
  64. package/src/views/w3m-connecting-external-view/index.tsx +18 -8
@@ -4,5 +4,8 @@ import { StyleSheet } from 'react-native';
4
4
  export default StyleSheet.create({
5
5
  copyButton: {
6
6
  marginTop: Spacing.m
7
+ },
8
+ reownButton: {
9
+ marginTop: Spacing['2xl']
7
10
  }
8
11
  });
@@ -204,6 +204,18 @@ export const WcHelpersUtil = {
204
204
  return this.applyNamespaceOverrides(defaultNamespaces, configOverride);
205
205
  },
206
206
 
207
+ isExternalWallet(wallet?: WcWallet) {
208
+ if (!wallet) {
209
+ return false;
210
+ }
211
+
212
+ return (
213
+ wallet.id === ConstantsUtil.PHANTOM_CUSTOM_WALLET.id ||
214
+ wallet.id === ConstantsUtil.SOLFLARE_CUSTOM_WALLET.id ||
215
+ wallet.id === ConstantsUtil.COINBASE_CUSTOM_WALLET.id
216
+ );
217
+ },
218
+
207
219
  getConnectorTypeByWallet(wallet?: WcWallet) {
208
220
  if (!wallet) {
209
221
  return 'walletconnect';
@@ -17,6 +17,10 @@ export const UiUtil = {
17
17
  if (currentRouteTransition) {
18
18
  const { navigationDirection } = RouterController.state;
19
19
  await currentRouteTransition(navigationDirection);
20
+ // After the transition completes, ensure direction is reset to 'none'
21
+ if (RouterController.state.navigationDirection !== 'none') {
22
+ RouterController.state.navigationDirection = 'none';
23
+ }
20
24
  }
21
25
  }
22
26
  };
@@ -1,6 +1,6 @@
1
1
  import { useState } from 'react';
2
2
  import { WcController, EventsController, RouterController } from '@reown/appkit-core-react-native';
3
- import { type WcWallet, ConstantsUtil } from '@reown/appkit-common-react-native';
3
+ import { type WcWallet } from '@reown/appkit-common-react-native';
4
4
  import { FlexView, IconLink, SearchBar, Spacing, useTheme } from '@reown/appkit-ui-react-native';
5
5
 
6
6
  import styles from './styles';
@@ -8,6 +8,7 @@ import { useDebounceCallback } from '../../hooks/useDebounceCallback';
8
8
  import { AllWalletsList } from '../../partials/w3m-all-wallets-list';
9
9
  import { AllWalletsSearch } from '../../partials/w3m-all-wallets-search';
10
10
  import { useCustomDimensions } from '../../hooks/useCustomDimensions';
11
+ import { WcHelpersUtil } from '../../utils/HelpersUtil';
11
12
 
12
13
  export function AllWalletsView() {
13
14
  const Theme = useTheme();
@@ -20,9 +21,7 @@ export function AllWalletsView() {
20
21
  const { debouncedCallback: onInputChange } = useDebounceCallback({ callback: setSearchQuery });
21
22
 
22
23
  const onWalletPress = (wallet: WcWallet) => {
23
- const isExternal =
24
- wallet.id === ConstantsUtil.PHANTOM_CUSTOM_WALLET.id ||
25
- wallet.id === ConstantsUtil.COINBASE_CUSTOM_WALLET.id;
24
+ const isExternal = WcHelpersUtil.isExternalWallet(wallet);
26
25
  if (isExternal) {
27
26
  RouterController.push('ConnectingExternal', { wallet });
28
27
  } else {
@@ -30,7 +30,13 @@ export function CustomWalletList({ itemStyle, onWalletPress }: Props) {
30
30
  return null;
31
31
  }
32
32
 
33
- const list = filterOutRecentWallets(recentWallets, customWallets, RECENT_COUNT);
33
+ let list = filterOutRecentWallets(recentWallets, customWallets, RECENT_COUNT);
34
+
35
+ // Filter out custom wallets that are already installed
36
+ list = list.filter(
37
+ wallet =>
38
+ !ApiController.state.installed.find(installedWallet => installedWallet.id === wallet.id)
39
+ );
34
40
 
35
41
  return list.map(wallet => (
36
42
  <ListWallet
@@ -7,7 +7,7 @@ import {
7
7
  OptionsController,
8
8
  RouterController
9
9
  } from '@reown/appkit-core-react-native';
10
- import { type WcWallet, ConstantsUtil } from '@reown/appkit-common-react-native';
10
+ import { type WcWallet } from '@reown/appkit-common-react-native';
11
11
  import { FlexView, Icon, ListItem, Separator, Text } from '@reown/appkit-ui-react-native';
12
12
  import { useCustomDimensions } from '../../hooks/useCustomDimensions';
13
13
  import { Placeholder } from '../../partials/w3m-placeholder';
@@ -17,6 +17,7 @@ import { AllWalletList } from './components/all-wallet-list';
17
17
  import { RecentWalletList } from './components/recent-wallet-list';
18
18
  import { SocialLoginList } from './components/social-login-list';
19
19
  import styles from './styles';
20
+ import { WcHelpersUtil } from '../../utils/HelpersUtil';
20
21
 
21
22
  export function ConnectView() {
22
23
  const { prefetchError } = useSnapshot(ApiController.state);
@@ -29,9 +30,7 @@ export function ConnectView() {
29
30
  const showList = !showConnectWalletsButton && !showLoadingError;
30
31
 
31
32
  const onWalletPress = (wallet: WcWallet, isInstalled?: boolean) => {
32
- const isExternal =
33
- wallet.id === ConstantsUtil.PHANTOM_CUSTOM_WALLET.id ||
34
- wallet.id === ConstantsUtil.COINBASE_CUSTOM_WALLET.id;
33
+ const isExternal = WcHelpersUtil.isExternalWallet(wallet);
35
34
  if (isExternal) {
36
35
  RouterController.push('ConnectingExternal', { wallet });
37
36
  } else {
@@ -1,13 +1,14 @@
1
1
  import { useSnapshot } from 'valtio';
2
2
  import { useCallback, useEffect, useState } from 'react';
3
- import { ScrollView } from 'react-native';
3
+ import { Platform, ScrollView } from 'react-native';
4
4
  import {
5
5
  RouterController,
6
6
  ApiController,
7
7
  EventsController,
8
8
  WcController,
9
9
  AssetUtil,
10
- AssetController
10
+ AssetController,
11
+ CoreHelperUtil
11
12
  } from '@reown/appkit-core-react-native';
12
13
  import {
13
14
  Button,
@@ -21,7 +22,8 @@ import { useCustomDimensions } from '../../hooks/useCustomDimensions';
21
22
  import { ConnectingBody, getMessage, type BodyErrorType } from '../../partials/w3m-connecting-body';
22
23
  import styles from './styles';
23
24
  import { useInternalAppKit } from '../../AppKitContext';
24
- import { ConstantsUtil } from '@reown/appkit-common-react-native';
25
+ import { StoreLink } from '../../partials/w3m-connecting-mobile/components/StoreLink';
26
+ import { WcHelpersUtil } from '../../utils/HelpersUtil';
25
27
 
26
28
  export function ConnectingExternalView() {
27
29
  const { data } = useSnapshot(RouterController.state);
@@ -31,6 +33,17 @@ export function ConnectingExternalView() {
31
33
  const [errorType, setErrorType] = useState<BodyErrorType>();
32
34
  const bodyMessage = getMessage({ walletName: data?.wallet?.name, errorType });
33
35
 
36
+ const storeUrl = Platform.select({
37
+ ios: data?.wallet?.app_store,
38
+ android: data?.wallet?.play_store
39
+ });
40
+
41
+ const onStorePress = () => {
42
+ if (storeUrl) {
43
+ CoreHelperUtil.openLink(storeUrl);
44
+ }
45
+ };
46
+
34
47
  const onRetryPress = () => {
35
48
  setErrorType(undefined);
36
49
  onConnect();
@@ -40,11 +53,7 @@ export function ConnectingExternalView() {
40
53
  try {
41
54
  const wallet = RouterController.state.data?.wallet;
42
55
  if (wallet) {
43
- if (
44
- wallet.id === ConstantsUtil.PHANTOM_CUSTOM_WALLET.id ||
45
- wallet.id === ConstantsUtil.SOLFLARE_CUSTOM_WALLET.id ||
46
- wallet.id === ConstantsUtil.COINBASE_CUSTOM_WALLET.id
47
- ) {
56
+ if (WcHelpersUtil.isExternalWallet(wallet)) {
48
57
  await connect({ wallet });
49
58
  } else {
50
59
  // All other wallets are handled by WalletConnect connector
@@ -122,6 +131,7 @@ export function ConnectingExternalView() {
122
131
  </Button>
123
132
  )}
124
133
  </FlexView>
134
+ <StoreLink visible={!!storeUrl} walletName={data?.wallet?.name} onPress={onStorePress} />
125
135
  </ScrollView>
126
136
  );
127
137
  }