@reown/appkit-react-native 0.0.0-feat-multi-social-20250708154835 → 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 (116) hide show
  1. package/lib/commonjs/AppKit.js +13 -1
  2. package/lib/commonjs/AppKit.js.map +1 -1
  3. package/lib/commonjs/client.js +15 -24
  4. package/lib/commonjs/client.js.map +1 -1
  5. package/lib/commonjs/connectors/WalletConnectConnector.js +4 -2
  6. package/lib/commonjs/connectors/WalletConnectConnector.js.map +1 -1
  7. package/lib/commonjs/modal/w3m-router/index.js +0 -9
  8. package/lib/commonjs/modal/w3m-router/index.js.map +1 -1
  9. package/lib/commonjs/partials/w3m-connecting-qrcode/index.js +4 -3
  10. package/lib/commonjs/partials/w3m-connecting-qrcode/index.js.map +1 -1
  11. package/lib/commonjs/partials/w3m-header/index.js +0 -3
  12. package/lib/commonjs/partials/w3m-header/index.js.map +1 -1
  13. package/lib/commonjs/views/w3m-account-default-view/index.js +11 -4
  14. package/lib/commonjs/views/w3m-account-default-view/index.js.map +1 -1
  15. package/lib/commonjs/views/w3m-all-wallets-view/index.js +10 -11
  16. package/lib/commonjs/views/w3m-all-wallets-view/index.js.map +1 -1
  17. package/lib/commonjs/views/w3m-connect-view/components/connectors-list.js +47 -32
  18. package/lib/commonjs/views/w3m-connect-view/components/connectors-list.js.map +1 -1
  19. package/lib/commonjs/views/w3m-connect-view/index.js +12 -21
  20. package/lib/commonjs/views/w3m-connect-view/index.js.map +1 -1
  21. package/lib/commonjs/views/w3m-connecting-external-view/index.js +20 -15
  22. package/lib/commonjs/views/w3m-connecting-external-view/index.js.map +1 -1
  23. package/lib/commonjs/views/w3m-onramp-transaction-view/index.js +1 -1
  24. package/lib/commonjs/views/w3m-onramp-transaction-view/index.js.map +1 -1
  25. package/lib/commonjs/views/w3m-unsupported-chain-view/index.js +7 -20
  26. package/lib/commonjs/views/w3m-unsupported-chain-view/index.js.map +1 -1
  27. package/lib/commonjs/views/w3m-upgrade-email-wallet-view/index.js +3 -8
  28. package/lib/commonjs/views/w3m-upgrade-email-wallet-view/index.js.map +1 -1
  29. package/lib/module/AppKit.js +13 -1
  30. package/lib/module/AppKit.js.map +1 -1
  31. package/lib/module/client.js +17 -26
  32. package/lib/module/client.js.map +1 -1
  33. package/lib/module/connectors/WalletConnectConnector.js +4 -2
  34. package/lib/module/connectors/WalletConnectConnector.js.map +1 -1
  35. package/lib/module/modal/w3m-router/index.js +0 -9
  36. package/lib/module/modal/w3m-router/index.js.map +1 -1
  37. package/lib/module/partials/w3m-connecting-qrcode/index.js +5 -4
  38. package/lib/module/partials/w3m-connecting-qrcode/index.js.map +1 -1
  39. package/lib/module/partials/w3m-header/index.js +0 -3
  40. package/lib/module/partials/w3m-header/index.js.map +1 -1
  41. package/lib/module/views/w3m-account-default-view/index.js +11 -4
  42. package/lib/module/views/w3m-account-default-view/index.js.map +1 -1
  43. package/lib/module/views/w3m-all-wallets-view/index.js +11 -12
  44. package/lib/module/views/w3m-all-wallets-view/index.js.map +1 -1
  45. package/lib/module/views/w3m-connect-view/components/connectors-list.js +47 -32
  46. package/lib/module/views/w3m-connect-view/components/connectors-list.js.map +1 -1
  47. package/lib/module/views/w3m-connect-view/index.js +13 -22
  48. package/lib/module/views/w3m-connect-view/index.js.map +1 -1
  49. package/lib/module/views/w3m-connecting-external-view/index.js +22 -16
  50. package/lib/module/views/w3m-connecting-external-view/index.js.map +1 -1
  51. package/lib/module/views/w3m-onramp-transaction-view/index.js +2 -2
  52. package/lib/module/views/w3m-onramp-transaction-view/index.js.map +1 -1
  53. package/lib/module/views/w3m-unsupported-chain-view/index.js +8 -21
  54. package/lib/module/views/w3m-unsupported-chain-view/index.js.map +1 -1
  55. package/lib/module/views/w3m-upgrade-email-wallet-view/index.js +3 -8
  56. package/lib/module/views/w3m-upgrade-email-wallet-view/index.js.map +1 -1
  57. package/lib/typescript/AppKit.d.ts +2 -1
  58. package/lib/typescript/AppKit.d.ts.map +1 -1
  59. package/lib/typescript/client.d.ts +1 -6
  60. package/lib/typescript/client.d.ts.map +1 -1
  61. package/lib/typescript/connectors/WalletConnectConnector.d.ts.map +1 -1
  62. package/lib/typescript/hooks/useAppKitEvents.d.ts +1 -1
  63. package/lib/typescript/modal/w3m-router/index.d.ts.map +1 -1
  64. package/lib/typescript/partials/w3m-connecting-qrcode/index.d.ts.map +1 -1
  65. package/lib/typescript/partials/w3m-header/index.d.ts.map +1 -1
  66. package/lib/typescript/views/w3m-account-default-view/index.d.ts.map +1 -1
  67. package/lib/typescript/views/w3m-all-wallets-view/index.d.ts.map +1 -1
  68. package/lib/typescript/views/w3m-connect-view/components/connectors-list.d.ts +1 -7
  69. package/lib/typescript/views/w3m-connect-view/components/connectors-list.d.ts.map +1 -1
  70. package/lib/typescript/views/w3m-connect-view/index.d.ts.map +1 -1
  71. package/lib/typescript/views/w3m-connecting-external-view/index.d.ts.map +1 -1
  72. package/lib/typescript/views/w3m-unsupported-chain-view/index.d.ts.map +1 -1
  73. package/lib/typescript/views/w3m-upgrade-email-wallet-view/index.d.ts.map +1 -1
  74. package/package.json +5 -5
  75. package/src/AppKit.ts +36 -21
  76. package/src/client.ts +12 -41
  77. package/src/connectors/WalletConnectConnector.ts +4 -2
  78. package/src/modal/w3m-router/index.tsx +0 -9
  79. package/src/partials/w3m-connecting-qrcode/index.tsx +3 -4
  80. package/src/partials/w3m-header/index.tsx +0 -3
  81. package/src/views/w3m-account-default-view/index.tsx +13 -2
  82. package/src/views/w3m-all-wallets-view/index.tsx +7 -7
  83. package/src/views/w3m-connect-view/components/connectors-list.tsx +40 -38
  84. package/src/views/w3m-connect-view/index.tsx +9 -18
  85. package/src/views/w3m-connecting-external-view/index.tsx +16 -16
  86. package/src/views/w3m-onramp-transaction-view/index.tsx +2 -2
  87. package/src/views/w3m-unsupported-chain-view/index.tsx +8 -30
  88. package/src/views/w3m-upgrade-email-wallet-view/index.tsx +3 -7
  89. package/lib/commonjs/views/w3m-update-email-primary-otp-view/index.js +0 -56
  90. package/lib/commonjs/views/w3m-update-email-primary-otp-view/index.js.map +0 -1
  91. package/lib/commonjs/views/w3m-update-email-secondary-otp-view/index.js +0 -62
  92. package/lib/commonjs/views/w3m-update-email-secondary-otp-view/index.js.map +0 -1
  93. package/lib/commonjs/views/w3m-update-email-wallet-view/index.js +0 -104
  94. package/lib/commonjs/views/w3m-update-email-wallet-view/index.js.map +0 -1
  95. package/lib/commonjs/views/w3m-update-email-wallet-view/styles.js +0 -30
  96. package/lib/commonjs/views/w3m-update-email-wallet-view/styles.js.map +0 -1
  97. package/lib/module/views/w3m-update-email-primary-otp-view/index.js +0 -50
  98. package/lib/module/views/w3m-update-email-primary-otp-view/index.js.map +0 -1
  99. package/lib/module/views/w3m-update-email-secondary-otp-view/index.js +0 -56
  100. package/lib/module/views/w3m-update-email-secondary-otp-view/index.js.map +0 -1
  101. package/lib/module/views/w3m-update-email-wallet-view/index.js +0 -97
  102. package/lib/module/views/w3m-update-email-wallet-view/index.js.map +0 -1
  103. package/lib/module/views/w3m-update-email-wallet-view/styles.js +0 -24
  104. package/lib/module/views/w3m-update-email-wallet-view/styles.js.map +0 -1
  105. package/lib/typescript/views/w3m-update-email-primary-otp-view/index.d.ts +0 -2
  106. package/lib/typescript/views/w3m-update-email-primary-otp-view/index.d.ts.map +0 -1
  107. package/lib/typescript/views/w3m-update-email-secondary-otp-view/index.d.ts +0 -2
  108. package/lib/typescript/views/w3m-update-email-secondary-otp-view/index.d.ts.map +0 -1
  109. package/lib/typescript/views/w3m-update-email-wallet-view/index.d.ts +0 -2
  110. package/lib/typescript/views/w3m-update-email-wallet-view/index.d.ts.map +0 -1
  111. package/lib/typescript/views/w3m-update-email-wallet-view/styles.d.ts +0 -23
  112. package/lib/typescript/views/w3m-update-email-wallet-view/styles.d.ts.map +0 -1
  113. package/src/views/w3m-update-email-primary-otp-view/index.tsx +0 -55
  114. package/src/views/w3m-update-email-secondary-otp-view/index.tsx +0 -56
  115. package/src/views/w3m-update-email-wallet-view/index.tsx +0 -96
  116. package/src/views/w3m-update-email-wallet-view/styles.ts +0 -24
