@reown/appkit-react-native 0.0.0-chore-bump-builder-20250728194329 → 0.0.0-chore-solflare-20250730210452

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 (203) hide show
  1. package/lib/commonjs/AppKit.js +22 -2
  2. package/lib/commonjs/AppKit.js.map +1 -1
  3. package/lib/commonjs/AppKitContext.js +1 -0
  4. package/lib/commonjs/AppKitContext.js.map +1 -1
  5. package/lib/commonjs/hooks/useRouteTransition.js +83 -0
  6. package/lib/commonjs/hooks/useRouteTransition.js.map +1 -0
  7. package/lib/commonjs/modal/w3m-modal/index.js +10 -31
  8. package/lib/commonjs/modal/w3m-modal/index.js.map +1 -1
  9. package/lib/commonjs/modal/w3m-modal/styles.js +0 -4
  10. package/lib/commonjs/modal/w3m-modal/styles.js.map +1 -1
  11. package/lib/commonjs/modal/w3m-router/index.js +16 -1
  12. package/lib/commonjs/modal/w3m-router/index.js.map +1 -1
  13. package/lib/commonjs/partials/w3m-header/index.js +7 -15
  14. package/lib/commonjs/partials/w3m-header/index.js.map +1 -1
  15. package/lib/commonjs/partials/w3m-information-modal/index.js +34 -32
  16. package/lib/commonjs/partials/w3m-information-modal/index.js.map +1 -1
  17. package/lib/commonjs/partials/w3m-information-modal/styles.js +6 -4
  18. package/lib/commonjs/partials/w3m-information-modal/styles.js.map +1 -1
  19. package/lib/commonjs/partials/w3m-selector-modal/index.js +64 -66
  20. package/lib/commonjs/partials/w3m-selector-modal/index.js.map +1 -1
  21. package/lib/commonjs/partials/w3m-selector-modal/styles.js +1 -0
  22. package/lib/commonjs/partials/w3m-selector-modal/styles.js.map +1 -1
  23. package/lib/commonjs/utils/RouterUtil.js +52 -0
  24. package/lib/commonjs/utils/RouterUtil.js.map +1 -0
  25. package/lib/commonjs/utils/UiUtil.js +11 -6
  26. package/lib/commonjs/utils/UiUtil.js.map +1 -1
  27. package/lib/commonjs/views/w3m-all-wallets-view/index.js +1 -1
  28. package/lib/commonjs/views/w3m-all-wallets-view/index.js.map +1 -1
  29. package/lib/commonjs/views/w3m-connect-view/index.js +1 -1
  30. package/lib/commonjs/views/w3m-connect-view/index.js.map +1 -1
  31. package/lib/commonjs/views/w3m-connecting-external-view/index.js +3 -1
  32. package/lib/commonjs/views/w3m-connecting-external-view/index.js.map +1 -1
  33. package/lib/commonjs/views/w3m-connecting-siwe-view/index.js +0 -1
  34. package/lib/commonjs/views/w3m-connecting-siwe-view/index.js.map +1 -1
  35. package/lib/commonjs/views/w3m-networks-view/index.js +3 -6
  36. package/lib/commonjs/views/w3m-networks-view/index.js.map +1 -1
  37. package/lib/commonjs/views/w3m-onramp-view/components/Header.js +5 -6
  38. package/lib/commonjs/views/w3m-onramp-view/components/Header.js.map +1 -1
  39. package/lib/commonjs/views/w3m-onramp-view/components/SelectPaymentModal.js +68 -70
  40. package/lib/commonjs/views/w3m-onramp-view/components/SelectPaymentModal.js.map +1 -1
  41. package/lib/commonjs/views/w3m-swap-preview-view/index.js +1 -14
  42. package/lib/commonjs/views/w3m-swap-preview-view/index.js.map +1 -1
  43. package/lib/commonjs/views/w3m-swap-preview-view/styles.js +3 -0
  44. package/lib/commonjs/views/w3m-swap-preview-view/styles.js.map +1 -1
  45. package/lib/commonjs/views/w3m-swap-view/components/select-token-view/index.js +3 -2
  46. package/lib/commonjs/views/w3m-swap-view/components/select-token-view/index.js.map +1 -1
  47. package/lib/commonjs/views/w3m-swap-view/components/select-token-view/styles.js +1 -2
  48. package/lib/commonjs/views/w3m-swap-view/components/select-token-view/styles.js.map +1 -1
  49. package/lib/commonjs/views/w3m-swap-view/index.js +10 -20
  50. package/lib/commonjs/views/w3m-swap-view/index.js.map +1 -1
  51. package/lib/commonjs/views/w3m-swap-view/styles.js +5 -1
  52. package/lib/commonjs/views/w3m-swap-view/styles.js.map +1 -1
  53. package/lib/commonjs/views/w3m-wallet-send-view/index.js +4 -12
  54. package/lib/commonjs/views/w3m-wallet-send-view/index.js.map +1 -1
  55. package/lib/commonjs/views/w3m-wallet-send-view/styles.js +3 -0
  56. package/lib/commonjs/views/w3m-wallet-send-view/styles.js.map +1 -1
  57. package/lib/module/AppKit.js +22 -2
  58. package/lib/module/AppKit.js.map +1 -1
  59. package/lib/module/AppKitContext.js +1 -0
  60. package/lib/module/AppKitContext.js.map +1 -1
  61. package/lib/module/hooks/useRouteTransition.js +79 -0
  62. package/lib/module/hooks/useRouteTransition.js.map +1 -0
  63. package/lib/module/modal/w3m-modal/index.js +11 -32
  64. package/lib/module/modal/w3m-modal/index.js.map +1 -1
  65. package/lib/module/modal/w3m-modal/styles.js +0 -4
  66. package/lib/module/modal/w3m-modal/styles.js.map +1 -1
  67. package/lib/module/modal/w3m-router/index.js +17 -2
  68. package/lib/module/modal/w3m-router/index.js.map +1 -1
  69. package/lib/module/partials/w3m-header/index.js +8 -16
  70. package/lib/module/partials/w3m-header/index.js.map +1 -1
  71. package/lib/module/partials/w3m-information-modal/index.js +33 -31
  72. package/lib/module/partials/w3m-information-modal/index.js.map +1 -1
  73. package/lib/module/partials/w3m-information-modal/styles.js +7 -5
  74. package/lib/module/partials/w3m-information-modal/styles.js.map +1 -1
  75. package/lib/module/partials/w3m-selector-modal/index.js +64 -66
  76. package/lib/module/partials/w3m-selector-modal/index.js.map +1 -1
  77. package/lib/module/partials/w3m-selector-modal/styles.js +1 -0
  78. package/lib/module/partials/w3m-selector-modal/styles.js.map +1 -1
  79. package/lib/module/utils/RouterUtil.js +48 -0
  80. package/lib/module/utils/RouterUtil.js.map +1 -0
  81. package/lib/module/utils/UiUtil.js +12 -7
  82. package/lib/module/utils/UiUtil.js.map +1 -1
  83. package/lib/module/views/w3m-all-wallets-view/index.js +1 -1
  84. package/lib/module/views/w3m-all-wallets-view/index.js.map +1 -1
  85. package/lib/module/views/w3m-connect-view/index.js +1 -1
  86. package/lib/module/views/w3m-connect-view/index.js.map +1 -1
  87. package/lib/module/views/w3m-connecting-external-view/index.js +3 -1
  88. package/lib/module/views/w3m-connecting-external-view/index.js.map +1 -1
  89. package/lib/module/views/w3m-connecting-siwe-view/index.js +1 -2
  90. package/lib/module/views/w3m-connecting-siwe-view/index.js.map +1 -1
  91. package/lib/module/views/w3m-networks-view/index.js +4 -7
  92. package/lib/module/views/w3m-networks-view/index.js.map +1 -1
  93. package/lib/module/views/w3m-onramp-view/components/Header.js +5 -6
  94. package/lib/module/views/w3m-onramp-view/components/Header.js.map +1 -1
  95. package/lib/module/views/w3m-onramp-view/components/SelectPaymentModal.js +68 -69
  96. package/lib/module/views/w3m-onramp-view/components/SelectPaymentModal.js.map +1 -1
  97. package/lib/module/views/w3m-swap-preview-view/index.js +3 -16
  98. package/lib/module/views/w3m-swap-preview-view/index.js.map +1 -1
  99. package/lib/module/views/w3m-swap-preview-view/styles.js +3 -0
  100. package/lib/module/views/w3m-swap-preview-view/styles.js.map +1 -1
  101. package/lib/module/views/w3m-swap-view/components/select-token-view/index.js +3 -2
  102. package/lib/module/views/w3m-swap-view/components/select-token-view/index.js.map +1 -1
  103. package/lib/module/views/w3m-swap-view/components/select-token-view/styles.js +1 -2
  104. package/lib/module/views/w3m-swap-view/components/select-token-view/styles.js.map +1 -1
  105. package/lib/module/views/w3m-swap-view/index.js +11 -21
  106. package/lib/module/views/w3m-swap-view/index.js.map +1 -1
  107. package/lib/module/views/w3m-swap-view/styles.js +5 -1
  108. package/lib/module/views/w3m-swap-view/styles.js.map +1 -1
  109. package/lib/module/views/w3m-wallet-send-view/index.js +6 -14
  110. package/lib/module/views/w3m-wallet-send-view/index.js.map +1 -1
  111. package/lib/module/views/w3m-wallet-send-view/styles.js +3 -0
  112. package/lib/module/views/w3m-wallet-send-view/styles.js.map +1 -1
  113. package/lib/typescript/AppKit.d.ts +2 -1
  114. package/lib/typescript/AppKit.d.ts.map +1 -1
  115. package/lib/typescript/AppKitContext.d.ts +2 -1
  116. package/lib/typescript/AppKitContext.d.ts.map +1 -1
  117. package/lib/typescript/hooks/useRouteTransition.d.ts +16 -0
  118. package/lib/typescript/hooks/useRouteTransition.d.ts.map +1 -0
  119. package/lib/typescript/modal/w3m-modal/index.d.ts.map +1 -1
  120. package/lib/typescript/modal/w3m-modal/styles.d.ts +0 -4
  121. package/lib/typescript/modal/w3m-modal/styles.d.ts.map +1 -1
  122. package/lib/typescript/modal/w3m-router/index.d.ts.map +1 -1
  123. package/lib/typescript/partials/w3m-header/index.d.ts.map +1 -1
  124. package/lib/typescript/partials/w3m-information-modal/index.d.ts.map +1 -1
  125. package/lib/typescript/partials/w3m-information-modal/styles.d.ts +2 -0
  126. package/lib/typescript/partials/w3m-information-modal/styles.d.ts.map +1 -1
  127. package/lib/typescript/partials/w3m-selector-modal/index.d.ts.map +1 -1
  128. package/lib/typescript/partials/w3m-selector-modal/styles.d.ts +1 -0
  129. package/lib/typescript/partials/w3m-selector-modal/styles.d.ts.map +1 -1
  130. package/lib/typescript/utils/RouterUtil.d.ts +9 -0
  131. package/lib/typescript/utils/RouterUtil.d.ts.map +1 -0
  132. package/lib/typescript/utils/UiUtil.d.ts +2 -2
  133. package/lib/typescript/utils/UiUtil.d.ts.map +1 -1
  134. package/lib/typescript/views/w3m-all-wallets-view/index.d.ts.map +1 -1
  135. package/lib/typescript/views/w3m-connect-view/index.d.ts.map +1 -1
  136. package/lib/typescript/views/w3m-connecting-external-view/index.d.ts.map +1 -1
  137. package/lib/typescript/views/w3m-connecting-siwe-view/index.d.ts.map +1 -1
  138. package/lib/typescript/views/w3m-networks-view/index.d.ts.map +1 -1
  139. package/lib/typescript/views/w3m-onramp-view/components/Header.d.ts.map +1 -1
  140. package/lib/typescript/views/w3m-onramp-view/components/SelectPaymentModal.d.ts.map +1 -1
  141. package/lib/typescript/views/w3m-swap-preview-view/index.d.ts.map +1 -1
  142. package/lib/typescript/views/w3m-swap-preview-view/styles.d.ts +3 -0
  143. package/lib/typescript/views/w3m-swap-preview-view/styles.d.ts.map +1 -1
  144. package/lib/typescript/views/w3m-swap-view/components/select-token-view/index.d.ts +3 -1
  145. package/lib/typescript/views/w3m-swap-view/components/select-token-view/index.d.ts.map +1 -1
  146. package/lib/typescript/views/w3m-swap-view/components/select-token-view/styles.d.ts +0 -1
  147. package/lib/typescript/views/w3m-swap-view/components/select-token-view/styles.d.ts.map +1 -1
  148. package/lib/typescript/views/w3m-swap-view/index.d.ts.map +1 -1
  149. package/lib/typescript/views/w3m-swap-view/styles.d.ts +5 -1
  150. package/lib/typescript/views/w3m-swap-view/styles.d.ts.map +1 -1
  151. package/lib/typescript/views/w3m-wallet-send-view/index.d.ts.map +1 -1
  152. package/lib/typescript/views/w3m-wallet-send-view/styles.d.ts +3 -0
  153. package/lib/typescript/views/w3m-wallet-send-view/styles.d.ts.map +1 -1
  154. package/package.json +6 -21
  155. package/src/AppKit.ts +37 -2
  156. package/src/AppKitContext.tsx +1 -0
  157. package/src/hooks/useRouteTransition.ts +95 -0
  158. package/src/modal/w3m-modal/index.tsx +12 -39
  159. package/src/modal/w3m-modal/styles.ts +0 -4
  160. package/src/modal/w3m-router/index.tsx +17 -2
  161. package/src/partials/w3m-header/index.tsx +4 -15
  162. package/src/partials/w3m-information-modal/index.tsx +28 -32
  163. package/src/partials/w3m-information-modal/styles.ts +7 -5
  164. package/src/partials/w3m-selector-modal/index.tsx +61 -65
  165. package/src/partials/w3m-selector-modal/styles.ts +1 -0
  166. package/src/utils/RouterUtil.ts +50 -0
  167. package/src/utils/UiUtil.ts +14 -6
  168. package/src/views/w3m-all-wallets-view/index.tsx +2 -1
  169. package/src/views/w3m-connect-view/index.tsx +3 -2
  170. package/src/views/w3m-connecting-external-view/index.tsx +3 -1
  171. package/src/views/w3m-connecting-siwe-view/index.tsx +0 -2
  172. package/src/views/w3m-networks-view/index.tsx +2 -8
  173. package/src/views/w3m-onramp-view/components/Header.tsx +4 -6
  174. package/src/views/w3m-onramp-view/components/SelectPaymentModal.tsx +49 -56
  175. package/src/views/w3m-swap-preview-view/index.tsx +4 -23
  176. package/src/views/w3m-swap-preview-view/styles.ts +3 -0
  177. package/src/views/w3m-swap-view/components/select-token-view/index.tsx +12 -3
  178. package/src/views/w3m-swap-view/components/select-token-view/styles.ts +1 -2
  179. package/src/views/w3m-swap-view/index.tsx +7 -20
  180. package/src/views/w3m-swap-view/styles.ts +5 -1
  181. package/src/views/w3m-wallet-send-view/index.tsx +5 -10
  182. package/src/views/w3m-wallet-send-view/styles.ts +3 -0
  183. package/lib/commonjs/config/animations.js +0 -9
  184. package/lib/commonjs/config/animations.js.map +0 -1
  185. package/lib/commonjs/partials/w3m-otp-code/index.js +0 -89
  186. package/lib/commonjs/partials/w3m-otp-code/index.js.map +0 -1
  187. package/lib/commonjs/partials/w3m-otp-code/styles.js +0 -21
  188. package/lib/commonjs/partials/w3m-otp-code/styles.js.map +0 -1
  189. package/lib/module/config/animations.js +0 -9
  190. package/lib/module/config/animations.js.map +0 -1
  191. package/lib/module/partials/w3m-otp-code/index.js +0 -84
  192. package/lib/module/partials/w3m-otp-code/index.js.map +0 -1
  193. package/lib/module/partials/w3m-otp-code/styles.js +0 -17
  194. package/lib/module/partials/w3m-otp-code/styles.js.map +0 -1
  195. package/lib/typescript/config/animations.d.ts +0 -2
  196. package/lib/typescript/config/animations.d.ts.map +0 -1
  197. package/lib/typescript/partials/w3m-otp-code/index.d.ts +0 -16
  198. package/lib/typescript/partials/w3m-otp-code/index.d.ts.map +0 -1
  199. package/lib/typescript/partials/w3m-otp-code/styles.d.ts +0 -14
  200. package/lib/typescript/partials/w3m-otp-code/styles.d.ts.map +0 -1
  201. package/src/config/animations.ts +0 -7
  202. package/src/partials/w3m-otp-code/index.tsx +0 -81
  203. package/src/partials/w3m-otp-code/styles.ts +0 -15
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-swap-view/index.tsx"],"names":[],"mappings":"AAuBA,wBAAgB,QAAQ,4CAyMvB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-swap-view/index.tsx"],"names":[],"mappings":"AAsBA,wBAAgB,QAAQ,4CA6LvB"}
@@ -17,10 +17,14 @@ declare const _default: {
17
17
  marginTop: number;
18
18
  width: "100%";
19
19
  };
