@reown/appkit-react-native 0.0.0-feat-multi-social-20250703185818 → 0.0.0-feat-multi-social-20250710154055

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 (179) hide show
  1. package/lib/commonjs/AppKit.js +50 -16
  2. package/lib/commonjs/AppKit.js.map +1 -1
  3. package/lib/commonjs/AppKitContext.js +2 -1
  4. package/lib/commonjs/AppKitContext.js.map +1 -1
  5. package/lib/commonjs/client.js +15 -24
  6. package/lib/commonjs/client.js.map +1 -1
  7. package/lib/commonjs/connectors/WalletConnectConnector.js +4 -2
  8. package/lib/commonjs/connectors/WalletConnectConnector.js.map +1 -1
  9. package/lib/commonjs/modal/w3m-router/index.js +0 -9
  10. package/lib/commonjs/modal/w3m-router/index.js.map +1 -1
  11. package/lib/commonjs/partials/w3m-account-tokens/index.js +11 -4
  12. package/lib/commonjs/partials/w3m-account-tokens/index.js.map +1 -1
  13. package/lib/commonjs/partials/w3m-account-wallet-features/index.js +5 -2
  14. package/lib/commonjs/partials/w3m-account-wallet-features/index.js.map +1 -1
  15. package/lib/commonjs/partials/w3m-connecting-qrcode/index.js +4 -3
  16. package/lib/commonjs/partials/w3m-connecting-qrcode/index.js.map +1 -1
  17. package/lib/commonjs/partials/w3m-header/index.js +0 -3
  18. package/lib/commonjs/partials/w3m-header/index.js.map +1 -1
  19. package/lib/commonjs/partials/w3m-send-input-token/index.js +1 -1
  20. package/lib/commonjs/partials/w3m-send-input-token/index.js.map +1 -1
  21. package/lib/commonjs/views/w3m-account-default-view/index.js +22 -23
  22. package/lib/commonjs/views/w3m-account-default-view/index.js.map +1 -1
  23. package/lib/commonjs/views/w3m-account-view/index.js +11 -6
  24. package/lib/commonjs/views/w3m-account-view/index.js.map +1 -1
  25. package/lib/commonjs/views/w3m-all-wallets-view/index.js +10 -11
  26. package/lib/commonjs/views/w3m-all-wallets-view/index.js.map +1 -1
  27. package/lib/commonjs/views/w3m-connect-view/components/connectors-list.js +47 -32
  28. package/lib/commonjs/views/w3m-connect-view/components/connectors-list.js.map +1 -1
  29. package/lib/commonjs/views/w3m-connect-view/index.js +12 -21
  30. package/lib/commonjs/views/w3m-connect-view/index.js.map +1 -1
  31. package/lib/commonjs/views/w3m-connecting-external-view/index.js +20 -15
  32. package/lib/commonjs/views/w3m-connecting-external-view/index.js.map +1 -1
  33. package/lib/commonjs/views/w3m-network-switch-view/index.js +13 -19
  34. package/lib/commonjs/views/w3m-network-switch-view/index.js.map +1 -1
  35. package/lib/commonjs/views/w3m-onramp-transaction-view/index.js +1 -1
  36. package/lib/commonjs/views/w3m-onramp-transaction-view/index.js.map +1 -1
  37. package/lib/commonjs/views/w3m-swap-select-token-view/utils.js +4 -1
  38. package/lib/commonjs/views/w3m-swap-select-token-view/utils.js.map +1 -1
  39. package/lib/commonjs/views/w3m-unsupported-chain-view/index.js +7 -20
  40. package/lib/commonjs/views/w3m-unsupported-chain-view/index.js.map +1 -1
  41. package/lib/commonjs/views/w3m-upgrade-email-wallet-view/index.js +3 -8
  42. package/lib/commonjs/views/w3m-upgrade-email-wallet-view/index.js.map +1 -1
  43. package/lib/commonjs/views/w3m-wallet-send-preview-view/components/preview-send-details.js +2 -2
  44. package/lib/commonjs/views/w3m-wallet-send-preview-view/components/preview-send-details.js.map +1 -1
  45. package/lib/commonjs/views/w3m-wallet-send-preview-view/index.js +3 -3
  46. package/lib/commonjs/views/w3m-wallet-send-preview-view/index.js.map +1 -1
  47. package/lib/commonjs/views/w3m-wallet-send-select-token-view/index.js +1 -1
  48. package/lib/commonjs/views/w3m-wallet-send-select-token-view/index.js.map +1 -1
  49. package/lib/module/AppKit.js +50 -16
  50. package/lib/module/AppKit.js.map +1 -1
  51. package/lib/module/AppKitContext.js +2 -1
  52. package/lib/module/AppKitContext.js.map +1 -1
  53. package/lib/module/client.js +17 -26
  54. package/lib/module/client.js.map +1 -1
  55. package/lib/module/connectors/WalletConnectConnector.js +4 -2
  56. package/lib/module/connectors/WalletConnectConnector.js.map +1 -1
  57. package/lib/module/modal/w3m-router/index.js +0 -9
  58. package/lib/module/modal/w3m-router/index.js.map +1 -1
  59. package/lib/module/partials/w3m-account-tokens/index.js +12 -5
  60. package/lib/module/partials/w3m-account-tokens/index.js.map +1 -1
  61. package/lib/module/partials/w3m-account-wallet-features/index.js +5 -2
  62. package/lib/module/partials/w3m-account-wallet-features/index.js.map +1 -1
  63. package/lib/module/partials/w3m-connecting-qrcode/index.js +5 -4
  64. package/lib/module/partials/w3m-connecting-qrcode/index.js.map +1 -1
  65. package/lib/module/partials/w3m-header/index.js +0 -3
  66. package/lib/module/partials/w3m-header/index.js.map +1 -1
  67. package/lib/module/partials/w3m-send-input-token/index.js +1 -1
  68. package/lib/module/partials/w3m-send-input-token/index.js.map +1 -1
  69. package/lib/module/views/w3m-account-default-view/index.js +22 -23
  70. package/lib/module/views/w3m-account-default-view/index.js.map +1 -1
  71. package/lib/module/views/w3m-account-view/index.js +12 -7
  72. package/lib/module/views/w3m-account-view/index.js.map +1 -1
  73. package/lib/module/views/w3m-all-wallets-view/index.js +11 -12
  74. package/lib/module/views/w3m-all-wallets-view/index.js.map +1 -1
  75. package/lib/module/views/w3m-connect-view/components/connectors-list.js +47 -32
  76. package/lib/module/views/w3m-connect-view/components/connectors-list.js.map +1 -1
  77. package/lib/module/views/w3m-connect-view/index.js +13 -22
  78. package/lib/module/views/w3m-connect-view/index.js.map +1 -1
  79. package/lib/module/views/w3m-connecting-external-view/index.js +22 -16
  80. package/lib/module/views/w3m-connecting-external-view/index.js.map +1 -1
  81. package/lib/module/views/w3m-network-switch-view/index.js +14 -19
  82. package/lib/module/views/w3m-network-switch-view/index.js.map +1 -1
  83. package/lib/module/views/w3m-onramp-transaction-view/index.js +2 -2
  84. package/lib/module/views/w3m-onramp-transaction-view/index.js.map +1 -1
  85. package/lib/module/views/w3m-swap-select-token-view/utils.js +4 -1
  86. package/lib/module/views/w3m-swap-select-token-view/utils.js.map +1 -1
  87. package/lib/module/views/w3m-unsupported-chain-view/index.js +8 -21
  88. package/lib/module/views/w3m-unsupported-chain-view/index.js.map +1 -1
  89. package/lib/module/views/w3m-upgrade-email-wallet-view/index.js +3 -8
  90. package/lib/module/views/w3m-upgrade-email-wallet-view/index.js.map +1 -1
  91. package/lib/module/views/w3m-wallet-send-preview-view/components/preview-send-details.js +2 -2
  92. package/lib/module/views/w3m-wallet-send-preview-view/components/preview-send-details.js.map +1 -1
  93. package/lib/module/views/w3m-wallet-send-preview-view/index.js +4 -4
  94. package/lib/module/views/w3m-wallet-send-preview-view/index.js.map +1 -1
  95. package/lib/module/views/w3m-wallet-send-select-token-view/index.js +1 -1
  96. package/lib/module/views/w3m-wallet-send-select-token-view/index.js.map +1 -1
  97. package/lib/typescript/AppKit.d.ts +4 -1
  98. package/lib/typescript/AppKit.d.ts.map +1 -1
  99. package/lib/typescript/AppKitContext.d.ts +1 -0
  100. package/lib/typescript/AppKitContext.d.ts.map +1 -1
  101. package/lib/typescript/client.d.ts +1 -6
  102. package/lib/typescript/client.d.ts.map +1 -1
  103. package/lib/typescript/connectors/WalletConnectConnector.d.ts +1 -1
  104. package/lib/typescript/connectors/WalletConnectConnector.d.ts.map +1 -1
  105. package/lib/typescript/hooks/useAppKitEvents.d.ts +1 -1
  106. package/lib/typescript/modal/w3m-router/index.d.ts.map +1 -1
  107. package/lib/typescript/partials/w3m-account-tokens/index.d.ts +2 -1
  108. package/lib/typescript/partials/w3m-account-tokens/index.d.ts.map +1 -1
  109. package/lib/typescript/partials/w3m-account-wallet-features/index.d.ts +2 -2
  110. package/lib/typescript/partials/w3m-account-wallet-features/index.d.ts.map +1 -1
  111. package/lib/typescript/partials/w3m-connecting-qrcode/index.d.ts.map +1 -1
  112. package/lib/typescript/partials/w3m-header/index.d.ts.map +1 -1
  113. package/lib/typescript/views/w3m-account-default-view/index.d.ts.map +1 -1
  114. package/lib/typescript/views/w3m-account-view/index.d.ts.map +1 -1
  115. package/lib/typescript/views/w3m-all-wallets-view/index.d.ts.map +1 -1
  116. package/lib/typescript/views/w3m-connect-view/components/connectors-list.d.ts +1 -7
  117. package/lib/typescript/views/w3m-connect-view/components/connectors-list.d.ts.map +1 -1
  118. package/lib/typescript/views/w3m-connect-view/index.d.ts.map +1 -1
  119. package/lib/typescript/views/w3m-connecting-external-view/index.d.ts.map +1 -1
  120. package/lib/typescript/views/w3m-network-switch-view/index.d.ts.map +1 -1
  121. package/lib/typescript/views/w3m-swap-select-token-view/utils.d.ts +1 -1
  122. package/lib/typescript/views/w3m-swap-select-token-view/utils.d.ts.map +1 -1
  123. package/lib/typescript/views/w3m-unsupported-chain-view/index.d.ts.map +1 -1
  124. package/lib/typescript/views/w3m-upgrade-email-wallet-view/index.d.ts.map +1 -1
  125. package/lib/typescript/views/w3m-wallet-send-preview-view/components/preview-send-details.d.ts +3 -3
  126. package/lib/typescript/views/w3m-wallet-send-preview-view/components/preview-send-details.d.ts.map +1 -1
  127. package/package.json +5 -5
  128. package/src/AppKit.ts +78 -39
  129. package/src/AppKitContext.tsx +2 -1
  130. package/src/client.ts +12 -41
  131. package/src/connectors/WalletConnectConnector.ts +5 -3
  132. package/src/modal/w3m-router/index.tsx +0 -9
  133. package/src/partials/w3m-account-tokens/index.tsx +26 -18
  134. package/src/partials/w3m-account-wallet-features/index.tsx +5 -3
  135. package/src/partials/w3m-connecting-qrcode/index.tsx +3 -4
  136. package/src/partials/w3m-header/index.tsx +0 -3
  137. package/src/partials/w3m-send-input-token/index.tsx +2 -2
  138. package/src/views/w3m-account-default-view/index.tsx +20 -23
  139. package/src/views/w3m-account-view/index.tsx +11 -8
  140. package/src/views/w3m-all-wallets-view/index.tsx +7 -7
  141. package/src/views/w3m-connect-view/components/connectors-list.tsx +40 -38
  142. package/src/views/w3m-connect-view/index.tsx +9 -18
  143. package/src/views/w3m-connecting-external-view/index.tsx +16 -16
  144. package/src/views/w3m-network-switch-view/index.tsx +12 -24
  145. package/src/views/w3m-onramp-transaction-view/index.tsx +2 -2
  146. package/src/views/w3m-swap-select-token-view/utils.ts +6 -2
  147. package/src/views/w3m-unsupported-chain-view/index.tsx +8 -30
  148. package/src/views/w3m-upgrade-email-wallet-view/index.tsx +3 -7
  149. package/src/views/w3m-wallet-send-preview-view/components/preview-send-details.tsx +4 -4
  150. package/src/views/w3m-wallet-send-preview-view/index.tsx +3 -3
  151. package/src/views/w3m-wallet-send-select-token-view/index.tsx +1 -1
  152. package/lib/commonjs/views/w3m-update-email-primary-otp-view/index.js +0 -56
  153. package/lib/commonjs/views/w3m-update-email-primary-otp-view/index.js.map +0 -1
  154. package/lib/commonjs/views/w3m-update-email-secondary-otp-view/index.js +0 -62
  155. package/lib/commonjs/views/w3m-update-email-secondary-otp-view/index.js.map +0 -1
  156. package/lib/commonjs/views/w3m-update-email-wallet-view/index.js +0 -104
  157. package/lib/commonjs/views/w3m-update-email-wallet-view/index.js.map +0 -1
  158. package/lib/commonjs/views/w3m-update-email-wallet-view/styles.js +0 -30
  159. package/lib/commonjs/views/w3m-update-email-wallet-view/styles.js.map +0 -1
  160. package/lib/module/views/w3m-update-email-primary-otp-view/index.js +0 -50
  161. package/lib/module/views/w3m-update-email-primary-otp-view/index.js.map +0 -1
  162. package/lib/module/views/w3m-update-email-secondary-otp-view/index.js +0 -56
  163. package/lib/module/views/w3m-update-email-secondary-otp-view/index.js.map +0 -1
  164. package/lib/module/views/w3m-update-email-wallet-view/index.js +0 -97
  165. package/lib/module/views/w3m-update-email-wallet-view/index.js.map +0 -1
  166. package/lib/module/views/w3m-update-email-wallet-view/styles.js +0 -24
  167. package/lib/module/views/w3m-update-email-wallet-view/styles.js.map +0 -1
  168. package/lib/typescript/views/w3m-update-email-primary-otp-view/index.d.ts +0 -2
  169. package/lib/typescript/views/w3m-update-email-primary-otp-view/index.d.ts.map +0 -1
  170. package/lib/typescript/views/w3m-update-email-secondary-otp-view/index.d.ts +0 -2
  171. package/lib/typescript/views/w3m-update-email-secondary-otp-view/index.d.ts.map +0 -1
  172. package/lib/typescript/views/w3m-update-email-wallet-view/index.d.ts +0 -2
  173. package/lib/typescript/views/w3m-update-email-wallet-view/index.d.ts.map +0 -1
  174. package/lib/typescript/views/w3m-update-email-wallet-view/styles.d.ts +0 -23
  175. package/lib/typescript/views/w3m-update-email-wallet-view/styles.d.ts.map +0 -1
  176. package/src/views/w3m-update-email-primary-otp-view/index.tsx +0 -55
  177. package/src/views/w3m-update-email-secondary-otp-view/index.tsx +0 -56
  178. package/src/views/w3m-update-email-wallet-view/index.tsx +0 -96
  179. package/src/views/w3m-update-email-wallet-view/styles.ts +0 -24
