decane-connect-kit 2.8.0 → 2.8.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.cjs +16 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1205,6 +1205,7 @@ declare function useSocialAuth(): {
|
|
|
1205
1205
|
isCreatingWallet: boolean;
|
|
1206
1206
|
needsReconnect: boolean;
|
|
1207
1207
|
googleLoading: boolean;
|
|
1208
|
+
kingschatLoading: boolean;
|
|
1208
1209
|
emailLoading: boolean;
|
|
1209
1210
|
phoneLoading: boolean;
|
|
1210
1211
|
tokenLoading: boolean;
|
|
@@ -1213,6 +1214,7 @@ declare function useSocialAuth(): {
|
|
|
1213
1214
|
error: string | null;
|
|
1214
1215
|
clearError: () => void;
|
|
1215
1216
|
signInWithGoogle: () => Promise<void>;
|
|
1217
|
+
signInWithKingsChat: () => Promise<void>;
|
|
1216
1218
|
sendEmailCode: (email: string) => Promise<{
|
|
1217
1219
|
codeRequired: true;
|
|
1218
1220
|
}>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1205,6 +1205,7 @@ declare function useSocialAuth(): {
|
|
|
1205
1205
|
isCreatingWallet: boolean;
|
|
1206
1206
|
needsReconnect: boolean;
|
|
1207
1207
|
googleLoading: boolean;
|
|
1208
|
+
kingschatLoading: boolean;
|
|
1208
1209
|
emailLoading: boolean;
|
|
1209
1210
|
phoneLoading: boolean;
|
|
1210
1211
|
tokenLoading: boolean;
|
|
@@ -1213,6 +1214,7 @@ declare function useSocialAuth(): {
|
|
|
1213
1214
|
error: string | null;
|
|
1214
1215
|
clearError: () => void;
|
|
1215
1216
|
signInWithGoogle: () => Promise<void>;
|
|
1217
|
+
signInWithKingsChat: () => Promise<void>;
|
|
1216
1218
|
sendEmailCode: (email: string) => Promise<{
|
|
1217
1219
|
codeRequired: true;
|
|
1218
1220
|
}>;
|
package/dist/index.js
CHANGED
|
@@ -7010,6 +7010,7 @@ function useSocialAuth() {
|
|
|
7010
7010
|
const {
|
|
7011
7011
|
socialAuth,
|
|
7012
7012
|
connectWithGoogle,
|
|
7013
|
+
connectWithKingsChat,
|
|
7013
7014
|
connectWithEmail,
|
|
7014
7015
|
verifyEmailCode: verifyEmailCode2,
|
|
7015
7016
|
connectWithPhone,
|
|
@@ -7022,6 +7023,7 @@ function useSocialAuth() {
|
|
|
7022
7023
|
socialDisconnect
|
|
7023
7024
|
} = useDecaneContext();
|
|
7024
7025
|
const [googleLoading, setGoogleLoading] = useState4(false);
|
|
7026
|
+
const [kingschatLoading, setKingschatLoading] = useState4(false);
|
|
7025
7027
|
const [emailLoading, setEmailLoading] = useState4(false);
|
|
7026
7028
|
const [phoneLoading, setPhoneLoading] = useState4(false);
|
|
7027
7029
|
const [tokenLoading, setTokenLoading] = useState4(false);
|
|
@@ -7037,6 +7039,18 @@ function useSocialAuth() {
|
|
|
7037
7039
|
setGoogleLoading(false);
|
|
7038
7040
|
}
|
|
7039
7041
|
}, [connectWithGoogle]);
|
|
7042
|
+
const signInWithKingsChat = useCallback4(async () => {
|
|
7043
|
+
setKingschatLoading(true);
|
|
7044
|
+
setError(null);
|
|
7045
|
+
try {
|
|
7046
|
+
await connectWithKingsChat();
|
|
7047
|
+
} catch (e) {
|
|
7048
|
+
setError(e.message);
|
|
7049
|
+
throw e;
|
|
7050
|
+
} finally {
|
|
7051
|
+
setKingschatLoading(false);
|
|
7052
|
+
}
|
|
7053
|
+
}, [connectWithKingsChat]);
|
|
7040
7054
|
const sendEmailCode = useCallback4(async (email) => {
|
|
7041
7055
|
setEmailLoading(true);
|
|
7042
7056
|
setError(null);
|
|
@@ -7156,6 +7170,7 @@ function useSocialAuth() {
|
|
|
7156
7170
|
// this into a real reconnect (signInWithGoogle / sendEmailCode), not unlock().
|
|
7157
7171
|
needsReconnect: socialAuth.needsReconnect,
|
|
7158
7172
|
googleLoading,
|
|
7173
|
+
kingschatLoading,
|
|
7159
7174
|
emailLoading,
|
|
7160
7175
|
phoneLoading,
|
|
7161
7176
|
tokenLoading,
|
|
@@ -7164,6 +7179,7 @@ function useSocialAuth() {
|
|
|
7164
7179
|
error,
|
|
7165
7180
|
clearError: () => setError(null),
|
|
7166
7181
|
signInWithGoogle,
|
|
7182
|
+
signInWithKingsChat,
|
|
7167
7183
|
sendEmailCode,
|
|
7168
7184
|
confirmEmailCode,
|
|
7169
7185
|
sendPhoneCode,
|