@@ -1 +1 @@
1
- {"version":3,"file":"connectors-list.d.ts","sourceRoot":"","sources":["../../../../../src/views/w3m-connect-view/components/connectors-list.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAWzD,UAAU,KAAK;IACb,SAAS,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAChC,sBAAsB,EAAE,OAAO,CAAC;CACjC;AAED,wBAAgB,aAAa,CAAC,EAAE,SAAS,EAAE,sBAAsB,EAAE,EAAE,KAAK,sDA2BzE"}
1
+ {"version":3,"file":"connectors-list.d.ts","sourceRoot":"","sources":["../../../../../src/views/w3m-connect-view/components/connectors-list.tsx"],"names":[],"mappings":"AAkBA,wBAAgB,aAAa,SA4B5B"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-connect-view/index.tsx"],"names":[],"mappings":"AAsBA,wBAAgB,WAAW,4CAuG1B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-connect-view/index.tsx"],"names":[],"mappings":"AAoBA,wBAAgB,WAAW,4CAgG1B"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-connecting-external-view/index.tsx"],"names":[],"mappings":"AAwBA,wBAAgB,sBAAsB,4CA0GrC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-connecting-external-view/index.tsx"],"names":[],"mappings":"AAsBA,wBAAgB,sBAAsB,4CA4GrC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-unsupported-chain-view/index.tsx"],"names":[],"mappings":"AAkBA,wBAAgB,oBAAoB,4CA8EnC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-unsupported-chain-view/index.tsx"],"names":[],"mappings":"AASA,wBAAgB,oBAAoB,4CAiEnC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-upgrade-email-wallet-view/index.tsx"],"names":[],"mappings":"AAKA,wBAAgB,sBAAsB,4CA0BrC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/w3m-upgrade-email-wallet-view/index.tsx"],"names":[],"mappings":"AAIA,wBAAgB,sBAAsB,4CAuBrC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reown/appkit-react-native",
3
- "version": "0.0.0-feat-multi-social-20250708154835",
3
+ "version": "0.0.0-feat-multi-social-20250710154055",
4
4
  "main": "lib/commonjs/index.js",
