@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.
- package/lib/commonjs/hooks/useRouteTransition.js +10 -4
- package/lib/commonjs/hooks/useRouteTransition.js.map +1 -1
- package/lib/commonjs/partials/w3m-connecting-qrcode/components/ReownButton.js +36 -0
- package/lib/commonjs/partials/w3m-connecting-qrcode/components/ReownButton.js.map +1 -0
- package/lib/commonjs/partials/w3m-connecting-qrcode/index.js +6 -23
- package/lib/commonjs/partials/w3m-connecting-qrcode/index.js.map +1 -1
- package/lib/commonjs/partials/w3m-connecting-qrcode/styles.js +3 -0
- package/lib/commonjs/partials/w3m-connecting-qrcode/styles.js.map +1 -1
- package/lib/commonjs/utils/HelpersUtil.js +6 -0
- package/lib/commonjs/utils/HelpersUtil.js.map +1 -1
- package/lib/commonjs/utils/UiUtil.js +4 -0
- package/lib/commonjs/utils/UiUtil.js.map +1 -1
- package/lib/commonjs/views/w3m-all-wallets-view/index.js +2 -2
- package/lib/commonjs/views/w3m-all-wallets-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-connect-view/components/custom-wallet-list.js +4 -1
- package/lib/commonjs/views/w3m-connect-view/components/custom-wallet-list.js.map +1 -1
- package/lib/commonjs/views/w3m-connect-view/index.js +2 -2
- package/lib/commonjs/views/w3m-connect-view/index.js.map +1 -1
- package/lib/commonjs/views/w3m-connecting-external-view/index.js +19 -5
- package/lib/commonjs/views/w3m-connecting-external-view/index.js.map +1 -1
- package/lib/module/hooks/useRouteTransition.js +10 -4
- package/lib/module/hooks/useRouteTransition.js.map +1 -1
- package/lib/module/partials/w3m-connecting-qrcode/components/ReownButton.js +32 -0
- package/lib/module/partials/w3m-connecting-qrcode/components/ReownButton.js.map +1 -0
- package/lib/module/partials/w3m-connecting-qrcode/index.js +7 -24
- package/lib/module/partials/w3m-connecting-qrcode/index.js.map +1 -1
- package/lib/module/partials/w3m-connecting-qrcode/styles.js +3 -0
- package/lib/module/partials/w3m-connecting-qrcode/styles.js.map +1 -1
- package/lib/module/utils/HelpersUtil.js +6 -0
- package/lib/module/utils/HelpersUtil.js.map +1 -1
- package/lib/module/utils/UiUtil.js +4 -0
- package/lib/module/utils/UiUtil.js.map +1 -1
- package/lib/module/views/w3m-all-wallets-view/index.js +2 -2
- package/lib/module/views/w3m-all-wallets-view/index.js.map +1 -1
- package/lib/module/views/w3m-connect-view/components/custom-wallet-list.js +4 -1
- package/lib/module/views/w3m-connect-view/components/custom-wallet-list.js.map +1 -1
- package/lib/module/views/w3m-connect-view/index.js +2 -2
- package/lib/module/views/w3m-connect-view/index.js.map +1 -1
- package/lib/module/views/w3m-connecting-external-view/index.js +21 -7
- package/lib/module/views/w3m-connecting-external-view/index.js.map +1 -1
- package/lib/typescript/hooks/useRouteTransition.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-connecting-qrcode/components/ReownButton.d.ts +7 -0
- package/lib/typescript/partials/w3m-connecting-qrcode/components/ReownButton.d.ts.map +1 -0
- package/lib/typescript/partials/w3m-connecting-qrcode/index.d.ts.map +1 -1
- package/lib/typescript/partials/w3m-connecting-qrcode/styles.d.ts +3 -0
- package/lib/typescript/partials/w3m-connecting-qrcode/styles.d.ts.map +1 -1
- package/lib/typescript/utils/HelpersUtil.d.ts +1 -0
- package/lib/typescript/utils/HelpersUtil.d.ts.map +1 -1
- package/lib/typescript/utils/UiUtil.d.ts.map +1 -1
- package/lib/typescript/views/w3m-all-wallets-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-connect-view/components/custom-wallet-list.d.ts.map +1 -1
- package/lib/typescript/views/w3m-connect-view/index.d.ts.map +1 -1
- package/lib/typescript/views/w3m-connecting-external-view/index.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/hooks/useRouteTransition.ts +11 -4
- package/src/partials/w3m-connecting-qrcode/components/ReownButton.tsx +20 -0
- package/src/partials/w3m-connecting-qrcode/index.tsx +5 -13
- package/src/partials/w3m-connecting-qrcode/styles.ts +3 -0
- package/src/utils/HelpersUtil.ts +12 -0
- package/src/utils/UiUtil.ts +4 -0
- package/src/views/w3m-all-wallets-view/index.tsx +3 -4
- package/src/views/w3m-connect-view/components/custom-wallet-list.tsx +7 -1
- package/src/views/w3m-connect-view/index.tsx +3 -4
- package/src/views/w3m-connecting-external-view/index.tsx +18 -8
package/src/utils/HelpersUtil.ts
CHANGED
|
@@ -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';
|
package/src/utils/UiUtil.ts
CHANGED
|
@@ -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
|
|
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
|
-
|
|
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
|
|
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 {
|
|
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
|
}
|