@reown/appkit-react-native 0.0.0-feat-multi-siwe-20250623145640 → 0.0.0-feat-multi-social-20250630195637

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 (107) hide show
  1. package/lib/commonjs/connectors/WalletConnectConnector.js +5 -2
  2. package/lib/commonjs/connectors/WalletConnectConnector.js.map +1 -1
  3. package/lib/commonjs/index.js +9 -58
  4. package/lib/commonjs/index.js.map +1 -1
  5. package/lib/commonjs/modal/w3m-modal/index.js +2 -15
  6. package/lib/commonjs/modal/w3m-modal/index.js.map +1 -1
  7. package/lib/commonjs/modal/w3m-router/index.js +1 -7
  8. package/lib/commonjs/modal/w3m-router/index.js.map +1 -1
  9. package/lib/commonjs/partials/w3m-header/index.js +3 -12
  10. package/lib/commonjs/partials/w3m-header/index.js.map +1 -1
  11. package/lib/commonjs/views/w3m-account-default-view/components/auth-buttons.js +1 -1
  12. package/lib/commonjs/views/w3m-account-default-view/components/auth-buttons.js.map +1 -1
  13. package/lib/commonjs/views/w3m-connect-socials-view/index.js +3 -10
  14. package/lib/commonjs/views/w3m-connect-socials-view/index.js.map +1 -1
  15. package/lib/commonjs/views/w3m-connect-view/components/social-login-list.js +3 -7
  16. package/lib/commonjs/views/w3m-connect-view/components/social-login-list.js.map +1 -1
  17. package/lib/commonjs/views/w3m-connect-view/index.js +9 -32
  18. package/lib/commonjs/views/w3m-connect-view/index.js.map +1 -1
  19. package/lib/commonjs/views/w3m-connecting-siwe-view/index.js +2 -0
  20. package/lib/commonjs/views/w3m-connecting-siwe-view/index.js.map +1 -1
  21. package/lib/commonjs/views/w3m-connecting-social-view/index.js +39 -61
  22. package/lib/commonjs/views/w3m-connecting-social-view/index.js.map +1 -1
  23. package/lib/commonjs/views/w3m-connecting-view/index.js +6 -7
  24. package/lib/commonjs/views/w3m-connecting-view/index.js.map +1 -1
  25. package/lib/module/connectors/WalletConnectConnector.js +5 -2
  26. package/lib/module/connectors/WalletConnectConnector.js.map +1 -1
  27. package/lib/module/index.js +11 -6
  28. package/lib/module/index.js.map +1 -1
  29. package/lib/module/modal/w3m-modal/index.js +3 -16
  30. package/lib/module/modal/w3m-modal/index.js.map +1 -1
  31. package/lib/module/modal/w3m-router/index.js +1 -7
  32. package/lib/module/modal/w3m-router/index.js.map +1 -1
  33. package/lib/module/partials/w3m-header/index.js +4 -13
  34. package/lib/module/partials/w3m-header/index.js.map +1 -1
  35. package/lib/module/views/w3m-account-default-view/components/auth-buttons.js +1 -1
  36. package/lib/module/views/w3m-account-default-view/components/auth-buttons.js.map +1 -1
  37. package/lib/module/views/w3m-connect-socials-view/index.js +4 -11
  38. package/lib/module/views/w3m-connect-socials-view/index.js.map +1 -1
  39. package/lib/module/views/w3m-connect-view/components/social-login-list.js +4 -8
  40. package/lib/module/views/w3m-connect-view/components/social-login-list.js.map +1 -1
  41. package/lib/module/views/w3m-connect-view/index.js +11 -34
  42. package/lib/module/views/w3m-connect-view/index.js.map +1 -1
  43. package/lib/module/views/w3m-connecting-siwe-view/index.js +2 -0
  44. package/lib/module/views/w3m-connecting-siwe-view/index.js.map +1 -1
  45. package/lib/module/views/w3m-connecting-social-view/index.js +41 -63
  46. package/lib/module/views/w3m-connecting-social-view/index.js.map +1 -1
  47. package/lib/module/views/w3m-connecting-view/index.js +7 -8
  48. package/lib/module/views/w3m-connecting-view/index.js.map +1 -1
  49. package/lib/typescript/connectors/WalletConnectConnector.d.ts.map +1 -1
  50. package/lib/typescript/index.d.ts +7 -6
  51. package/lib/typescript/index.d.ts.map +1 -1
  52. package/lib/typescript/modal/w3m-modal/index.d.ts.map +1 -1
  53. package/lib/typescript/modal/w3m-router/index.d.ts.map +1 -1
  54. package/lib/typescript/partials/w3m-header/index.d.ts.map +1 -1
  55. package/lib/typescript/views/w3m-connect-socials-view/index.d.ts.map +1 -1
  56. package/lib/typescript/views/w3m-connect-view/components/social-login-list.d.ts.map +1 -1
  57. package/lib/typescript/views/w3m-connect-view/index.d.ts.map +1 -1
  58. package/lib/typescript/views/w3m-connecting-siwe-view/index.d.ts.map +1 -1
  59. package/lib/typescript/views/w3m-connecting-social-view/index.d.ts.map +1 -1
  60. package/package.json +5 -5
  61. package/src/connectors/WalletConnectConnector.ts +5 -2
  62. package/src/index.ts +10 -10
  63. package/src/modal/w3m-modal/index.tsx +1 -12
  64. package/src/modal/w3m-router/index.tsx +1 -7
  65. package/src/partials/w3m-header/index.tsx +5 -22
  66. package/src/views/w3m-account-default-view/components/auth-buttons.tsx +1 -1
  67. package/src/views/w3m-connect-socials-view/index.tsx +3 -14
  68. package/src/views/w3m-connect-view/components/social-login-list.tsx +2 -14
  69. package/src/views/w3m-connect-view/index.tsx +9 -25
  70. package/src/views/w3m-connecting-siwe-view/index.tsx +1 -0
  71. package/src/views/w3m-connecting-social-view/index.tsx +44 -96
  72. package/src/views/w3m-connecting-view/index.tsx +8 -8
  73. package/lib/commonjs/views/w3m-connect-view/components/connect-email-input.js +0 -73
  74. package/lib/commonjs/views/w3m-connect-view/components/connect-email-input.js.map +0 -1
  75. package/lib/commonjs/views/w3m-connect-view/components/wallet-guide.js +0 -55
  76. package/lib/commonjs/views/w3m-connect-view/components/wallet-guide.js.map +0 -1
  77. package/lib/commonjs/views/w3m-connecting-farcaster-view/index.js +0 -124
  78. package/lib/commonjs/views/w3m-connecting-farcaster-view/index.js.map +0 -1
  79. package/lib/commonjs/views/w3m-connecting-farcaster-view/styles.js +0 -24
  80. package/lib/commonjs/views/w3m-connecting-farcaster-view/styles.js.map +0 -1
  81. package/lib/commonjs/views/w3m-create-view/index.js +0 -57
  82. package/lib/commonjs/views/w3m-create-view/index.js.map +0 -1
  83. package/lib/module/views/w3m-connect-view/components/connect-email-input.js +0 -67
  84. package/lib/module/views/w3m-connect-view/components/connect-email-input.js.map +0 -1
  85. package/lib/module/views/w3m-connect-view/components/wallet-guide.js +0 -49
  86. package/lib/module/views/w3m-connect-view/components/wallet-guide.js.map +0 -1
  87. package/lib/module/views/w3m-connecting-farcaster-view/index.js +0 -117
  88. package/lib/module/views/w3m-connecting-farcaster-view/index.js.map +0 -1
  89. package/lib/module/views/w3m-connecting-farcaster-view/styles.js +0 -18
  90. package/lib/module/views/w3m-connecting-farcaster-view/styles.js.map +0 -1
  91. package/lib/module/views/w3m-create-view/index.js +0 -51
  92. package/lib/module/views/w3m-create-view/index.js.map +0 -1
  93. package/lib/typescript/views/w3m-connect-view/components/connect-email-input.d.ts +0 -6
  94. package/lib/typescript/views/w3m-connect-view/components/connect-email-input.d.ts.map +0 -1
  95. package/lib/typescript/views/w3m-connect-view/components/wallet-guide.d.ts +0 -5
  96. package/lib/typescript/views/w3m-connect-view/components/wallet-guide.d.ts.map +0 -1
  97. package/lib/typescript/views/w3m-connecting-farcaster-view/index.d.ts +0 -2
  98. package/lib/typescript/views/w3m-connecting-farcaster-view/index.d.ts.map +0 -1
  99. package/lib/typescript/views/w3m-connecting-farcaster-view/styles.d.ts +0 -17
  100. package/lib/typescript/views/w3m-connecting-farcaster-view/styles.d.ts.map +0 -1
  101. package/lib/typescript/views/w3m-create-view/index.d.ts +0 -2
  102. package/lib/typescript/views/w3m-create-view/index.d.ts.map +0 -1
  103. package/src/views/w3m-connect-view/components/connect-email-input.tsx +0 -69
  104. package/src/views/w3m-connect-view/components/wallet-guide.tsx +0 -50
  105. package/src/views/w3m-connecting-farcaster-view/index.tsx +0 -140
  106. package/src/views/w3m-connecting-farcaster-view/styles.ts +0 -18
  107. package/src/views/w3m-create-view/index.tsx +0 -35
