@getpara/solana-wallet-connectors 2.0.0-alpha.16 → 2.0.0-alpha.17

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.
@@ -23,9 +23,11 @@ export type SolanaExternalWalletProviderConfig = {
23
23
  }) => void;
24
24
  para: ParaWeb;
25
25
  walletsWithFullAuth: TExternalWallet[];
26
+ includeWalletVerification?: boolean;
27
+ connectionOnly?: boolean;
26
28
  };
27
29
  type SolanaExternalWalletProviderConfigFull = {
28
30
  wallets: WalletList;
29
31
  } & SolanaExternalWalletProviderConfig;
30
- export declare function SolanaExternalWalletProvider({ children, wallets: walletFns, onSwitchWallet, para, walletsWithFullAuth, }: SolanaExternalWalletProviderConfigFull & PropsWithChildren): import("react/jsx-runtime").JSX.Element;
32
+ export declare function SolanaExternalWalletProvider({ children, wallets: walletFns, onSwitchWallet, para, walletsWithFullAuth, includeWalletVerification, connectionOnly, }: SolanaExternalWalletProviderConfigFull & PropsWithChildren): import("react/jsx-runtime").JSX.Element;
31
33
  export {};
@@ -52,7 +52,9 @@ function SolanaExternalWalletProvider({
52
52
  wallets: walletFns,
53
53
  onSwitchWallet,
54
54
  para,
55
- walletsWithFullAuth
55
+ walletsWithFullAuth,
56
+ includeWalletVerification,
57
+ connectionOnly
56
58
  }) {
57
59
  const {
58
60
  wallets: adapters,
@@ -79,7 +81,9 @@ function SolanaExternalWalletProvider({
79
81
  provider: providerName,
80
82
  withFullParaAuth: walletsWithFullAuth == null ? void 0 : walletsWithFullAuth.includes(
81
83
  (_b = (_a = getWallet(providerName != null ? providerName : "")) == null ? void 0 : _a.id.toUpperCase()) != null ? _b : ""
82
- )
84
+ ),
85
+ withVerification: includeWalletVerification,
86
+ isConnectionOnly: connectionOnly
83
87
  }
84
88
  });
85
89
  } catch (err) {
@@ -93,10 +97,17 @@ function SolanaExternalWalletProvider({
93
97
  if (!address) {
94
98
  yield para.logout();
95
99
  } else {
96
- try {
97
- yield login({ address, providerName: (_a = wallet == null ? void 0 : wallet.adapter) == null ? void 0 : _a.name });
98
- } catch (err) {
99
- error = err;
100
+ if (para.isExternalWalletAuth || para.isExternalWalletWithVerification) {
101
+ yield reset();
102
+ } else {
103
+ try {
104
+ yield login({
105
+ address,
106
+ providerName: (_a = wallet == null ? void 0 : wallet.adapter) == null ? void 0 : _a.name
107
+ });
108
+ } catch (err) {
109
+ error = err;
110
+ }
100
111
  }
101
112
  }
102
113
  onSwitchWallet({ address, error });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getpara/solana-wallet-connectors",
3
- "version": "2.0.0-alpha.16",
3
+ "version": "2.0.0-alpha.17",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -14,7 +14,7 @@
14
14
  "test": "vitest run --coverage"
15
15
  },
16
16
  "dependencies": {
17
- "@getpara/web-sdk": "2.0.0-alpha.16",
17
+ "@getpara/web-sdk": "2.0.0-alpha.17",
18
18
  "@solana-mobile/wallet-adapter-mobile": "2.1.3",
19
19
  "@solana/wallet-adapter-base": "0.9.23",
20
20
  "@solana/wallet-adapter-react": "0.15.35",
@@ -22,7 +22,7 @@
22
22
  "bs58": "6.0.0"
23
23
  },
24
24
  "devDependencies": {
25
- "@getpara/react-common": "2.0.0-alpha.16",
25
+ "@getpara/react-common": "2.0.0-alpha.17",
26
26
  "@types/react": "^18.0.31",
27
27
  "@types/react-dom": "^18.2.7",
28
28
  "typescript": "^5.4.3"
@@ -35,5 +35,5 @@
35
35
  "dist",
36
36
  "package.json"
37
37
  ],
38
- "gitHead": "84eb1a14fa8918c449ae4b163fe173d34688cdcd"
38
+ "gitHead": "5cb0f3dee5564995c465ead160ed817ba2ba37a7"
39
39
  }