@getpara/react-sdk 2.0.0-alpha.18 → 2.0.0-alpha.20
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/cli/cli.mjs +2 -0
- package/dist/modal/ParaModal.js +2 -2
- package/dist/modal/components/Account/Account.js +6 -6
- package/dist/modal/components/AddFunds/AddFunds.js +2 -2
- package/dist/modal/components/AddFunds/AddFundsAsset.js +6 -6
- package/dist/modal/components/AddFunds/AddFundsAwaiting.js +2 -2
- package/dist/modal/components/AddFunds/AddFundsProvider.js +4 -4
- package/dist/modal/components/AddFunds/AddFundsSettings.js +6 -6
- package/dist/modal/components/AddFunds/common.js +2 -2
- package/dist/modal/components/AuthInput/AuthInput.js +6 -6
- package/dist/modal/components/AuthMainStep/AuthMainStep.js +2 -2
- package/dist/modal/components/AuthMainStep/AuthMainStepContent.js +6 -6
- package/dist/modal/components/AuthOptions/AuthOptions.js +4 -4
- package/dist/modal/components/BiometricLoginStep/BiometricLoginStep.js +2 -2
- package/dist/modal/components/Body/AnimatedHeightWrapper.js +2 -2
- package/dist/modal/components/Body/Body.js +8 -8
- package/dist/modal/components/ChainSwitch/ChainSwitch.js +4 -4
- package/dist/modal/components/Controls/Controls.js +5 -5
- package/dist/modal/components/Controls/Selects.js +6 -6
- package/dist/modal/components/ExternalWalletStep/ExternalWalletStep.js +15 -15
- package/dist/modal/components/ExternalWalletVerificationStep/ExternalWalletVerificationStep.js +2 -2
- package/dist/modal/components/ExternalWallets/ExternalWallets.js +12 -12
- package/dist/modal/components/Footer/Footer.js +10 -10
- package/dist/modal/components/Header/Header.js +2 -2
- package/dist/modal/components/Header/hooks/useStepTitle.js +1 -0
- package/dist/modal/components/Hero/Hero.js +7 -7
- package/dist/modal/components/IFrameStep/IFrameStep.js +3 -3
- package/dist/modal/components/OAuth/OAuth.js +3 -3
- package/dist/modal/components/OAuth/TelegramOAuthStep.js +4 -4
- package/dist/modal/components/OnRampComponents/OnRampProviderButton.js +8 -8
- package/dist/modal/components/RecoverySecretStep/RecoverySecretStep.js +4 -4
- package/dist/modal/components/Setup2FAStep/Setup2FAStep.js +3 -3
- package/dist/modal/components/VerificationCodeStep/VerificationCodeStep.js +4 -4
- package/dist/modal/components/WalletCard/PartnerIcon.js +4 -4
- package/dist/modal/components/WalletCard/WalletCard.js +7 -7
- package/dist/modal/components/WalletCreationDoneStep/WalletCreationDoneStep.js +2 -2
- package/dist/modal/components/common.js +19 -19
- package/dist/modal/constants/constants.js +1 -1
- package/dist/modal/utils/steps.d.ts +2 -0
- package/dist/modal/utils/steps.js +5 -1
- package/dist/provider/index.d.ts +2 -0
- package/dist/provider/index.js +2 -0
- package/dist/provider/providers/AuthProvider.js +14 -4
- package/dist/provider/providers/ExternalWalletProvider.d.ts +0 -3
- package/dist/provider/providers/ExternalWalletProvider.js +2 -3
- package/package.json +8 -8
- package/dist/modal/types/externalWallets.d.ts +0 -37
- package/dist/modal/types/externalWallets.js +0 -34
|
@@ -8,7 +8,7 @@ import { StepContainer, InnerStepContainer, HeroIcon } from "../common.js";
|
|
|
8
8
|
import { useModalStore } from "../../stores/index.js";
|
|
9
9
|
import { ModalStep } from "../../utils/steps.js";
|
|
10
10
|
import { WalletCard, WalletCards } from "../WalletCard/WalletCard.js";
|
|
11
|
-
import
|
|
11
|
+
import { safeStyled } from "@getpara/react-common";
|
|
12
12
|
import { useInternalClient } from "../../../provider/hooks/utils/useInternalClient.js";
|
|
13
13
|
import { useStore } from "../../../provider/stores/useStore.js";
|
|
14
14
|
import { useAuthActions } from "../../../provider/providers/AuthProvider.js";
|
|
@@ -74,7 +74,7 @@ const WalletCreationDoneStep = ({ twoFactorAuthEnabled, onClose }) => {
|
|
|
74
74
|
/* @__PURE__ */ jsx(InnerStepContainer, { children: /* @__PURE__ */ jsx(CpslButton, { fullWidth: true, onClick: handleNext, disabled: isWaiting, children: twoFactorAuthEnabled ? "Continue" : "Done" }) })
|
|
75
75
|
] });
|
|
76
76
|
};
|
|
77
|
-
const CardContainer =
|
|
77
|
+
const CardContainer = safeStyled(InnerStepContainer)`
|
|
78
78
|
min-height: 196px;
|
|
79
79
|
justify-content: center;
|
|
80
80
|
`;
|
|
@@ -2,27 +2,27 @@
|
|
|
2
2
|
import "../../chunk-MMUBH76A.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { CpslIcon, CpslInput, CpslSelect, CpslSelectItem, CpslText, CpslTileButton } from "@getpara/react-components";
|
|
5
|
-
import {
|
|
5
|
+
import { safeStyled } from "@getpara/react-common";
|
|
6
6
|
import { MOBILE_SIZE, NETWORKS, ON_RAMP_ASSETS } from "../constants/constants.js";
|
|
7
7
|
import { useStore } from "../../provider/stores/useStore.js";
|
|
8
|
-
const SpinnerContainer =
|
|
8
|
+
const SpinnerContainer = safeStyled.div`
|
|
9
9
|
display: flex;
|
|
10
10
|
align-items: center;
|
|
11
11
|
justify-content: center;
|
|
12
12
|
`;
|
|
13
|
-
const QRContainer =
|
|
13
|
+
const QRContainer = safeStyled.div`
|
|
14
14
|
display: flex;
|
|
15
15
|
justify-content: center;
|
|
16
16
|
align-items: center;
|
|
17
17
|
width: 286px;
|
|
18
18
|
height: 286px;
|
|
19
19
|
`;
|
|
20
|
-
const InfoBoxContent =
|
|
20
|
+
const InfoBoxContent = safeStyled.div`
|
|
21
21
|
display: flex;
|
|
22
22
|
flex-direction: column;
|
|
23
23
|
gap: 8px;
|
|
24
24
|
`;
|
|
25
|
-
const InfoBoxHeader =
|
|
25
|
+
const InfoBoxHeader = safeStyled.div`
|
|
26
26
|
display: flex;
|
|
27
27
|
align-items: center;
|
|
28
28
|
gap: 4px;
|
|
@@ -32,21 +32,21 @@ const InfoBoxHeader = styled.div`
|
|
|
32
32
|
--width: 20px;
|
|
33
33
|
}
|
|
34
34
|
`;
|
|
35
|
-
const FilledDisabledInput =
|
|
35
|
+
const FilledDisabledInput = safeStyled(CpslInput)`
|
|
36
36
|
--container-border-color: var(--cpsl-color-input-border-placeholder);
|
|
37
37
|
--container-background-color: var(--cpsl-color-background-0);
|
|
38
38
|
--input-background-color: transparent;
|
|
39
39
|
--input-font-weight: 500;
|
|
40
40
|
--input-color: var(--cpsl-color-text-secondary);
|
|
41
41
|
`;
|
|
42
|
-
const FullWidthFilledDisabledInput =
|
|
42
|
+
const FullWidthFilledDisabledInput = safeStyled(FilledDisabledInput)`
|
|
43
43
|
width: 100%;
|
|
44
44
|
`;
|
|
45
|
-
const CenteredText =
|
|
45
|
+
const CenteredText = safeStyled(CpslText)`
|
|
46
46
|
width: 100%;
|
|
47
47
|
text-align: center;
|
|
48
48
|
`;
|
|
49
|
-
const InnerStepContainer =
|
|
49
|
+
const InnerStepContainer = safeStyled.div`
|
|
50
50
|
width: 100%;
|
|
51
51
|
height: 100%;
|
|
52
52
|
align-self: center;
|
|
@@ -55,22 +55,22 @@ const InnerStepContainer = styled.div`
|
|
|
55
55
|
align-items: center;
|
|
56
56
|
gap: 8px;
|
|
57
57
|
`;
|
|
58
|
-
const StepContainer =
|
|
58
|
+
const StepContainer = safeStyled(InnerStepContainer)`
|
|
59
59
|
gap: ${({ $wide }) => $wide ? "32px" : "24px"};
|
|
60
60
|
`;
|
|
61
|
-
const Heading =
|
|
62
|
-
const StyledCpslTileButton =
|
|
61
|
+
const Heading = safeStyled(CenteredText)``;
|
|
62
|
+
const StyledCpslTileButton = safeStyled(CpslTileButton)`
|
|
63
63
|
--button-width: 100%;
|
|
64
64
|
--button-height: 87px;
|
|
65
65
|
--button-icon-height: 32px;
|
|
66
66
|
--button-icon-width: 32px;
|
|
67
67
|
`;
|
|
68
|
-
const HeroIcon =
|
|
68
|
+
const HeroIcon = safeStyled(CpslIcon)`
|
|
69
69
|
--height: 80px;
|
|
70
70
|
--width: 80px;
|
|
71
71
|
--icon-color: var(--cpsl-color-text-primary);
|
|
72
72
|
`;
|
|
73
|
-
const HeaderSelect =
|
|
73
|
+
const HeaderSelect = safeStyled(CpslSelect)`
|
|
74
74
|
--container-height: 26px;
|
|
75
75
|
--container-border-width: 0px;
|
|
76
76
|
--container-padding-end: 0px;
|
|
@@ -106,13 +106,13 @@ const HeaderSelect = styled(CpslSelect)`
|
|
|
106
106
|
--icon-color: var(--cpsl-color-contrast);
|
|
107
107
|
}
|
|
108
108
|
`;
|
|
109
|
-
const HeaderSelectItem =
|
|
109
|
+
const HeaderSelectItem = safeStyled(CpslSelectItem)`
|
|
110
110
|
--outer-container-padding-start: 4px;
|
|
111
111
|
--outer-container-padding-end: 4px;
|
|
112
112
|
--outer-container-padding-top: 4px;
|
|
113
113
|
--outer-container-padding-bottom: 4px;
|
|
114
114
|
`;
|
|
115
|
-
const HeaderSelectContainer =
|
|
115
|
+
const HeaderSelectContainer = safeStyled.div`
|
|
116
116
|
position: relative;
|
|
117
117
|
display: flex;
|
|
118
118
|
align-items: center;
|
|
@@ -121,7 +121,7 @@ const HeaderSelectContainer = styled.div`
|
|
|
121
121
|
background-color: var(--cpsl-color-background-8);
|
|
122
122
|
padding: 4px;
|
|
123
123
|
`;
|
|
124
|
-
const StyledIcon =
|
|
124
|
+
const StyledIcon = safeStyled(CpslIcon)`
|
|
125
125
|
background: var(--cpsl-color-background-0);
|
|
126
126
|
border-radius: 100%;
|
|
127
127
|
`;
|
|
@@ -141,13 +141,13 @@ function NetworkIcon({ network, size }) {
|
|
|
141
141
|
const data = NETWORKS[network];
|
|
142
142
|
return /* @__PURE__ */ jsx(StyledIcon, { size, icon: data.icon, inset: data.isCircular ? void 0 : "15%", invert: isDark && data.isDark });
|
|
143
143
|
}
|
|
144
|
-
const ErrorContainer =
|
|
144
|
+
const ErrorContainer = safeStyled.div`
|
|
145
145
|
display: flex;
|
|
146
146
|
align-items: center;
|
|
147
147
|
justify-content: center;
|
|
148
148
|
gap: 4px;
|
|
149
149
|
`;
|
|
150
|
-
const ErrorIcon =
|
|
150
|
+
const ErrorIcon = safeStyled(CpslIcon)`
|
|
151
151
|
--height: 16px;
|
|
152
152
|
--width: 16px;
|
|
153
153
|
--icon-color: var(--cpsl-color-text-error);
|
|
@@ -19,6 +19,7 @@ export declare enum ModalStep {
|
|
|
19
19
|
WALLET_CREATION_DONE = "WALLET_CREATION_DONE",
|
|
20
20
|
SECRET = "SECRET",
|
|
21
21
|
BIOMETRIC_LOGIN = "BIOMETRIC_LOGIN",
|
|
22
|
+
EMBEDDED_PASSWORD_LOGIN = "EMBEDDED_PASSWORD_LOGIN",
|
|
22
23
|
AWAITING_BIOMETRIC_LOGIN = "AWAITING_BIOMETRIC_LOGIN",
|
|
23
24
|
AWAITING_PASSWORD_LOGIN = "AWAITING_PASSWORD_LOGIN",
|
|
24
25
|
LOGIN_DONE = "LOGIN_DONE",
|
|
@@ -95,6 +96,7 @@ declare enum LoginModalStep {
|
|
|
95
96
|
FARCASTER_OAUTH = "FARCASTER_OAUTH",
|
|
96
97
|
TELEGRAM_OAUTH = "TELEGRAM_OAUTH",
|
|
97
98
|
BIOMETRIC_LOGIN = "BIOMETRIC_LOGIN",
|
|
99
|
+
EMBEDDED_PASSWORD_LOGIN = "EMBEDDED_PASSWORD_LOGIN",
|
|
98
100
|
AWAITING_BIOMETRIC_LOGIN = "AWAITING_BIOMETRIC_LOGIN",
|
|
99
101
|
AWAITING_PASSWORD_LOGIN = "AWAITING_PASSWORD_LOGIN",
|
|
100
102
|
AWAITING_WALLET_CREATION = "AWAITING_WALLET_CREATION",
|
|
@@ -20,6 +20,7 @@ var ModalStep = /* @__PURE__ */ ((ModalStep2) => {
|
|
|
20
20
|
ModalStep2["WALLET_CREATION_DONE"] = "WALLET_CREATION_DONE";
|
|
21
21
|
ModalStep2["SECRET"] = "SECRET";
|
|
22
22
|
ModalStep2["BIOMETRIC_LOGIN"] = "BIOMETRIC_LOGIN";
|
|
23
|
+
ModalStep2["EMBEDDED_PASSWORD_LOGIN"] = "EMBEDDED_PASSWORD_LOGIN";
|
|
23
24
|
ModalStep2["AWAITING_BIOMETRIC_LOGIN"] = "AWAITING_BIOMETRIC_LOGIN";
|
|
24
25
|
ModalStep2["AWAITING_PASSWORD_LOGIN"] = "AWAITING_PASSWORD_LOGIN";
|
|
25
26
|
ModalStep2["LOGIN_DONE"] = "LOGIN_DONE";
|
|
@@ -61,6 +62,7 @@ const RESET_TO_AUTH_STEPS = [
|
|
|
61
62
|
"PASSWORD_CREATION" /* PASSWORD_CREATION */,
|
|
62
63
|
"AWAITING_PASSWORD_CREATION" /* AWAITING_PASSWORD_CREATION */,
|
|
63
64
|
"BIOMETRIC_LOGIN" /* BIOMETRIC_LOGIN */,
|
|
65
|
+
"EMBEDDED_PASSWORD_LOGIN" /* EMBEDDED_PASSWORD_LOGIN */,
|
|
64
66
|
"AWAITING_BIOMETRIC_LOGIN" /* AWAITING_BIOMETRIC_LOGIN */,
|
|
65
67
|
"AWAITING_PASSWORD_LOGIN" /* AWAITING_PASSWORD_LOGIN */,
|
|
66
68
|
"AWAITING_WALLET_CREATION" /* AWAITING_WALLET_CREATION */,
|
|
@@ -165,6 +167,7 @@ var LoginModalStep = /* @__PURE__ */ ((LoginModalStep2) => {
|
|
|
165
167
|
LoginModalStep2["FARCASTER_OAUTH"] = "FARCASTER_OAUTH";
|
|
166
168
|
LoginModalStep2["TELEGRAM_OAUTH"] = "TELEGRAM_OAUTH";
|
|
167
169
|
LoginModalStep2["BIOMETRIC_LOGIN"] = "BIOMETRIC_LOGIN";
|
|
170
|
+
LoginModalStep2["EMBEDDED_PASSWORD_LOGIN"] = "EMBEDDED_PASSWORD_LOGIN";
|
|
168
171
|
LoginModalStep2["AWAITING_BIOMETRIC_LOGIN"] = "AWAITING_BIOMETRIC_LOGIN";
|
|
169
172
|
LoginModalStep2["AWAITING_PASSWORD_LOGIN"] = "AWAITING_PASSWORD_LOGIN";
|
|
170
173
|
LoginModalStep2["AWAITING_WALLET_CREATION"] = "AWAITING_WALLET_CREATION";
|
|
@@ -191,6 +194,7 @@ const LoginPreviousStep = {
|
|
|
191
194
|
["AWAITING_OAUTH" /* AWAITING_OAUTH */]: "AUTH_MAIN" /* AUTH_MAIN */,
|
|
192
195
|
["FARCASTER_OAUTH" /* FARCASTER_OAUTH */]: "AUTH_MAIN" /* AUTH_MAIN */,
|
|
193
196
|
["BIOMETRIC_LOGIN" /* BIOMETRIC_LOGIN */]: "AUTH_MAIN" /* AUTH_MAIN */,
|
|
197
|
+
["EMBEDDED_PASSWORD_LOGIN" /* EMBEDDED_PASSWORD_LOGIN */]: "AUTH_MAIN" /* AUTH_MAIN */,
|
|
194
198
|
["AWAITING_BIOMETRIC_LOGIN" /* AWAITING_BIOMETRIC_LOGIN */]: "BIOMETRIC_LOGIN" /* BIOMETRIC_LOGIN */,
|
|
195
199
|
["AWAITING_PASSWORD_LOGIN" /* AWAITING_PASSWORD_LOGIN */]: "BIOMETRIC_LOGIN" /* BIOMETRIC_LOGIN */,
|
|
196
200
|
["AWAITING_WALLET_CREATION" /* AWAITING_WALLET_CREATION */]: void 0,
|
|
@@ -232,7 +236,7 @@ function getAddFundsStep(currentTab) {
|
|
|
232
236
|
return "ADD_FUNDS_WITHDRAW" /* ADD_FUNDS_WITHDRAW */;
|
|
233
237
|
}
|
|
234
238
|
}
|
|
235
|
-
const IFrameSteps = ["PASSWORD_CREATION" /* PASSWORD_CREATION */];
|
|
239
|
+
const IFrameSteps = ["PASSWORD_CREATION" /* PASSWORD_CREATION */, "EMBEDDED_PASSWORD_LOGIN" /* EMBEDDED_PASSWORD_LOGIN */];
|
|
236
240
|
export {
|
|
237
241
|
AccountPreviousStep,
|
|
238
242
|
GuestPreviousStep,
|
package/dist/provider/index.d.ts
CHANGED
package/dist/provider/index.js
CHANGED
|
@@ -4,6 +4,8 @@ import { ParaProvider } from "./ParaProvider.js";
|
|
|
4
4
|
export * from "./hooks/index.js";
|
|
5
5
|
export * from "./stores/getters.js";
|
|
6
6
|
export * from "./stores/setters.js";
|
|
7
|
+
export * from "./types/externalWalletProviders.js";
|
|
8
|
+
export * from "./types/provider.js";
|
|
7
9
|
export {
|
|
8
10
|
ParaProvider
|
|
9
11
|
};
|
|
@@ -188,8 +188,13 @@ function AuthProvider({
|
|
|
188
188
|
},
|
|
189
189
|
[isIFrameReady]
|
|
190
190
|
);
|
|
191
|
-
const login = () => {
|
|
192
|
-
|
|
191
|
+
const login = (authState) => {
|
|
192
|
+
if (authState.isWalletSelectionNeeded || authState.passkeyUrl) {
|
|
193
|
+
setStep(ModalStep.BIOMETRIC_LOGIN);
|
|
194
|
+
} else {
|
|
195
|
+
setIFrameUrl(authState.passwordUrl);
|
|
196
|
+
setStep(ModalStep.EMBEDDED_PASSWORD_LOGIN);
|
|
197
|
+
}
|
|
193
198
|
refs.poll.current = {
|
|
194
199
|
action: "login",
|
|
195
200
|
timeout: window == null ? void 0 : window.setTimeout(() => __async(this, null, function* () {
|
|
@@ -197,11 +202,16 @@ function AuthProvider({
|
|
|
197
202
|
{
|
|
198
203
|
isCanceled: () => cancelIfExitedSteps([
|
|
199
204
|
ModalStep.BIOMETRIC_LOGIN,
|
|
205
|
+
ModalStep.EMBEDDED_PASSWORD_LOGIN,
|
|
200
206
|
ModalStep.AWAITING_BIOMETRIC_LOGIN,
|
|
201
207
|
ModalStep.AWAITING_PASSWORD_LOGIN
|
|
202
208
|
]),
|
|
203
209
|
onPoll: () => {
|
|
204
|
-
goBackIfPopupClosedOnSteps([
|
|
210
|
+
goBackIfPopupClosedOnSteps([
|
|
211
|
+
ModalStep.AWAITING_BIOMETRIC_LOGIN,
|
|
212
|
+
ModalStep.AWAITING_PASSWORD_LOGIN,
|
|
213
|
+
ModalStep.EMBEDDED_PASSWORD_LOGIN
|
|
214
|
+
]);
|
|
205
215
|
}
|
|
206
216
|
},
|
|
207
217
|
{
|
|
@@ -262,7 +272,7 @@ function AuthProvider({
|
|
|
262
272
|
}
|
|
263
273
|
break;
|
|
264
274
|
case "login":
|
|
265
|
-
login();
|
|
275
|
+
login(authState);
|
|
266
276
|
break;
|
|
267
277
|
case "signup":
|
|
268
278
|
{
|
|
@@ -11,7 +11,6 @@ export declare const defaultExternalWallet: {
|
|
|
11
11
|
walletDisplayHelpers: {
|
|
12
12
|
showExtension: boolean;
|
|
13
13
|
showMobile: boolean;
|
|
14
|
-
isSolanaMobileIOS: boolean;
|
|
15
14
|
isCosmosMobileWallet: boolean;
|
|
16
15
|
};
|
|
17
16
|
username: undefined;
|
|
@@ -35,7 +34,6 @@ export declare const ExternalWalletContext: import("react").Context<{
|
|
|
35
34
|
walletDisplayHelpers: {
|
|
36
35
|
showExtension: boolean;
|
|
37
36
|
showMobile: boolean;
|
|
38
|
-
isSolanaMobileIOS: boolean;
|
|
39
37
|
isCosmosMobileWallet: boolean;
|
|
40
38
|
};
|
|
41
39
|
username?: string;
|
|
@@ -60,7 +58,6 @@ export declare const useExternalWallets: () => {
|
|
|
60
58
|
walletDisplayHelpers: {
|
|
61
59
|
showExtension: boolean;
|
|
62
60
|
showMobile: boolean;
|
|
63
|
-
isSolanaMobileIOS: boolean;
|
|
64
61
|
isCosmosMobileWallet: boolean;
|
|
65
62
|
};
|
|
66
63
|
username?: string;
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from "../../chunk-MMUBH76A.js";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
import { createContext, useCallback, useContext, useEffect, useMemo, useState } from "react";
|
|
8
|
-
import {
|
|
8
|
+
import { isMobile, truncateAddress } from "@getpara/web-sdk";
|
|
9
9
|
import { useInternalClient } from "../hooks/utils/useInternalClient.js";
|
|
10
10
|
import { useStore } from "../stores/useStore.js";
|
|
11
11
|
import { ModalStep } from "../../modal/index.js";
|
|
@@ -19,7 +19,7 @@ const defaultExternalWallet = {
|
|
|
19
19
|
wallet: void 0,
|
|
20
20
|
qrUri: void 0,
|
|
21
21
|
chainIdSwitchingTo: void 0,
|
|
22
|
-
walletDisplayHelpers: { showExtension: false, showMobile: false,
|
|
22
|
+
walletDisplayHelpers: { showExtension: false, showMobile: false, isCosmosMobileWallet: false },
|
|
23
23
|
username: void 0,
|
|
24
24
|
avatar: void 0,
|
|
25
25
|
connectExternalWallet: () => Promise.resolve(),
|
|
@@ -325,7 +325,6 @@ function ExternalWalletProvider({ children }) {
|
|
|
325
325
|
showExtension: !isMobile() && ((wallet == null ? void 0 : wallet.isExtension) && (wallet == null ? void 0 : wallet.installed) || !(wallet == null ? void 0 : wallet.isMobile) || (wallet == null ? void 0 : wallet.type) === "SOLANA"),
|
|
326
326
|
// Show the mobile screen if on mobile and the wallet is a mobile wallet or if on desktop and the wallet isn't installed
|
|
327
327
|
showMobile: isMobile() && (wallet == null ? void 0 : wallet.isMobile) || !isMobile() && !(wallet == null ? void 0 : wallet.installed),
|
|
328
|
-
isSolanaMobileIOS: isIOS() && isMobile() && !isIOSWebview() && (wallet == null ? void 0 : wallet.type) === "SOLANA",
|
|
329
328
|
isCosmosMobileWallet: (wallet == null ? void 0 : wallet.type) === "COSMOS" && !!isUsingMobileConnector
|
|
330
329
|
};
|
|
331
330
|
const username = useMemo(() => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getpara/react-sdk",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.20",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
"*.css"
|
|
16
16
|
],
|
|
17
17
|
"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.
|
|
18
|
+
"@getpara/react-common": "2.0.0-alpha.20",
|
|
19
|
+
"@getpara/react-components": "2.0.0-alpha.20",
|
|
20
|
+
"@getpara/web-sdk": "2.0.0-alpha.20",
|
|
21
21
|
"date-fns": "^3.6.0",
|
|
22
22
|
"framer-motion": "11.3.28",
|
|
23
23
|
"libphonenumber-js": "^1.11.1",
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"cli": "node ./dist/cli/cli.mjs"
|
|
34
34
|
},
|
|
35
35
|
"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.
|
|
36
|
+
"@getpara/cosmos-wallet-connectors": "2.0.0-alpha.20",
|
|
37
|
+
"@getpara/evm-wallet-connectors": "2.0.0-alpha.20",
|
|
38
|
+
"@getpara/solana-wallet-connectors": "2.0.0-alpha.20",
|
|
39
39
|
"@testing-library/dom": "^10.4.0",
|
|
40
40
|
"@testing-library/react": "^16.3.0",
|
|
41
41
|
"@testing-library/react-hooks": "^8.0.1",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"resolutions": {
|
|
64
64
|
"styled-components": "^6"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "4c8d918b9fc387476968bfc08524fe1a8b6ec83b"
|
|
67
67
|
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
export declare enum EvmWallet {
|
|
2
|
-
METAMASK = "METAMASK",
|
|
3
|
-
RAINBOW = "RAINBOW",
|
|
4
|
-
COINBASE = "COINBASE",
|
|
5
|
-
WALLETCONNECT = "WALLETCONNECT",
|
|
6
|
-
ZERION = "ZERION",
|
|
7
|
-
SAFE = "SAFE",
|
|
8
|
-
RABBY = "RABBY",
|
|
9
|
-
OKX = "OKX"
|
|
10
|
-
}
|
|
11
|
-
export declare enum SolanaWallet {
|
|
12
|
-
PHANTOM = "PHANTOM",
|
|
13
|
-
GLOW = "GLOW",
|
|
14
|
-
BACKPACK = "BACKPACK",
|
|
15
|
-
SOLFLARE = "SOLFLARE"
|
|
16
|
-
}
|
|
17
|
-
export declare enum CosmosWallet {
|
|
18
|
-
KEPLR = "KEPLR",
|
|
19
|
-
LEAP = "LEAP"
|
|
20
|
-
}
|
|
21
|
-
export declare const ExternalWallet: {
|
|
22
|
-
KEPLR: CosmosWallet.KEPLR;
|
|
23
|
-
LEAP: CosmosWallet.LEAP;
|
|
24
|
-
PHANTOM: SolanaWallet.PHANTOM;
|
|
25
|
-
GLOW: SolanaWallet.GLOW;
|
|
26
|
-
BACKPACK: SolanaWallet.BACKPACK;
|
|
27
|
-
SOLFLARE: SolanaWallet.SOLFLARE;
|
|
28
|
-
METAMASK: EvmWallet.METAMASK;
|
|
29
|
-
RAINBOW: EvmWallet.RAINBOW;
|
|
30
|
-
COINBASE: EvmWallet.COINBASE;
|
|
31
|
-
WALLETCONNECT: EvmWallet.WALLETCONNECT;
|
|
32
|
-
ZERION: EvmWallet.ZERION;
|
|
33
|
-
SAFE: EvmWallet.SAFE;
|
|
34
|
-
RABBY: EvmWallet.RABBY;
|
|
35
|
-
OKX: EvmWallet.OKX;
|
|
36
|
-
};
|
|
37
|
-
export type TExternalWallet = keyof typeof ExternalWallet;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
__spreadValues
|
|
4
|
-
} from "../../chunk-MMUBH76A.js";
|
|
5
|
-
var EvmWallet = /* @__PURE__ */ ((EvmWallet2) => {
|
|
6
|
-
EvmWallet2["METAMASK"] = "METAMASK";
|
|
7
|
-
EvmWallet2["RAINBOW"] = "RAINBOW";
|
|
8
|
-
EvmWallet2["COINBASE"] = "COINBASE";
|
|
9
|
-
EvmWallet2["WALLETCONNECT"] = "WALLETCONNECT";
|
|
10
|
-
EvmWallet2["ZERION"] = "ZERION";
|
|
11
|
-
EvmWallet2["SAFE"] = "SAFE";
|
|
12
|
-
EvmWallet2["RABBY"] = "RABBY";
|
|
13
|
-
EvmWallet2["OKX"] = "OKX";
|
|
14
|
-
return EvmWallet2;
|
|
15
|
-
})(EvmWallet || {});
|
|
16
|
-
var SolanaWallet = /* @__PURE__ */ ((SolanaWallet2) => {
|
|
17
|
-
SolanaWallet2["PHANTOM"] = "PHANTOM";
|
|
18
|
-
SolanaWallet2["GLOW"] = "GLOW";
|
|
19
|
-
SolanaWallet2["BACKPACK"] = "BACKPACK";
|
|
20
|
-
SolanaWallet2["SOLFLARE"] = "SOLFLARE";
|
|
21
|
-
return SolanaWallet2;
|
|
22
|
-
})(SolanaWallet || {});
|
|
23
|
-
var CosmosWallet = /* @__PURE__ */ ((CosmosWallet2) => {
|
|
24
|
-
CosmosWallet2["KEPLR"] = "KEPLR";
|
|
25
|
-
CosmosWallet2["LEAP"] = "LEAP";
|
|
26
|
-
return CosmosWallet2;
|
|
27
|
-
})(CosmosWallet || {});
|
|
28
|
-
const ExternalWallet = __spreadValues(__spreadValues(__spreadValues({}, EvmWallet), SolanaWallet), CosmosWallet);
|
|
29
|
-
export {
|
|
30
|
-
CosmosWallet,
|
|
31
|
-
EvmWallet,
|
|
32
|
-
ExternalWallet,
|
|
33
|
-
SolanaWallet
|
|
34
|
-
};
|