20
- modal: {
20
+ modalContent: {
21
21
  margin: number;
22
+ flex: number;
22
23
  justifyContent: "flex-end";
23
24
  };
25
+ withKeyboard: {
26
+ height: "100%";
27
+ };
24
28
  };
25
29
  export default _default;
26
30
  //# sourceMappingURL=styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-swap-view/styles.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAGA,wBAuBG"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-swap-view/styles.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,wBA2BG"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-wallet-send-view/index.tsx"],"names":[],"mappings":"AAgBA,wBAAgB,cAAc,4CA6G7B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-wallet-send-view/index.tsx"],"names":[],"mappings":"AAgBA,wBAAgB,cAAc,4CAwG7B"}
@@ -15,6 +15,9 @@ declare const _default: {
15
15
  addressContainer: {
16
16
  width: "100%";
17
17
  };
18
+ withKeyboard: {
19
+ height: "100%";
20
+ };
18
21
  };
19
22
  export default _default;
20
23
  //# sourceMappingURL=styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-wallet-send-view/styles.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAGA,wBAiBG"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-wallet-send-view/styles.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAGA,wBAoBG"}
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "@reown/appkit-react-native",
3
- "version": "0.0.0-chore-bump-builder-20250728194329",
3
+ "version": "0.0.0-chore-solflare-20250730210452",
4
4
  "main": "lib/commonjs/index.js",
