@turnkey/react-wallet-kit 1.4.0 → 1.4.2
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Provider.d.ts","sourceRoot":"","sources":["../../../src/providers/client/Provider.tsx"],"names":[],"mappings":"AAqGA,OAAO,EAAE,SAAS,EAA4C,MAAM,OAAO,CAAC;AAqB5E,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAM3B,MAAM,kBAAkB,CAAC;AAwD1B;;GAEG;AACH,UAAU,mBAAmB;IAC3B,QAAQ,EAAE,SAAS,CAAC;IACpB,MAAM,EAAE,qBAAqB,CAAC;IAC9B,SAAS,CAAC,EAAE,gBAAgB,GAAG,SAAS,CAAC;CAC1C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,
|
|
1
|
+
{"version":3,"file":"Provider.d.ts","sourceRoot":"","sources":["../../../src/providers/client/Provider.tsx"],"names":[],"mappings":"AAqGA,OAAO,EAAE,SAAS,EAA4C,MAAM,OAAO,CAAC;AAqB5E,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAM3B,MAAM,kBAAkB,CAAC;AAwD1B;;GAEG;AACH,UAAU,mBAAmB;IAC3B,QAAQ,EAAE,SAAS,CAAC;IACpB,MAAM,EAAE,qBAAqB,CAAC;IAC9B,SAAS,CAAC,EAAE,gBAAgB,GAAG,SAAS,CAAC;CAC1C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA4sKxD,CAAC"}
|
|
@@ -868,7 +868,7 @@ const ClientProvider = ({
|
|
|
868
868
|
if (!client) {
|
|
869
869
|
throw new sdkTypes.TurnkeyError("Client is not initialized.", sdkTypes.TurnkeyErrorCodes.CLIENT_NOT_INITIALIZED);
|
|
870
870
|
}
|
|
871
|
-
const expirationSeconds = masterConfig?.auth?.sessionExpirationSeconds ?? core.DEFAULT_SESSION_EXPIRATION_IN_SECONDS;
|
|
871
|
+
const expirationSeconds = params?.expirationSeconds ?? masterConfig?.auth?.sessionExpirationSeconds ?? core.DEFAULT_SESSION_EXPIRATION_IN_SECONDS;
|
|
872
872
|
const res = await utils.withTurnkeyErrorHandling(() => client.loginWithPasskey({
|
|
873
873
|
...params,
|
|
874
874
|
expirationSeconds
|
|
@@ -898,7 +898,7 @@ const ClientProvider = ({
|
|
|
898
898
|
} : {
|
|
899
899
|
...params
|
|
900
900
|
};
|
|
901
|
-
const expirationSeconds = masterConfig?.auth?.sessionExpirationSeconds ?? core.DEFAULT_SESSION_EXPIRATION_IN_SECONDS;
|
|
901
|
+
const expirationSeconds = params?.expirationSeconds ?? masterConfig?.auth?.sessionExpirationSeconds ?? core.DEFAULT_SESSION_EXPIRATION_IN_SECONDS;
|
|
902
902
|
const websiteName = window.location.hostname;
|
|
903
903
|
const timestamp = new Date().toLocaleDateString() + "-" + new Date().toLocaleTimeString([], {
|
|
904
904
|
hour: "2-digit",
|
|
@@ -981,7 +981,7 @@ const ClientProvider = ({
|
|
|
981
981
|
if (!client) {
|
|
982
982
|
throw new sdkTypes.TurnkeyError("Client is not initialized.", sdkTypes.TurnkeyErrorCodes.CLIENT_NOT_INITIALIZED);
|
|
983
983
|
}
|
|
984
|
-
const expirationSeconds = masterConfig?.auth?.sessionExpirationSeconds ?? core.DEFAULT_SESSION_EXPIRATION_IN_SECONDS;
|
|
984
|
+
const expirationSeconds = params?.expirationSeconds ?? masterConfig?.auth?.sessionExpirationSeconds ?? core.DEFAULT_SESSION_EXPIRATION_IN_SECONDS;
|
|
985
985
|
return await utils.withTurnkeyErrorHandling(() => client.buildWalletLoginRequest({
|
|
986
986
|
...params,
|
|
987
987
|
expirationSeconds
|
|
@@ -991,7 +991,7 @@ const ClientProvider = ({
|
|
|
991
991
|
if (!client) {
|
|
992
992
|
throw new sdkTypes.TurnkeyError("Client is not initialized.", sdkTypes.TurnkeyErrorCodes.CLIENT_NOT_INITIALIZED);
|
|
993
993
|
}
|
|
994
|
-
const expirationSeconds = masterConfig?.auth?.sessionExpirationSeconds ?? core.DEFAULT_SESSION_EXPIRATION_IN_SECONDS;
|
|
994
|
+
const expirationSeconds = params?.expirationSeconds ?? masterConfig?.auth?.sessionExpirationSeconds ?? core.DEFAULT_SESSION_EXPIRATION_IN_SECONDS;
|
|
995
995
|
const res = await utils.withTurnkeyErrorHandling(() => client.loginWithWallet({
|
|
996
996
|
...params,
|
|
997
997
|
expirationSeconds
|
|
@@ -1021,7 +1021,7 @@ const ClientProvider = ({
|
|
|
1021
1021
|
} : {
|
|
1022
1022
|
...params
|
|
1023
1023
|
};
|
|
1024
|
-
const expirationSeconds = masterConfig?.auth?.sessionExpirationSeconds ?? core.DEFAULT_SESSION_EXPIRATION_IN_SECONDS;
|
|
1024
|
+
const expirationSeconds = params?.expirationSeconds ?? masterConfig?.auth?.sessionExpirationSeconds ?? core.DEFAULT_SESSION_EXPIRATION_IN_SECONDS;
|
|
1025
1025
|
const res = await utils.withTurnkeyErrorHandling(() => client.signUpWithWallet({
|
|
1026
1026
|
...params,
|
|
1027
1027
|
expirationSeconds
|
|
@@ -1051,7 +1051,7 @@ const ClientProvider = ({
|
|
|
1051
1051
|
} : {
|
|
1052
1052
|
...params
|
|
1053
1053
|
};
|
|
1054
|
-
const expirationSeconds = masterConfig?.auth?.sessionExpirationSeconds ?? core.DEFAULT_SESSION_EXPIRATION_IN_SECONDS;
|
|
1054
|
+
const expirationSeconds = params?.expirationSeconds ?? masterConfig?.auth?.sessionExpirationSeconds ?? core.DEFAULT_SESSION_EXPIRATION_IN_SECONDS;
|
|
1055
1055
|
const res = await utils.withTurnkeyErrorHandling(() => client.loginOrSignupWithWallet({
|
|
1056
1056
|
...params,
|
|
1057
1057
|
expirationSeconds
|
|
@@ -1570,10 +1570,7 @@ const ClientProvider = ({
|
|
|
1570
1570
|
if (session && sessionKey) {
|
|
1571
1571
|
await scheduleSessionExpiration({
|
|
1572
1572
|
sessionKey,
|
|
1573
|
-
expiry: session.expiry
|
|
1574
|
-
...(params?.expirationSeconds && {
|
|
1575
|
-
expirationSeconds: params?.expirationSeconds
|
|
1576
|
-
})
|
|
1573
|
+
expiry: session.expiry
|
|
1577
1574
|
});
|
|
1578
1575
|
}
|
|
1579
1576
|
const allSessions = await getAllSessions();
|
|
@@ -2601,7 +2598,7 @@ const ClientProvider = ({
|
|
|
2601
2598
|
} else {
|
|
2602
2599
|
const res = await updateUserName({
|
|
2603
2600
|
userName: params.userName,
|
|
2604
|
-
userId: user.userId,
|
|
2601
|
+
userId: params.userId ?? user.userId,
|
|
2605
2602
|
stampWith,
|
|
2606
2603
|
...(organizationId !== undefined && {
|
|
2607
2604
|
organizationId
|
|
@@ -3058,7 +3055,7 @@ const ClientProvider = ({
|
|
|
3058
3055
|
const res = await updateUserPhoneNumber({
|
|
3059
3056
|
phoneNumber: params.phoneNumber,
|
|
3060
3057
|
verificationToken,
|
|
3061
|
-
userId
|
|
3058
|
+
userId,
|
|
3062
3059
|
organizationId,
|
|
3063
3060
|
stampWith
|
|
3064
3061
|
});
|