@getpara/solana-wallet-connectors 2.0.0-dev.0 → 2.0.0-dev.1

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.
package/dist/index.js CHANGED
@@ -57,7 +57,8 @@ function SolanaExternalWalletProvider({
57
57
  children,
58
58
  wallets: walletFns,
59
59
  onSwitchWallet,
60
- para
60
+ para,
61
+ walletsWithFullAuth
61
62
  }) {
62
63
  const {
63
64
  wallets: adapters,
@@ -75,8 +76,16 @@ function SolanaExternalWalletProvider({
75
76
  yield para.logout();
76
77
  });
77
78
  const login = (_0) => __async(this, [_0], function* ({ address, providerName }) {
79
+ var _a, _b;
78
80
  try {
79
- return yield para.externalWalletLogin({ address, type: WalletType.SOLANA, provider: providerName });
81
+ return yield para.externalWalletLogin({
82
+ address,
83
+ type: WalletType.SOLANA,
84
+ provider: providerName,
85
+ withFullParaAuth: walletsWithFullAuth == null ? void 0 : walletsWithFullAuth.includes(
86
+ (_b = (_a = getWallet(providerName != null ? providerName : "")) == null ? void 0 : _a.id.toUpperCase()) != null ? _b : ""
87
+ )
88
+ });
80
89
  } catch (err) {
81
90
  yield reset();
82
91
  throw "Error logging you in. Please try again.";
@@ -171,6 +180,7 @@ function SolanaExternalWalletProvider({
171
180
  var _a;
172
181
  return (_a = adapters.find((a) => a.adapter.name === "Mobile Wallet Adapter" ? a : a.adapter.name === name ? a : false)) == null ? void 0 : _a.adapter;
173
182
  };
183
+ const getWallet = (name) => wallets.find((w) => w.name === name);
174
184
  const wallets = walletFns.map((walletFn) => {
175
185
  const metaData = walletFn();
176
186
  const adapter = getAdapter(metaData.name);
package/dist/index.js.br CHANGED
Binary file
package/dist/index.js.gz CHANGED
Binary file
@@ -1,7 +1,7 @@
1
1
  import { PropsWithChildren } from 'react';
2
2
  import ParaWeb from '@getpara/web-sdk';
3
3
  import { WalletList } from '../types/Wallet.js';
4
- import { type CommonWallet } from '@getpara/react-common';
4
+ import { TExternalWallet, type CommonWallet } from '@getpara/react-common';
5
5
  export type SolanaExternalWalletContextType = {
6
6
  wallets: CommonWallet[];
7
7
  disconnect: () => Promise<void>;
@@ -22,9 +22,10 @@ export type SolanaExternalWalletProviderConfig = {
22
22
  error?: string;
23
23
  }) => void;
24
24
  para: ParaWeb;
25
+ walletsWithFullAuth: TExternalWallet[];
25
26
  };
26
27
  type SolanaExternalWalletProviderConfigFull = {
27
28
  wallets: WalletList;
28
29
  } & SolanaExternalWalletProviderConfig;
29
- export declare function SolanaExternalWalletProvider({ children, wallets: walletFns, onSwitchWallet, para, }: SolanaExternalWalletProviderConfigFull & PropsWithChildren): import("react/jsx-runtime").JSX.Element;
30
+ export declare function SolanaExternalWalletProvider({ children, wallets: walletFns, onSwitchWallet, para, walletsWithFullAuth, }: SolanaExternalWalletProviderConfigFull & PropsWithChildren): import("react/jsx-runtime").JSX.Element;
30
31
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getpara/solana-wallet-connectors",
3
- "version": "2.0.0-dev.0",
3
+ "version": "2.0.0-dev.1",
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-dev.0",
17
+ "@getpara/web-sdk": "^2.0.0-dev.1",
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-dev.0",
25
+ "@getpara/react-common": "^2.0.0-dev.1",
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": "f94ef031ef0e1894f5f0800e55f6ca2904641780"
38
+ "gitHead": "426e843bd6084fb2e5f30ab87b02c79fc2f52832"
39
39
  }