@@ -1,121 +1,73 @@
1
1
  import { useSnapshot } from 'valtio';
2
2
  import { useCallback, useEffect, useState } from 'react';
3
- import { Platform } from 'react-native';
4
3
  import {
5
4
  ConnectionController,
6
- ConnectorController,
5
+ CoreHelperUtil,
7
6
  EventsController,
8
- ModalController,
9
7
  RouterController,
10
- SnackController,
11
- WebviewController,
12
- type AppKitFrameProvider
8
+ SnackController
13
9
  } from '@reown/appkit-core-react-native';
14
10
  import { FlexView, LoadingThumbnail, IconBox, Logo, Text } from '@reown/appkit-ui-react-native';
15
- import { StringUtil } from '@reown/appkit-common-react-native';
11
+ import { ConstantsUtil, StringUtil } from '@reown/appkit-common-react-native';
16
12
 
17
13
  import { useCustomDimensions } from '../../hooks/useCustomDimensions';
18
14
  import styles from './styles';
15
+ import { useAppKit } from '../../AppKitContext';
16
+ import { UiUtil } from '../../utils/UiUtil';
19
17
 
20
18
  export function ConnectingSocialView() {
21
19
  const { maxWidth: width } = useCustomDimensions();
22
- const { processingAuth } = useSnapshot(WebviewController.state);
23
- const { selectedSocialProvider } = useSnapshot(ConnectionController.state);
24
- const authConnector = ConnectorController.getAuthConnector();
20
+ const { connect } = useAppKit();
21
+ const { data } = useSnapshot(RouterController.state);
22
+ const { wcUri } = useSnapshot(ConnectionController.state);
25
23
  const [error, setError] = useState(false);
26
- const provider = authConnector?.provider as AppKitFrameProvider;
27
24
 
28
25
  const onConnect = useCallback(async () => {
29
26
  try {
30
- if (
31
- !WebviewController.state.connecting &&
32
- provider &&
33
- ConnectionController.state.selectedSocialProvider
34
- ) {
35
- const { uri } = await provider.getSocialRedirectUri({
36
- provider: ConnectionController.state.selectedSocialProvider
27
+ if (wcUri) {
28
+ const { redirect, href } = CoreHelperUtil.formatUniversalUrl(
29
+ ConstantsUtil.WEB_WALLET_URL,
30
+ wcUri,
31
+ RouterController.state.data?.socialProvider
32
+ );
33
+ const wcLinking = { name: 'Reown Wallet', href };
34
+ ConnectionController.setWcLinking(wcLinking);
35
+ await CoreHelperUtil.openLink(redirect);
36
+ await ConnectionController.state.wcPromise;
37
+ //todo: rename this. its not just UI
38
+ UiUtil.storeConnectedWallet(wcLinking);
39
+ EventsController.sendEvent({
40
+ type: 'track',
41
+ event: 'SOCIAL_LOGIN_SUCCESS',
42
+ properties: { provider: RouterController.state.data?.socialProvider! }
37
43
  });
38
- WebviewController.setWebviewUrl(uri);
39
-
40
- const isNativeApple =
41
- ConnectionController.state.selectedSocialProvider === 'apple' && Platform.OS === 'ios';
42
-
43
- WebviewController.setWebviewVisible(!isNativeApple);
44
- WebviewController.setConnecting(true);
45
- WebviewController.setConnectingProvider(ConnectionController.state.selectedSocialProvider);
46
44
  }
47
45
  } catch (e) {
48
- WebviewController.setWebviewVisible(false);
49
- WebviewController.setWebviewUrl(undefined);
50
- WebviewController.setConnecting(false);
51
- WebviewController.setConnectingProvider(undefined);
46
+ EventsController.sendEvent({
47
+ type: 'track',
48
+ event: 'SOCIAL_LOGIN_ERROR',
49
+ properties: { provider: RouterController.state.data?.socialProvider! }
50
+ });
52
51
  SnackController.showError('Something went wrong');
53
52
  setError(true);
54
53
  }
55
- }, [provider]);
56
-
57
- const socialMessageHandler = useCallback(
58
- async (url: string) => {
59
- try {
60
- if (
61
- url.includes('/sdk/oauth') &&
62
- ConnectionController.state.selectedSocialProvider &&
63
- authConnector &&
64
- !WebviewController.state.processingAuth
65
- ) {
66
- WebviewController.setProcessingAuth(true);
67
- WebviewController.setWebviewVisible(false);
68
- const parsedUrl = new URL(url);
69
-
70
- EventsController.sendEvent({
71
- type: 'track',
72
- event: 'SOCIAL_LOGIN_REQUEST_USER_DATA',
73
- properties: { provider: ConnectionController.state.selectedSocialProvider }
74
- });
75
-
76
- await provider?.connectSocial(parsedUrl.search);
77
- await ConnectionController.connectExternal(authConnector);
78
- ConnectionController.setConnectedSocialProvider(
79
- ConnectionController.state.selectedSocialProvider
80
- );
81
- WebviewController.setConnecting(false);
82
-
83
- EventsController.sendEvent({
84
- type: 'track',
85
- event: 'SOCIAL_LOGIN_SUCCESS',
86
- properties: { provider: ConnectionController.state.selectedSocialProvider }
87
- });
54
+ }, [wcUri]);
88
55
 
89
- ModalController.close();
90
- WebviewController.reset();
91
- }
92
- } catch (e) {
93
- EventsController.sendEvent({
94
- type: 'track',
95
- event: 'SOCIAL_LOGIN_ERROR',
96
- properties: { provider: ConnectionController.state.selectedSocialProvider! }
97
- });
98
- WebviewController.reset();
99
- RouterController.goBack();
100
- SnackController.showError('Something went wrong');
101
- }
102
- },
103
- [authConnector, provider]
104
- );
56
+ const initializeConnection = useCallback(async () => {
57
+ const connectPromise = connect('walletconnect');
58
+ ConnectionController.setWcPromise(connectPromise);
59
+ }, [connect]);
105
60
 
106
61
  useEffect(() => {
107
- onConnect();
108
- }, [onConnect]);
62
+ initializeConnection();
63
+ // eslint-disable-next-line react-hooks/exhaustive-deps
64
+ }, []);
109
65
 
