@dynamic-labs/sdk-react-core 5.14.0 → 5.15.0
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/CHANGELOG.md +28 -0
- package/package.cjs +3 -3
- package/package.js +3 -3
- package/package.json +14 -14
- package/src/lib/store/utils/settingsUtils/settingsUtils.cjs +21 -2
- package/src/lib/store/utils/settingsUtils/settingsUtils.js +21 -2
- package/src/lib/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +1 -1
- package/src/lib/utils/hooks/useSetWalletConnectorFetchers/useSetWalletConnectorFetchers.cjs +3 -0
- package/src/lib/utils/hooks/useSetWalletConnectorFetchers/useSetWalletConnectorFetchers.js +3 -0
|
@@ -36,6 +36,7 @@ var isCookieEnabled = require('../../../client/extension/functions/isCookieEnabl
|
|
|
36
36
|
var generateChainingSignature = require('../../../client/extension/functions/generateChainingSignature/generateChainingSignature.cjs');
|
|
37
37
|
var getSessionPublicKey = require('../../../client/extension/functions/getSessionPublicKey/getSessionPublicKey.cjs');
|
|
38
38
|
var useDynamicWaas = require('../useDynamicWaas/useDynamicWaas.cjs');
|
|
39
|
+
var useGetElevatedAccessToken = require('../useGetElevatedAccessToken/useGetElevatedAccessToken.cjs');
|
|
39
40
|
var useGetMfaToken = require('../useGetMfaToken/useGetMfaToken.cjs');
|
|
40
41
|
|
|
41
42
|
const useSetWalletConnectorFetchers = (walletOptions, environmentId, projectSettings,
|
|
@@ -46,6 +47,7 @@ onUnauthorized) => {
|
|
|
46
47
|
var _a, _b, _c;
|
|
47
48
|
const apiBaseUrl = dynamicContextProps.useApiBaseUrl();
|
|
48
49
|
const getMfaToken = useGetMfaToken.useGetMfaToken();
|
|
50
|
+
const getElevatedAccessToken = useGetElevatedAccessToken.useGetElevatedAccessToken();
|
|
49
51
|
const isCookieAuthEnabled = projectSettings && isCookieEnabled.isCookieEnabled();
|
|
50
52
|
const svmGasSponsorshipEnabled = (_c = (_b = (_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _a === void 0 ? void 0 : _a.embeddedWallets) === null || _b === void 0 ? void 0 : _b.svmGasSponsorshipEnabled) !== null && _c !== void 0 ? _c : false;
|
|
51
53
|
const svmGasSponsorshipEnabledRef = React.useRef(svmGasSponsorshipEnabled);
|
|
@@ -62,6 +64,7 @@ onUnauthorized) => {
|
|
|
62
64
|
apiBaseUrl: apiBaseUrl !== null && apiBaseUrl !== void 0 ? apiBaseUrl : apiUrl.DEFAULT_WAAS_API_URL,
|
|
63
65
|
authMode: isCookieAuthEnabled ? 'cookie' : 'header',
|
|
64
66
|
environmentId,
|
|
67
|
+
getElevatedAccessToken,
|
|
65
68
|
getEvmGasSponsorshipEnabled: () => evmGasSponsorshipEnabledRef.current,
|
|
66
69
|
getMfaToken,
|
|
67
70
|
getSessionPublicKey: getSessionPublicKey.getSessionPublicKey,
|
|
@@ -32,6 +32,7 @@ import { isCookieEnabled } from '../../../client/extension/functions/isCookieEna
|
|
|
32
32
|
import { generateChainingSignature } from '../../../client/extension/functions/generateChainingSignature/generateChainingSignature.js';
|
|
33
33
|
import { getSessionPublicKey } from '../../../client/extension/functions/getSessionPublicKey/getSessionPublicKey.js';
|
|
34
34
|
import { configWaasWalletConnector } from '../useDynamicWaas/useDynamicWaas.js';
|
|
35
|
+
import { useGetElevatedAccessToken } from '../useGetElevatedAccessToken/useGetElevatedAccessToken.js';
|
|
35
36
|
import { useGetMfaToken } from '../useGetMfaToken/useGetMfaToken.js';
|
|
36
37
|
|
|
37
38
|
const useSetWalletConnectorFetchers = (walletOptions, environmentId, projectSettings,
|
|
@@ -42,6 +43,7 @@ onUnauthorized) => {
|
|
|
42
43
|
var _a, _b, _c;
|
|
43
44
|
const apiBaseUrl = useApiBaseUrl();
|
|
44
45
|
const getMfaToken = useGetMfaToken();
|
|
46
|
+
const getElevatedAccessToken = useGetElevatedAccessToken();
|
|
45
47
|
const isCookieAuthEnabled = projectSettings && isCookieEnabled();
|
|
46
48
|
const svmGasSponsorshipEnabled = (_c = (_b = (_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _a === void 0 ? void 0 : _a.embeddedWallets) === null || _b === void 0 ? void 0 : _b.svmGasSponsorshipEnabled) !== null && _c !== void 0 ? _c : false;
|
|
47
49
|
const svmGasSponsorshipEnabledRef = useRef(svmGasSponsorshipEnabled);
|
|
@@ -58,6 +60,7 @@ onUnauthorized) => {
|
|
|
58
60
|
apiBaseUrl: apiBaseUrl !== null && apiBaseUrl !== void 0 ? apiBaseUrl : DEFAULT_WAAS_API_URL,
|
|
59
61
|
authMode: isCookieAuthEnabled ? 'cookie' : 'header',
|
|
60
62
|
environmentId,
|
|
63
|
+
getElevatedAccessToken,
|
|
61
64
|
getEvmGasSponsorshipEnabled: () => evmGasSponsorshipEnabledRef.current,
|
|
62
65
|
getMfaToken,
|
|
63
66
|
getSessionPublicKey,
|