@getpara/react-sdk-lite 2.0.0-alpha.66 → 2.0.0-alpha.67
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/modal/components/Account/AccountProfile.js +12 -172
- package/dist/modal/components/Account/AccountProfileEntry.d.ts +12 -0
- package/dist/modal/components/Account/AccountProfileEntry.js +220 -0
- package/dist/modal/components/Account/AccountWallet.d.ts +1 -0
- package/dist/modal/components/Account/AccountWallet.js +133 -0
- package/dist/modal/components/Body/Body.js +4 -0
- package/dist/modal/components/Header/hooks/useStepTitle.js +50 -45
- package/dist/modal/stores/modal/actions.js +2 -1
- package/dist/modal/stores/modal/useModalStore.d.ts +3 -0
- package/dist/modal/stores/modal/useModalStore.js +2 -1
- package/dist/modal/utils/steps.d.ts +3 -1
- package/dist/modal/utils/steps.js +4 -0
- package/dist/provider/external/stubs/CosmosExternalWalletContextStub.js +3 -1
- package/dist/provider/external/stubs/EvmExternalWalletContextStub.js +3 -1
- package/dist/provider/external/stubs/SolanaExternalWalletContextStub.js +3 -1
- package/dist/provider/hooks/mutations/useAddAuthMethod.d.ts +2 -2
- package/dist/provider/hooks/mutations/useClaimPregenWallets.d.ts +2 -2
- package/dist/provider/hooks/mutations/useCreateGuestWallets.d.ts +2 -2
- package/dist/provider/hooks/mutations/useCreatePregenWallet.d.ts +2 -2
- package/dist/provider/hooks/mutations/useCreatePregenWalletPerType.d.ts +2 -2
- package/dist/provider/hooks/mutations/useCreateWallet.d.ts +2 -2
- package/dist/provider/hooks/mutations/useCreateWalletPerType.d.ts +2 -2
- package/dist/provider/hooks/mutations/useEnable2fa.d.ts +2 -2
- package/dist/provider/hooks/mutations/useHasPregenWallet.d.ts +2 -2
- package/dist/provider/hooks/mutations/useIssueJwt.d.ts +2 -2
- package/dist/provider/hooks/mutations/useKeepSessionAlive.d.ts +2 -2
- package/dist/provider/hooks/mutations/useLoginExternalWallet.d.ts +2 -2
- package/dist/provider/hooks/mutations/useLogout.d.ts +2 -2
- package/dist/provider/hooks/mutations/useResendVerificationCode.d.ts +2 -2
- package/dist/provider/hooks/mutations/useSetup2fa.d.ts +2 -2
- package/dist/provider/hooks/mutations/useSignMessage.d.ts +2 -2
- package/dist/provider/hooks/mutations/useSignTransaction.d.ts +2 -2
- package/dist/provider/hooks/mutations/useSignUpOrLogIn.d.ts +2 -2
- package/dist/provider/hooks/mutations/useSwitchWallets.d.ts +2 -2
- package/dist/provider/hooks/mutations/useUpdatePregenWalletIdentifier.d.ts +2 -2
- package/dist/provider/hooks/mutations/useVerify2fa.d.ts +2 -2
- package/dist/provider/hooks/mutations/useVerifyExternalWallet.d.ts +2 -2
- package/dist/provider/hooks/mutations/useVerifyFarcaster.d.ts +2 -2
- package/dist/provider/hooks/mutations/useVerifyNewAccount.d.ts +8 -8
- package/dist/provider/hooks/mutations/useVerifyOAuth.d.ts +2 -2
- package/dist/provider/hooks/mutations/useVerifyTelegram.d.ts +2 -2
- package/dist/provider/hooks/mutations/useWaitForLogin.d.ts +2 -2
- package/dist/provider/hooks/mutations/useWaitForSignup.d.ts +2 -2
- package/dist/provider/hooks/mutations/useWaitForWalletCreation.d.ts +2 -2
- package/dist/provider/hooks/utils/useWalletState.d.ts +1 -1
- package/dist/provider/providers/AccountLinkProvider.js +3 -2
- package/dist/provider/providers/ExternalWalletProvider.d.ts +10 -4
- package/dist/provider/providers/ExternalWalletProvider.js +35 -11
- package/dist/provider/stores/getters.d.ts +1 -1
- package/package.json +8 -8
|
@@ -15,7 +15,8 @@ export declare const VERIFY_FARCASTER_KEY = "VERIFY_FARCASTER";
|
|
|
15
15
|
* await verifyFarcasterAsync({ ...params });
|
|
16
16
|
*/
|
|
17
17
|
export declare const useVerifyFarcaster: () => {
|
|
18
|
-
status: "
|
|
18
|
+
status: "idle" | "pending" | "error" | "success";
|
|
19
|
+
error: Error | null;
|
|
19
20
|
data: Compute<import("@getpara/core-sdk/dist/types/types/methods.js").AuthStateSignupOrLoginOrDone> | undefined;
|
|
20
21
|
isSuccess: boolean;
|
|
21
22
|
variables: void | {
|
|
@@ -27,7 +28,6 @@ export declare const useVerifyFarcaster: () => {
|
|
|
27
28
|
onConnectUri?: ((uri: string) => void) | undefined;
|
|
28
29
|
serverAuthState?: import("@getpara/shared").VerifyThirdPartyAuth | undefined;
|
|
29
30
|
} | undefined;
|
|
30
|
-
error: Error | null;
|
|
31
31
|
isError: boolean;
|
|
32
32
|
isIdle: boolean;
|
|
33
33
|
isPending: boolean;
|
|
@@ -14,14 +14,15 @@ export declare const VERIFY_NEW_ACCOUNT_KEY = "VERIFY_NEW_ACCOUNT";
|
|
|
14
14
|
* await verifyNewAccountAsync({ ...params });
|
|
15
15
|
*/
|
|
16
16
|
export declare const useVerifyNewAccount: () => {
|
|
17
|
-
status: "
|
|
17
|
+
status: "idle" | "pending" | "error" | "success";
|
|
18
|
+
error: Error | null;
|
|
18
19
|
data: {
|
|
20
|
+
userId: string;
|
|
21
|
+
externalWallet?: import("@getpara/web-sdk").ExternalWalletInfo | undefined;
|
|
19
22
|
username?: string | undefined;
|
|
20
23
|
displayName?: string | undefined;
|
|
21
24
|
pfpUrl?: string | undefined;
|
|
22
|
-
externalWallet?: import("@getpara/web-sdk").ExternalWalletInfo | undefined;
|
|
23
25
|
auth: import("@getpara/shared").PrimaryAuth;
|
|
24
|
-
userId: string;
|
|
25
26
|
stage: "signup";
|
|
26
27
|
isPasskeySupported: boolean;
|
|
27
28
|
passkeyUrl?: string | undefined;
|
|
@@ -38,7 +39,6 @@ export declare const useVerifyNewAccount: () => {
|
|
|
38
39
|
useShortUrls?: boolean | undefined;
|
|
39
40
|
verificationCode: string;
|
|
40
41
|
} | undefined;
|
|
41
|
-
error: Error | null;
|
|
42
42
|
isError: boolean;
|
|
43
43
|
isIdle: boolean;
|
|
44
44
|
isPending: boolean;
|
|
@@ -49,12 +49,12 @@ export declare const useVerifyNewAccount: () => {
|
|
|
49
49
|
isPaused: boolean;
|
|
50
50
|
submittedAt: number;
|
|
51
51
|
verifyNewAccount: import("@tanstack/react-query").UseMutateFunction<{
|
|
52
|
+
userId: string;
|
|
53
|
+
externalWallet?: import("@getpara/web-sdk").ExternalWalletInfo | undefined;
|
|
52
54
|
username?: string | undefined;
|
|
53
55
|
displayName?: string | undefined;
|
|
54
56
|
pfpUrl?: string | undefined;
|
|
55
|
-
externalWallet?: import("@getpara/web-sdk").ExternalWalletInfo | undefined;
|
|
56
57
|
auth: import("@getpara/shared").PrimaryAuth;
|
|
57
|
-
userId: string;
|
|
58
58
|
stage: "signup";
|
|
59
59
|
isPasskeySupported: boolean;
|
|
60
60
|
passkeyUrl?: string | undefined;
|
|
@@ -70,12 +70,12 @@ export declare const useVerifyNewAccount: () => {
|
|
|
70
70
|
verificationCode: string;
|
|
71
71
|
}, unknown>;
|
|
72
72
|
verifyNewAccountAsync: import("@tanstack/react-query").UseMutateAsyncFunction<{
|
|
73
|
+
userId: string;
|
|
74
|
+
externalWallet?: import("@getpara/web-sdk").ExternalWalletInfo | undefined;
|
|
73
75
|
username?: string | undefined;
|
|
74
76
|
displayName?: string | undefined;
|
|
75
77
|
pfpUrl?: string | undefined;
|
|
76
|
-
externalWallet?: import("@getpara/web-sdk").ExternalWalletInfo | undefined;
|
|
77
78
|
auth: import("@getpara/shared").PrimaryAuth;
|
|
78
|
-
userId: string;
|
|
79
79
|
stage: "signup";
|
|
80
80
|
isPasskeySupported: boolean;
|
|
81
81
|
passkeyUrl?: string | undefined;
|
|
@@ -15,7 +15,8 @@ export declare const VERIFY_OAUTH_KEY = "VERIFY_OAUTH";
|
|
|
15
15
|
* await verifyOAuthAsync({ ...params });
|
|
16
16
|
*/
|
|
17
17
|
export declare const useVerifyOAuth: () => {
|
|
18
|
-
status: "
|
|
18
|
+
status: "idle" | "pending" | "error" | "success";
|
|
19
|
+
error: Error | null;
|
|
19
20
|
data: Compute<import("@getpara/core-sdk/dist/types/types/methods.js").AuthStateSignupOrLoginOrDone> | undefined;
|
|
20
21
|
isSuccess: boolean;
|
|
21
22
|
variables: {
|
|
@@ -29,7 +30,6 @@ export declare const useVerifyOAuth: () => {
|
|
|
29
30
|
onOAuthUrl?: ((url: string) => void) | undefined;
|
|
30
31
|
onOAuthPopup?: ((popup: Window) => void) | undefined;
|
|
31
32
|
} | undefined;
|
|
32
|
-
error: Error | null;
|
|
33
33
|
isError: boolean;
|
|
34
34
|
isIdle: boolean;
|
|
35
35
|
isPending: boolean;
|
|
@@ -15,7 +15,8 @@ export declare const VERIFY_TELEGRAM_KEY = "VERIFY_TELEGRAM";
|
|
|
15
15
|
* await verifyTelegramAsync({ ...params });
|
|
16
16
|
*/
|
|
17
17
|
export declare const useVerifyTelegram: () => {
|
|
18
|
-
status: "
|
|
18
|
+
status: "idle" | "pending" | "error" | "success";
|
|
19
|
+
error: Error | null;
|
|
19
20
|
data: Compute<import("@getpara/core-sdk/dist/types/types/methods.js").AuthStateSignupOrLoginOrDone> | undefined;
|
|
20
21
|
isSuccess: boolean;
|
|
21
22
|
variables: {
|
|
@@ -24,7 +25,6 @@ export declare const useVerifyTelegram: () => {
|
|
|
24
25
|
telegramAuthResponse?: import("@getpara/web-sdk").TelegramAuthResponse | undefined;
|
|
25
26
|
serverAuthState?: import("@getpara/shared").VerifyThirdPartyAuth | undefined;
|
|
26
27
|
} | undefined;
|
|
27
|
-
error: Error | null;
|
|
28
28
|
isError: boolean;
|
|
29
29
|
isIdle: boolean;
|
|
30
30
|
isPending: boolean;
|
|
@@ -14,7 +14,8 @@ export declare const WAIT_FOR_LOG_IN_KEY = "WAIT_FOR_LOG_IN";
|
|
|
14
14
|
* await waitForLoginAsync({ ...params });
|
|
15
15
|
*/
|
|
16
16
|
export declare const useWaitForLogin: () => {
|
|
17
|
-
status: "
|
|
17
|
+
status: "idle" | "pending" | "error" | "success";
|
|
18
|
+
error: Error | null;
|
|
18
19
|
data: {
|
|
19
20
|
needsWallet?: boolean | undefined;
|
|
20
21
|
partnerId?: string | undefined;
|
|
@@ -26,7 +27,6 @@ export declare const useWaitForLogin: () => {
|
|
|
26
27
|
skipSessionRefresh?: boolean | undefined;
|
|
27
28
|
isCanceled?: (() => boolean) | undefined;
|
|
28
29
|
} | undefined;
|
|
29
|
-
error: Error | null;
|
|
30
30
|
isError: boolean;
|
|
31
31
|
isIdle: boolean;
|
|
32
32
|
isPending: boolean;
|
|
@@ -14,7 +14,8 @@ export declare const WAIT_FOR_SIGN_UP_KEY = "WAIT_FOR_SIGN_UP";
|
|
|
14
14
|
* await waitForSignupAsync({ ...params });
|
|
15
15
|
*/
|
|
16
16
|
export declare const useWaitForSignup: () => {
|
|
17
|
-
status: "
|
|
17
|
+
status: "idle" | "pending" | "error" | "success";
|
|
18
|
+
error: Error | null;
|
|
18
19
|
data: true | undefined;
|
|
19
20
|
isSuccess: boolean;
|
|
20
21
|
variables: void | {
|
|
@@ -22,7 +23,6 @@ export declare const useWaitForSignup: () => {
|
|
|
22
23
|
onCancel?: (() => void) | undefined;
|
|
23
24
|
isCanceled?: (() => boolean) | undefined;
|
|
24
25
|
} | undefined;
|
|
25
|
-
error: Error | null;
|
|
26
26
|
isError: boolean;
|
|
27
27
|
isIdle: boolean;
|
|
28
28
|
isPending: boolean;
|
|
@@ -14,7 +14,8 @@ export declare const WAIT_FOR_WALLET_CREATION_KEY = "WAIT_FOR_WALLET_CREATION";
|
|
|
14
14
|
* await waitForWalletCreationAsync({ ...params });
|
|
15
15
|
*/
|
|
16
16
|
export declare const useWaitForWalletCreation: () => {
|
|
17
|
-
status: "
|
|
17
|
+
status: "idle" | "pending" | "error" | "success";
|
|
18
|
+
error: Error | null;
|
|
18
19
|
data: {
|
|
19
20
|
walletIds: import("@getpara/web-sdk").CurrentWalletIds;
|
|
20
21
|
recoverySecret?: string | undefined;
|
|
@@ -25,7 +26,6 @@ export declare const useWaitForWalletCreation: () => {
|
|
|
25
26
|
onCancel?: (() => void) | undefined;
|
|
26
27
|
isCanceled?: (() => boolean) | undefined;
|
|
27
28
|
} | undefined;
|
|
28
|
-
error: Error | null;
|
|
29
29
|
isError: boolean;
|
|
30
30
|
isIdle: boolean;
|
|
31
31
|
isPending: boolean;
|
|
@@ -5,7 +5,7 @@ import { TWalletType } from '@getpara/web-sdk';
|
|
|
5
5
|
export declare const useWalletState: () => {
|
|
6
6
|
selectedWallet: {
|
|
7
7
|
id: string | undefined;
|
|
8
|
-
type: "
|
|
8
|
+
type: "SOLANA" | "COSMOS" | "EVM" | undefined;
|
|
9
9
|
};
|
|
10
10
|
setSelectedWallet: ({ id, type }: {
|
|
11
11
|
id?: string;
|
|
@@ -188,7 +188,7 @@ const AccountLinkProvider = ({ children }) => {
|
|
|
188
188
|
setLinkAccountError(e.message);
|
|
189
189
|
} finally {
|
|
190
190
|
if (linkWallet.type === "EVM" || linkWallet.type === "SOLANA") {
|
|
191
|
-
yield disconnectBase(providerId, linkWallet.type);
|
|
191
|
+
yield disconnectBase(providerId, linkWallet.type, { disconnectType: "ACCOUNT_LINKING" });
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
194
|
}
|
|
@@ -318,7 +318,8 @@ const AccountLinkProvider = ({ children }) => {
|
|
|
318
318
|
try {
|
|
319
319
|
yield disconnectBase(
|
|
320
320
|
accountLinkInProgress.externalWallet.providerId,
|
|
321
|
-
accountLinkInProgress.externalWallet.type
|
|
321
|
+
accountLinkInProgress.externalWallet.type,
|
|
322
|
+
{ disconnectType: "ACCOUNT_LINKING" }
|
|
322
323
|
);
|
|
323
324
|
} catch (error) {
|
|
324
325
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { TWalletType } from '@getpara/web-sdk';
|
|
3
|
-
import { BalanceManagement, ChainManagement, CommonWallet, ExternalWalletContextType } from '@getpara/react-common';
|
|
3
|
+
import { BalanceManagement, ChainManagement, CommonWallet, DisconnectBaseOptions, ExternalWalletContextType, MutationStatus } from '@getpara/react-common';
|
|
4
4
|
import { ExternalWalletInfo, VerifyExternalWalletParams } from '@getpara/web-sdk';
|
|
5
5
|
import { CosmosSignResult } from '@getpara/cosmos-wallet-connectors';
|
|
6
6
|
export declare const useWalletDisplayHelpers: (wallet: CommonWallet | undefined) => {
|
|
@@ -33,11 +33,14 @@ export declare const defaultExternalWallet: {
|
|
|
33
33
|
isSigningMessage: boolean;
|
|
34
34
|
getWalletBalance: () => Promise<undefined>;
|
|
35
35
|
requestInfo: (_: string) => Promise<ExternalWalletInfo>;
|
|
36
|
-
disconnectBase: (_: string, __: TWalletType) => Promise<void>;
|
|
36
|
+
disconnectBase: (_: string, __: TWalletType, ___?: DisconnectBaseOptions) => Promise<void>;
|
|
37
37
|
connectFarcasterMiniApp: () => Promise<void>;
|
|
38
38
|
verificationStage: undefined;
|
|
39
|
+
evmDisconnectStatus: string;
|
|
40
|
+
solanaDisconnectStatus: string;
|
|
41
|
+
cosmosDisconnectStatus: string;
|
|
39
42
|
};
|
|
40
|
-
type Value = Omit<ExternalWalletContextType<CosmosSignResult>, 'disconnect' | 'signVerificationMessage' | 'requestInfo' | 'disconnectBase'> & ChainManagement<string, void> & BalanceManagement & {
|
|
43
|
+
type Value = Omit<ExternalWalletContextType<CosmosSignResult>, 'disconnect' | 'disconnectStatus' | 'signVerificationMessage' | 'requestInfo' | 'disconnectBase'> & ChainManagement<string, void> & BalanceManagement & {
|
|
41
44
|
wallet?: CommonWallet;
|
|
42
45
|
qrUri?: string;
|
|
43
46
|
chainIdSwitchingTo?: string;
|
|
@@ -56,9 +59,12 @@ type Value = Omit<ExternalWalletContextType<CosmosSignResult>, 'disconnect' | 's
|
|
|
56
59
|
isSigningMessage: boolean;
|
|
57
60
|
verifyWalletSignature: () => Promise<VerifyExternalWalletParams | undefined>;
|
|
58
61
|
requestInfo: (_: string, __: TWalletType) => Promise<ExternalWalletInfo>;
|
|
59
|
-
disconnectBase: (_: string, __: TWalletType) => Promise<void>;
|
|
62
|
+
disconnectBase: (_: string, __: TWalletType, ___?: DisconnectBaseOptions) => Promise<void>;
|
|
60
63
|
connectFarcasterMiniApp: () => Promise<void>;
|
|
61
64
|
verificationStage?: 'verifying' | 'switchingChain';
|
|
65
|
+
evmDisconnectStatus: MutationStatus;
|
|
66
|
+
solanaDisconnectStatus: MutationStatus;
|
|
67
|
+
cosmosDisconnectStatus: MutationStatus;
|
|
62
68
|
};
|
|
63
69
|
export declare const ExternalWalletContext: import("react").Context<Value>;
|
|
64
70
|
export declare function ExternalWalletProvider({ children }: PropsWithChildren): import("react/jsx-runtime").JSX.Element;
|
|
@@ -49,9 +49,12 @@ const defaultExternalWallet = {
|
|
|
49
49
|
isSigningMessage: false,
|
|
50
50
|
getWalletBalance: () => Promise.resolve(void 0),
|
|
51
51
|
requestInfo: (_) => Promise.resolve({}),
|
|
52
|
-
disconnectBase: (_, __) => Promise.resolve(),
|
|
52
|
+
disconnectBase: (_, __, ___) => Promise.resolve(),
|
|
53
53
|
connectFarcasterMiniApp: () => Promise.resolve(),
|
|
54
|
-
verificationStage: void 0
|
|
54
|
+
verificationStage: void 0,
|
|
55
|
+
evmDisconnectStatus: "idle",
|
|
56
|
+
solanaDisconnectStatus: "idle",
|
|
57
|
+
cosmosDisconnectStatus: "idle"
|
|
55
58
|
};
|
|
56
59
|
const ExternalWalletContext = createContext(defaultExternalWallet);
|
|
57
60
|
function ExternalWalletProvider({ children }) {
|
|
@@ -81,7 +84,8 @@ function ExternalWalletProvider({ children }) {
|
|
|
81
84
|
requestInfo: evmRequestInfo,
|
|
82
85
|
disconnectBase: evmDisconnectBase,
|
|
83
86
|
farcasterStatus: evmFarcasterStatus,
|
|
84
|
-
verificationStage: evmVerificationStage
|
|
87
|
+
verificationStage: evmVerificationStage,
|
|
88
|
+
disconnectStatus: evmDisconnectStatus
|
|
85
89
|
} = useContext(evmContext);
|
|
86
90
|
const {
|
|
87
91
|
wallets: solanaWallets,
|
|
@@ -90,7 +94,8 @@ function ExternalWalletProvider({ children }) {
|
|
|
90
94
|
signVerificationMessage: solanaSignVerificationMessage,
|
|
91
95
|
requestInfo: solanaRequestInfo,
|
|
92
96
|
disconnectBase: solanaDisconnectBase,
|
|
93
|
-
farcasterStatus: solanaFarcasterStatus
|
|
97
|
+
farcasterStatus: solanaFarcasterStatus,
|
|
98
|
+
disconnectStatus: solanaDisconnectStatus
|
|
94
99
|
} = useContext(solanaContext);
|
|
95
100
|
const {
|
|
96
101
|
wallets: cosmosWallets,
|
|
@@ -102,7 +107,8 @@ function ExternalWalletProvider({ children }) {
|
|
|
102
107
|
signMessage: cosmosSignMessage,
|
|
103
108
|
signVerificationMessage: cosmosSignVerificationMessage,
|
|
104
109
|
requestInfo: cosmosRequestInfo,
|
|
105
|
-
disconnectBase: cosmosDisconnectBase
|
|
110
|
+
disconnectBase: cosmosDisconnectBase,
|
|
111
|
+
disconnectStatus: cosmosDisconnectStatus
|
|
106
112
|
} = useContext(cosmosContext);
|
|
107
113
|
const onLoginRef = useStore((state) => state.onLoginRef);
|
|
108
114
|
const setStep = useModalStore((state) => state.setStep);
|
|
@@ -559,19 +565,31 @@ function ExternalWalletProvider({ children }) {
|
|
|
559
565
|
}
|
|
560
566
|
}
|
|
561
567
|
});
|
|
562
|
-
const disconnectBase = (providerId, type) => __async(this, null, function* () {
|
|
568
|
+
const disconnectBase = (providerId, type, opts) => __async(this, null, function* () {
|
|
563
569
|
switch (type) {
|
|
564
570
|
case "EVM":
|
|
565
|
-
yield evmDisconnectBase(providerId);
|
|
571
|
+
yield evmDisconnectBase(providerId, opts);
|
|
566
572
|
break;
|
|
567
573
|
case "SOLANA":
|
|
568
|
-
yield solanaDisconnectBase(providerId);
|
|
574
|
+
yield solanaDisconnectBase(providerId, opts);
|
|
569
575
|
break;
|
|
570
576
|
default: {
|
|
571
|
-
yield cosmosDisconnectBase();
|
|
577
|
+
yield cosmosDisconnectBase(void 0, opts);
|
|
572
578
|
break;
|
|
573
579
|
}
|
|
574
580
|
}
|
|
581
|
+
if ((opts == null ? void 0 : opts.disconnectType) === "ACCOUNT_WIDGET") {
|
|
582
|
+
yield para.setExternalWallets(
|
|
583
|
+
(prev) => Object.entries(prev).reduce((acc, [address, externalWallet]) => {
|
|
584
|
+
if (externalWallet.type === type && externalWallet.externalProviderId === providerId) {
|
|
585
|
+
return acc;
|
|
586
|
+
}
|
|
587
|
+
return __spreadProps(__spreadValues({}, acc), {
|
|
588
|
+
[address]: externalWallet
|
|
589
|
+
});
|
|
590
|
+
}, {})
|
|
591
|
+
);
|
|
592
|
+
}
|
|
575
593
|
});
|
|
576
594
|
const disconnectExternalWallet = () => __async(this, null, function* () {
|
|
577
595
|
if (para.isExternalWalletAuth) yield para.logout();
|
|
@@ -683,7 +701,10 @@ function ExternalWalletProvider({ children }) {
|
|
|
683
701
|
requestInfo,
|
|
684
702
|
disconnectBase,
|
|
685
703
|
connectFarcasterMiniApp,
|
|
686
|
-
verificationStage
|
|
704
|
+
verificationStage,
|
|
705
|
+
evmDisconnectStatus,
|
|
706
|
+
solanaDisconnectStatus,
|
|
707
|
+
cosmosDisconnectStatus
|
|
687
708
|
}),
|
|
688
709
|
[
|
|
689
710
|
wallets,
|
|
@@ -708,7 +729,10 @@ function ExternalWalletProvider({ children }) {
|
|
|
708
729
|
requestInfo,
|
|
709
730
|
disconnectBase,
|
|
710
731
|
connectFarcasterMiniApp,
|
|
711
|
-
verificationStage
|
|
732
|
+
verificationStage,
|
|
733
|
+
evmDisconnectStatus,
|
|
734
|
+
solanaDisconnectStatus,
|
|
735
|
+
cosmosDisconnectStatus
|
|
712
736
|
]
|
|
713
737
|
),
|
|
714
738
|
children
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const getClient: () => import("graz").ParaWeb | undefined;
|
|
2
2
|
export declare const getIsOpen: () => boolean;
|
|
3
3
|
export declare const getSelectedWalletId: () => string | undefined;
|
|
4
|
-
export declare const getSelectedWalletType: () => "
|
|
4
|
+
export declare const getSelectedWalletType: () => "SOLANA" | "COSMOS" | "EVM" | undefined;
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getpara/react-sdk-lite",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.67",
|
|
4
4
|
"bin": {
|
|
5
5
|
"setup-para": "dist/cli/cli.mjs"
|
|
6
6
|
},
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@getpara/react-common": "2.0.0-alpha.
|
|
9
|
-
"@getpara/react-components": "2.0.0-alpha.
|
|
10
|
-
"@getpara/web-sdk": "2.0.0-alpha.
|
|
8
|
+
"@getpara/react-common": "2.0.0-alpha.67",
|
|
9
|
+
"@getpara/react-components": "2.0.0-alpha.67",
|
|
10
|
+
"@getpara/web-sdk": "2.0.0-alpha.67",
|
|
11
11
|
"date-fns": "^3.6.0",
|
|
12
12
|
"framer-motion": "^11.3.31",
|
|
13
13
|
"libphonenumber-js": "^1.11.7",
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
"zustand-sync-tabs": "^0.2.2"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@getpara/cosmos-wallet-connectors": "2.0.0-alpha.
|
|
20
|
-
"@getpara/evm-wallet-connectors": "2.0.0-alpha.
|
|
21
|
-
"@getpara/solana-wallet-connectors": "2.0.0-alpha.
|
|
19
|
+
"@getpara/cosmos-wallet-connectors": "2.0.0-alpha.67",
|
|
20
|
+
"@getpara/evm-wallet-connectors": "2.0.0-alpha.67",
|
|
21
|
+
"@getpara/solana-wallet-connectors": "2.0.0-alpha.67",
|
|
22
22
|
"@tanstack/react-query": "^5.74.0",
|
|
23
23
|
"@testing-library/dom": "^10.4.0",
|
|
24
24
|
"@testing-library/react": "^16.3.0",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"package.json",
|
|
39
39
|
"styles.css"
|
|
40
40
|
],
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "0266cc49e978575fed0b12c9bb0c832651e140eb",
|
|
42
42
|
"main": "dist/index.js",
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"@tanstack/react-query": ">=5.0.0",
|