@dynamic-labs/sdk-react-core 2.0.0-alpha.31 → 2.0.0-alpha.32
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 +2 -0
- package/package.cjs +2 -2
- package/package.js +2 -2
- package/package.json +14 -14
- package/src/index.d.ts +1 -1
- package/src/lib/context/ConnectWithOtpContext/utils/createEmailHandler.cjs +21 -6
- package/src/lib/context/ConnectWithOtpContext/utils/createEmailHandler.js +16 -1
- package/src/lib/context/ConnectWithOtpContext/utils/createSmsHandler.cjs +17 -3
- package/src/lib/context/ConnectWithOtpContext/utils/createSmsHandler.js +15 -1
- package/src/lib/context/ConnectWithOtpContext/utils/findEmailProvider.cjs +19 -4
- package/src/lib/context/ConnectWithOtpContext/utils/findEmailProvider.js +16 -1
- package/src/lib/context/DynamicContext/DynamicContext.cjs +17 -17
- package/src/lib/context/DynamicContext/DynamicContext.js +3 -3
- package/src/lib/context/DynamicContext/hooks/useHandleLogout/useHandleLogout.cjs +6 -6
- package/src/lib/context/DynamicContext/hooks/useHandleLogout/useHandleLogout.js +5 -5
- package/src/lib/context/FundingContext/FundingContext.cjs +6 -6
- package/src/lib/context/FundingContext/FundingContext.js +5 -5
- package/src/lib/context/PasskeyContext/PasskeyContext.cjs +4 -4
- package/src/lib/context/PasskeyContext/PasskeyContext.js +3 -3
- package/src/lib/data/api/api.cjs +24 -0
- package/src/lib/data/api/api.d.ts +2 -0
- package/src/lib/data/api/api.js +20 -0
- package/src/lib/data/api/email/email.cjs +118 -0
- package/src/lib/data/api/email/email.d.ts +26 -0
- package/src/lib/data/api/email/email.js +110 -0
- package/src/lib/data/api/email/index.d.ts +1 -0
- package/src/lib/data/api/embeddedWallets/embeddedWallets.cjs +191 -0
- package/src/lib/data/api/embeddedWallets/embeddedWallets.d.ts +30 -0
- package/src/lib/data/api/embeddedWallets/embeddedWallets.js +177 -0
- package/src/lib/data/api/embeddedWallets/index.d.ts +2 -0
- package/src/lib/data/api/embeddedWallets/types.d.ts +39 -0
- package/src/lib/data/api/index.d.ts +10 -0
- package/src/lib/data/api/oauth/index.d.ts +1 -0
- package/src/lib/data/api/oauth/oauth.cjs +136 -0
- package/src/lib/data/api/oauth/oauth.d.ts +11 -0
- package/src/lib/data/api/oauth/oauth.js +128 -0
- package/src/lib/data/api/onramp/index.d.ts +1 -0
- package/src/lib/data/api/onramp/onramp.cjs +22 -0
- package/src/lib/data/api/onramp/onramp.d.ts +8 -0
- package/src/lib/data/api/onramp/onramp.js +18 -0
- package/src/lib/data/api/session/index.d.ts +1 -0
- package/src/lib/data/api/session/session.cjs +77 -0
- package/src/lib/data/api/session/session.d.ts +17 -0
- package/src/lib/data/api/session/session.js +69 -0
- package/src/lib/data/api/settings/index.d.ts +1 -0
- package/src/lib/data/api/settings/settings.cjs +58 -0
- package/src/lib/data/api/settings/settings.d.ts +7 -0
- package/src/lib/data/api/settings/settings.js +53 -0
- package/src/lib/data/api/sms/index.d.ts +1 -0
- package/src/lib/data/api/sms/sms.cjs +102 -0
- package/src/lib/data/api/sms/sms.d.ts +32 -0
- package/src/lib/data/api/sms/sms.js +95 -0
- package/src/lib/data/api/user/index.d.ts +1 -0
- package/src/lib/data/api/user/user.cjs +77 -0
- package/src/lib/data/api/user/user.d.ts +9 -0
- package/src/lib/data/api/user/user.js +71 -0
- package/src/lib/data/api/utils.cjs +20 -0
- package/src/lib/data/api/utils.d.ts +1 -0
- package/src/lib/data/api/utils.js +16 -0
- package/src/lib/data/api/wallets/index.d.ts +1 -0
- package/src/lib/data/api/wallets/wallets.cjs +137 -0
- package/src/lib/data/api/wallets/wallets.d.ts +10 -0
- package/src/lib/data/api/wallets/wallets.js +130 -0
- package/src/lib/data/index.d.ts +1 -0
- package/src/lib/shared/types/dynamicEventsCallbacks.d.ts +3 -4
- package/src/lib/shared/types/general.d.ts +1 -0
- package/src/lib/utils/functions/getCoinbaseMPCConnectorFetchers/getCoinbaseMPCConnectorFetchers.cjs +18 -4
- package/src/lib/utils/functions/getCoinbaseMPCConnectorFetchers/getCoinbaseMPCConnectorFetchers.js +15 -1
- package/src/lib/utils/functions/handleUnlinkHelper/handleUnlinkHelper.cjs +6 -4
- package/src/lib/utils/functions/handleUnlinkHelper/handleUnlinkHelper.js +5 -3
- package/src/lib/utils/hooks/authenticationHooks/useOtpVerificationRequest/useOtpVerificationRequest.cjs +4 -3
- package/src/lib/utils/hooks/authenticationHooks/useOtpVerificationRequest/useOtpVerificationRequest.d.ts +3 -3
- package/src/lib/utils/hooks/authenticationHooks/useOtpVerificationRequest/useOtpVerificationRequest.js +3 -2
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.cjs +4 -2
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.js +3 -1
- package/src/lib/utils/hooks/useEmailProvider/useEmailProvider.cjs +6 -6
- package/src/lib/utils/hooks/useEmailProvider/useEmailProvider.js +3 -3
- package/src/lib/utils/hooks/useEmbeddedWallet/useCoinbaseMPC/useCoinbaseMPC.cjs +4 -4
- package/src/lib/utils/hooks/useEmbeddedWallet/useCoinbaseMPC/useCoinbaseMPC.js +3 -3
- package/src/lib/utils/hooks/useEmbeddedWalletPassword/useEmbeddedWalletPassword.cjs +4 -4
- package/src/lib/utils/hooks/useEmbeddedWalletPassword/useEmbeddedWalletPassword.js +3 -3
- package/src/lib/utils/hooks/useFetchNonce/useFetchNonce.cjs +6 -4
- package/src/lib/utils/hooks/useFetchNonce/useFetchNonce.js +3 -1
- package/src/lib/utils/hooks/useFetchProjectSettings/useFetchProjectSettings.cjs +6 -6
- package/src/lib/utils/hooks/useFetchProjectSettings/useFetchProjectSettings.js +3 -3
- package/src/lib/utils/hooks/useHandleVerificationRequired/useHandleVerificationRequired.d.ts +4 -4
- package/src/lib/utils/hooks/usePasskeyRecovery/usePasskeyRecovery.cjs +8 -8
- package/src/lib/utils/hooks/usePasskeyRecovery/usePasskeyRecovery.js +3 -3
- package/src/lib/utils/hooks/useSendDynamicProps/useSendDynamicProps.cjs +9 -6
- package/src/lib/utils/hooks/useSendDynamicProps/useSendDynamicProps.js +4 -1
- package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.cjs +4 -4
- package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.js +3 -3
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.cjs +7 -7
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.js +3 -3
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs +4 -4
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js +3 -3
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.cjs +5 -5
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +3 -3
- package/src/lib/views/EmailUpdate/EmailUpdate.cjs +4 -4
- package/src/lib/views/EmailUpdate/EmailUpdate.js +3 -3
- package/src/lib/views/EmailVerification/EmailVerification.cjs +11 -11
- package/src/lib/views/EmailVerification/EmailVerification.js +3 -3
- package/src/lib/views/EmbeddedReveal/utils/turnkeyExport/turnkeyExport.cjs +4 -2
- package/src/lib/views/EmbeddedReveal/utils/turnkeyExport/turnkeyExport.js +3 -1
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/useSubmitPhoneNumber/useSubmitPhoneNumber.cjs +3 -3
- package/src/lib/views/LoginView/sections/PhoneNumberSignInSection/useSubmitPhoneNumber/useSubmitPhoneNumber.js +2 -2
- package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.cjs +7 -7
- package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.js +3 -3
- package/src/lib/views/Passkey/RenamePasskeyView/RenamePasskeyView.cjs +4 -4
- package/src/lib/views/Passkey/RenamePasskeyView/RenamePasskeyView.js +3 -3
- package/src/lib/views/Passkey/utils/createEmbeddedWalletWithPasskey/createEmbeddedWalletWithPasskey.cjs +4 -2
- package/src/lib/views/Passkey/utils/createEmbeddedWalletWithPasskey/createEmbeddedWalletWithPasskey.js +3 -1
- package/src/lib/views/Passkey/utils/createPregeneratedWallet/createPregeneratedWallet.cjs +4 -2
- package/src/lib/views/Passkey/utils/createPregeneratedWallet/createPregeneratedWallet.js +3 -1
- package/src/lib/views/Passkey/utils/passkeyRecovery/passkeyRecovery.cjs +11 -8
- package/src/lib/views/Passkey/utils/passkeyRecovery/passkeyRecovery.js +5 -2
- package/src/lib/views/SelectWalletInWalletGroupView/components/WalletGroupItem/index.d.ts +1 -0
- package/src/lib/views/SmsVerification/useSmsVerification/useSmsVerification.cjs +4 -4
- package/src/lib/views/SmsVerification/useSmsVerification/useSmsVerification.js +2 -2
- package/src/lib/views/WalletUsedView/WalletUsedView.cjs +4 -4
- package/src/lib/views/WalletUsedView/WalletUsedView.js +3 -3
- package/src/lib/widgets/DynamicWidget/views/WalletSettingsView/WalletSettingsView.cjs +6 -2
- package/src/lib/widgets/DynamicWidget/views/WalletSettingsView/WalletSettingsView.js +6 -2
- package/src/lib/data/api.cjs +0 -797
- package/src/lib/data/api.d.ts +0 -179
- package/src/lib/data/api.js +0 -753
package/CHANGELOG.md
CHANGED
package/package.cjs
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var version = "2.0.0-alpha.
|
|
5
|
+
var version = "2.0.0-alpha.32";
|
|
6
6
|
var dependencies = {
|
|
7
|
-
"@dynamic-labs/sdk-api-core": "0.0.
|
|
7
|
+
"@dynamic-labs/sdk-api-core": "0.0.418",
|
|
8
8
|
"@hcaptcha/react-hcaptcha": "1.4.4",
|
|
9
9
|
"country-list": "2.3.0",
|
|
10
10
|
formik: "2.2.9",
|
package/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/sdk-react-core",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.32",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/dynamic-labs/DynamicAuth.git",
|
|
7
7
|
"directory": "packages/sdk-react-core"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@dynamic-labs/sdk-api-core": "0.0.
|
|
10
|
+
"@dynamic-labs/sdk-api-core": "0.0.418",
|
|
11
11
|
"@hcaptcha/react-hcaptcha": "1.4.4",
|
|
12
12
|
"country-list": "2.3.0",
|
|
13
13
|
"formik": "2.2.9",
|
|
@@ -17,18 +17,18 @@
|
|
|
17
17
|
"react-i18next": "13.5.0",
|
|
18
18
|
"yup": "0.32.11",
|
|
19
19
|
"react-international-phone": "4.2.5",
|
|
20
|
-
"@dynamic-labs/ethereum": "2.0.0-alpha.
|
|
21
|
-
"@dynamic-labs/iconic": "2.0.0-alpha.
|
|
22
|
-
"@dynamic-labs/logger": "2.0.0-alpha.
|
|
23
|
-
"@dynamic-labs/multi-wallet": "2.0.0-alpha.
|
|
24
|
-
"@dynamic-labs/rpc-provider-ethereum": "2.0.0-alpha.
|
|
25
|
-
"@dynamic-labs/rpc-provider-solana": "2.0.0-alpha.
|
|
26
|
-
"@dynamic-labs/rpc-providers": "2.0.0-alpha.
|
|
27
|
-
"@dynamic-labs/types": "2.0.0-alpha.
|
|
28
|
-
"@dynamic-labs/utils": "2.0.0-alpha.
|
|
29
|
-
"@dynamic-labs/viem-utils": "2.0.0-alpha.
|
|
30
|
-
"@dynamic-labs/wallet-book": "2.0.0-alpha.
|
|
31
|
-
"@dynamic-labs/wallet-connector-core": "2.0.0-alpha.
|
|
20
|
+
"@dynamic-labs/ethereum": "2.0.0-alpha.32",
|
|
21
|
+
"@dynamic-labs/iconic": "2.0.0-alpha.32",
|
|
22
|
+
"@dynamic-labs/logger": "2.0.0-alpha.32",
|
|
23
|
+
"@dynamic-labs/multi-wallet": "2.0.0-alpha.32",
|
|
24
|
+
"@dynamic-labs/rpc-provider-ethereum": "2.0.0-alpha.32",
|
|
25
|
+
"@dynamic-labs/rpc-provider-solana": "2.0.0-alpha.32",
|
|
26
|
+
"@dynamic-labs/rpc-providers": "2.0.0-alpha.32",
|
|
27
|
+
"@dynamic-labs/types": "2.0.0-alpha.32",
|
|
28
|
+
"@dynamic-labs/utils": "2.0.0-alpha.32",
|
|
29
|
+
"@dynamic-labs/viem-utils": "2.0.0-alpha.32",
|
|
30
|
+
"@dynamic-labs/wallet-book": "2.0.0-alpha.32",
|
|
31
|
+
"@dynamic-labs/wallet-connector-core": "2.0.0-alpha.32",
|
|
32
32
|
"eventemitter3": "5.0.1"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
package/src/index.d.ts
CHANGED
|
@@ -56,7 +56,7 @@ LogoutIcon,
|
|
|
56
56
|
/** @deprecated */
|
|
57
57
|
PencilIcon,
|
|
58
58
|
/** @deprecated */
|
|
59
|
-
SpinnerIcon, type AccessDeniedCustomButton, type AccountSwitchState, type AuthModeType, type AwaitingSignatureState, type ChainToWalletMap, type DynamicEventsCallbacks, type DynamicHandlers, type DynamicRPCProviders, type MultiWalletWidgetState, type OnAuthSuccess, type HandleConnectedWallet, type OnWalletAdded, type OnWalletRemoved, type OnOtpVerificationResult, type OnEmbeddedWalletCreated, type OnUserProfileUpdate, type RecommendedWallet, type UserProfile, type Wallet, type WalletOption,
|
|
59
|
+
SpinnerIcon, type AccessDeniedCustomButton, type AccountSwitchState, type AuthModeType, type AwaitingSignatureState, type ChainToWalletMap, type DynamicEventsCallbacks, type DynamicHandlers, type DynamicRPCProviders, type MultiWalletWidgetState, type OnAuthSuccess, type HandleConnectedWallet, type OnWalletAdded, type OnWalletRemoved, type OnOtpVerificationResult, type OnEmbeddedWalletCreated, type OnUserProfileUpdate, type RecommendedWallet, type UserProfile, type Wallet, type WalletOption, type PhoneData, type OtpDestination,
|
|
60
60
|
/** @deprecated */
|
|
61
61
|
useLocalStorage,
|
|
62
62
|
/** @deprecated */
|
|
@@ -3,24 +3,39 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var _tslib = require('../../../../../_virtual/_tslib.cjs');
|
|
6
|
-
var
|
|
6
|
+
var email = require('../../../data/api/email/email.cjs');
|
|
7
|
+
require('@dynamic-labs/utils');
|
|
8
|
+
require('@dynamic-labs/sdk-api-core');
|
|
9
|
+
require('../../../shared/logger.cjs');
|
|
10
|
+
require('@dynamic-labs/iconic');
|
|
11
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
12
|
+
require('react/jsx-runtime');
|
|
13
|
+
require('../../ViewContext/ViewContext.cjs');
|
|
14
|
+
require('react');
|
|
15
|
+
require('@dynamic-labs/wallet-book');
|
|
16
|
+
require('../../../utils/constants/colors.cjs');
|
|
17
|
+
require('../../../utils/constants/values.cjs');
|
|
18
|
+
require('../../../shared/utils/classes/storage/localStorage.cjs');
|
|
19
|
+
require('../../../shared/consts/index.cjs');
|
|
20
|
+
require('../../../config/ApiEndpoint.cjs');
|
|
21
|
+
require('../../../locale/locale.cjs');
|
|
7
22
|
|
|
8
|
-
const createEmailHandler = (environmentId, createUserProfileByJWT) => (email) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
9
|
-
const { verificationUUID } = yield
|
|
10
|
-
email,
|
|
23
|
+
const createEmailHandler = (environmentId, createUserProfileByJWT) => (email$1) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
24
|
+
const { verificationUUID } = yield email.createEmailVerification({
|
|
25
|
+
email: email$1,
|
|
11
26
|
environmentId,
|
|
12
27
|
});
|
|
13
28
|
return {
|
|
14
29
|
type: 'email',
|
|
15
30
|
verify: (oneTimePassword) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
16
|
-
const response = yield
|
|
31
|
+
const response = yield email.signInWithEmailVerification({
|
|
17
32
|
environmentId,
|
|
18
33
|
verificationToken: oneTimePassword,
|
|
19
34
|
verificationUUID,
|
|
20
35
|
});
|
|
21
36
|
yield createUserProfileByJWT(response.jwt, response.minifiedJwt);
|
|
22
37
|
return {
|
|
23
|
-
destination: email,
|
|
38
|
+
destination: email$1,
|
|
24
39
|
verified: Boolean(response.jwt),
|
|
25
40
|
};
|
|
26
41
|
}),
|
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
import { __awaiter } from '../../../../../_virtual/_tslib.js';
|
|
2
|
-
import { createEmailVerification, signInWithEmailVerification } from '../../../data/api.js';
|
|
2
|
+
import { createEmailVerification, signInWithEmailVerification } from '../../../data/api/email/email.js';
|
|
3
|
+
import '@dynamic-labs/utils';
|
|
4
|
+
import '@dynamic-labs/sdk-api-core';
|
|
5
|
+
import '../../../shared/logger.js';
|
|
6
|
+
import '@dynamic-labs/iconic';
|
|
7
|
+
import '@dynamic-labs/wallet-connector-core';
|
|
8
|
+
import 'react/jsx-runtime';
|
|
9
|
+
import '../../ViewContext/ViewContext.js';
|
|
10
|
+
import 'react';
|
|
11
|
+
import '@dynamic-labs/wallet-book';
|
|
12
|
+
import '../../../utils/constants/colors.js';
|
|
13
|
+
import '../../../utils/constants/values.js';
|
|
14
|
+
import '../../../shared/utils/classes/storage/localStorage.js';
|
|
15
|
+
import '../../../shared/consts/index.js';
|
|
16
|
+
import '../../../config/ApiEndpoint.js';
|
|
17
|
+
import '../../../locale/locale.js';
|
|
3
18
|
|
|
4
19
|
const createEmailHandler = (environmentId, createUserProfileByJWT) => (email) => __awaiter(void 0, void 0, void 0, function* () {
|
|
5
20
|
const { verificationUUID } = yield createEmailVerification({
|
|
@@ -3,10 +3,24 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var _tslib = require('../../../../../_virtual/_tslib.cjs');
|
|
6
|
-
|
|
6
|
+
require('@dynamic-labs/utils');
|
|
7
|
+
require('@dynamic-labs/sdk-api-core');
|
|
8
|
+
require('../../../shared/logger.cjs');
|
|
9
|
+
require('@dynamic-labs/iconic');
|
|
10
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
11
|
+
require('react/jsx-runtime');
|
|
12
|
+
require('../../ViewContext/ViewContext.cjs');
|
|
13
|
+
require('react');
|
|
14
|
+
require('@dynamic-labs/wallet-book');
|
|
15
|
+
require('../../../utils/constants/colors.cjs');
|
|
16
|
+
require('../../../utils/constants/values.cjs');
|
|
17
|
+
require('../../../shared/utils/classes/storage/localStorage.cjs');
|
|
18
|
+
require('../../../shared/consts/index.cjs');
|
|
19
|
+
require('../../../config/ApiEndpoint.cjs');
|
|
20
|
+
var sms = require('../../../data/api/sms/sms.cjs');
|
|
7
21
|
|
|
8
22
|
const createSmsHandler = (environmentId, createUserProfileByJWT) => (phone) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
9
|
-
const { verificationUUID } = yield
|
|
23
|
+
const { verificationUUID } = yield sms.createSmsVerification({
|
|
10
24
|
environmentId,
|
|
11
25
|
isoCountryCode: phone.iso2,
|
|
12
26
|
phoneCountryCode: phone.dialCode,
|
|
@@ -15,7 +29,7 @@ const createSmsHandler = (environmentId, createUserProfileByJWT) => (phone) => _
|
|
|
15
29
|
return {
|
|
16
30
|
type: 'sms',
|
|
17
31
|
verify: (oneTimePassword) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
18
|
-
const response = yield
|
|
32
|
+
const response = yield sms.signInWithSmsVerification({
|
|
19
33
|
environmentId,
|
|
20
34
|
verificationToken: oneTimePassword,
|
|
21
35
|
verificationUUID,
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
import { __awaiter } from '../../../../../_virtual/_tslib.js';
|
|
2
|
-
import
|
|
2
|
+
import '@dynamic-labs/utils';
|
|
3
|
+
import '@dynamic-labs/sdk-api-core';
|
|
4
|
+
import '../../../shared/logger.js';
|
|
5
|
+
import '@dynamic-labs/iconic';
|
|
6
|
+
import '@dynamic-labs/wallet-connector-core';
|
|
7
|
+
import 'react/jsx-runtime';
|
|
8
|
+
import '../../ViewContext/ViewContext.js';
|
|
9
|
+
import 'react';
|
|
10
|
+
import '@dynamic-labs/wallet-book';
|
|
11
|
+
import '../../../utils/constants/colors.js';
|
|
12
|
+
import '../../../utils/constants/values.js';
|
|
13
|
+
import '../../../shared/utils/classes/storage/localStorage.js';
|
|
14
|
+
import '../../../shared/consts/index.js';
|
|
15
|
+
import '../../../config/ApiEndpoint.js';
|
|
16
|
+
import { createSmsVerification, signInWithSmsVerification } from '../../../data/api/sms/sms.js';
|
|
3
17
|
|
|
4
18
|
const createSmsHandler = (environmentId, createUserProfileByJWT) => (phone) => __awaiter(void 0, void 0, void 0, function* () {
|
|
5
19
|
const { verificationUUID } = yield createSmsVerification({
|
|
@@ -3,12 +3,27 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var _tslib = require('../../../../../_virtual/_tslib.cjs');
|
|
6
|
-
var
|
|
6
|
+
var email = require('../../../data/api/email/email.cjs');
|
|
7
|
+
require('@dynamic-labs/utils');
|
|
8
|
+
require('@dynamic-labs/sdk-api-core');
|
|
9
|
+
require('../../../shared/logger.cjs');
|
|
10
|
+
require('@dynamic-labs/iconic');
|
|
11
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
12
|
+
require('react/jsx-runtime');
|
|
13
|
+
require('../../ViewContext/ViewContext.cjs');
|
|
14
|
+
require('react');
|
|
15
|
+
require('@dynamic-labs/wallet-book');
|
|
16
|
+
require('../../../utils/constants/colors.cjs');
|
|
17
|
+
require('../../../utils/constants/values.cjs');
|
|
18
|
+
require('../../../shared/utils/classes/storage/localStorage.cjs');
|
|
19
|
+
require('../../../shared/consts/index.cjs');
|
|
20
|
+
require('../../../config/ApiEndpoint.cjs');
|
|
21
|
+
require('../../../locale/locale.cjs');
|
|
7
22
|
var constants = require('../constants.cjs');
|
|
8
23
|
|
|
9
|
-
const findEmailProvider = (environmentId, email) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
10
|
-
const { emailProvider } = yield
|
|
11
|
-
email,
|
|
24
|
+
const findEmailProvider = (environmentId, email$1) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
25
|
+
const { emailProvider } = yield email.getEmailProvider({
|
|
26
|
+
email: email$1,
|
|
12
27
|
environmentId,
|
|
13
28
|
});
|
|
14
29
|
if (!constants.allSupportedProviders.includes(emailProvider)) {
|
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
import { __awaiter } from '../../../../../_virtual/_tslib.js';
|
|
2
|
-
import { getEmailProvider } from '../../../data/api.js';
|
|
2
|
+
import { getEmailProvider } from '../../../data/api/email/email.js';
|
|
3
|
+
import '@dynamic-labs/utils';
|
|
4
|
+
import '@dynamic-labs/sdk-api-core';
|
|
5
|
+
import '../../../shared/logger.js';
|
|
6
|
+
import '@dynamic-labs/iconic';
|
|
7
|
+
import '@dynamic-labs/wallet-connector-core';
|
|
8
|
+
import 'react/jsx-runtime';
|
|
9
|
+
import '../../ViewContext/ViewContext.js';
|
|
10
|
+
import 'react';
|
|
11
|
+
import '@dynamic-labs/wallet-book';
|
|
12
|
+
import '../../../utils/constants/colors.js';
|
|
13
|
+
import '../../../utils/constants/values.js';
|
|
14
|
+
import '../../../shared/utils/classes/storage/localStorage.js';
|
|
15
|
+
import '../../../shared/consts/index.js';
|
|
16
|
+
import '../../../config/ApiEndpoint.js';
|
|
17
|
+
import '../../../locale/locale.js';
|
|
3
18
|
import { allSupportedProviders } from '../constants.js';
|
|
4
19
|
|
|
5
20
|
const findEmailProvider = (environmentId, email) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -31,7 +31,9 @@ var getMinAuthToken = require('../../utils/functions/getMinAuthToken/getMinAuthT
|
|
|
31
31
|
require('react-international-phone');
|
|
32
32
|
require('viem');
|
|
33
33
|
require('viem/chains');
|
|
34
|
-
var
|
|
34
|
+
var ApiEndpoint = require('../../config/ApiEndpoint.cjs');
|
|
35
|
+
var settings = require('../../data/api/settings/settings.cjs');
|
|
36
|
+
var locale = require('../../locale/locale.cjs');
|
|
35
37
|
var AccessDeniedContext = require('../AccessDeniedContext/AccessDeniedContext.cjs');
|
|
36
38
|
var AccountExistsContext = require('../AccountExistsContext/AccountExistsContext.cjs');
|
|
37
39
|
var UserWalletsContext = require('../UserWalletsContext/UserWalletsContext.cjs');
|
|
@@ -75,10 +77,8 @@ require('formik');
|
|
|
75
77
|
require('../../views/WalletList/WalletList.cjs');
|
|
76
78
|
var SocialRedirectContext = require('../SocialRedirectContext/SocialRedirectContext.cjs');
|
|
77
79
|
require('../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
78
|
-
var locale = require('../../locale/locale.cjs');
|
|
79
80
|
require('@hcaptcha/react-hcaptcha');
|
|
80
81
|
var LoadingContext = require('../LoadingContext/LoadingContext.cjs');
|
|
81
|
-
var ApiEndpoint = require('../../config/ApiEndpoint.cjs');
|
|
82
82
|
require('../FooterAnimationContext/index.cjs');
|
|
83
83
|
require('../../views/LoginView/sections/PhoneNumberSignInSection/PhoneNumberSignInSection.cjs');
|
|
84
84
|
var WalletGroupContext = require('../WalletGroupContext/WalletGroupContext.cjs');
|
|
@@ -127,21 +127,21 @@ const PUBLIC_PROJECT_LIVE_ENVIRONMENT_ID = '2762a57b-faa4-41ce-9f16-abff9300e2c9
|
|
|
127
127
|
const EMPTY_INITIAL_USER = undefined;
|
|
128
128
|
const DynamicContext = React.createContext(undefined);
|
|
129
129
|
/** The context provider itself we only use internally */
|
|
130
|
-
const InnerDynamicContextProvider = ({ children, theme, settings, locale: locale$1, }) => {
|
|
130
|
+
const InnerDynamicContextProvider = ({ children, theme, settings: settings$1, locale: locale$1, }) => {
|
|
131
131
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
132
|
-
const { accessDeniedMessagePrimary, accessDeniedMessageSecondary, accessDeniedButton, apiBaseUrl, enableConnectOnlyFallback = false, deepLinkPreference: deepLinkPreferenceProp = 'native', bridgeChains, cssOverrides, defaultNumberOfWalletsToShow = values.DEFAULT_NUMBER_OF_WALLETS_TO_SHOW, flowNetwork, initialAuthenticationMode = 'connect-and-sign', debugError = false, displaySiweStatement = true, newToWeb3WalletChainMap, enableVisitTrackingOnConnectOnly = true, environmentId, localStorageSuffix, walletsFilter, logLevel = 'WARN', mobileExperience = 'in-app-browser', notInTheListImageUrl, onboardingImageUrl, policiesConsentInnerComponent, customPrivacyPolicy, privacyPolicyUrl, signWithEmailWalletName, socialMediaLinkText, socialMediaIconUrl, socialMediaUrl, customTermsOfServices, termsOfServiceUrl, toolkitEnabled, siweStatement, shadowDOMEnabled = true, walletConnectors: walletConnectorsProp, socialProvidersFilter, showLockedWalletView = false, walletConnectPreferredChains, walletConnectorExtensions, recommendedWallets, hideEmbeddedWalletTransactionUIs, handlers, } = settings;
|
|
132
|
+
const { accessDeniedMessagePrimary, accessDeniedMessageSecondary, accessDeniedButton, apiBaseUrl, enableConnectOnlyFallback = false, deepLinkPreference: deepLinkPreferenceProp = 'native', bridgeChains, cssOverrides, defaultNumberOfWalletsToShow = values.DEFAULT_NUMBER_OF_WALLETS_TO_SHOW, flowNetwork, initialAuthenticationMode = 'connect-and-sign', debugError = false, displaySiweStatement = true, newToWeb3WalletChainMap, enableVisitTrackingOnConnectOnly = true, environmentId, localStorageSuffix, walletsFilter, logLevel = 'WARN', mobileExperience = 'in-app-browser', notInTheListImageUrl, onboardingImageUrl, policiesConsentInnerComponent, customPrivacyPolicy, privacyPolicyUrl, signWithEmailWalletName, socialMediaLinkText, socialMediaIconUrl, socialMediaUrl, customTermsOfServices, termsOfServiceUrl, toolkitEnabled, siweStatement, shadowDOMEnabled = true, walletConnectors: walletConnectorsProp, socialProvidersFilter, showLockedWalletView = false, walletConnectPreferredChains, walletConnectorExtensions, recommendedWallets, hideEmbeddedWalletTransactionUIs, handlers, } = settings$1;
|
|
133
133
|
/**
|
|
134
134
|
* For backwards compatibility, we allow the client to pass in
|
|
135
135
|
* `eventsCallbacks` instead of `events`. It should remove this
|
|
136
136
|
* in version 3.0.0.
|
|
137
137
|
* ticket: QNTM-1504
|
|
138
138
|
*/
|
|
139
|
-
const events = (_a = settings.events) !== null && _a !== void 0 ? _a : settings.eventsCallbacks;
|
|
139
|
+
const events = (_a = settings$1.events) !== null && _a !== void 0 ? _a : settings$1.eventsCallbacks;
|
|
140
140
|
const networkValidationMode = helpers.resolveNetworkValidationMode({
|
|
141
|
-
bridgeChains: settings.bridgeChains,
|
|
142
|
-
networkValidationMode: settings.networkValidationMode,
|
|
141
|
+
bridgeChains: settings$1.bridgeChains,
|
|
142
|
+
networkValidationMode: settings$1.networkValidationMode,
|
|
143
143
|
});
|
|
144
|
-
let { appLogoUrl = 'https://demo.dynamic.xyz/assets/dynamic-logo.svg', appName = 'Dynamic Example', } = settings;
|
|
144
|
+
let { appLogoUrl = 'https://demo.dynamic.xyz/assets/dynamic-logo.svg', appName = 'Dynamic Example', } = settings$1;
|
|
145
145
|
if (!environmentId) {
|
|
146
146
|
throw new utils.MissingEnvironmentIdError();
|
|
147
147
|
}
|
|
@@ -174,10 +174,10 @@ const InnerDynamicContextProvider = ({ children, theme, settings, locale: locale
|
|
|
174
174
|
authToken: getAuthToken.getAuthToken(),
|
|
175
175
|
environmentId,
|
|
176
176
|
});
|
|
177
|
-
useSendDynamicProps.useSendDynamicProps({ environmentId, settings });
|
|
177
|
+
useSendDynamicProps.useSendDynamicProps({ environmentId, settings: settings$1 });
|
|
178
178
|
const multiWallet = useMultiWallet.useMultiWallet({
|
|
179
179
|
isBridgeFlow,
|
|
180
|
-
multiWalletOverride: (_c = settings.overrides) === null || _c === void 0 ? void 0 : _c.multiWallet,
|
|
180
|
+
multiWalletOverride: (_c = settings$1.overrides) === null || _c === void 0 ? void 0 : _c.multiWallet,
|
|
181
181
|
multiWalletSettings: (_d = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _d === void 0 ? void 0 : _d.multiWallet,
|
|
182
182
|
});
|
|
183
183
|
// ensures that when user comes back to site and primary wallet is out of sync, we don't show widget popup
|
|
@@ -188,7 +188,7 @@ const InnerDynamicContextProvider = ({ children, theme, settings, locale: locale
|
|
|
188
188
|
const { networkConfigurations: serverNetworkConfigurations, handleRemoveLsNetworks, } = useProcessNetworkConfigurations.useProcessNetworkConfigurations({
|
|
189
189
|
authToken: getAuthToken.getAuthToken(),
|
|
190
190
|
environmentId,
|
|
191
|
-
evmNetworksOverrides: (_e = settings.overrides) === null || _e === void 0 ? void 0 : _e.evmNetworks,
|
|
191
|
+
evmNetworksOverrides: (_e = settings$1.overrides) === null || _e === void 0 ? void 0 : _e.evmNetworks,
|
|
192
192
|
projectSettings,
|
|
193
193
|
});
|
|
194
194
|
const { imageUserInAccessList, imageUserNotInAccessList, displayName, appLogo, } = (projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general) || {};
|
|
@@ -365,10 +365,10 @@ const InnerDynamicContextProvider = ({ children, theme, settings, locale: locale
|
|
|
365
365
|
setHasLoggedOut,
|
|
366
366
|
user,
|
|
367
367
|
});
|
|
368
|
-
const sendWagmiSettings = React.useCallback(() => (settings) => {
|
|
369
|
-
const { dynamicWagmiSettings } = settings;
|
|
368
|
+
const sendWagmiSettings = React.useCallback(() => (settings$1) => {
|
|
369
|
+
const { dynamicWagmiSettings } = settings$1;
|
|
370
370
|
if (dynamicWagmiSettings) {
|
|
371
|
-
|
|
371
|
+
settings.sendDynamicProps(environmentId, {
|
|
372
372
|
dynamicWagmiSettings: { dynamicWagmiSettings },
|
|
373
373
|
});
|
|
374
374
|
}
|
|
@@ -465,7 +465,7 @@ const InnerDynamicContextProvider = ({ children, theme, settings, locale: locale
|
|
|
465
465
|
notInTheListImageUrl: imageUserNotInAccessList || notInTheListImageUrl,
|
|
466
466
|
onboardingImageUrl: imageUserInAccessList || onboardingImageUrl,
|
|
467
467
|
onboardingOnlyJwt,
|
|
468
|
-
overrides: settings.overrides,
|
|
468
|
+
overrides: settings$1.overrides,
|
|
469
469
|
passkeySuccessPopup,
|
|
470
470
|
policiesConsentInnerComponent,
|
|
471
471
|
primaryWallet,
|
|
@@ -580,7 +580,7 @@ const InnerDynamicContextProvider = ({ children, theme, settings, locale: locale
|
|
|
580
580
|
notInTheListImageUrl,
|
|
581
581
|
imageUserInAccessList,
|
|
582
582
|
onboardingImageUrl,
|
|
583
|
-
settings.overrides,
|
|
583
|
+
settings$1.overrides,
|
|
584
584
|
passkeySuccessPopup,
|
|
585
585
|
policiesConsentInnerComponent,
|
|
586
586
|
primaryWallet,
|
|
@@ -27,7 +27,9 @@ import { getMinAuthToken } from '../../utils/functions/getMinAuthToken/getMinAut
|
|
|
27
27
|
import 'react-international-phone';
|
|
28
28
|
import 'viem';
|
|
29
29
|
import 'viem/chains';
|
|
30
|
-
import
|
|
30
|
+
import ApiEndpoint from '../../config/ApiEndpoint.js';
|
|
31
|
+
import { sendDynamicProps } from '../../data/api/settings/settings.js';
|
|
32
|
+
import { Locale } from '../../locale/locale.js';
|
|
31
33
|
import { AccessDeniedContextProvider } from '../AccessDeniedContext/AccessDeniedContext.js';
|
|
32
34
|
import { AccountExistsContextProvider } from '../AccountExistsContext/AccountExistsContext.js';
|
|
33
35
|
import { UserWalletsProvider } from '../UserWalletsContext/UserWalletsContext.js';
|
|
@@ -71,10 +73,8 @@ import 'formik';
|
|
|
71
73
|
import '../../views/WalletList/WalletList.js';
|
|
72
74
|
import { SocialRedirectContextProvider } from '../SocialRedirectContext/SocialRedirectContext.js';
|
|
73
75
|
import '../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
74
|
-
import { Locale } from '../../locale/locale.js';
|
|
75
76
|
import '@hcaptcha/react-hcaptcha';
|
|
76
77
|
import { LoadingContextProvider } from '../LoadingContext/LoadingContext.js';
|
|
77
|
-
import ApiEndpoint from '../../config/ApiEndpoint.js';
|
|
78
78
|
import '../FooterAnimationContext/index.js';
|
|
79
79
|
import '../../views/LoginView/sections/PhoneNumberSignInSection/PhoneNumberSignInSection.js';
|
|
80
80
|
import { WalletGroupContextProvider } from '../WalletGroupContext/WalletGroupContext.js';
|
|
@@ -4,8 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var _tslib = require('../../../../../../_virtual/_tslib.cjs');
|
|
6
6
|
var React = require('react');
|
|
7
|
-
|
|
8
|
-
var dynamicEvents = require('../../../../events/dynamicEvents.cjs');
|
|
7
|
+
require('@dynamic-labs/utils');
|
|
9
8
|
require('@dynamic-labs/sdk-api-core');
|
|
10
9
|
require('../../../../shared/logger.cjs');
|
|
11
10
|
require('@dynamic-labs/iconic');
|
|
@@ -17,8 +16,11 @@ var localStorage$1 = require('../../../../utils/constants/localStorage.cjs');
|
|
|
17
16
|
require('../../../../utils/constants/colors.cjs');
|
|
18
17
|
require('../../../../utils/constants/values.cjs');
|
|
19
18
|
var localStorage = require('../../../../shared/utils/classes/storage/localStorage.cjs');
|
|
20
|
-
require('@dynamic-labs/utils');
|
|
21
19
|
require('../../../../shared/consts/index.cjs');
|
|
20
|
+
require('../../../../config/ApiEndpoint.cjs');
|
|
21
|
+
var session = require('../../../../data/api/session/session.cjs');
|
|
22
|
+
require('../../../../locale/locale.cjs');
|
|
23
|
+
var dynamicEvents = require('../../../../events/dynamicEvents.cjs');
|
|
22
24
|
require('@dynamic-labs/multi-wallet');
|
|
23
25
|
var getMinAuthToken = require('../../../../utils/functions/getMinAuthToken/getMinAuthToken.cjs');
|
|
24
26
|
require('react-international-phone');
|
|
@@ -63,10 +65,8 @@ require('formik');
|
|
|
63
65
|
require('../../../../views/WalletList/WalletList.cjs');
|
|
64
66
|
require('../../../SocialRedirectContext/SocialRedirectContext.cjs');
|
|
65
67
|
require('../../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
66
|
-
require('../../../../locale/locale.cjs');
|
|
67
68
|
require('@hcaptcha/react-hcaptcha');
|
|
68
69
|
require('../../../LoadingContext/LoadingContext.cjs');
|
|
69
|
-
require('../../../../config/ApiEndpoint.cjs');
|
|
70
70
|
require('../../../FooterAnimationContext/index.cjs');
|
|
71
71
|
require('../../../../views/LoginView/sections/PhoneNumberSignInSection/PhoneNumberSignInSection.cjs');
|
|
72
72
|
require('../../../WalletGroupContext/WalletGroupContext.cjs');
|
|
@@ -89,7 +89,7 @@ const useHandleLogout = (params) => {
|
|
|
89
89
|
const jwt = getMinAuthToken.getMinAuthToken();
|
|
90
90
|
if (jwt && p.user) {
|
|
91
91
|
// do not await this async call - just fire and forget
|
|
92
|
-
|
|
92
|
+
session.revokeSession({ environmentId: p.environmentId, sessionId: p.user.sessionId }, jwt);
|
|
93
93
|
}
|
|
94
94
|
p.setLegacyIsVerifying(false);
|
|
95
95
|
localStorage.LocalStorage.removeFromLS(localStorage$1.AUTH_TOKEN);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { __awaiter } from '../../../../../../_virtual/_tslib.js';
|
|
2
2
|
import { useRef, useCallback } from 'react';
|
|
3
|
-
import
|
|
4
|
-
import { dynamicEvents } from '../../../../events/dynamicEvents.js';
|
|
3
|
+
import '@dynamic-labs/utils';
|
|
5
4
|
import '@dynamic-labs/sdk-api-core';
|
|
6
5
|
import '../../../../shared/logger.js';
|
|
7
6
|
import '@dynamic-labs/iconic';
|
|
@@ -13,8 +12,11 @@ import { WALLET_PICKER_SEARCH_KEY, AUTH_TOKEN, AUTH_MIN_TOKEN } from '../../../.
|
|
|
13
12
|
import '../../../../utils/constants/colors.js';
|
|
14
13
|
import '../../../../utils/constants/values.js';
|
|
15
14
|
import { LocalStorage } from '../../../../shared/utils/classes/storage/localStorage.js';
|
|
16
|
-
import '@dynamic-labs/utils';
|
|
17
15
|
import '../../../../shared/consts/index.js';
|
|
16
|
+
import '../../../../config/ApiEndpoint.js';
|
|
17
|
+
import { revokeSession } from '../../../../data/api/session/session.js';
|
|
18
|
+
import '../../../../locale/locale.js';
|
|
19
|
+
import { dynamicEvents } from '../../../../events/dynamicEvents.js';
|
|
18
20
|
import '@dynamic-labs/multi-wallet';
|
|
19
21
|
import { getMinAuthToken } from '../../../../utils/functions/getMinAuthToken/getMinAuthToken.js';
|
|
20
22
|
import 'react-international-phone';
|
|
@@ -59,10 +61,8 @@ import 'formik';
|
|
|
59
61
|
import '../../../../views/WalletList/WalletList.js';
|
|
60
62
|
import '../../../SocialRedirectContext/SocialRedirectContext.js';
|
|
61
63
|
import '../../../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
62
|
-
import '../../../../locale/locale.js';
|
|
63
64
|
import '@hcaptcha/react-hcaptcha';
|
|
64
65
|
import '../../../LoadingContext/LoadingContext.js';
|
|
65
|
-
import '../../../../config/ApiEndpoint.js';
|
|
66
66
|
import '../../../FooterAnimationContext/index.js';
|
|
67
67
|
import '../../../../views/LoginView/sections/PhoneNumberSignInSection/PhoneNumberSignInSection.js';
|
|
68
68
|
import '../../../WalletGroupContext/WalletGroupContext.js';
|
|
@@ -7,8 +7,7 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
|
|
9
9
|
var sdkApiCore = require('@dynamic-labs/sdk-api-core');
|
|
10
|
-
|
|
11
|
-
require('../DynamicContext/DynamicContext.cjs');
|
|
10
|
+
require('@dynamic-labs/utils');
|
|
12
11
|
require('../../shared/logger.cjs');
|
|
13
12
|
require('@dynamic-labs/iconic');
|
|
14
13
|
require('../ViewContext/ViewContext.cjs');
|
|
@@ -16,8 +15,11 @@ require('@dynamic-labs/wallet-book');
|
|
|
16
15
|
require('../../utils/constants/colors.cjs');
|
|
17
16
|
require('../../utils/constants/values.cjs');
|
|
18
17
|
require('../../shared/utils/classes/storage/localStorage.cjs');
|
|
19
|
-
require('@dynamic-labs/utils');
|
|
20
18
|
require('../../shared/consts/index.cjs');
|
|
19
|
+
require('../../config/ApiEndpoint.cjs');
|
|
20
|
+
var onramp = require('../../data/api/onramp/onramp.cjs');
|
|
21
|
+
require('../../locale/locale.cjs');
|
|
22
|
+
require('../DynamicContext/DynamicContext.cjs');
|
|
21
23
|
require('../../events/dynamicEvents.cjs');
|
|
22
24
|
require('../CaptchaContext/CaptchaContext.cjs');
|
|
23
25
|
require('../ErrorContext/ErrorContext.cjs');
|
|
@@ -62,10 +64,8 @@ require('formik');
|
|
|
62
64
|
require('../../views/WalletList/WalletList.cjs');
|
|
63
65
|
require('../SocialRedirectContext/SocialRedirectContext.cjs');
|
|
64
66
|
require('../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
65
|
-
require('../../locale/locale.cjs');
|
|
66
67
|
require('@hcaptcha/react-hcaptcha');
|
|
67
68
|
require('../LoadingContext/LoadingContext.cjs');
|
|
68
|
-
require('../../config/ApiEndpoint.cjs');
|
|
69
69
|
require('../FooterAnimationContext/index.cjs');
|
|
70
70
|
require('../../views/LoginView/sections/PhoneNumberSignInSection/PhoneNumberSignInSection.cjs');
|
|
71
71
|
require('../WalletGroupContext/WalletGroupContext.cjs');
|
|
@@ -98,7 +98,7 @@ const FundingContextProvider = ({ children, }) => {
|
|
|
98
98
|
getWalletAdditionalAddressByType.getWalletAdditionalAddressByType(sdkApiCore.WalletAddressType.Payment, primaryWallet);
|
|
99
99
|
const chainHasNetwork = network && chainName === 'evm';
|
|
100
100
|
try {
|
|
101
|
-
const [{ url }] = yield
|
|
101
|
+
const [{ url }] = yield onramp.getOnrampProviders({
|
|
102
102
|
chain: chainName,
|
|
103
103
|
environmentId,
|
|
104
104
|
networkId: chainHasNetwork ? network.toString() : undefined,
|
|
@@ -3,8 +3,7 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import { createContext, useContext, useRef, useState, useCallback, useMemo, useEffect } from 'react';
|
|
4
4
|
import { getChainInfo, isBitcoinConnector } from '@dynamic-labs/wallet-connector-core';
|
|
5
5
|
import { WalletAddressType } from '@dynamic-labs/sdk-api-core';
|
|
6
|
-
import
|
|
7
|
-
import '../DynamicContext/DynamicContext.js';
|
|
6
|
+
import '@dynamic-labs/utils';
|
|
8
7
|
import '../../shared/logger.js';
|
|
9
8
|
import '@dynamic-labs/iconic';
|
|
10
9
|
import '../ViewContext/ViewContext.js';
|
|
@@ -12,8 +11,11 @@ import '@dynamic-labs/wallet-book';
|
|
|
12
11
|
import '../../utils/constants/colors.js';
|
|
13
12
|
import '../../utils/constants/values.js';
|
|
14
13
|
import '../../shared/utils/classes/storage/localStorage.js';
|
|
15
|
-
import '@dynamic-labs/utils';
|
|
16
14
|
import '../../shared/consts/index.js';
|
|
15
|
+
import '../../config/ApiEndpoint.js';
|
|
16
|
+
import { getOnrampProviders } from '../../data/api/onramp/onramp.js';
|
|
17
|
+
import '../../locale/locale.js';
|
|
18
|
+
import '../DynamicContext/DynamicContext.js';
|
|
17
19
|
import '../../events/dynamicEvents.js';
|
|
18
20
|
import '../CaptchaContext/CaptchaContext.js';
|
|
19
21
|
import '../ErrorContext/ErrorContext.js';
|
|
@@ -58,10 +60,8 @@ import 'formik';
|
|
|
58
60
|
import '../../views/WalletList/WalletList.js';
|
|
59
61
|
import '../SocialRedirectContext/SocialRedirectContext.js';
|
|
60
62
|
import '../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
61
|
-
import '../../locale/locale.js';
|
|
62
63
|
import '@hcaptcha/react-hcaptcha';
|
|
63
64
|
import '../LoadingContext/LoadingContext.js';
|
|
64
|
-
import '../../config/ApiEndpoint.js';
|
|
65
65
|
import '../FooterAnimationContext/index.js';
|
|
66
66
|
import '../../views/LoginView/sections/PhoneNumberSignInSection/PhoneNumberSignInSection.js';
|
|
67
67
|
import '../WalletGroupContext/WalletGroupContext.js';
|
|
@@ -28,7 +28,9 @@ var getMinAuthToken = require('../../utils/functions/getMinAuthToken/getMinAuthT
|
|
|
28
28
|
require('react-international-phone');
|
|
29
29
|
require('viem');
|
|
30
30
|
require('viem/chains');
|
|
31
|
-
|
|
31
|
+
require('../../config/ApiEndpoint.cjs');
|
|
32
|
+
var embeddedWallets = require('../../data/api/embeddedWallets/embeddedWallets.cjs');
|
|
33
|
+
require('../../locale/locale.cjs');
|
|
32
34
|
require('../AccessDeniedContext/AccessDeniedContext.cjs');
|
|
33
35
|
require('../AccountExistsContext/AccountExistsContext.cjs');
|
|
34
36
|
require('../UserWalletsContext/UserWalletsContext.cjs');
|
|
@@ -67,10 +69,8 @@ require('formik');
|
|
|
67
69
|
require('../../views/WalletList/WalletList.cjs');
|
|
68
70
|
require('../SocialRedirectContext/SocialRedirectContext.cjs');
|
|
69
71
|
require('../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
|
|
70
|
-
require('../../locale/locale.cjs');
|
|
71
72
|
require('@hcaptcha/react-hcaptcha');
|
|
72
73
|
require('../LoadingContext/LoadingContext.cjs');
|
|
73
|
-
require('../../config/ApiEndpoint.cjs');
|
|
74
74
|
require('../FooterAnimationContext/index.cjs');
|
|
75
75
|
require('../../views/LoginView/sections/PhoneNumberSignInSection/PhoneNumberSignInSection.cjs');
|
|
76
76
|
require('../WalletGroupContext/WalletGroupContext.cjs');
|
|
@@ -119,7 +119,7 @@ const PasskeyContextProviderWithBrowser = ({ children, }) => {
|
|
|
119
119
|
const userJwt = getMinAuthToken.getMinAuthToken();
|
|
120
120
|
// It fetches user passkeys if user has embedded wallet
|
|
121
121
|
const getUserPasskeysResult = usePromise.usePromise(() => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
122
|
-
const data = yield
|
|
122
|
+
const data = yield embeddedWallets.getUserPasskeys({
|
|
123
123
|
environmentId: environmentId,
|
|
124
124
|
userJwt: userJwt,
|
|
125
125
|
});
|
|
@@ -24,7 +24,9 @@ import { getMinAuthToken } from '../../utils/functions/getMinAuthToken/getMinAut
|
|
|
24
24
|
import 'react-international-phone';
|
|
25
25
|
import 'viem';
|
|
26
26
|
import 'viem/chains';
|
|
27
|
-
import
|
|
27
|
+
import '../../config/ApiEndpoint.js';
|
|
28
|
+
import { getUserPasskeys } from '../../data/api/embeddedWallets/embeddedWallets.js';
|
|
29
|
+
import '../../locale/locale.js';
|
|
28
30
|
import '../AccessDeniedContext/AccessDeniedContext.js';
|
|
29
31
|
import '../AccountExistsContext/AccountExistsContext.js';
|
|
30
32
|
import '../UserWalletsContext/UserWalletsContext.js';
|
|
@@ -63,10 +65,8 @@ import 'formik';
|
|
|
63
65
|
import '../../views/WalletList/WalletList.js';
|
|
64
66
|
import '../SocialRedirectContext/SocialRedirectContext.js';
|
|
65
67
|
import '../../widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
|
|
66
|
-
import '../../locale/locale.js';
|
|
67
68
|
import '@hcaptcha/react-hcaptcha';
|
|
68
69
|
import '../LoadingContext/LoadingContext.js';
|
|
69
|
-
import '../../config/ApiEndpoint.js';
|
|
70
70
|
import '../FooterAnimationContext/index.js';
|
|
71
71
|
import '../../views/LoginView/sections/PhoneNumberSignInSection/PhoneNumberSignInSection.js';
|
|
72
72
|
import '../WalletGroupContext/WalletGroupContext.js';
|