5
5
  "types": "lib/typescript/index.d.ts",
6
6
  "module": "lib/module/index.js",
7
+ "react-native": "src/index.ts",
7
8
  "source": "src/index.ts",
8
9
  "scripts": {
9
10
  "build": "bob build",
@@ -37,12 +38,11 @@
37
38
  "access": "public"
38
39
  },
39
40
  "dependencies": {
40
- "@reown/appkit-common-react-native": "0.0.0-chore-bump-builder-20250728194329",
41
- "@reown/appkit-core-react-native": "0.0.0-chore-bump-builder-20250728194329",
42
- "@reown/appkit-siwe-react-native": "0.0.0-chore-bump-builder-20250728194329",
43
- "@reown/appkit-ui-react-native": "0.0.0-chore-bump-builder-20250728194329",
41
+ "@reown/appkit-common-react-native": "0.0.0-chore-solflare-20250730210452",
42
+ "@reown/appkit-core-react-native": "0.0.0-chore-solflare-20250730210452",
43
+ "@reown/appkit-siwe-react-native": "0.0.0-chore-solflare-20250730210452",
44
+ "@reown/appkit-ui-react-native": "0.0.0-chore-solflare-20250730210452",
44
45
  "@walletconnect/universal-provider": "2.21.5",
45
- "react-native-modal": ">=13",
46
46
  "valtio": "2.1.5"
47
47
  },