5
5
  "types": "lib/typescript/index.d.ts",
6
6
  "module": "lib/module/index.js",
@@ -37,10 +37,10 @@
37
37
  "access": "public"
38
38
  },
39
39
  "dependencies": {
40
- "@reown/appkit-common-react-native": "0.0.0-feat-multi-social-20250708154835",
41
- "@reown/appkit-core-react-native": "0.0.0-feat-multi-social-20250708154835",
42
- "@reown/appkit-siwe-react-native": "0.0.0-feat-multi-social-20250708154835",
43
- "@reown/appkit-ui-react-native": "0.0.0-feat-multi-social-20250708154835",
40
+ "@reown/appkit-common-react-native": "0.0.0-feat-multi-social-20250710154055",
41
+ "@reown/appkit-core-react-native": "0.0.0-feat-multi-social-20250710154055",
42
+ "@reown/appkit-siwe-react-native": "0.0.0-feat-multi-social-20250710154055",
43
+ "@reown/appkit-ui-react-native": "0.0.0-feat-multi-social-20250710154055",
44
44
  "@walletconnect/universal-provider": "2.20.2",
45
45
  "valtio": "^1.13.2"
46
46
  },
package/src/AppKit.ts CHANGED
@@ -13,26 +13,27 @@ import {
13
13
  ConnectionController
14
14
  } from '@reown/appkit-core-react-native';
15
15
 