@@ -1,97 +0,0 @@
1
- import { useState } from 'react';
2
- import { Platform } from 'react-native';
3
- import { ConnectorController, CoreHelperUtil, RouterController, SnackController, EventsController } from '@reown/appkit-core-react-native';
4
- import { Button, EmailInput, FlexView, Spacing, Text } from '@reown/appkit-ui-react-native';
5
- import { useKeyboard } from '../../hooks/useKeyboard';
6
- import styles from './styles';
7
- export function UpdateEmailWalletView() {
8
- const {
9
- data
10
- } = RouterController.state;
11
- const [loading, setLoading] = useState(false);
12
- const [error, setError] = useState('');
13
- const [email, setEmail] = useState(data?.email || '');
14
- const [isValidNewEmail, setIsValidNewEmail] = useState(false);
15
- const authConnector = ConnectorController.getAuthConnector();
16
- const {
17
- keyboardShown,
18
- keyboardHeight
19
- } = useKeyboard();
20
- const paddingBottom = Platform.select({
21
- android: keyboardShown ? keyboardHeight + Spacing.l : Spacing.l,
22
- default: Spacing.l
23
- });
24
- const onChangeText = value => {
25
- setIsValidNewEmail(data?.email !== value && CoreHelperUtil.isValidEmail(value));
26
- setEmail(value);
27
- setError('');
28
- };
29
- const onEmailSubmit = async value => {
30
- if (!authConnector) return;
31
- const provider = authConnector.provider;
32
- setLoading(true);
33
- setError('');
34
- try {
35
- const response = await provider.updateEmail({
36
- email: value
37
- });
38
- EventsController.sendEvent({
39
- type: 'track',
40
- event: 'EMAIL_EDIT'
41
- });
42
- if (response.action === 'VERIFY_SECONDARY_OTP') {
43
- RouterController.push('UpdateEmailSecondaryOtp', {
44
- email: data?.email,
45
- newEmail: value
46
- });
47
- } else {
48
- RouterController.push('UpdateEmailPrimaryOtp', {
49
- email: data?.email,
50
- newEmail: value
51
- });
52
- }
53
- } catch (e) {
54
- const parsedError = CoreHelperUtil.parseError(e);
55
- if (parsedError?.includes('Invalid email')) {
56
- setError('Invalid email. Try again.');
57
- } else {
58
- SnackController.showError(parsedError);
59
- }
60
- } finally {
61
- setLoading(false);
62
- }
63
- };
64
- return /*#__PURE__*/React.createElement(FlexView, {
65
- padding: ['l', 's', '0', 's'],
66
- style: {
67
- paddingBottom
68
- }
69
- }, /*#__PURE__*/React.createElement(EmailInput, {
70
- initialValue: data?.email,
71
- onSubmit: onEmailSubmit,
72
- submitEnabled: isValidNewEmail,
73
- onChangeText: onChangeText,
74
- loading: loading,
75
- errorMessage: error,
76
- style: styles.emailInput,
77
- autoFocus: true
78
- }), /*#__PURE__*/React.createElement(FlexView, {
79
- flexDirection: "row",
80
- justifyContent: "center",
81
- alignItems: "center",
82
- margin: ['0', 'xs', '0', 'xs']
83
- }, /*#__PURE__*/React.createElement(Button, {
84
- onPress: RouterController.goBack,
85
- variant: "shade",
86
- style: styles.cancelButton
87
- }, /*#__PURE__*/React.createElement(Text, {
88
- variant: "paragraph-600",
89
- color: "fg-100"
90
- }, "Cancel")), /*#__PURE__*/React.createElement(Button, {
91
- onPress: () => onEmailSubmit(email),
92
- variant: "fill",
93
- style: styles.saveButton,
94
- disabled: loading || !isValidNewEmail
95
- }, "Save")));
96
- }
97
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["useState","Platform","ConnectorController","CoreHelperUtil","RouterController","SnackController","EventsController","Button","EmailInput","FlexView","Spacing","Text","useKeyboard","styles","UpdateEmailWalletView","data","state","loading","setLoading","error","setError","email","setEmail","isValidNewEmail","setIsValidNewEmail","authConnector","getAuthConnector","keyboardShown","keyboardHeight","paddingBottom","select","android","l","default","onChangeText","value","isValidEmail","onEmailSubmit","provider","response","updateEmail","sendEvent","type","event","action","push","newEmail","e","parsedError","parseError","includes","showError","React","createElement","padding","style","initialValue","onSubmit","submitEnabled","errorMessage","emailInput","autoFocus","flexDirection","justifyContent","alignItems","margin","onPress","goBack","variant","cancelButton","color","saveButton","disabled"],"sourceRoot":"../../../../src","sources":["views/w3m-update-email-wallet-view/index.tsx"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,OAAO;AAChC,SAASC,QAAQ,QAAQ,cAAc;AACvC,SACEC,mBAAmB,EACnBC,cAAc,EACdC,gBAAgB,EAChBC,eAAe,EACfC,gBAAgB,QAEX,iCAAiC;AACxC,SAASC,MAAM,EAAEC,UAAU,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,IAAI,QAAQ,+BAA+B;AAC3F,SAASC,WAAW,QAAQ,yBAAyB;AAErD,OAAOC,MAAM,MAAM,UAAU;AAE7B,OAAO,SAASC,qBAAqBA,CAAA,EAAG;EACtC,MAAM;IAAEC;EAAK,CAAC,GAAGX,gBAAgB,CAACY,KAAK;EACvC,MAAM,CAACC,OAAO,EAAEC,UAAU,CAAC,GAAGlB,QAAQ,CAAC,KAAK,CAAC;EAC7C,MAAM,CAACmB,KAAK,EAAEC,QAAQ,CAAC,GAAGpB,QAAQ,CAAC,EAAE,CAAC;EACtC,MAAM,CAACqB,KAAK,EAAEC,QAAQ,CAAC,GAAGtB,QAAQ,CAACe,IAAI,EAAEM,KAAK,IAAI,EAAE,CAAC;EACrD,MAAM,CAACE,eAAe,EAAEC,kBAAkB,CAAC,GAAGxB,QAAQ,CAAC,KAAK,CAAC;EAC7D,MAAMyB,aAAa,GAAGvB,mBAAmB,CAACwB,gBAAgB,CAAC,CAAC;EAC5D,MAAM;IAAEC,aAAa;IAAEC;EAAe,CAAC,GAAGhB,WAAW,CAAC,CAAC;EACvD,MAAMiB,aAAa,GAAG5B,QAAQ,CAAC6B,MAAM,CAAC;IACpCC,OAAO,EAAEJ,aAAa,GAAGC,cAAc,GAAGlB,OAAO,CAACsB,CA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AC0D,UAAW;IACzBC,QAAQ,EAAEvD,OAAO,IAAI,CAACM;EAAgB,GACvC,MAEO,CACA,CACF,CAAC;AAEf"}
@@ -1,24 +0,0 @@
1
- import { BorderRadius, Spacing } from '@reown/appkit-ui-react-native';
2
- import { StyleSheet } from 'react-native';
3
- export default StyleSheet.create({
4
- container: {
5
- justifyContent: 'center',
6
- alignItems: 'center'
7
- },
8
- emailInput: {
9
- marginBottom: Spacing.s
10
- },
11
- cancelButton: {
12
- flex: 1,
13
- height: 48,
14
- marginRight: Spacing['2xs'],
15
- borderRadius: BorderRadius.xs
16
- },
17
- saveButton: {
18
- flex: 1,
19
- height: 48,
20
- marginLeft: Spacing['2xs'],
21
- borderRadius: BorderRadius.xs
22
- }
23
- });
24
- //# sourceMappingURL=styles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["BorderRadius","Spacing","StyleSheet","create","container","justifyContent","alignItems","emailInput","marginBottom","s","cancelButton","flex","height","marginRight","borderRadius","xs","saveButton","marginLeft"],"sourceRoot":"../../../../src","sources":["views/w3m-update-email-wallet-view/styles.ts"],"mappings":"AAAA,SAASA,YAAY,EAAEC,OAAO,QAAQ,+BAA+B;AACrE,SAASC,UAAU,QAAQ,cAAc;AAEzC,eAAeA,UAAU,CAACC,MAAM,CAAC;EAC/BC,SAAS,EAAE;IACTC,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd,CAAC;EACDC,UAAU,EAAE;IACVC,YAAY,EAAEP,OAAO,CAACQ;EACxB,CAAC;EACDC,YAAY,EAAE;IACZC,IAAI,EAAE,CAAC;IACPC,MAAM,EAAE,EAAE;IACVC,WAAW,EAAEZ,OAAO,CAAC,KAAK,CAAC;IAC3Ba,YAAY,EAAEd,YAAY,CAACe;EAC7B,CAAC;EACDC,UAAU,EAAE;IACVL,IAAI,EAAE,CAAC;IACPC,MAAM,EAAE,EAAE;IACVK,UAAU,EAAEhB,OAAO,CAAC,KAAK,CAAC;IAC1Ba,YAAY,EAAEd,YAAY,CAACe;EAC7B;AACF,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare function UpdateEmailPrimaryOtpView(): import("react/jsx-runtime").JSX.Element;
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-update-email-primary-otp-view/index.tsx"],"names":[],"mappings":"AAaA,wBAAgB,yBAAyB,4CAyCxC"}
@@ -1,2 +0,0 @@
1
- export declare function UpdateEmailSecondaryOtpView(): import("react/jsx-runtime").JSX.Element;
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-update-email-secondary-otp-view/index.tsx"],"names":[],"mappings":"AAcA,wBAAgB,2BAA2B,4CAyC1C"}
@@ -1,2 +0,0 @@
1
- export declare function UpdateEmailWalletView(): import("react/jsx-runtime").JSX.Element;
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-update-email-wallet-view/index.tsx"],"names":[],"mappings":"AAeA,wBAAgB,qBAAqB,4CAgFpC"}
@@ -1,23 +0,0 @@
1
- declare const _default: {
2
- container: {
3
- justifyContent: "center";
4
- alignItems: "center";
5
- };
6
- emailInput: {
7
- marginBottom: number;
8
- };
9
- cancelButton: {
10
- flex: number;
11
- height: number;
12
- marginRight: number;
13
- borderRadius: number;
14
- };
15
- saveButton: {
16
- flex: number;
17
- height: number;
18
- marginLeft: number;
19
- borderRadius: number;
20
- };
21
- };
22
- export default _default;
23
- //# sourceMappingURL=styles.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-update-email-wallet-view/styles.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAGA,wBAoBG"}
@@ -1,55 +0,0 @@
1
- import { useState } from 'react';
2
-
3
- import {
4
- ConnectorController,
5
- CoreHelperUtil,
6
- EventsController,
7
- RouterController,
8
- SnackController,
9
- type AppKitFrameProvider
10
- } from '@reown/appkit-core-react-native';
11
-
12
- import { OtpCodeView } from '../../partials/w3m-otp-code';
13
-
14
- export function UpdateEmailPrimaryOtpView() {
15
- const { data } = RouterController.state;
16
- const [loading, setLoading] = useState(false);
17
- const [error, setError] = useState('');
18
- const authProvider = ConnectorController.getAuthConnector()?.provider as
19
- | AppKitFrameProvider
20
- | undefined;
21
-
22
- const onOtpSubmit = async (value: string) => {
23
- if (!authProvider || loading) return;
24
- setLoading(true);
25
- setError('');
26
- try {
27
- await authProvider.updateEmailPrimaryOtp({ otp: value });
28
- EventsController.sendEvent({ type: 'track', event: 'EMAIL_VERIFICATION_CODE_PASS' });
29
- RouterController.replace('UpdateEmailSecondaryOtp', data);
30
- } catch (e) {
31
- EventsController.sendEvent({ type: 'track', event: 'EMAIL_VERIFICATION_CODE_FAIL' });
32
- const parsedError = CoreHelperUtil.parseError(e);
33
- if (parsedError?.includes('Invalid Otp')) {
34
- setError('Invalid code. Try again.');
35
- } else {
36
- SnackController.showError(parsedError);
37
- }
38
- }
39
- setLoading(false);
40
- };
41
-
42
- return (
43
- <OtpCodeView
44
- loading={loading}
45
- error={error}
46
- email={data?.email}
47
- onSubmit={onOtpSubmit}
48
- onRetry={RouterController.goBack}
49
- codeExpiry={10}
50
- retryLabel="Something wrong?"
51
- retryDisabledButtonLabel="Try again"
52
- retryButtonLabel="Try again"
53
- />
54
- );
55
- }
@@ -1,56 +0,0 @@
1
- import { useSnapshot } from 'valtio';
2
- import { useState } from 'react';
3
-
4
- import {
5
- ConnectorController,
6
- CoreHelperUtil,
7
- RouterController,
8
- SnackController,
9
- EventsController,
10
- type AppKitFrameProvider
11
- } from '@reown/appkit-core-react-native';
12
-
13
- import { OtpCodeView } from '../../partials/w3m-otp-code';
14
-
15
- export function UpdateEmailSecondaryOtpView() {
16
- const { data } = useSnapshot(RouterController.state);
17
- const [loading, setLoading] = useState(false);
18
- const [error, setError] = useState('');
19
- const authConnector = ConnectorController.getAuthConnector();
20
-
21
- const onOtpSubmit = async (value: string) => {
22
- if (!authConnector) return;
23
- setLoading(true);
24
- setError('');
25
- try {
26
- const provider = authConnector?.provider as AppKitFrameProvider;
27
- await provider.updateEmailSecondaryOtp({ otp: value });
28
- EventsController.sendEvent({ type: 'track', event: 'EMAIL_VERIFICATION_CODE_PASS' });
29
- EventsController.sendEvent({ type: 'track', event: 'EMAIL_EDIT_COMPLETE' });
30
- RouterController.reset('Account');
31
- } catch (e) {
32
- EventsController.sendEvent({ type: 'track', event: 'EMAIL_VERIFICATION_CODE_FAIL' });
33
- const parsedError = CoreHelperUtil.parseError(e);
34
- if (parsedError?.includes('Invalid Otp')) {
35
- setError('Invalid code. Try again.');
36
- } else {
37
- SnackController.showError(parsedError);
38
- }
39
- }
40
- setLoading(false);
41
- };
42
-
43
- return (
44
- <OtpCodeView
45
- loading={loading}
46
- error={error}
47
- email={data?.newEmail}
48
- onSubmit={onOtpSubmit}
49
- onRetry={RouterController.goBack}
50
- codeExpiry={10}
51
- retryLabel="Something wrong?"
52
- retryDisabledButtonLabel="Try again"
53
- retryButtonLabel="Try again"
54
- />
55
- );
56
- }
@@ -1,96 +0,0 @@
1
- import { useState } from 'react';
2
- import { Platform } from 'react-native';
3
- import {
4
- ConnectorController,
5
- CoreHelperUtil,
6
- RouterController,
7
- SnackController,
8
- EventsController,
9
- type AppKitFrameProvider
10
- } from '@reown/appkit-core-react-native';
11
- import { Button, EmailInput, FlexView, Spacing, Text } from '@reown/appkit-ui-react-native';
12
- import { useKeyboard } from '../../hooks/useKeyboard';
13
-
14
- import styles from './styles';
15
-
16
- export function UpdateEmailWalletView() {
17
- const { data } = RouterController.state;
18
- const [loading, setLoading] = useState(false);
19
- const [error, setError] = useState('');
20
- const [email, setEmail] = useState(data?.email || '');
21
- const [isValidNewEmail, setIsValidNewEmail] = useState(false);
22
- const authConnector = ConnectorController.getAuthConnector();
23
- const { keyboardShown, keyboardHeight } = useKeyboard();
24
- const paddingBottom = Platform.select({
25
- android: keyboardShown ? keyboardHeight + Spacing.l : Spacing.l,
26
- default: Spacing.l
27
- });
28
-
29
- const onChangeText = (value: string) => {
30
- setIsValidNewEmail(data?.email !== value && CoreHelperUtil.isValidEmail(value));
31
- setEmail(value);
32
- setError('');
33
- };
34
-
35
- const onEmailSubmit = async (value: string) => {
36
- if (!authConnector) return;
37
-
38
- const provider = authConnector.provider as AppKitFrameProvider;
39
- setLoading(true);
40
- setError('');
41
-
42
- try {
43
- const response = await provider.updateEmail({ email: value });
44
- EventsController.sendEvent({ type: 'track', event: 'EMAIL_EDIT' });
45
- if (response.action === 'VERIFY_SECONDARY_OTP') {
46
- RouterController.push('UpdateEmailSecondaryOtp', { email: data?.email, newEmail: value });
47
- } else {
48
- RouterController.push('UpdateEmailPrimaryOtp', { email: data?.email, newEmail: value });
49
- }
50
- } catch (e) {
51
- const parsedError = CoreHelperUtil.parseError(e);
52
- if (parsedError?.includes('Invalid email')) {
53
- setError('Invalid email. Try again.');
54
- } else {
55
- SnackController.showError(parsedError);
56
- }
57
- } finally {
58
- setLoading(false);
59
- }
60
- };
61
-
62
- return (
63
- <FlexView padding={['l', 's', '0', 's']} style={{ paddingBottom }}>
64
- <EmailInput
65
- initialValue={data?.email}
66
- onSubmit={onEmailSubmit}
67
- submitEnabled={isValidNewEmail}
68
- onChangeText={onChangeText}
69
- loading={loading}
70
- errorMessage={error}
71
- style={styles.emailInput}
72
- autoFocus
73
- />
74
- <FlexView
75
- flexDirection="row"
76
- justifyContent="center"
77
- alignItems="center"
78
- margin={['0', 'xs', '0', 'xs']}
79
- >
80
- <Button onPress={RouterController.goBack} variant="shade" style={styles.cancelButton}>
81
- <Text variant="paragraph-600" color="fg-100">
82
- Cancel
83
- </Text>
84
- </Button>
85
- <Button
86
- onPress={() => onEmailSubmit(email)}
87
- variant="fill"
88
- style={styles.saveButton}
89
- disabled={loading || !isValidNewEmail}
90
- >
91
- Save
92
- </Button>
93
- </FlexView>
94
- </FlexView>
95
- );
96
- }
@@ -1,24 +0,0 @@
1
- import { BorderRadius, Spacing } from '@reown/appkit-ui-react-native';
2
- import { StyleSheet } from 'react-native';
3
-
4
- export default StyleSheet.create({
5
- container: {
6
- justifyContent: 'center',
7
- alignItems: 'center'
8
- },
9
- emailInput: {
10
- marginBottom: Spacing.s
11
- },
12
- cancelButton: {
13
- flex: 1,
14
- height: 48,
15
- marginRight: Spacing['2xs'],
16
- borderRadius: BorderRadius.xs
17
- },
18
- saveButton: {
19
- flex: 1,
20
- height: 48,
21
- marginLeft: Spacing['2xs'],
22
- borderRadius: BorderRadius.xs
23
- }
24
- });