110
66
  useEffect(() => {
111
- if (!provider) return;
112
-
113
- const unsubscribe = provider?.getEventEmitter().addListener('social', socialMessageHandler);
114
-
115
- return () => {
116
- unsubscribe.removeListener('social', socialMessageHandler);
117
- };
118
- }, [socialMessageHandler, provider]);
67
+ if (wcUri) {
68
+ onConnect();
69
+ }
70
+ }, [wcUri, onConnect]);
119
71
 
120
72
  return (
121
73
  <FlexView
@@ -125,7 +77,7 @@ export function ConnectingSocialView() {
125
77
  style={{ width }}
126
78
  >
127
79
  <LoadingThumbnail paused={!!error}>
128
- <Logo logo={selectedSocialProvider ?? 'more'} height={72} width={72} />
80
+ <Logo logo={data?.socialProvider ?? 'more'} height={72} width={72} />
129
81
  {error && (
130
82
  <IconBox
131
83
  icon={'close'}
@@ -139,14 +91,10 @@ export function ConnectingSocialView() {
139
91
  )}
140
92
  </LoadingThumbnail>
141
93
  <Text style={styles.continueText} variant="paragraph-500">
142
- {processingAuth
143
- ? 'Loading user data'
144
- : `Continue with ${StringUtil.capitalize(selectedSocialProvider)}`}
94
+ Continue with {StringUtil.capitalize(data?.socialProvider ?? 'Login')}
145
95
  </Text>
146
96
  <Text variant="small-400" color="fg-200">
147
- {processingAuth
148
- ? 'Please wait a moment while we load your data'
149
- : 'Connect in the provider window'}
97
+ Continue in your browser
150
98
  </Text>
151
99
  </FlexView>
152
100
  );
@@ -1,7 +1,6 @@
1
1
  import { useSnapshot } from 'valtio';
2
2
  import { useEffect, useState } from 'react';
3
3
  import {
4
- AccountController,
5
4
  ConnectionController,
6
5
  ConstantsUtil,
7
6
  CoreHelperUtil,
@@ -11,7 +10,8 @@ import {
11
10
  type Platform,
12
11
  OptionsController,
13
12
  ApiController,
14
- EventsController
13
+ EventsController,
14
+ ConnectionsController
15
15
  } from '@reown/appkit-core-react-native';
16
16
  import { SIWEController } from '@reown/appkit-siwe-react-native';
17
17
  import { useAppKit } from '../../AppKitContext';
@@ -45,10 +45,9 @@ export function ConnectingView() {
45
45
  const initializeConnection = async (retry = false) => {
46
46
  try {
47
47
  const { wcPairingExpiry } = ConnectionController.state;
48
- // const { data: routeData } = RouterController.state;
48
+ const { data: routeData } = RouterController.state;
49
49
  if (retry || CoreHelperUtil.isPairingExpired(wcPairingExpiry)) {
50
50
  ConnectionController.setWcError(false);
51
- // ConnectionController.connectWalletConnect(routeData?.wallet?.link_mode ?? undefined);
52
51
 
53
52
  let connectPromise: Promise<void>;
54
53
  // TODO: check phantom wallet id from cloud
@@ -56,16 +55,17 @@ export function ConnectingView() {
56
55
  connectPromise = connect('phantom');
57
56
  } else {
58
57
  connectPromise = connect('walletconnect', {
59
- universalLink: data?.wallet?.link_mode ?? undefined
58
+ universalLink: routeData?.wallet?.link_mode ?? undefined
60
59
  });
61
60
  }
62
61
  ConnectionController.setWcPromise(connectPromise);
63
62
  await connectPromise;
64
- // await ConnectionController.state.wcPromise;
65
63
  // ConnectorController.setConnectedConnector('WALLET_CONNECT');
66
- AccountController.setIsConnected(true);
67
64
 
68
- if (OptionsController.state.isSiweEnabled) {
65
+ if (
66
+ OptionsController.state.isSiweEnabled &&
67
+ ConnectionsController.state.activeNamespace === 'eip155'
68
+ ) {
69
69
  if (SIWEController.state.status === 'success') {
70
70
  ModalController.close();
71
71
  } else {
@@ -1,73 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.ConnectEmailInput = ConnectEmailInput;
7
- var _valtio = require("valtio");
8
- var _react = require("react");
9
- var _appkitUiReactNative = require("@reown/appkit-ui-react-native");
10
- var _appkitCoreReactNative = require("@reown/appkit-core-react-native");
11
- function ConnectEmailInput({
12
- loading
13
- }) {
14
- const {
15
- connectors
16
- } = (0, _valtio.useSnapshot)(_appkitCoreReactNative.ConnectorController.state);
17
- const [inputLoading, setInputLoading] = (0, _react.useState)(false);
18
- const [error, setError] = (0, _react.useState)('');
19
- const [isValidEmail, setIsValidEmail] = (0, _react.useState)(false);
20
- const authProvider = connectors.find(c => c.type === 'AUTH')?.provider;
21
- const onChangeText = value => {
22
- setIsValidEmail(_appkitCoreReactNative.CoreHelperUtil.isValidEmail(value));
23
- setError('');
24
- };
25
- const onEmailFocus = () => {
26
- _appkitCoreReactNative.EventsController.sendEvent({
27
- type: 'track',
28
- event: 'EMAIL_LOGIN_SELECTED'
29
- });
30
- };
31
- const onEmailSubmit = async email => {
32
- try {
33
- if (email.length === 0) return;
34
- setInputLoading(true);
35
- const response = await authProvider.connectEmail({
36
- email
37
- });
38
- _appkitCoreReactNative.EventsController.sendEvent({
39
- type: 'track',
40
- event: 'EMAIL_SUBMITTED'
41
- });
42
- if (response.action === 'VERIFY_DEVICE') {
43
- _appkitCoreReactNative.RouterController.push('EmailVerifyDevice', {
44
- email
45
- });
46
- } else if (response.action === 'VERIFY_OTP') {
47
- _appkitCoreReactNative.RouterController.push('EmailVerifyOtp', {
48
- email
49
- });
50
- }
51
- } catch (e) {
52
- const parsedError = _appkitCoreReactNative.CoreHelperUtil.parseError(e);
53
- if (parsedError?.includes('valid email')) {
54
- setError('Invalid email. Try again.');
55
- } else {
56
- _appkitCoreReactNative.SnackController.showError(parsedError);
57
- }
58
- } finally {
59
- setInputLoading(false);
60
- }
61
- };
62
- return /*#__PURE__*/React.createElement(_appkitUiReactNative.FlexView, {
63
- padding: ['0', 's', '0', 's']
64
- }, /*#__PURE__*/React.createElement(_appkitUiReactNative.EmailInput, {
65
- onSubmit: onEmailSubmit,
66
- onFocus: onEmailFocus,
67
- loading: inputLoading || loading,
68
- errorMessage: error,
69
- onChangeText: onChangeText,
70
- submitEnabled: isValidEmail
71
- }));
72
- }
73
- //# sourceMappingURL=connect-email-input.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_valtio","require","_react","_appkitUiReactNative","_appkitCoreReactNative","ConnectEmailInput","loading","connectors","useSnapshot","ConnectorController","state","inputLoading","setInputLoading","useState","error","setError","isValidEmail","setIsValidEmail","authProvider","find","c","type","provider","onChangeText","value","CoreHelperUtil","onEmailFocus","EventsController","sendEvent","event","onEmailSubmit","email","length","response","connectEmail","action","RouterController","push","e","parsedError","parseError","includes","SnackController","showError","React","createElement","FlexView","padding","EmailInput","onSubmit","onFocus","errorMessage","submitEnabled"],"sourceRoot":"../../../../../src","sources":["views/w3m-connect-view/components/connect-email-input.tsx"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,oBAAA,GAAAF,OAAA;AACA,IAAAG,sBAAA,GAAAH,OAAA;AAaO,SAASI,iBAAiBA,CAAC;EAAEC;AAAe,CAAC,EAAE;EACpD,MAAM;IAAEC;EAAW,CAAC,GAAG,IAAAC,mBAAW,EAACC,0CAAmB,CAACC,KAAK,CAAC;EAC7D,MAAM,CAACC,YAAY,EAAEC,eAAe,CAAC,GAAG,IAAAC,eAAQ,EAAC,KAAK,CAAC;EACvD,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAG,IAAAF,eAAQ,EAAC,EAAE,CAAC;EACtC,MAAM,CAACG,YAAY,EAAEC,eAAe,CAAC,GAAG,IAAAJ,eAAQ,EAAC,KAAK,CAAC;EACvD,MAAMK,YAAY,GAAGX,UAAU,CAACY,IAAI,CAACC,CAAC,IAAIA,CAAC,CAACC,IAAI,KAAK,MAAM,CAAC,EAAEC,QAA+B;EAE7F,MAAMC,YAAY,GAAIC,KAAa,IAAK;IACtCP,eAAe,CAACQ,qCAAc,CAACT,YAAY,CAACQ,KAAK,CAAC,CAAC;IACnDT,QAAQ,CAAC,EAAE,CAAC;EACd,CAAC;EAED,MAAMW,YAAY,GAAGA,CAAA,KAAM;I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,EAAEnB,aAAc;IACxBoB,OAAO,EAAExB,YAAa;IACtBpB,OAAO,EAAEK,YAAY,IAAIL,OAAQ;IACjC6C,YAAY,EAAErC,KAAM;IACpBS,YAAY,EAAEA,YAAa;IAC3B6B,aAAa,EAAEpC;EAAa,CAC7B,CACO,CAAC;AAEf"}
@@ -1,55 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.WalletGuide = WalletGuide;
7
- var _appkitCoreReactNative = require("@reown/appkit-core-react-native");
8
- var _appkitUiReactNative = require("@reown/appkit-ui-react-native");
9
- var _reactNative = require("react-native");
10
- function WalletGuide({
11
- guide
12
- }) {
13
- const onExplorerPress = () => {
14
- _reactNative.Linking.openURL('https://explorer.walletconnect.com');
15
- };
16
- const onGetStartedPress = () => {
17
- _appkitCoreReactNative.RouterController.push('Create');
18
- };
19
- return guide === 'explore' ? /*#__PURE__*/React.createElement(_appkitUiReactNative.FlexView, {
20
- alignItems: "center",
21
- justifyContent: "center"
22
- }, /*#__PURE__*/React.createElement(_appkitUiReactNative.Separator, {
23
- text: "or",
24
- style: styles.socialSeparator
25
- }), /*#__PURE__*/React.createElement(_appkitUiReactNative.Text, {
26
- variant: "small-400",
27
- style: styles.text
28
- }, "Looking for a self-custody wallet?"), /*#__PURE__*/React.createElement(_appkitUiReactNative.Chip, {
29
- label: "Visit our explorer",
30
- variant: "transparent",
31
- rightIcon: "externalLink",
32
- leftIcon: "walletConnectLightBrown",
33
- size: "sm",
34
- onPress: onExplorerPress
35
- })) : /*#__PURE__*/React.createElement(_appkitUiReactNative.FlexView, {
36
- alignItems: "center",
37
- justifyContent: "center",
38
- margin: "m",
39
- flexDirection: "row"
40
- }, /*#__PURE__*/React.createElement(_appkitUiReactNative.Text, {
41
- variant: "small-400"
42
- }, "Haven't got a wallet?"), /*#__PURE__*/React.createElement(_appkitUiReactNative.Link, {
43
- onPress: onGetStartedPress,
44
- size: "sm"
45
- }, "Get started"));
46
- }
47
- const styles = _reactNative.StyleSheet.create({
48
- text: {
49
- marginBottom: _appkitUiReactNative.Spacing.xs
50
- },
51
- socialSeparator: {
52
- marginVertical: _appkitUiReactNative.Spacing.l
53
- }
54
- });
55
- //# sourceMappingURL=wallet-guide.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_appkitCoreReactNative","require","_appkitUiReactNative","_reactNative","WalletGuide","guide","onExplorerPress","Linking","openURL","onGetStartedPress","RouterController","push","React","createElement","FlexView","alignItems","justifyContent","Separator","text","style","styles","socialSeparator","Text","variant","Chip","label","rightIcon","leftIcon","size","onPress","margin","flexDirection","Link","StyleSheet","create","marginBottom","Spacing","xs","marginVertical","l"],"sourceRoot":"../../../../../src","sources":["views/w3m-connect-view/components/wallet-guide.tsx"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AACA,IAAAC,oBAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAMO,SAASG,WAAWA,CAAC;EAAEC;AAAwB,CAAC,EAAE;EACvD,MAAMC,eAAe,GAAGA,CAAA,KAAM;IAC5BC,oBAAO,CAACC,OAAO,CAAC,oCAAoC,CAAC;EACvD,CAAC;EAED,MAAMC,iBAAiB,GAAGA,CAAA,KAAM;IAC9BC,uCAAgB,CAACC,IAAI,CAAC,QAAQ,CAAC;EACjC,CAAC;EAED,OAAON,KAAK,KAAK,SAAS,gBACxBO,KAAA,CAAAC,aAAA,CAACX,oBAAA,CAAAY,QAAQ;IAACC,UAAU,EAAC,QAAQ;IAACC,cAAc,EAAC;EAAQ,gBACnDJ,KAAA,CAAAC,aAAA,CAACX,oBAAA,CAAAe,SAAS;IAACC,IAAI,EAAC,IAAI;IAACC,KAAK,EAAEC,MAAM,CAACC;EAAgB,CAAE,CAAC,eACtDT,KAAA,CAAAC,aAAA,CAACX,oBAAA,CAAAoB,IAAI;IAACC,OAAO,EAAC,WAAW;IAACJ,KAAK,EAAEC,MAAM,CAACF;EAAK,GAAC,oCAExC,CAAC,eACPN,KAAA,CAAAC,aAAA,CAACX,oBAAA,CAAAsB,IAAI;IACHC,KAAK,EAAC,oBAAoB;IAC1BF,OAAO,EAAC,aAAa;IACrBG,SAAS,EAAC,cAAc;IACxBC,QAAQ,EAAC,yBAAyB;IAClCC,IAAI,EAAC,IAAI;IACTC,OAAO,EAAEvB;EAAgB,CAC1B,CACO,CAAC,gBAEXM,KAAA,CAAAC,aAAA,CAACX,oBAAA,CAAAY,QAAQ;IAACC,UAAU,EAAC,QAAQ;IAACC,cAAc,EAAC,QAAQ;IAACc,MAAM,EAAC,GAAG;IAACC,aAAa,EAAC;EAAK,gBAClFnB,KAAA,CAAAC,aAAA,CAACX,oBAAA,CAAAoB,IAAI;IAACC,OAAO,EAAC;EAAW,GAAC,uBAA2B,CAAC,eACtDX,KAAA,CAAAC,aAAA,CAACX,oBAAA,CAAA8B,IAAI;IAACH,OAAO,EAAEpB,iBAAkB;IAACmB,IAAI,EAAC;EAAI,GAAC,aAEtC,CACE,CACX;AACH;AAEA,MAAMR,MAAM,GAAGa,uBAAU,CAACC,MAAM,CAAC;EAC/BhB,IAAI,EAAE;IACJiB,YAAY,EAAEC,4BAAO,CAACC;EACxB,CAAC;EACDhB,eAAe,EAAE;IACfiB,cAAc,EAAEF,4BAAO,CAACG;EAC1B;AACF,CAAC,CAAC"}
@@ -1,124 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.ConnectingFarcasterView = ConnectingFarcasterView;
7
- var _reactNative = require("react-native");
8
- var _react = require("react");
9
- var _appkitCoreReactNative = require("@reown/appkit-core-react-native");
10
- var _appkitUiReactNative = require("@reown/appkit-ui-react-native");
11
- var _useCustomDimensions = require("../../hooks/useCustomDimensions");
12
- var _styles = _interopRequireDefault(require("./styles"));
13
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
- function ConnectingFarcasterView() {
15
- const {
16
- maxWidth: width
17
- } = (0, _useCustomDimensions.useCustomDimensions)();
18
- const authConnector = _appkitCoreReactNative.ConnectorController.getAuthConnector();
19
- const [error, setError] = (0, _react.useState)(false);
20
- const [processing, setProcessing] = (0, _react.useState)(false);
21
- const [url, setUrl] = (0, _react.useState)();
22
- const showCopy = _appkitCoreReactNative.OptionsController.isClipboardAvailable();
23
- const provider = authConnector?.provider;
24
- const onConnect = (0, _react.useCallback)(async () => {
25
- try {
26
- if (provider && authConnector) {
27
- setError(false);
28
- const {
29
- url: farcasterUrl
30
- } = await provider.getFarcasterUri();
31
- setUrl(farcasterUrl);
32
- _reactNative.Linking.openURL(farcasterUrl);
33
- await provider.connectFarcaster();
34
- _appkitCoreReactNative.EventsController.sendEvent({
35
- type: 'track',
36
- event: 'SOCIAL_LOGIN_REQUEST_USER_DATA',
37
- properties: {
38
- provider: 'farcaster'
39
- }
40
- });
41
- setProcessing(true);
42
- await _appkitCoreReactNative.ConnectionController.connectExternal(authConnector);
43
- _appkitCoreReactNative.ConnectionController.setConnectedSocialProvider('farcaster');
44
- _appkitCoreReactNative.EventsController.sendEvent({
45
- type: 'track',
46
- event: 'SOCIAL_LOGIN_SUCCESS',
47
- properties: {
48
- provider: 'farcaster'
49
- }
50
- });
51
- setProcessing(false);
52
- _appkitCoreReactNative.ModalController.close();
53
- }
54
- } catch (e) {
55
- _appkitCoreReactNative.EventsController.sendEvent({
56
- type: 'track',
57
- event: 'SOCIAL_LOGIN_ERROR',
58
- properties: {
59
- provider: 'farcaster'
60
- }
61
- });
62
- // TODO: remove this once Farcaster session refresh is implemented
63
- // @ts-expect-error
64
- provider?.webviewRef?.current?.reload();
65
- _appkitCoreReactNative.SnackController.showError('Something went wrong');
66
- setError(true);
67
- setProcessing(false);
68
- }
69
- }, [provider, authConnector]);
70
- const onCopyUrl = () => {
71
- if (url) {
72
- _appkitCoreReactNative.OptionsController.copyToClipboard(url);
73
- _appkitCoreReactNative.SnackController.showSuccess('Link copied');
74
- }
75
- };
76
- (0, _react.useEffect)(() => {
77
- return () => {
78
- // TODO: remove this once Farcaster session refresh is implemented
79
- if (!_appkitCoreReactNative.ModalController.state.open) {
80
- // @ts-expect-error
81
- provider.webviewRef?.current?.reload();
82
- }
83
- };
84
- // @ts-expect-error
85
- }, [provider.webviewRef]);
86
- (0, _react.useEffect)(() => {
87
- onConnect();
88
- }, [onConnect]);
89
- return /*#__PURE__*/React.createElement(_appkitUiReactNative.FlexView, {
90
- alignItems: "center",
91
- alignSelf: "center",
92
- padding: ['2xl', 'l', '3xl', 'l'],
93
- style: {
94
- width
95
- }
96
- }, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_appkitUiReactNative.LoadingThumbnail, {
97
- paused: !!error
98
- }, /*#__PURE__*/React.createElement(_appkitUiReactNative.Logo, {
99
- logo: "farcasterSquare",
100
- height: 72,
101
- width: 72
102
- }), error && /*#__PURE__*/React.createElement(_appkitUiReactNative.IconBox, {
103
- icon: 'close',
104
- border: true,
105
- background: true,
106
- backgroundColor: "icon-box-bg-error-100",
107
- size: "sm",
108
- iconColor: "error-100",
109
- style: _styles.default.errorIcon
110
- })), /*#__PURE__*/React.createElement(_appkitUiReactNative.Text, {
111
- style: _styles.default.continueText,
112
- variant: "paragraph-500"
113
- }, processing ? 'Loading user data' : 'Continue in Farcaster'), /*#__PURE__*/React.createElement(_appkitUiReactNative.Text, {
114
- variant: "small-400",
115
- color: "fg-200"
116
- }, processing ? 'Please wait a moment while we load your data' : 'Connect in the Farcaster app'), showCopy && /*#__PURE__*/React.createElement(_appkitUiReactNative.Link, {
117
- iconLeft: "copySmall",
118
- color: "fg-200",
119
- style: _styles.default.copyButton,
120
- onPress: onCopyUrl,
121
- testID: "copy-link"
122
- }, "Copy link")));
123
- }
124
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_reactNative","require","_react","_appkitCoreReactNative","_appkitUiReactNative","_useCustomDimensions","_styles","_interopRequireDefault","e","__esModule","default","ConnectingFarcasterView","maxWidth","width","useCustomDimensions","authConnector","ConnectorController","getAuthConnector","error","setError","useState","processing","setProcessing","url","setUrl","showCopy","OptionsController","isClipboardAvailable","provider","onConnect","useCallback","farcasterUrl","getFarcasterUri","Linking","openURL","connectFarcaster","EventsController","sendEvent","type","event","properties","ConnectionController","connectExternal","setConnectedSocialProvider","ModalController","close","webviewRef","current","reload","SnackController","showError","onCopyUrl","copyToClipboard","showSuccess","useEffect","state","open","React","createElement","FlexView","alignItems","alignSelf","padding","style","Fragment","LoadingThumbnail","paused","Logo","logo","height","IconBox","icon","border","background","backgroundColor","size","iconColor","styles","errorIcon","Text","continueText","variant","color","Link","iconLeft","copyButton","onPress","testID"],"sourceRoot":"../../../../src","sources":["views/w3m-connecting-farcaster-view/index.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAF,OAAA;AASA,IAAAG,oBAAA,GAAAH,OAAA;AASA,IAAAI,oBAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAC,sBAAA,CAAAN,OAAA;AAA8B,SAAAM,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEvB,SAASG,uBAAuBA,CAAA,EAAG;EACxC,MAAM;IAAEC,QAAQ,EAAEC;EAAM,CAAC,GAAG,IAAAC,wCAAmB,EAAC,CAAC;EACjD,MAAMC,aAAa,GAAGC,0CAAmB,CAACC,gBAAgB,CAAC,CAAC;EAC5D,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAG,IAAAC,eAAQ,EAAC,KAAK,CAAC;EACzC,MAAM,CAACC,UAAU,EAAEC,aAAa,CAAC,GAAG,IAAAF,eAAQ,EAAC,KAAK,CAAC;EACnD,MAAM,CAACG,GAAG,EAAEC,MAAM,CAAC,GAAG,IAAAJ,eAAQ,EAAqB,CAAC;EACpD,MAAMK,QAAQ,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,KAAK,iBACJuC,KAAA,CAAAC,aAAA,CAACtD,oBAAA,CAAAkE,OAAO;IACNC,IAAI,EAAE,OAAQ;IACdC,MAAM;IACNC,UAAU;IACVC,eAAe,EAAC,uBAAuB;IACvCC,IAAI,EAAC,IAAI;IACTC,SAAS,EAAC,WAAW;IACrBb,KAAK,EAAEc,eAAM,CAACC;EAAU,CACzB,CAEa,CAAC,eACnBrB,KAAA,CAAAC,aAAA,CAACtD,oBAAA,CAAA2E,IAAI;IAAChB,KAAK,EAAEc,eAAM,CAACG,YAAa;IAACC,OAAO,EAAC;EAAe,GACtD5D,UAAU,GAAG,mBAAmB,GAAG,uBAChC,CAAC,eACPoC,KAAA,CAAAC,aAAA,CAACtD,oBAAA,CAAA2E,IAAI;IAACE,OAAO,EAAC,WAAW;IAACC,KAAK,EAAC;EAAQ,GACrC7D,UAAU,GACP,8CAA8C,GAC9C,8BACA,CAAC,EACNI,QAAQ,iBACPgC,KAAA,CAAAC,aAAA,CAACtD,oBAAA,CAAA+E,IAAI;IACHC,QAAQ,EAAC,WAAW;IACpBF,KAAK,EAAC,QAAQ;IACdnB,KAAK,EAAEc,eAAM,CAACQ,UAAW;IACzBC,OAAO,EAAEnC,SAAU;IACnBoC,MAAM,EAAC;EAAW,GACnB,WAEK,CAER,CACM,CAAC;AAEf"}
@@ -1,24 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _reactNative = require("react-native");
8
- var _appkitUiReactNative = require("@reown/appkit-ui-react-native");
9
- var _default = exports.default = _reactNative.StyleSheet.create({
10
- errorIcon: {
11
- position: 'absolute',
12
- bottom: 8,
13
- right: 8,
14
- zIndex: 2
15
- },
16
- continueText: {
17
- marginTop: _appkitUiReactNative.Spacing.m,
18
- marginBottom: _appkitUiReactNative.Spacing.xs
19
- },
20
- copyButton: {
21
- marginTop: _appkitUiReactNative.Spacing.m
22
- }
23
- });
24
- //# sourceMappingURL=styles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_reactNative","require","_appkitUiReactNative","_default","exports","default","StyleSheet","create","errorIcon","position","bottom","right","zIndex","continueText","marginTop","Spacing","m","marginBottom","xs","copyButton"],"sourceRoot":"../../../../src","sources":["views/w3m-connecting-farcaster-view/styles.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,oBAAA,GAAAD,OAAA;AAAwD,IAAAE,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEzCC,uBAAU,CAACC,MAAM,CAAC;EAC/BC,SAAS,EAAE;IACTC,QAAQ,EAAE,UAAU;IACpBC,MAAM,EAAE,CAAC;IACTC,KAAK,EAAE,CAAC;IACRC,MAAM,EAAE;EACV,CAAC;EACDC,YAAY,EAAE;IACZC,SAAS,EAAEC,4BAAO,CAACC,CAAC;IACpBC,YAAY,EAAEF,4BAAO,CAACG;EACxB,CAAC;EACDC,UAAU,EAAE;IACVL,SAAS,EAAEC,4BAAO,CAACC;EACrB;AACF,CAAC,CAAC"}
@@ -1,57 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.CreateView = CreateView;
7
- var _reactNative = require("react-native");
8
- var _valtio = require("valtio");
9
- var _appkitUiReactNative = require("@reown/appkit-ui-react-native");
10
- var _connectEmailInput = require("../w3m-connect-view/components/connect-email-input");
11
- var _socialLoginList = require("../w3m-connect-view/components/social-login-list");
12
- var _walletGuide = require("../w3m-connect-view/components/wallet-guide");
13
- var _useCustomDimensions = require("../../hooks/useCustomDimensions");
14
- var _appkitCoreReactNative = require("@reown/appkit-core-react-native");
15
- var _useKeyboard = require("../../hooks/useKeyboard");
16
- function CreateView() {
17
- const connectors = _appkitCoreReactNative.ConnectorController.state.connectors;
18
- const {
19
- authLoading
20
- } = (0, _valtio.useSnapshot)(_appkitCoreReactNative.ConnectorController.state);
21
- const {
22
- features
23
- } = (0, _valtio.useSnapshot)(_appkitCoreReactNative.OptionsController.state);
24
- const {
25
- padding
26
- } = (0, _useCustomDimensions.useCustomDimensions)();
27
- const {
28
- keyboardShown,
29
- keyboardHeight
30
- } = (0, _useKeyboard.useKeyboard)();
31
- const isAuthEnabled = connectors.some(c => c.type === 'AUTH');
32
- const isEmailEnabled = isAuthEnabled && features?.email;
33
- const isSocialEnabled = isAuthEnabled && features?.socials && features?.socials.length > 0;
34
- const paddingBottom = _reactNative.Platform.select({
35
- android: keyboardShown ? keyboardHeight + _appkitUiReactNative.Spacing.xl : _appkitUiReactNative.Spacing.xl,
36
- default: _appkitUiReactNative.Spacing.xl
37
- });
38
- return /*#__PURE__*/React.createElement(_reactNative.ScrollView, {
39
- style: {
40
- paddingHorizontal: padding
41
- },
42
- bounces: false
43
- }, /*#__PURE__*/React.createElement(_appkitUiReactNative.FlexView, {
44
- padding: ['xs', '0', '0', '0'],
45
- style: {
46
- paddingBottom
47
- }
48
- }, isEmailEnabled && /*#__PURE__*/React.createElement(_connectEmailInput.ConnectEmailInput, {
49
- loading: authLoading
50
- }), isSocialEnabled && /*#__PURE__*/React.createElement(_socialLoginList.SocialLoginList, {
51
- options: features?.socials,
52
- disabled: authLoading
53
- }), isAuthEnabled && /*#__PURE__*/React.createElement(_walletGuide.WalletGuide, {
54
- guide: "explore"
55
- })));
56
- }
57
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_reactNative","require","_valtio","_appkitUiReactNative","_connectEmailInput","_socialLoginList","_walletGuide","_useCustomDimensions","_appkitCoreReactNative","_useKeyboard","CreateView","connectors","ConnectorController","state","authLoading","useSnapshot","features","OptionsController","padding","useCustomDimensions","keyboardShown","keyboardHeight","useKeyboard","isAuthEnabled","some","c","type","isEmailEnabled","email","isSocialEnabled","socials","length","paddingBottom","Platform","select","android","Spacing","xl","default","React","createElement","ScrollView","style","paddingHorizontal","bounces","FlexView","ConnectEmailInput","loading","SocialLoginList","options","disabled","WalletGuide","guide"],"sourceRoot":"../../../../src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