16
- import type {
17
- WalletConnector,
18
- BlockchainAdapter,
19
- ProposalNamespaces,
20
- New_ConnectorType,
21
- Namespaces,
22
- Metadata,
23
- CaipNetworkId,
24
- AppKitNetwork,
25
- Provider,
26
- ThemeVariables,
27
- ThemeMode,
28
- WalletInfo,
29
- Network,
30
- ChainNamespace,
31
- Storage,
32
- AppKitConnectOptions,
33
- AppKitSIWEClient,
34
- ConnectionProperties,
35
- AccountType
16
+ import {
17
+ type WalletConnector,
18
+ type BlockchainAdapter,
19
+ type ProposalNamespaces,
20
+ type New_ConnectorType,
21
+ type Namespaces,
22
+ type Metadata,
23
+ type CaipNetworkId,
24
+ type AppKitNetwork,
25
+ type Provider,
26
+ type ThemeVariables,
27
+ type ThemeMode,
28
+ type WalletInfo,
29
+ type Network,
30
+ type ChainNamespace,
31
+ type Storage,
32
+ type AppKitConnectOptions,
33
+ type AppKitSIWEClient,
34
+ type ConnectionProperties,
35
+ type AccountType,
36
+ ConstantsUtil
36
37
  } from '@reown/appkit-common-react-native';
37
38
 
38
39
  import { WalletConnectConnector } from './connectors/WalletConnectConnector';
@@ -516,7 +517,7 @@ export class AppKit {
516
517
  OptionsController.setProjectId(options.projectId);
517
518
  OptionsController.setMetadata(options.metadata);
518
519
  OptionsController.setIncludeWalletIds(options.includeWalletIds);
519
- OptionsController.setExcludeWalletIds(options.excludeWalletIds);
520
+ this.setExcludedWallets(options);
520
521
  OptionsController.setFeaturedWalletIds(options.featuredWalletIds);
521
522
  OptionsController.setTokens(options.tokens);
522
523
  OptionsController.setCustomWallets(options.customWallets);
@@ -582,6 +583,20 @@ export class AppKit {
582
583
  }
583
584
  }
584
585
 
586
+ private setExcludedWallets(options: AppKitConfig) {
587
+ // Exclude Coinbase if the connector is not implemented
588
+ const excludedWallets = options.excludeWalletIds || [];
589
+
590
+ //TODO: check this when coinbase connector is implemented
591
+ const excludeCoinbase = true;
592
+
593
+ if (excludeCoinbase) {
594
+ excludedWallets.push(ConstantsUtil.COINBASE_EXPLORER_ID);
595
+ }
596
+
597
+ OptionsController.setExcludeWalletIds(excludedWallets);
598
+ }
599
+
585
600
  private async initAsyncValues(options: AppKitConfig) {
586
601
  await this.initActiveNamespace();
587
602
  await this.initRecentWallets(options);
package/src/client.ts CHANGED
@@ -10,7 +10,6 @@ import type {
10
10
  EventsControllerState,
11
11
  PublicStateControllerState,
12
12
  ThemeControllerState,
13
- Connector,
14
13
  ConnectedWalletInfo,
15
14
  Features,
16
15
  EventName
@@ -20,7 +19,6 @@ import {
20
19
  AccountController,
21
20
  BlockchainApiController,
22
21
  ConnectionController,
23
- ConnectorController,
24
22
  EnsController,
25
23
  EventsController,
26
24
  ModalController,
@@ -32,12 +30,7 @@ import {
32
30
  ThemeController,
33
31
  TransactionsController
34
32
  } from '@reown/appkit-core-react-native';
35
- import {
36
- ConstantsUtil,
37
- ErrorUtil,
38
- type ThemeMode,
39
- type ThemeVariables
40
- } from '@reown/appkit-common-react-native';
33
+ import { ErrorUtil, type ThemeMode, type ThemeVariables } from '@reown/appkit-common-react-native';
41
34
  import { Appearance } from 'react-native';
42
35
 
43
36
  // -- Types ---------------------------------------------------------------------
@@ -205,20 +198,6 @@ export class AppKitScaffold {
205
198
  NetworkController.resetNetwork();
206
199
  };
207
200
 
208
- protected setConnectors: (typeof ConnectorController)['setConnectors'] = (
209
- connectors: Connector[]
210
- ) => {
211
- ConnectorController.setConnectors(connectors);
212
- this.setConnectorExcludedWallets(connectors);
213
- };
214
-
215
- protected addConnector: (typeof ConnectorController)['addConnector'] = (connector: Connector) => {
216
- ConnectorController.addConnector(connector);
217
- };
218
-
219
- protected getConnectors: (typeof ConnectorController)['getConnectors'] = () =>
220
- ConnectorController.getConnectors();
221
-
222
201
  protected resetWcConnection: (typeof ConnectionController)['resetWcConnection'] = () => {
223
202
  ConnectionController.resetWcConnection();
224
203
  TransactionsController.resetTransactions();
@@ -326,20 +305,20 @@ export class AppKitScaffold {
326
305
  }
327
306
  }
328
307
 
329
- private async setConnectorExcludedWallets(connectors: Connector[]) {
330
- const excludedWallets = OptionsController.state.excludeWalletIds || [];
308
+ // private async setConnectorExcludedWallets(connectors: Connector[]) {
309
+ // const excludedWallets = OptionsController.state.excludeWalletIds || [];
331
310
 
332
- // Exclude Coinbase if the connector is not implemented
333
- const excludeCoinbase =
334
- connectors.findIndex(connector => connector.id === ConstantsUtil.COINBASE_CONNECTOR_ID) ===
335
- -1;
311
+ // // Exclude Coinbase if the connector is not implemented
312
+ // const excludeCoinbase =
313
+ // connectors.findIndex(connector => connector.id === ConstantsUtil.COINBASE_CONNECTOR_ID) ===
314
+ // -1;
336
315
 
337
- if (excludeCoinbase) {
338
- excludedWallets.push(ConstantsUtil.COINBASE_EXPLORER_ID);
339
- }
316
+ // if (excludeCoinbase) {
317
+ // excludedWallets.push(ConstantsUtil.COINBASE_EXPLORER_ID);
318
+ // }
340
319
 
341
- OptionsController.setExcludeWalletIds(excludedWallets);
342
- }
320
+ // OptionsController.setExcludeWalletIds(excludedWallets);
321
+ // }
343
322
 
344
323
  private async initRecentWallets(options: ScaffoldOptions) {
345
324
  const wallets = await StorageUtil.getRecentWallets();
@@ -359,20 +338,12 @@ export class AppKitScaffold {
359
338
  ConnectionController.setRecentWallets(filteredWallets);
360
339
  }
361
340
 
362
- private async initConnectedConnector() {
363
- const connectedConnector = await StorageUtil.getConnectedConnector();
364
- if (connectedConnector) {
365
- ConnectorController.setConnectedConnector(connectedConnector, false);
366
- }
367
- }
368
-
369
341
  private async initSocial() {
370
342
  const connectedSocialProvider = await StorageUtil.getConnectedSocialProvider();
371
343
  ConnectionController.setConnectedSocialProvider(connectedSocialProvider);
372
344
  }
373
345
 
374
346
  private async initAsyncValues(options: ScaffoldOptions) {
375
- await this.initConnectedConnector();
376
347
  await this.initRecentWallets(options);
377
348
  await this.initSocial();
378
349
  }
@@ -55,7 +55,8 @@ export class WalletConnectConnector extends WalletConnector {
55
55
  ...provider.session.sessionProperties,
56
56
  smartAccounts: provider.session.sessionProperties['smartAccounts']
57
57
  ? JSON.parse(provider.session.sessionProperties['smartAccounts'])
58
- : []
58
+ : [],
59
+ sessionTopic: provider.session.topic
59
60
  };
60
61
  }
61
62
 
@@ -188,7 +189,8 @@ export class WalletConnectConnector extends WalletConnector {
188
189
  ...session.sessionProperties,
189
190
  smartAccounts: session.sessionProperties['smartAccounts']
190
191
  ? JSON.parse(session.sessionProperties['smartAccounts'])
191
- : []
192
+ : [],
193
+ sessionTopic: session.topic
192
194
  };
193
195
  }
194
196
 
@@ -24,9 +24,6 @@ import { SwapPreviewView } from '../../views/w3m-swap-preview-view';
24
24
  import { SwapSelectTokenView } from '../../views/w3m-swap-select-token-view';
25
25
  import { TransactionsView } from '../../views/w3m-transactions-view';
26
26
  import { UnsupportedChainView } from '../../views/w3m-unsupported-chain-view';
27
- import { UpdateEmailWalletView } from '../../views/w3m-update-email-wallet-view';
28
- import { UpdateEmailPrimaryOtpView } from '../../views/w3m-update-email-primary-otp-view';
29
- import { UpdateEmailSecondaryOtpView } from '../../views/w3m-update-email-secondary-otp-view';
30
27
  import { UpgradeEmailWalletView } from '../../views/w3m-upgrade-email-wallet-view';
31
28
  import { WalletCompatibleNetworks } from '../../views/w3m-wallet-compatible-networks-view';
32
29
  import { WalletReceiveView } from '../../views/w3m-wallet-receive-view';
@@ -90,12 +87,6 @@ export function AppKitRouter() {
90
87
  return TransactionsView;
91
88
  case 'UnsupportedChain':
92
89
  return UnsupportedChainView;
93
- case 'UpdateEmailPrimaryOtp':
94
- return UpdateEmailPrimaryOtpView;
95
- case 'UpdateEmailSecondaryOtp':
96
- return UpdateEmailSecondaryOtpView;
97
- case 'UpdateEmailWallet':
98
- return UpdateEmailWalletView;
99
90
  case 'UpgradeEmailWallet':
100
91
  return UpgradeEmailWalletView;
101
92
  case 'WalletCompatibleNetworks':
@@ -3,7 +3,6 @@ import { useSnapshot } from 'valtio';
3
3
  import {
4
4
  AssetUtil,
5
5
  ConnectionController,
6
- ConnectorController,
7
6
  EventsController,
8
7
  OptionsController,
9
8
  SnackController
@@ -11,6 +10,7 @@ import {
11
10
  import { FlexView, Link, QrCode, Text, Spacing } from '@reown/appkit-ui-react-native';
12
11
  import { useCustomDimensions } from '../../hooks/useCustomDimensions';
13
12
  import styles from './styles';
13
+ import { PresetsUtil } from '@reown/appkit-common-react-native';
14
14
 
15
15
  export function ConnectingQrCode() {
16
16
  const { wcUri } = useSnapshot(ConnectionController.state);
@@ -37,9 +37,8 @@ export function ConnectingQrCode() {
37
37
  }
38
38
  });
39
39
 
40
- const connectors = ConnectorController.state.connectors;
41
- const connector = connectors.find(c => c.type === 'WALLET_CONNECT');
42
- const url = AssetUtil.getConnectorImage(connector);
40
+ //TODO: check this
41
+ const url = AssetUtil.getConnectorImage(PresetsUtil.ConnectorImageIds['WALLET_CONNECT']);
43
42
  ConnectionController.setConnectedWalletImageUrl(url);
44
43
  };
45
44
 
@@ -48,9 +48,6 @@ export function Header() {
48
48
  SwapPreview: 'Review swap',
49
49
  Transactions: 'Activity',
50
50
  UnsupportedChain: 'Switch network',
51
- UpdateEmailPrimaryOtp: 'Confirm current email',
52
- UpdateEmailSecondaryOtp: 'Confirm new email',
53
- UpdateEmailWallet: 'Edit email',
54
51
  UpgradeEmailWallet: 'Upgrade wallet',
55
52
  WalletCompatibleNetworks: 'Compatible networks',
56
53
  WalletReceive: 'Receive',
@@ -16,6 +16,7 @@ import {
16
16
  OnRampController,
17
17
  ConnectionsController
18
18
  } from '@reown/appkit-core-react-native';
19
+ import { ConstantsUtil as CommonConstantsUtil } from '@reown/appkit-common-react-native';
19
20
  import {
20
21
  Avatar,
21
22
  Button,
@@ -144,11 +145,21 @@ export function AccountDefaultView() {
144
145
  RouterController.push('UpgradeEmailWallet');
145
146
  };
146
147
 
147
- const onEmailPress = () => {
148
+ const onEmailPress = async () => {
148
149
  const email = ConnectionsController.state.connection?.properties?.email;
149
150
  const provider = ConnectionsController.state.connection?.properties?.provider;
150
151
  if (provider !== 'email' || !email) return;
151
- RouterController.push('UpdateEmailWallet', { email });
152
+
153
+ const sessionTopic = ConnectionsController.state.connection?.properties?.sessionTopic;
154
+
155
+ if (!sessionTopic) {
156
+ throw new Error('Session topic not found');
157
+ }
158
+
159
+ const link = `${CommonConstantsUtil.WEB_WALLET_URL}/emailUpdate/${sessionTopic}`;
160
+ await CoreHelperUtil.openLink(link);
161
+
162
+ // Subscribe to email update event
152
163
  };
153
164
 
154
165
  return (
@@ -1,7 +1,6 @@
1
1
  import { useState } from 'react';
2
2
  import {
3
3
  ConnectionController,
4
- ConnectorController,
5
4
  EventsController,
6
5
  RouterController,
7
6
  type WcWallet
@@ -25,12 +24,13 @@ export function AllWalletsView() {
25
24
  const { debouncedCallback: onInputChange } = useDebounceCallback({ callback: setSearchQuery });
26
25
 
27
26
  const onWalletPress = (wallet: WcWallet) => {
28
- const connector = ConnectorController.state.connectors.find(c => c.explorerId === wallet.id);
29
- if (connector) {
30
- RouterController.push('ConnectingExternal', { connector, wallet });
31
- } else {
32
- RouterController.push('ConnectingWalletConnect', { wallet });
33
- }
27
+ //TODO: check this
28
+ // const connector = ConnectorController.state.connectors.find(c => c.explorerId === wallet.id);
29
+ // if (connector) {
30
+ // RouterController.push('ConnectingExternal', { connector, wallet });
31
+ // } else {
32
+ RouterController.push('ConnectingWalletConnect', { wallet });
33
+ // }
34
34
 
35
35
  EventsController.sendEvent({
36
36
  type: 'track',
@@ -1,45 +1,47 @@
1
- import { useSnapshot } from 'valtio';
2
- import type { StyleProp, ViewStyle } from 'react-native';
3
- import {
4
- ConnectorController,
5
- AssetUtil,
6
- RouterController,
7
- ApiController
8
- } from '@reown/appkit-core-react-native';
1
+ // import { useSnapshot } from 'valtio';
2
+ // import type { StyleProp, ViewStyle } from 'react-native';
3
+ // import {
4
+ // ConnectorController,
5
+ // AssetUtil,
6
+ // RouterController,
7
+ // ApiController
8
+ // } from '@reown/appkit-core-react-native';
9
9
 
10
- import { ListWallet } from '@reown/appkit-ui-react-native';
11
- import type { ConnectorType } from '@reown/appkit-common-react-native';
10
+ // import { ListWallet } from '@reown/appkit-ui-react-native';
11
+ // import type { ConnectorType } from '@reown/appkit-common-react-native';
12
12
 
13
- interface Props {
14
- itemStyle: StyleProp<ViewStyle>;
15
- isWalletConnectEnabled: boolean;
16
- }
13
+ // interface Props {
14
+ // itemStyle: StyleProp<ViewStyle>;
15
+ // isWalletConnectEnabled: boolean;
16
+ // }
17
17
 
18
- export function ConnectorList({ itemStyle, isWalletConnectEnabled }: Props) {
19
- const { connectors } = useSnapshot(ConnectorController.state);
20
- const excludeConnectors: ConnectorType[] = ['WALLET_CONNECT', 'AUTH'];
21
- const imageHeaders = ApiController._getApiHeaders();
18
+ // TODO: check this for coinbase
19
+ export function ConnectorList(/*{ itemStyle, isWalletConnectEnabled }: Props*/) {
20
+ // const { connectors } = useSnapshot(ConnectorController.state);
21
+ // const excludeConnectors: ConnectorType[] = ['WALLET_CONNECT', 'AUTH'];
22
+ // const imageHeaders = ApiController._getApiHeaders();
22
23
 
23
- if (isWalletConnectEnabled) {
24
- // use wallet from api list
25
- excludeConnectors.push('COINBASE');
26
- }
24
+ // if (isWalletConnectEnabled) {
25
+ // // use wallet from api list
26
+ // excludeConnectors.push('COINBASE');
27
+ // }
27
28
 
28
- return connectors.map(connector => {
29
- if (excludeConnectors.includes(connector.type)) {
30
- return null;
31
- }
29
+ // return connectors.map(connector => {
30
+ // if (excludeConnectors.includes(connector.type)) {
31
+ // return null;
32
+ // }
32
33
 
33
- return (
34
- <ListWallet
35
- key={connector.type}
36
- imageSrc={AssetUtil.getConnectorImage(connector)}
37
- imageHeaders={imageHeaders}
38
- name={connector.name || 'Unknown'}
39
- onPress={() => RouterController.push('ConnectingExternal', { connector })}
40
- style={itemStyle}
41
- installed={connector.installed}
42
- />
43
- );
44
- });
34
+ // return (
35
+ // <ListWallet
36
+ // key={connector.type}
37
+ // imageSrc={AssetUtil.getConnectorImage(connector)}
38
+ // imageHeaders={imageHeaders}
39
+ // name={connector.name || 'Unknown'}
40
+ // onPress={() => RouterController.push('ConnectingExternal', { connector })}
41
+ // style={itemStyle}
42
+ // installed={connector.installed}
43
+ // />
44
+ // );
45
+ // });
46
+ return null;
45
47
  }
@@ -2,7 +2,6 @@ import { useSnapshot } from 'valtio';
2
2
  import { ScrollView, View } from 'react-native';
3
3
  import {
4
4
  ApiController,
5
- ConnectorController,
6
5
  EventUtil,
7
6
  EventsController,
8
7
  OptionsController,
@@ -12,7 +11,6 @@ import {
12
11
  import { FlexView, Icon, ListItem, Separator, Text } from '@reown/appkit-ui-react-native';
13
12
  import { useCustomDimensions } from '../../hooks/useCustomDimensions';
14
13
  import { Placeholder } from '../../partials/w3m-placeholder';
15
- import { ConnectorList } from './components/connectors-list';
16
14
  import { CustomWalletList } from './components/custom-wallet-list';
17
15
  import { AllWalletsButton } from './components/all-wallets-button';
18
16
  import { AllWalletList } from './components/all-wallet-list';
@@ -21,16 +19,13 @@ import { SocialLoginList } from './components/social-login-list';
21
19
  import styles from './styles';
22
20
 
23
21
  export function ConnectView() {
24
- const connectors = ConnectorController.state.connectors;
25
- // const { authLoading } = useSnapshot(ConnectorController.state);
26
22
  const { prefetchError } = useSnapshot(ApiController.state);
27
23
  const { features } = useSnapshot(OptionsController.state);
28
24
  const { padding } = useCustomDimensions();
29
25
 
30
- //TODO: check this
31
- // const isWalletConnectEnabled = connectors.some(c => c.type === 'WALLET_CONNECT');
26
+ //TODO: check this with Coinbase
32
27
  const isWalletConnectEnabled = true;
33
- const isCoinbaseEnabled = connectors.some(c => c.type === 'COINBASE');
28
+ const isCoinbaseEnabled = false;
34
29
  const isSocialEnabled = features?.socials && features?.socials.length > 0;
35
30
  const showConnectWalletsButton =
36
31
  isWalletConnectEnabled && isSocialEnabled && !features?.showWallets;
@@ -39,19 +34,19 @@ export function ConnectView() {
39
34
  const showList = !showConnectWalletsButton && !showLoadingError;
40
35
 
41
36
  const onWalletPress = (wallet: WcWallet, isInstalled?: boolean) => {
42
- const connector = connectors.find(c => c.explorerId === wallet.id);
43
- if (connector) {
44
- RouterController.push('ConnectingExternal', { connector, wallet });
45
- } else {
46
- RouterController.push('ConnectingWalletConnect', { wallet });
47
- }
37
+ // const connector = connectors.find(c => c.explorerId === wallet.id);
38
+ // if (connector) {
39
+ // RouterController.push('ConnectingExternal', { connector, wallet });
40
+ // } else {
41
+ RouterController.push('ConnectingWalletConnect', { wallet });
42
+ // }
48
43
 
49
44
  const platform = EventUtil.getWalletPlatform(wallet, isInstalled);
50
45
  EventsController.sendEvent({
51
46
  type: 'track',
52
47
  event: 'SELECT_WALLET',
53
48
  properties: {
54
- name: wallet.name ?? connector?.name ?? 'Unknown',
49
+ name: wallet.name ?? 'Unknown',
55
50
  platform,
56
51
  explorer_id: wallet.id
57
52
  }
@@ -108,10 +103,6 @@ export function ConnectView() {
108
103
  onWalletPress={onWalletPress}
109
104
  isWalletConnectEnabled={isWalletConnectEnabled}
110
105
  />
111
- <ConnectorList
112
- itemStyle={styles.item}
113
- isWalletConnectEnabled={isWalletConnectEnabled}
114
- />
115
106
  <AllWalletsButton
116
107
  itemStyle={styles.item}
117
108
  onPress={onViewAllPress}
@@ -3,11 +3,8 @@ import { ScrollView } from 'react-native';
3
3
  import {
4
4
  RouterController,
5
5
  ApiController,
6
- AssetUtil,
7
- ConnectionController,
8
6
  ModalController,
9
7
  EventsController,
10
- StorageUtil,
11
8
  type WcWallet
12
9
  } from '@reown/appkit-core-react-native';
13
10
  import {
@@ -22,6 +19,7 @@ import { useCustomDimensions } from '../../hooks/useCustomDimensions';
22
19
  import { ConnectingBody, getMessage, type BodyErrorType } from '../../partials/w3m-connecting-body';
23
20
  import styles from './styles';
24
21
 
22
+ //TODO: check if this view is needed with Coinbase
25
23
  export function ConnectingExternalView() {
26
24
  const { data } = RouterController.state;
27
25
  const connector = data?.connector;
@@ -35,25 +33,27 @@ export function ConnectingExternalView() {
35
33
  };
36
34
 
37
35
  const storeConnectedWallet = useCallback(
36
+ // @ts-ignore
37
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
38
38
  async (wallet?: WcWallet) => {
39
- if (wallet) {
40
- const recentWallets = await StorageUtil.addRecentWallet(wallet);
41
- if (recentWallets) {
42
- ConnectionController.setRecentWallets(recentWallets);
43
- }
44
- }
45
- if (connector) {
46
- const url = AssetUtil.getConnectorImage(connector);
47
- ConnectionController.setConnectedWalletImageUrl(url);
48
- }
39
+ // if (wallet) {
40
+ // const recentWallets = await StorageUtil.addRecentWallet(wallet);
41
+ // if (recentWallets) {
42
+ // ConnectionController.setRecentWallets(recentWallets);
43
+ // }
44
+ // }
45
+ // if (connector) {
46
+ // const url = AssetUtil.getConnectorImage(connector);
47
+ // ConnectionController.setConnectedWalletImageUrl(url);
48
+ // }
49
49
  },
50
- [connector]
50
+ []
51
51
  );
52
52
 
53
53
  const onConnect = useCallback(async () => {
54
54
  try {
55
55
  if (connector) {
56
- await ConnectionController.connectExternal(connector);
56
+ // await ConnectionController.connectExternal(connector);
57
57
  storeConnectedWallet(data?.wallet);
58
58
  ModalController.close();
59
59
  EventsController.sendEvent({
@@ -97,7 +97,7 @@ export function ConnectingExternalView() {
97
97
  <LoadingThumbnail paused={!!errorType}>
98
98
  <WalletImage
99
99
  size="xl"
100
- imageSrc={AssetUtil.getConnectorImage(connector)}
100
+ // imageSrc={AssetUtil.getConnectorImage(connector)}
101
101
  imageHeaders={ApiController._getApiHeaders()}
102
102
  />
103
103
  {errorType && (
@@ -2,7 +2,7 @@ import { useSnapshot } from 'valtio';
2
2
  import { useEffect } from 'react';
3
3
  import {
4
4
  AccountController,
5
- ConnectorController,
5
+ ConnectionsController,
6
6
  OnRampController,
7
7
  RouterController
8
8
  } from '@reown/appkit-core-react-native';
@@ -15,7 +15,7 @@ export function OnRampTransactionView() {
15
15
  const { data } = useSnapshot(RouterController.state);
16
16
 
17
17
  const onClose = () => {
18
- const isAuth = ConnectorController.state.connectedConnector === 'AUTH';
18
+ const isAuth = !!ConnectionsController.state.connection?.properties?.provider;
19
19
  RouterController.replace(isAuth ? 'Account' : 'AccountDefault');
20
20
  };
21
21