48
48
  "peerDependencies": {
@@ -52,21 +52,6 @@
52
52
  "react-native": ">=0.72",
53
53
  "react-native-svg": ">=13.10"
54
54
  },
55
- "react-native": "src/index.ts",
56
- "react-native-builder-bob": {
57
- "source": "src",
58
- "output": "lib",
59
- "targets": [
60
- "commonjs",
61
- "module",
62
- [
63
- "typescript",
64
- {
65
- "tsc": "../../node_modules/.bin/tsc"
66
- }
67
- ]
68
- ]
69
- },
70
55
  "eslintIgnore": [
71
56
  "node_modules/",
72
57
  "lib/"
package/src/AppKit.ts CHANGED
@@ -46,6 +46,7 @@ import { SIWEController } from '@reown/appkit-siwe-react-native';
46
46
  import { WalletConnectConnector } from './connectors/WalletConnectConnector';
47
47
  import { WcHelpersUtil } from './utils/HelpersUtil';
48
48
  import { NetworkUtil } from './utils/NetworkUtil';
49
+ import { RouterUtil } from './utils/RouterUtil';
49
50
 
50
51
  interface AppKitConfig {
51
52
  projectId: string;
@@ -296,8 +297,33 @@ export class AppKit {
296
297
  ModalController.open(options);
297
298
  }
298
299
 
299
- close() {
300
+ async close() {
300
301
  ModalController.close();
302
+
303
+ if (OptionsController.state.isSiweEnabled && ConnectionsController.state.isConnected) {
304
+ const session = await SIWEController.getSession();
305
+ if (
306
+ !session &&
307
+ SIWEController.state.status !== 'success' &&
308
+ ConnectionsController.state.activeNamespace === 'eip155' &&
309
+ !!ConnectionsController.state.activeAddress
310
+ ) {
311
+ await this.disconnect();
312
+ }
313
+ }
314
+
315
+ RouterUtil.checkOnRampBack();
316
+ RouterUtil.checkSocialLoginBack();
317
+ }
318
+
319
+ back() {
320
+ if (RouterController.state.history.length > 1) {
321
+ RouterUtil.checkBack();
322
+
323
+ return RouterController.goBack();
324
+ }
325
+
326
+ return this.close();
301
327
  }
302
328
 
303
329
  async switchAccountType(namespace: ChainNamespace, type: AccountType, network: AppKitNetwork) {
@@ -693,6 +719,15 @@ export class AppKit {
693
719
  customList.push(ConstantsUtil.PHANTOM_CUSTOM_WALLET);
694
720
  }
695
721
 
722
+ const addSolflare =
723
+ adapters.some(adapter => adapter.getSupportedNamespace() === 'solana') &&
724
+ extraConnectors?.some(connector => connector.type.toLowerCase() === 'solflare') &&
725
+ !customList.some(wallet => wallet.id === ConstantsUtil.SOLFLARE_CUSTOM_WALLET.id);
726
+
727
+ if (addSolflare) {
728
+ customList.push(ConstantsUtil.SOLFLARE_CUSTOM_WALLET);
729
+ }
730
+
696
731
  OptionsController.setCustomWallets(customList);
697
732
  }
698
733
 
@@ -743,7 +778,7 @@ export class AppKit {
743
778
  // If it's connected but there's no session, show sign view
744
779
  return this.onSiweNavigation();
745
780
  } else if (isConnection) {
746
- //Connected with 1CA
781
+ // Connected with 1CA
747
782
  ModalController.close();
748
783
  }
749
784
  }
@@ -32,6 +32,7 @@ export const useAppKit = () => {
32
32
  disconnect: context.appKit.disconnect.bind(context.appKit),
33
33
  open: context.appKit.open.bind(context.appKit),
34
34
  close: context.appKit.close.bind(context.appKit),
35
+ back: context.appKit.back.bind(context.appKit),
35
36
  switchNetwork: context.appKit.switchNetwork.bind(context.appKit),
36
37
  getProvider: context.appKit.getProvider.bind(context.appKit),
37
38
  switchAccountType: context.appKit.switchAccountType.bind(context.appKit)
@@ -0,0 +1,95 @@
1
+ import { useCallback, useRef, useEffect } from 'react';
2
+ import { Animated, Dimensions } from 'react-native';
3
+
4
+ const { width: screenWidth } = Dimensions.get('window');
5
+
6
+ export interface RouteTransitionConfig {
7
+ duration?: number;
8
+ useNativeDriver?: boolean;
9
+ }
10
+
11
+ export function useRouteTransition(config: RouteTransitionConfig = {}) {
12
+ const { duration = 300, useNativeDriver = true } = config;
13
+
14
+ const fadeAnim = useRef(new Animated.Value(1)).current;
15
+ const slideAnim = useRef(new Animated.Value(0)).current;
16
+ const isAnimating = useRef(false);
17
+ const currentAnimation = useRef<Animated.CompositeAnimation | null>(null);
18
+
19
+ const animateTransition = useCallback(
20
+ (direction: 'forward' | 'backward' | 'none') => {
21
+ if (isAnimating.current || direction === 'none') {
22
+ return Promise.resolve();
23
+ }
24
+
25
+ if (currentAnimation.current) {
26
+ currentAnimation.current.stop();
27
+ }
28
+
29
+ isAnimating.current = true;
30
+
31
+ return new Promise<void>(resolve => {
32
+ const startPosition =
33
+ direction === 'forward'
34
+ ? screenWidth * 0.02 // Start from right for forward
35
+ : -screenWidth * 0.02; // Start from left for backward
36
+
37
+ // Immediately set starting position and fade out
38
+ fadeAnim.setValue(0);
39
+ slideAnim.setValue(startPosition);
40
+
41
+ // Animate to final position with fade in
42
+ const animation = Animated.parallel([
43
+ Animated.timing(fadeAnim, {
44
+ toValue: 1,
45
+ duration,
46
+ useNativeDriver
47
+ }),
48
+ Animated.timing(slideAnim, {
49
+ toValue: 0, // Slide to center
50
+ duration,
51
+ useNativeDriver
52
+ })
53
+ ]);
54
+
55
+ currentAnimation.current = animation;
56
+
57
+ animation.start(({ finished }) => {
58
+ if (finished) {
59
+ isAnimating.current = false;
60
+ currentAnimation.current = null;
61
+ resolve();
62
+ }
63
+ });
64
+ });
65
+ },
66
+ [fadeAnim, slideAnim, duration, useNativeDriver]
67
+ );
68
+
69
+ const getAnimatedStyle = useCallback(
70
+ () => ({
71
+ opacity: fadeAnim,
72
+ transform: [{ translateX: slideAnim }]
73
+ }),
74
+ [fadeAnim, slideAnim]
75
+ );
76
+
77
+ useEffect(() => {
78
+ fadeAnim.setValue(1);
79
+ slideAnim.setValue(0);
80
+
81
+ return () => {
82
+ if (currentAnimation.current) {
83
+ currentAnimation.current.stop();
84
+ currentAnimation.current = null;
85
+ }
86
+ isAnimating.current = false;
87
+ };
88
+ }, [fadeAnim, slideAnim]);
89
+
90
+ return {
91
+ animateTransition,
92
+ getAnimatedStyle,
93
+ isAnimating: isAnimating.current
94
+ };
95
+ }
@@ -1,28 +1,25 @@
1
1
  import { useSnapshot } from 'valtio';
2
2
  import { useCallback, useEffect } from 'react';
3
3
  import { useWindowDimensions, StatusBar } from 'react-native';
4
- import Modal from 'react-native-modal';
5
- import { Card, ThemeProvider } from '@reown/appkit-ui-react-native';
4
+ import { Card, Modal, ThemeProvider } from '@reown/appkit-ui-react-native';
6
5
  import {
7
6
  ApiController,
8
7
  EventsController,
9
8
  ModalController,
10
9
  OptionsController,
11
10
  RouterController,
12
- ThemeController,
13
- ConnectionsController
11
+ ThemeController
14
12
  } from '@reown/appkit-core-react-native';
15
- import { SIWEController } from '@reown/appkit-siwe-react-native';
16
13
 
17
14
  import { AppKitRouter } from '../w3m-router';
18
15
  import { Header } from '../../partials/w3m-header';
19
16
  import { Snackbar } from '../../partials/w3m-snackbar';
20
17
  import { useCustomDimensions } from '../../hooks/useCustomDimensions';
21
- import styles from './styles';
22
18
  import { useAppKit } from '../../AppKitContext';
19
+ import styles from './styles';
23
20
 
24
21
  export function AppKit() {
25
- const { disconnect } = useAppKit();
22
+ const { close } = useAppKit();
26
23
  const { open } = useSnapshot(ModalController.state);
27
24
  const { themeMode, themeVariables } = useSnapshot(ThemeController.state);
28
25
  const { projectId } = useSnapshot(OptionsController.state);
@@ -31,12 +28,12 @@ export function AppKit() {
31
28
  const portraitHeight = height - 80;
32
29
  const landScapeHeight = height * 0.95 - (StatusBar.currentHeight ?? 0);
33
30
 
34
- const onBackButtonPress = () => {
31
+ const handleBackPress = () => {
35
32
  if (RouterController.state.history.length > 1) {
36
33
  return RouterController.goBack();
37
34
  }
38
35
 
39
- return handleClose();
36
+ return handleModalClose();
40
37
  };
41
38
 
42
39
  const prefetch = useCallback(async () => {
@@ -44,27 +41,10 @@ export function AppKit() {
44
41
  EventsController.sendEvent({ type: 'track', event: 'MODAL_LOADED' });
45
42
  }, []);
46
43
 
47
- const handleClose = async () => {
48
- if (OptionsController.state.isSiweEnabled) {
49
- const session = await SIWEController.getSession();
50
- if (
51
- !session &&
52
- SIWEController.state.status !== 'success' &&
53
- ConnectionsController.state.activeNamespace === 'eip155' &&
54
- !!ConnectionsController.state.activeAddress
55
- ) {
56
- await disconnect();
57
- }
58
- }
59
-
60
- if (
61
- RouterController.state.view === 'OnRampLoading' &&
62
- EventsController.state.data.event === 'BUY_SUBMITTED'
63
- ) {
64
- // Send event only if the onramp url was already created
65
- EventsController.sendEvent({ type: 'track', event: 'BUY_CANCEL' });
66
- }
44
+ const handleModalClose = async () => {
45
+ await close();
67
46
  };
47
+
68
48
  useEffect(() => {
69
49
  if (projectId) {
70
50
  prefetch();
@@ -75,16 +55,9 @@ export function AppKit() {
75
55
  <>
76
56
  <ThemeProvider themeMode={themeMode} themeVariables={themeVariables}>
77
57
  <Modal
78
- style={styles.modal}
79
- isVisible={open}
80
- useNativeDriver
81
- useNativeDriverForBackdrop
82
- statusBarTranslucent
83
- hideModalContentWhileAnimating
84
- propagateSwipe
85
- onModalHide={handleClose}
86
- onBackdropPress={ModalController.close}
87
- onBackButtonPress={onBackButtonPress}
58
+ visible={open}
59
+ onRequestClose={handleBackPress}
60
+ onBackdropPress={handleModalClose}
88
61
  testID="w3m-modal"
89
62
  >
90
63
  <Card
@@ -1,10 +1,6 @@
1
1
  import { StyleSheet } from 'react-native';
2
2
 
3
3
  export default StyleSheet.create({
4
- modal: {
5
- margin: 0,
6
- justifyContent: 'flex-end'
7
- },
8
4
  card: {
9
5
  borderBottomLeftRadius: 0,
10
6
  borderBottomRightRadius: 0,
@@ -1,5 +1,5 @@
1
1
  import { useSnapshot } from 'valtio';
2
- import { useLayoutEffect, useMemo } from 'react';
2
+ import { useEffect, useLayoutEffect, useMemo } from 'react';
3
3
  import { RouterController } from '@reown/appkit-core-react-native';
4
4
 
5
5
  import { AccountDefaultView } from '../../views/w3m-account-default-view';
@@ -32,9 +32,20 @@ import { WalletSendSelectTokenView } from '../../views/w3m-wallet-send-select-to
32
32
  import { WhatIsANetworkView } from '../../views/w3m-what-is-a-network-view';
33
33
  import { WhatIsAWalletView } from '../../views/w3m-what-is-a-wallet-view';
34
34
  import { UiUtil } from '../../utils/UiUtil';
35
+ import { useRouteTransition } from '../../hooks/useRouteTransition';
36
+
37
+ import { Animated } from 'react-native';
35
38
 
36
39
  export function AppKitRouter() {
37
40
  const { view } = useSnapshot(RouterController.state);
41
+ const { animateTransition, getAnimatedStyle } = useRouteTransition({
42
+ duration: 300,
43
+ useNativeDriver: true
44
+ });
45
+
46
+ useEffect(() => {
47
+ UiUtil.setRouteTransition(animateTransition);
48
+ }, [animateTransition]);
38
49
 
39
50
  useLayoutEffect(() => {
40
51
  UiUtil.createViewTransition();
@@ -105,5 +116,9 @@ export function AppKitRouter() {
105
116
  }
106
117
  }, [view]);
107
118
 
108
- return <ViewComponent />;
119
+ return (
120
+ <Animated.View style={[getAnimatedStyle()]}>
121
+ <ViewComponent />
122
+ </Animated.View>
123
+ );
109
124
  }
@@ -1,7 +1,6 @@
1
1
  import { useSnapshot } from 'valtio';
2
2
  import {
3
3
  RouterController,
4
- ModalController,
5
4
  EventsController,
6
5
  type RouterControllerState
7
6
  } from '@reown/appkit-core-react-native';
@@ -9,8 +8,10 @@ import { IconLink, Text, FlexView } from '@reown/appkit-ui-react-native';
9
8
  import { StringUtil } from '@reown/appkit-common-react-native';
10
9
 
11
10
  import styles from './styles';
11
+ import { useAppKit } from '../../AppKitContext';
12
12
 
13
13
  export function Header() {
14
+ const { close, back } = useAppKit();
14
15
  const { data, view } = useSnapshot(RouterController.state);
15
16
  const onHelpPress = () => {
16
17
  RouterController.push('WhatIsAWallet');
@@ -61,24 +62,12 @@ export function Header() {
61
62
  const showClose = !noCloseViews.includes(view);
62
63
  const header = headings(data, view);
63
64
 
64
- const checkSocial = () => {
65
- if (RouterController.state.view === 'ConnectingSocial') {
66
- EventsController.sendEvent({
67
- type: 'track',
68
- event: 'SOCIAL_LOGIN_CANCELED',
69
- properties: { provider: RouterController.state.data?.socialProvider! }
70
- });
71
- }
72
- };
73
-
74
65
  const handleGoBack = () => {
75
- checkSocial();
76
- RouterController.goBack();
66
+ back();
77
67
  };
78
68
 
79
69
  const handleClose = () => {
80
- checkSocial();
81
- ModalController.close();
70
+ close();
82
71
  };
83
72
 
84
73
  const dynamicButtonTemplate = () => {
@@ -1,4 +1,4 @@
1
- import Modal from 'react-native-modal';
1
+ import { Modal } from 'react-native';
2
2
  import {
3
3
  FlexView,
4
4
  Text,
@@ -27,38 +27,34 @@ export function InformationModal({
27
27
  const Theme = useTheme();
28
28
 
29
29
  return (
30
- <Modal
31
- isVisible={visible}
32
- useNativeDriver
33
- useNativeDriverForBackdrop
34
- onBackdropPress={onClose}
35
- onDismiss={onClose}
36
- style={styles.modal}
37
- >
38
- <FlexView
39
- style={[
40
- styles.content,
41
- {
42
- backgroundColor: Theme['bg-200']
43
- }
44
- ]}
45
- padding="2xl"
46
- >
47
- <IconBox icon={iconName} size="lg" background />
48
- {!!title && (
49
- <Text variant="paragraph-500" style={styles.title}>
50
- {title}
51
- </Text>
52
- )}
30
+ <Modal visible={visible} transparent animationType="slide" onRequestClose={onClose}>
31
+ <FlexView style={styles.modal}>
32
+ <FlexView
33
+ style={[
34
+ styles.content,
35
+ {
36
+ backgroundColor: Theme['bg-100'],
37
+ borderColor: Theme['gray-glass-015']
38
+ }
39
+ ]}
40
+ padding="2xl"
41
+ >
42
+ <IconBox icon={iconName} size="lg" background />
43
+ {!!title && (
44
+ <Text variant="paragraph-500" style={styles.title}>
45
+ {title}
46
+ </Text>
47
+ )}
53
48
 
54
- {!!description && (
55
- <Text variant="small-400" color="fg-150" center>
56
- {description}
57
- </Text>
58
- )}
59
- <Button onPress={onClose} variant="fill" style={styles.button}>
60
- Got it
61
- </Button>
49
+ {!!description && (
50
+ <Text variant="small-400" color="fg-150" center>
51
+ {description}
52
+ </Text>
53
+ )}
54
+ <Button onPress={onClose} variant="fill" style={styles.button}>
55
+ Got it
56
+ </Button>
57
+ </FlexView>
62
58
  </FlexView>
63
59
  </Modal>
64
60
  );
@@ -1,15 +1,17 @@
1
- import { Spacing } from '@reown/appkit-ui-react-native';
1
+ import { BorderRadius, Spacing } from '@reown/appkit-ui-react-native';
2
2
  import { StyleSheet } from 'react-native';
3
3
 
4
4
  export default StyleSheet.create({
5
5
  modal: {
6
6
  margin: 0,
7
- justifyContent: 'flex-end'
7
+ justifyContent: 'flex-end',
8
+ flex: 1
8
9
  },
9
10
  content: {
10
- borderTopLeftRadius: 16,
11
- borderTopRightRadius: 16,
12
- alignItems: 'center'
11
+ borderTopLeftRadius: BorderRadius.l,
12
+ borderTopRightRadius: BorderRadius.l,
13
+ alignItems: 'center',
14
+ borderWidth: StyleSheet.hairlineWidth
13
15
  },
14
16
  title: {
15
17
  marginTop: Spacing.s,