@getpara/react-sdk 2.0.0-alpha.26 → 2.0.0-alpha.27
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/LoginDoneStep/LoginDoneStep.d.ts +4 -0
- package/dist/modal/constants/constants.d.ts +1 -1
- package/dist/modal/constants/constants.js +1 -1
- package/dist/modal/constants/oAuthLogos.js +5 -0
- package/dist/provider/actions/getWallet.d.ts +1 -1
- package/dist/provider/actions/getWallet.js +2 -1
- package/dist/provider/hooks/queries/useAccount.d.ts +0 -1
- package/dist/provider/hooks/queries/useAccount.js +2 -12
- package/dist/provider/hooks/queries/useIsFullyLoggedIn.d.ts +5 -0
- package/dist/provider/hooks/queries/useIsFullyLoggedIn.js +24 -0
- package/dist/provider/hooks/queries/useWallet.d.ts +1 -1
- package/dist/provider/hooks/queries/useWallet.js +3 -2
- package/dist/provider/hooks/utils/useEventListeners.js +6 -0
- package/package.json +36 -37
|
@@ -30,7 +30,7 @@ export declare function getNetworkName(str: Network | string): string;
|
|
|
30
30
|
export declare function getNetworkIcon(str: Network | string): IconType;
|
|
31
31
|
export declare function getAssetCode(str: OnRampAsset | string): string;
|
|
32
32
|
export declare function getAssetName(str: OnRampAsset | string): string;
|
|
33
|
-
export declare function getAssetIcon(str: OnRampAsset | string): "key" | "phone" | "farcaster" | "telegram" | "discord" | "x" | "search" | "para" | "walletConnect" | "wallet" | "close" | "copy" | "safe" | "cosmos" | "alertCircle" | "alertTriangle" | "alignVerticalCenter" | "angelListBrand" | "angelList" | "appleBrand" | "apple" | "arbitrumBrand" | "arrowCircleBrokenDownLeft" | "arrowCircleDownFilled" | "arrowNarrow" | "arrow" | "asterisk" | "backpack" | "backupKit" | "bank" | "baseBrand" | "brush" | "celoBrand" | "checkCircleFilled" | "checkCircle" | "checkSquare" | "check" | "chevronDown" | "chevronRight" | "chevronSelectorVertical" | "chevronUp" | "clock" | "clubhouseBrand" | "clubhouse" | "code" | "coinbase" | "copy07" | "cosmosCircle" | "cosmostation" | "creditCard02" | "creditCard" | "cube03" | "cubeOutline" | "cube" | "currencyDollar" | "decentBrand" | "decent" | "dell" | "discordBrand" | "dot" | "dots" | "downloadCloud" | "download" | "dribbbleBrand" | "dribbble" | "earth" | "edit02" | "emptyCircle" | "ethCircle" | "ethereum" | "eyeOff" | "eye" | "facebookBrand" | "facebook" | "farcasterBrand" | "figmaBrand" | "figma" | "file" | "folder" | "githubBrand" | "github" | "globe" | "glow" | "googleBrand" | "google" | "gridDots" | "haha" | "helpCircle" | "heroAlertCircle" | "heroCheckmarkCapsule" | "heroCheckmark" | "heroEmail" | "heroExternalConnection" | "heroLock" | "heroPasskey" | "heroPhone" | "heroPlusCircleCapsule" | "heroPlusCircle" | "heroWallet" | "home" | "hp" | "image" | "infoCircle" | "instagramBrand" | "instagram" | "keplr" | "laptop" | "leap" | "lenovo" | "lg" | "lightning01" | "lightning" | "linkExternal" | "linkedinBrand" | "linkedin" | "lockKeyholeCircle" | "logOut" | "mail" | "menu" | "metamask" | "monitor" | "moonpayBrand" | "moreLoginOptions" | "motorola" | "nobleBrand" | "okx" | "optimismBrand" | "paraBlackBg" | "paraBrand" | "paraIconBrand" | "paraIconQr" | "paraIcon" | "paraLogo" | "paraRingsDark" | "paraRings" | "passcode" | "phantom" | "pintrestBrand" | "pintrest" | "plusCircle" | "plus" | "polygonBrand" | "polygon" | "puzzlePiece" | "qrCode02" | "qrCode" | "rabby" | "rainbow" | "rampNetworkBrand" | "rampNetwork" | "redditBrand" | "reddit" | "refresh" | "samsung" | "send" | "settings" | "share" | "shield" | "signalBrand" | "signal" | "sliders" | "snapchatBrand" | "snapchat" | "solanaCircle" | "solana" | "solflare" | "spacingHeight" | "star04Filled" | "star05" | "stars01Filled" | "stars02" | "stars" | "stopSquare" | "stripeBrand" | "telegramBrand" | "tetherBrand" | "tikTokBrand" | "tikTok" | "trash" | "tumblrBrand" | "tumblr" | "twitterBrand" | "twitter" | "usdcBrand" | "userCircle" | "userPlus" | "user" | "youtubeBrand" | "youtube" | "zerion" | "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AR" | "AS" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BQ2" | "BQ3" | "BR" | "BS" | "BT" | "BW" | "BY" | "BZ" | "CA" | "CC" | "CD" | "CD2" | "CF" | "CH" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DS" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FM" | "FO" | "FR" | "GA" | "GB2" | "GB" | "GD" | "GE" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GQ" | "GR" | "GT" | "GU" | "GW" | "GY" | "HK" | "HN" | "HR" | "HT" | "HU" | "ID" | "IE" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KP" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MG" | "MH" | "MK" | "ML" | "MM" | "MN" | "MO" | "MP" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PN" | "PR" | "PS" | "PT" | "PW" | "PY" | "QA" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SE" | "SG" | "SI" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TC" | "TD" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "US" | "UY" | "UZ" | "VC" | "VE" | "VG" | "VI" | "VN" | "VU" | "WS" | "YE" | "ZA" | "ZM" | "ZW";
|
|
33
|
+
export declare function getAssetIcon(str: OnRampAsset | string): "key" | "phone" | "farcaster" | "telegram" | "discord" | "x" | "search" | "para" | "walletConnect" | "wallet" | "close" | "copy" | "safe" | "cosmos" | "alertCircle" | "alertTriangle" | "alignVerticalCenter" | "angelListBrand" | "angelList" | "appleBrand" | "apple" | "arbitrumBrand" | "arrowCircleBrokenDownLeft" | "arrowCircleDownFilled" | "arrowNarrow" | "arrow" | "asterisk" | "backpack" | "backupKit" | "bank" | "baseBrand" | "brush" | "celoBrand" | "checkCircleFilled" | "checkCircle" | "checkSquare" | "check" | "chevronDown" | "chevronRight" | "chevronSelectorVertical" | "chevronUp" | "clock" | "clubhouseBrand" | "clubhouse" | "code" | "coinbase" | "copy07" | "cosmosCircle" | "cosmostation" | "creditCard02" | "creditCard" | "cube03" | "cubeOutline" | "cube" | "currencyDollar" | "decentBrand" | "decent" | "dell" | "discordBrand" | "dot" | "dots" | "downloadCloud" | "download" | "dribbbleBrand" | "dribbble" | "earth" | "edit02" | "emptyCircle" | "ethCircle" | "ethereum" | "eyeOff" | "eye" | "facebookBrand" | "facebook" | "farcasterBrand" | "figmaBrand" | "figma" | "file" | "folder" | "githubBrand" | "github" | "globe" | "glow" | "googleBrand" | "google" | "gridDots" | "haha" | "helpCircle" | "heroAlertCircle" | "heroCheckmarkCapsule" | "heroCheckmark" | "heroEmail" | "heroExternalConnection" | "heroLock" | "heroPasskey" | "heroPhone" | "heroPlusCircleCapsule" | "heroPlusCircle" | "heroWallet" | "home" | "hp" | "image" | "infoCircle" | "instagramBrand" | "instagram" | "keplr" | "laptop" | "leap" | "lenovo" | "lg" | "lightning01" | "lightning" | "linkExternal" | "linkedinBrand" | "linkedin" | "lockKeyholeCircle" | "logOut" | "mail" | "menu" | "metamask" | "monitor" | "moonpayBrand" | "moreLoginOptions" | "motorola" | "nobleBrand" | "okx" | "optimismBrand" | "paraBlackBg" | "paraBrand" | "paraIconBrand" | "paraIconQr" | "paraIcon" | "paraLogo" | "paraRingsDark" | "paraRings" | "passcode" | "phantom" | "pintrestBrand" | "pintrest" | "plusCircle" | "plus" | "polygonBrand" | "polygon" | "puzzlePiece" | "qrCode02" | "qrCode" | "rabby" | "rainbow" | "rampNetworkBrand" | "rampNetwork" | "redditBrand" | "reddit" | "refresh" | "samsung" | "send" | "settings" | "share" | "shield" | "signalBrand" | "signal" | "sliders" | "snapchatBrand" | "snapchat" | "solanaCircle" | "solana" | "solflare" | "spacingHeight" | "star04Filled" | "star05" | "stars01Filled" | "stars02" | "stars" | "stopSquare" | "stripeBrand" | "telegramBrand" | "tetherBrand" | "tikTokBrand" | "tikTok" | "trash" | "tumblrBrand" | "tumblr" | "twitterBrand" | "twitter" | "usdcBrand" | "userCircle" | "userPlus" | "user" | "valora" | "youtubeBrand" | "youtube" | "zerion" | "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AR" | "AS" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BQ2" | "BQ3" | "BR" | "BS" | "BT" | "BW" | "BY" | "BZ" | "CA" | "CC" | "CD" | "CD2" | "CF" | "CH" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DS" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FM" | "FO" | "FR" | "GA" | "GB2" | "GB" | "GD" | "GE" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GQ" | "GR" | "GT" | "GU" | "GW" | "GY" | "HK" | "HN" | "HR" | "HT" | "HU" | "ID" | "IE" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KP" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MG" | "MH" | "MK" | "ML" | "MM" | "MN" | "MO" | "MP" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PN" | "PR" | "PS" | "PT" | "PW" | "PY" | "QA" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SE" | "SG" | "SI" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TC" | "TD" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "US" | "UY" | "UZ" | "VC" | "VE" | "VG" | "VI" | "VN" | "VU" | "WS" | "YE" | "ZA" | "ZM" | "ZW";
|
|
34
34
|
export declare const MOBILE_SIZE = 480;
|
|
35
35
|
export declare const NETWORK_NOT_SUPPORTED_ERROR = "network not supported";
|
|
36
36
|
export declare const EMAIL_REGEX: RegExp;
|
|
@@ -136,6 +136,11 @@ const ACCOUNT_TYPES = {
|
|
|
136
136
|
logo: "solflare",
|
|
137
137
|
name: "Solflare",
|
|
138
138
|
isExternalWallet: true
|
|
139
|
+
},
|
|
140
|
+
VALORA: {
|
|
141
|
+
logo: "valora",
|
|
142
|
+
name: "Valora",
|
|
143
|
+
isExternalWallet: true
|
|
139
144
|
}
|
|
140
145
|
};
|
|
141
146
|
function getAccountTypeName(type, { inline = false } = {}) {
|
|
@@ -2,4 +2,4 @@ import ParaWeb, { TWalletType } from '@getpara/web-sdk';
|
|
|
2
2
|
export declare const getWallet: (para?: ParaWeb, selectedWallet?: {
|
|
3
3
|
id?: string;
|
|
4
4
|
type?: TWalletType;
|
|
5
|
-
}, isConnected?: boolean) => Promise<Omit<import("@getpara/web-sdk").Wallet, "signer"> | null
|
|
5
|
+
}, isConnected?: boolean) => Promise<Omit<import("@getpara/web-sdk").Wallet, "signer"> | null>;
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
__async
|
|
4
4
|
} from "../../chunk-MMUBH76A.js";
|
|
5
5
|
const getWallet = (para, selectedWallet, isConnected) => __async(void 0, null, function* () {
|
|
6
|
+
var _a;
|
|
6
7
|
if (!para) {
|
|
7
8
|
return null;
|
|
8
9
|
}
|
|
@@ -10,7 +11,7 @@ const getWallet = (para, selectedWallet, isConnected) => __async(void 0, null, f
|
|
|
10
11
|
if (!isLoggedIn) {
|
|
11
12
|
return null;
|
|
12
13
|
}
|
|
13
|
-
return para.findWallet(selectedWallet == null ? void 0 : selectedWallet.id, selectedWallet == null ? void 0 : selectedWallet.type);
|
|
14
|
+
return (_a = para.findWallet(selectedWallet == null ? void 0 : selectedWallet.id, selectedWallet == null ? void 0 : selectedWallet.type)) != null ? _a : null;
|
|
14
15
|
});
|
|
15
16
|
export {
|
|
16
17
|
getWallet
|
|
@@ -5,17 +5,8 @@ import {
|
|
|
5
5
|
import { useQuery } from "@tanstack/react-query";
|
|
6
6
|
import { getAccount } from "../../actions/getAccount.js";
|
|
7
7
|
import { useInternalClient } from "../utils/useInternalClient.js";
|
|
8
|
+
import { useIsFullyLoggedIn } from "./useIsFullyLoggedIn.js";
|
|
8
9
|
const ACCOUNT_BASE_KEY = "PARA_ACCOUNT";
|
|
9
|
-
const useIsFullyLoggedIn = () => {
|
|
10
|
-
const client = useInternalClient();
|
|
11
|
-
return useQuery({
|
|
12
|
-
staleTime: 5e3,
|
|
13
|
-
queryKey: ["isFullyLoggedIn", client == null ? void 0 : client.getUserId()],
|
|
14
|
-
queryFn: () => __async(void 0, null, function* () {
|
|
15
|
-
return yield client == null ? void 0 : client.isFullyLoggedIn();
|
|
16
|
-
})
|
|
17
|
-
});
|
|
18
|
-
};
|
|
19
10
|
const useAccount = () => {
|
|
20
11
|
var _a, _b;
|
|
21
12
|
const client = useInternalClient();
|
|
@@ -30,6 +21,5 @@ const useAccount = () => {
|
|
|
30
21
|
};
|
|
31
22
|
export {
|
|
32
23
|
ACCOUNT_BASE_KEY,
|
|
33
|
-
useAccount
|
|
34
|
-
useIsFullyLoggedIn
|
|
24
|
+
useAccount
|
|
35
25
|
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
__async
|
|
4
|
+
} from "../../../chunk-MMUBH76A.js";
|
|
5
|
+
import { useQuery } from "@tanstack/react-query";
|
|
6
|
+
import { useInternalClient } from "../utils/useInternalClient.js";
|
|
7
|
+
const IS_FULLY_LOGGED_IN_BASE_KEY = "PARA_FULLY_LOGGED_IN";
|
|
8
|
+
const useIsFullyLoggedIn = () => {
|
|
9
|
+
var _a;
|
|
10
|
+
const client = useInternalClient();
|
|
11
|
+
return useQuery({
|
|
12
|
+
enabled: !!client,
|
|
13
|
+
staleTime: 5e3,
|
|
14
|
+
queryKey: [IS_FULLY_LOGGED_IN_BASE_KEY, (_a = client == null ? void 0 : client.userId) != null ? _a : null],
|
|
15
|
+
queryFn: () => __async(void 0, null, function* () {
|
|
16
|
+
var _a2;
|
|
17
|
+
return (_a2 = yield client == null ? void 0 : client.isFullyLoggedIn()) != null ? _a2 : false;
|
|
18
|
+
})
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
export {
|
|
22
|
+
IS_FULLY_LOGGED_IN_BASE_KEY,
|
|
23
|
+
useIsFullyLoggedIn
|
|
24
|
+
};
|
|
@@ -2,4 +2,4 @@ export declare const WALLET_BASE_KEY = "PARA_WALLET";
|
|
|
2
2
|
/**
|
|
3
3
|
* Hook for retrieving the selected wallet
|
|
4
4
|
*/
|
|
5
|
-
export declare const useWallet: () => import("@tanstack/react-query").UseQueryResult<Omit<import("@getpara/core-sdk").Wallet, "signer"> | null
|
|
5
|
+
export declare const useWallet: () => import("@tanstack/react-query").UseQueryResult<Omit<import("@getpara/core-sdk").Wallet, "signer"> | null, Error>;
|
|
@@ -4,16 +4,17 @@ import {
|
|
|
4
4
|
} from "../../../chunk-MMUBH76A.js";
|
|
5
5
|
import { useQuery } from "@tanstack/react-query";
|
|
6
6
|
import { useClient, useWalletState } from "../index.js";
|
|
7
|
-
import { useIsFullyLoggedIn } from "./useAccount.js";
|
|
8
7
|
import { getWallet } from "../../actions/getWallet.js";
|
|
8
|
+
import { useIsFullyLoggedIn } from "./useIsFullyLoggedIn.js";
|
|
9
9
|
const WALLET_BASE_KEY = "PARA_WALLET";
|
|
10
10
|
const useWallet = () => {
|
|
11
|
+
var _a, _b;
|
|
11
12
|
const client = useClient();
|
|
12
13
|
const { selectedWallet } = useWalletState();
|
|
13
14
|
const { data: isFullyLoggedIn, isSuccess } = useIsFullyLoggedIn();
|
|
14
15
|
return useQuery({
|
|
15
16
|
enabled: !!client && !!selectedWallet && isSuccess,
|
|
16
|
-
queryKey: [WALLET_BASE_KEY, isFullyLoggedIn, selectedWallet.id, selectedWallet.type],
|
|
17
|
+
queryKey: [WALLET_BASE_KEY, isFullyLoggedIn != null ? isFullyLoggedIn : null, (_a = selectedWallet.id) != null ? _a : null, (_b = selectedWallet.type) != null ? _b : null],
|
|
17
18
|
queryFn: () => __async(void 0, null, function* () {
|
|
18
19
|
return yield getWallet(client, selectedWallet, isFullyLoggedIn);
|
|
19
20
|
})
|
|
@@ -10,6 +10,7 @@ import { ACCOUNT_BASE_KEY } from "../queries/useAccount.js";
|
|
|
10
10
|
import { useStore } from "../../stores/useStore.js";
|
|
11
11
|
import { WALLET_BASE_KEY } from "../queries/useWallet.js";
|
|
12
12
|
import { WALLET_BALANCE_BASE_KEY } from "../queries/useWalletBalance.js";
|
|
13
|
+
import { IS_FULLY_LOGGED_IN_BASE_KEY } from "../queries/useIsFullyLoggedIn.js";
|
|
13
14
|
const useEventListeners = ({
|
|
14
15
|
onLogin,
|
|
15
16
|
onLogout,
|
|
@@ -27,6 +28,7 @@ const useEventListeners = ({
|
|
|
27
28
|
const clearSelectedWallet = useStore((state) => state.clearSelectedWallet);
|
|
28
29
|
const { updateSelectedWallet } = useWalletState();
|
|
29
30
|
const loginOrSetupListener = useCallback(() => {
|
|
31
|
+
queryClient.refetchQueries({ queryKey: [IS_FULLY_LOGGED_IN_BASE_KEY] });
|
|
30
32
|
queryClient.refetchQueries({ queryKey: [ACCOUNT_BASE_KEY] });
|
|
31
33
|
queryClient.refetchQueries({ queryKey: [WALLET_BASE_KEY] });
|
|
32
34
|
queryClient.invalidateQueries({ queryKey: [WALLET_BALANCE_BASE_KEY], exact: false });
|
|
@@ -53,6 +55,7 @@ const useEventListeners = ({
|
|
|
53
55
|
);
|
|
54
56
|
const logoutListener = useCallback(
|
|
55
57
|
(event) => {
|
|
58
|
+
queryClient.refetchQueries({ queryKey: [IS_FULLY_LOGGED_IN_BASE_KEY] });
|
|
56
59
|
queryClient.refetchQueries({ queryKey: [ACCOUNT_BASE_KEY] });
|
|
57
60
|
clearSelectedWallet();
|
|
58
61
|
onLogout == null ? void 0 : onLogout(event);
|
|
@@ -73,6 +76,7 @@ const useEventListeners = ({
|
|
|
73
76
|
);
|
|
74
77
|
const walletChangeListener = useCallback(
|
|
75
78
|
(event) => {
|
|
79
|
+
queryClient.refetchQueries({ queryKey: [IS_FULLY_LOGGED_IN_BASE_KEY] });
|
|
76
80
|
queryClient.refetchQueries({ queryKey: [ACCOUNT_BASE_KEY] });
|
|
77
81
|
updateSelectedWallet();
|
|
78
82
|
onWalletsChange == null ? void 0 : onWalletsChange(event);
|
|
@@ -81,6 +85,7 @@ const useEventListeners = ({
|
|
|
81
85
|
);
|
|
82
86
|
const externalWalletChangeListener = useCallback(
|
|
83
87
|
(event) => {
|
|
88
|
+
queryClient.refetchQueries({ queryKey: [IS_FULLY_LOGGED_IN_BASE_KEY] });
|
|
84
89
|
queryClient.refetchQueries({ queryKey: [ACCOUNT_BASE_KEY] });
|
|
85
90
|
updateSelectedWallet();
|
|
86
91
|
onExternalWalletChange == null ? void 0 : onExternalWalletChange(event);
|
|
@@ -101,6 +106,7 @@ const useEventListeners = ({
|
|
|
101
106
|
);
|
|
102
107
|
const guestWalletsCreatedListener = useCallback(
|
|
103
108
|
(event) => {
|
|
109
|
+
queryClient.refetchQueries({ queryKey: [IS_FULLY_LOGGED_IN_BASE_KEY] });
|
|
104
110
|
queryClient.refetchQueries({ queryKey: [ACCOUNT_BASE_KEY] });
|
|
105
111
|
updateSelectedWallet();
|
|
106
112
|
onGuestWalletsCreated == null ? void 0 : onGuestWalletsCreated(event);
|
package/package.json
CHANGED
|
@@ -1,41 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getpara/react-sdk",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
4
|
-
"type": "module",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"types": "dist/index.d.ts",
|
|
3
|
+
"version": "2.0.0-alpha.27",
|
|
7
4
|
"bin": {
|
|
8
5
|
"setup-para": "dist/cli/cli.mjs"
|
|
9
6
|
},
|
|
10
|
-
"exports": {
|
|
11
|
-
".": "./dist/index.js",
|
|
12
|
-
"./styles.css": "./dist/css/modal.css"
|
|
13
|
-
},
|
|
14
|
-
"sideEffects": [
|
|
15
|
-
"*.css"
|
|
16
|
-
],
|
|
17
7
|
"dependencies": {
|
|
18
|
-
"@getpara/react-common": "2.0.0-alpha.
|
|
19
|
-
"@getpara/react-components": "2.0.0-alpha.
|
|
20
|
-
"@getpara/web-sdk": "2.0.0-alpha.
|
|
8
|
+
"@getpara/react-common": "2.0.0-alpha.27",
|
|
9
|
+
"@getpara/react-components": "2.0.0-alpha.27",
|
|
10
|
+
"@getpara/web-sdk": "2.0.0-alpha.27",
|
|
21
11
|
"date-fns": "^3.6.0",
|
|
22
|
-
"framer-motion": "11.3.
|
|
23
|
-
"libphonenumber-js": "^1.11.
|
|
12
|
+
"framer-motion": "^11.3.31",
|
|
13
|
+
"libphonenumber-js": "^1.11.7",
|
|
24
14
|
"styled-components": "^6.1.8",
|
|
25
15
|
"zustand": "^4.5.2",
|
|
26
16
|
"zustand-sync-tabs": "^0.2.2"
|
|
27
17
|
},
|
|
28
|
-
"scripts": {
|
|
29
|
-
"post-build": "./scripts/post-build.sh",
|
|
30
|
-
"build": "rm -rf dist && yarn typegen && node ./scripts/build.mjs && yarn post-build",
|
|
31
|
-
"typegen": "tsc --emitDeclarationOnly",
|
|
32
|
-
"test": "vitest run --coverage",
|
|
33
|
-
"cli": "node ./dist/cli/cli.mjs"
|
|
34
|
-
},
|
|
35
18
|
"devDependencies": {
|
|
36
|
-
"@getpara/cosmos-wallet-connectors": "2.0.0-alpha.
|
|
37
|
-
"@getpara/evm-wallet-connectors": "2.0.0-alpha.
|
|
38
|
-
"@getpara/solana-wallet-connectors": "2.0.0-alpha.
|
|
19
|
+
"@getpara/cosmos-wallet-connectors": "2.0.0-alpha.27",
|
|
20
|
+
"@getpara/evm-wallet-connectors": "2.0.0-alpha.27",
|
|
21
|
+
"@getpara/solana-wallet-connectors": "2.0.0-alpha.27",
|
|
22
|
+
"@tanstack/react-query": "^5.74.0",
|
|
39
23
|
"@testing-library/dom": "^10.4.0",
|
|
40
24
|
"@testing-library/react": "^16.3.0",
|
|
41
25
|
"@testing-library/react-hooks": "^8.0.1",
|
|
@@ -43,25 +27,40 @@
|
|
|
43
27
|
"@types/chrome": "^0.0.237",
|
|
44
28
|
"@types/react": "^18.0.31",
|
|
45
29
|
"@types/react-dom": "^18.2.7",
|
|
46
|
-
"typescript": "^5.
|
|
47
|
-
"viem": "^2.24.2",
|
|
48
|
-
"wagmi": "^2.14.16"
|
|
30
|
+
"typescript": "^5.8.3"
|
|
49
31
|
},
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"@getpara/solana-wallet-connectors": "^2.0.0-alpha.12",
|
|
54
|
-
"@tanstack/react-query": ">=5.0.0",
|
|
55
|
-
"react": "*",
|
|
56
|
-
"react-dom": "*"
|
|
32
|
+
"exports": {
|
|
33
|
+
".": "./dist/index.js",
|
|
34
|
+
"./styles.css": "./dist/css/modal.css"
|
|
57
35
|
},
|
|
58
36
|
"files": [
|
|
59
37
|
"dist",
|
|
60
38
|
"package.json",
|
|
61
39
|
"styles.css"
|
|
62
40
|
],
|
|
41
|
+
"gitHead": "a54f63445995abd13220eda3d63809728e4b5f7e",
|
|
42
|
+
"main": "dist/index.js",
|
|
43
|
+
"peerDependencies": {
|
|
44
|
+
"@getpara/cosmos-wallet-connectors": "^2.0.0-alpha.26",
|
|
45
|
+
"@getpara/evm-wallet-connectors": "^2.0.0-alpha.26",
|
|
46
|
+
"@getpara/solana-wallet-connectors": "^2.0.0-alpha.26",
|
|
47
|
+
"@tanstack/react-query": ">=5.0.0",
|
|
48
|
+
"react": "*",
|
|
49
|
+
"react-dom": "*"
|
|
50
|
+
},
|
|
63
51
|
"resolutions": {
|
|
64
52
|
"styled-components": "^6"
|
|
65
53
|
},
|
|
66
|
-
"
|
|
54
|
+
"scripts": {
|
|
55
|
+
"build": "rm -rf dist && yarn typegen && node ./scripts/build.mjs && yarn post-build",
|
|
56
|
+
"cli": "node ./dist/cli/cli.mjs",
|
|
57
|
+
"post-build": "./scripts/post-build.sh",
|
|
58
|
+
"test": "vitest run --coverage",
|
|
59
|
+
"typegen": "tsc --emitDeclarationOnly"
|
|
60
|
+
},
|
|
61
|
+
"sideEffects": [
|
|
62
|
+
"*.css"
|
|
63
|
+
],
|
|
64
|
+
"type": "module",
|
|
65
|
+
"types": "dist/index.d.ts"
|
|
67
66
|
}
|