@dynamic-labs/sdk-react-core 0.19.0-alpha.7 → 0.19.0-alpha.9
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 +53 -0
- package/package.cjs +3 -3
- package/package.js +3 -3
- package/package.json +10 -10
- package/src/index.cjs +14 -5
- package/src/index.d.ts +2 -2
- package/src/index.js +8 -3
- package/src/lib/Main.cjs +3 -1
- package/src/lib/Main.js +3 -1
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.cjs +3 -3
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.js +3 -3
- package/src/lib/components/Divider/Divider.cjs +1 -1
- package/src/lib/components/Divider/Divider.js +1 -1
- package/src/lib/components/IconWithSpinner/IconWithSpinner.cjs +1 -0
- package/src/lib/components/IconWithSpinner/IconWithSpinner.js +1 -0
- package/src/lib/components/IconWithSpinner/Indicator/Indicator.cjs +1 -0
- package/src/lib/components/IconWithSpinner/Indicator/Indicator.js +1 -0
- package/src/lib/components/IconWithSpinner/Spinner/Spinner.cjs +1 -0
- package/src/lib/components/IconWithSpinner/Spinner/Spinner.js +1 -0
- package/src/lib/components/IconWithStatus/IconWithStatus.cjs +4 -3
- package/src/lib/components/IconWithStatus/IconWithStatus.d.ts +2 -2
- package/src/lib/components/IconWithStatus/IconWithStatus.js +4 -3
- package/src/lib/components/MockedQrCode/MockedQrCode.cjs +1 -1
- package/src/lib/components/MockedQrCode/MockedQrCode.js +1 -1
- package/src/lib/components/NetworkPicker/NetworkPicker.cjs +1 -1
- package/src/lib/components/NetworkPicker/NetworkPicker.js +1 -1
- package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.cjs +1 -1
- package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.js +1 -1
- package/src/lib/components/NetworkPicker/components/Network/Network.cjs +1 -1
- package/src/lib/components/NetworkPicker/components/Network/Network.js +1 -1
- package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.cjs +1 -1
- package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.js +1 -1
- package/src/lib/components/OTPVerificationView/OTPVerificationView.cjs +1 -1
- package/src/lib/components/OTPVerificationView/OTPVerificationView.js +1 -1
- package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.cjs +2 -2
- package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.d.ts +1 -1
- package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.js +2 -2
- package/src/lib/components/SignMessagePreview/SignMessagePreview.cjs +27 -0
- package/src/lib/components/SignMessagePreview/SignMessagePreview.d.ts +6 -0
- package/src/lib/components/SignMessagePreview/SignMessagePreview.js +23 -0
- package/src/lib/components/SignMessagePreview/SignMessagePreview.types.d.ts +8 -0
- package/src/lib/components/SignMessagePreview/components/SignTypedDataPreview/SignTypedDataPreview.cjs +44 -0
- package/src/lib/components/SignMessagePreview/components/SignTypedDataPreview/SignTypedDataPreview.d.ts +8 -0
- package/src/lib/components/SignMessagePreview/components/SignTypedDataPreview/SignTypedDataPreview.js +40 -0
- package/src/lib/components/SignMessagePreview/components/SignTypedDataPreview/index.d.ts +1 -0
- package/src/lib/components/SignMessagePreview/components/index.d.ts +1 -0
- package/src/lib/components/SignMessagePreview/index.d.ts +1 -0
- package/src/lib/components/SignMessagePreview/utils/index.d.ts +1 -0
- package/src/lib/components/SignMessagePreview/utils/isSignTypedData/index.d.ts +1 -0
- package/src/lib/components/SignMessagePreview/utils/isSignTypedData/isSignTypedData.cjs +17 -0
- package/src/lib/components/SignMessagePreview/utils/isSignTypedData/isSignTypedData.d.ts +2 -0
- package/src/lib/components/SignMessagePreview/utils/isSignTypedData/isSignTypedData.js +13 -0
- package/src/lib/components/SocialSignIn/SocialSignIn.cjs +26 -14
- package/src/lib/components/SocialSignIn/SocialSignIn.d.ts +8 -7
- package/src/lib/components/SocialSignIn/SocialSignIn.js +26 -14
- package/src/lib/components/Toolkit/Toolkit.cjs +2 -1
- package/src/lib/components/Toolkit/Toolkit.js +2 -1
- package/src/lib/components/Toolkit/components/MultiWalletSwitch.cjs +1 -1
- package/src/lib/components/Toolkit/components/MultiWalletSwitch.d.ts +1 -2
- package/src/lib/components/Toolkit/components/MultiWalletSwitch.js +1 -1
- package/src/lib/components/TransactionOriginDestination/TransactionOriginDestination.d.ts +1 -1
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.cjs +1 -1
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.js +1 -1
- package/src/lib/components/UserAvatar/UserAvatar.cjs +22 -0
- package/src/lib/components/UserAvatar/UserAvatar.d.ts +7 -0
- package/src/lib/components/UserAvatar/UserAvatar.js +18 -0
- package/src/lib/components/UserProfile/UserProfile.cjs +12 -2
- package/src/lib/components/UserProfile/UserProfile.js +12 -2
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.cjs +1 -1
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.js +1 -1
- package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.cjs +1 -1
- package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.js +1 -1
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs +16 -14
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js +16 -14
- package/src/lib/components/UserProfileForm/UserProfileForm.cjs +1 -0
- package/src/lib/components/UserProfileForm/UserProfileForm.js +1 -0
- package/src/lib/components/index.d.ts +1 -0
- package/src/lib/context/DynamicContext/DynamicContext.cjs +2 -3
- package/src/lib/context/DynamicContext/DynamicContext.js +2 -3
- package/src/lib/context/DynamicContext/helpers.cjs +22 -10
- package/src/lib/context/DynamicContext/helpers.d.ts +4 -2
- package/src/lib/context/DynamicContext/helpers.js +20 -10
- package/src/lib/context/DynamicContext/hooks/useEmailLoginState/useEmailLoginState.cjs +1 -0
- package/src/lib/context/DynamicContext/hooks/useEmailLoginState/useEmailLoginState.js +1 -0
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerCallbacks.cjs +1 -0
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerCallbacks.js +1 -0
- package/src/lib/context/ErrorContext/ErrorContext.cjs +4 -1
- package/src/lib/context/ErrorContext/ErrorContext.js +4 -1
- package/src/lib/context/FundingContext/FundingContext.cjs +1 -0
- package/src/lib/context/FundingContext/FundingContext.js +1 -0
- package/src/lib/context/MockContext/MockContext.cjs +1 -1
- package/src/lib/context/MockContext/MockContext.js +1 -1
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.cjs +7 -4
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.d.ts +5 -5
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +7 -4
- package/src/lib/context/ViewContext/ViewContext.cjs +4 -19
- package/src/lib/context/ViewContext/ViewContext.d.ts +1 -1
- package/src/lib/context/ViewContext/ViewContext.js +5 -20
- package/src/lib/context/WalletContext/WalletContext.cjs +1 -1
- package/src/lib/context/WalletContext/WalletContext.js +1 -1
- package/src/lib/data/api.cjs +67 -29
- package/src/lib/data/api.d.ts +6 -3
- package/src/lib/data/api.js +68 -31
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.cjs +5 -2
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.js +5 -2
- package/src/lib/layout/DynamicAuthLayout/Header/header.cjs +1 -1
- package/src/lib/layout/DynamicAuthLayout/Header/header.js +1 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpContent.cjs +5 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpContent.js +5 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.cjs +4 -3
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.js +4 -3
- package/src/lib/layout/DynamicAuthLayout/HelpContent/PasskeyInfoHelper/PasskeyInfoHelper.cjs +61 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/PasskeyInfoHelper/PasskeyInfoHelper.d.ts +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/PasskeyInfoHelper/PasskeyInfoHelper.js +57 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/PasskeyInfoHelper/index.d.ts +1 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/Item/Item.cjs +1 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/Item/Item.js +1 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.cjs +1 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.js +1 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletListHelpContent.cjs +3 -3
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletListHelpContent.js +3 -3
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletMoreInfoContent/WalletMoreInfoContent.cjs +1 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletMoreInfoContent/WalletMoreInfoContent.js +1 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/index.d.ts +1 -0
- package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.cjs +1 -1
- package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.js +1 -1
- package/src/lib/layout/DynamicAuthLayout/WalletProgressStepper/WalletProgressStepper.cjs +1 -1
- package/src/lib/layout/DynamicAuthLayout/WalletProgressStepper/WalletProgressStepper.js +1 -1
- package/src/lib/layouts/BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.cjs +1 -1
- package/src/lib/layouts/BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.js +1 -1
- package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.cjs +1 -1
- package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.js +1 -1
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.cjs +1 -1
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.js +1 -1
- package/src/lib/locale/en/translation.cjs +43 -5
- package/src/lib/locale/en/translation.js +41 -6
- package/src/lib/locale/locale.cjs +17 -4
- package/src/lib/locale/locale.d.ts +1 -0
- package/src/lib/locale/locale.js +17 -4
- package/src/lib/modals/SendBalanceModal/SendBalanceModal.cjs +1 -1
- package/src/lib/modals/SendBalanceModal/SendBalanceModal.js +1 -1
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.cjs +3 -2
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js +3 -2
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.cjs +1 -1
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.js +1 -1
- package/src/lib/modals/UserFieldEditorModal/UserFieldEditorModal.cjs +1 -1
- package/src/lib/modals/UserFieldEditorModal/UserFieldEditorModal.js +1 -1
- package/src/lib/shared/assets/android-face-id.cjs +61 -0
- package/src/lib/shared/assets/android-face-id.js +37 -0
- package/src/lib/shared/assets/index.d.ts +6 -0
- package/src/lib/shared/assets/iphone-face-id.cjs +53 -0
- package/src/lib/shared/assets/iphone-face-id.js +29 -0
- package/src/lib/shared/assets/iphone-touch-id.cjs +72 -0
- package/src/lib/shared/assets/iphone-touch-id.js +48 -0
- package/src/lib/shared/assets/passkey-intro-icon.cjs +97 -0
- package/src/lib/shared/assets/passkey-intro-icon.js +73 -0
- package/src/lib/shared/assets/passkey-success-icon.cjs +94 -0
- package/src/lib/shared/assets/passkey-success-icon.js +70 -0
- package/src/lib/shared/assets/user-account-2.cjs +53 -0
- package/src/lib/shared/assets/user-account-2.js +29 -0
- package/src/lib/shared/types/index.d.ts +5 -0
- package/src/lib/shared/utils/functions/wallet/createWallet.cjs +7 -5
- package/src/lib/shared/utils/functions/wallet/createWallet.js +7 -5
- package/src/lib/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +1 -1
- package/src/lib/utils/constants/localStorage.cjs +4 -2
- package/src/lib/utils/constants/localStorage.d.ts +2 -1
- package/src/lib/utils/constants/localStorage.js +3 -2
- package/src/lib/utils/functions/getActiveOauthCredential/getActiveOauthCredential.cjs +11 -0
- package/src/lib/utils/functions/getActiveOauthCredential/getActiveOauthCredential.d.ts +2 -0
- package/src/lib/utils/functions/getActiveOauthCredential/getActiveOauthCredential.js +7 -0
- package/src/lib/utils/functions/getActiveOauthCredential/index.d.ts +1 -0
- package/src/lib/utils/functions/getEnabledSocialSignInProvidersAsProviderEnum/getEnabledSocialSignInProvidersAsProviderEnum.d.ts +2 -0
- package/src/lib/utils/functions/getEnabledSocialSignInProvidersAsProviderEnum/index.d.ts +1 -0
- package/src/lib/utils/functions/getOauthLoginUrl/getOauthLoginUrl.cjs +72 -0
- package/src/lib/utils/functions/getOauthLoginUrl/getOauthLoginUrl.d.ts +2 -0
- package/src/lib/utils/functions/getOauthLoginUrl/getOauthLoginUrl.js +68 -0
- package/src/lib/utils/functions/getOauthLoginUrl/index.d.ts +1 -0
- package/src/lib/utils/functions/getProviderEnumForSocialSignInProvider/getProviderEnumForSocialSignInProvider.cjs +19 -0
- package/src/lib/utils/functions/getProviderEnumForSocialSignInProvider/getProviderEnumForSocialSignInProvider.d.ts +2 -0
- package/src/lib/utils/functions/getProviderEnumForSocialSignInProvider/getProviderEnumForSocialSignInProvider.js +15 -0
- package/src/lib/utils/functions/getProviderEnumForSocialSignInProvider/index.d.ts +1 -0
- package/src/lib/utils/functions/getSocialSignInProviderForProviderEnum/getSocialSignInProviderForProviderEnum.cjs +19 -0
- package/src/lib/utils/functions/getSocialSignInProviderForProviderEnum/getSocialSignInProviderForProviderEnum.d.ts +2 -0
- package/src/lib/utils/functions/getSocialSignInProviderForProviderEnum/getSocialSignInProviderForProviderEnum.js +15 -0
- package/src/lib/utils/functions/getSocialSignInProviderForProviderEnum/index.d.ts +1 -0
- package/src/lib/utils/functions/getSocialSignInProviderFromString/getSocialSignInProviderFromString.cjs +19 -0
- package/src/lib/utils/functions/getSocialSignInProviderFromString/getSocialSignInProviderFromString.d.ts +2 -0
- package/src/lib/utils/functions/getSocialSignInProviderFromString/getSocialSignInProviderFromString.js +15 -0
- package/src/lib/utils/functions/getSocialSignInProviderFromString/index.d.ts +1 -0
- package/src/lib/utils/functions/getVerifyArgs/getVerifyArgs.d.ts +1 -1
- package/src/lib/utils/functions/getWalletProvider/getWalletProvider.cjs +3 -0
- package/src/lib/utils/functions/getWalletProvider/getWalletProvider.js +3 -0
- package/src/lib/utils/functions/handleUnlinkHelper/handleUnlinkHelper.cjs +1 -0
- package/src/lib/utils/functions/handleUnlinkHelper/handleUnlinkHelper.js +1 -0
- package/src/lib/utils/functions/index.d.ts +6 -0
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.cjs +8 -23
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.js +9 -24
- package/src/lib/utils/hooks/multiWallet/useVerifyOnAwaitingSignature/useVerifyOnAwaitingSignature.cjs +1 -1
- package/src/lib/utils/hooks/multiWallet/useVerifyOnAwaitingSignature/useVerifyOnAwaitingSignature.js +1 -1
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.cjs +7 -3
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js +7 -3
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.cjs +4 -3
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.js +5 -4
- package/src/lib/utils/hooks/useConnectedWalletsNetworkValidation/useConnectedWalletsNetworkValidation.cjs +1 -0
- package/src/lib/utils/hooks/useConnectedWalletsNetworkValidation/useConnectedWalletsNetworkValidation.js +1 -0
- package/src/lib/utils/hooks/useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.cjs +1 -0
- package/src/lib/utils/hooks/useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.js +1 -0
- package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.cjs +10 -5
- package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.d.ts +3 -1
- package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.js +10 -5
- package/src/lib/utils/hooks/useFetchProjectSettings/useFetchProjectSettings.cjs +11 -1
- package/src/lib/utils/hooks/useFetchProjectSettings/useFetchProjectSettings.js +11 -1
- package/src/lib/utils/hooks/useHandleWalletsToConnect/useHandleWalletsToConnect.cjs +15 -1
- package/src/lib/utils/hooks/useHandleWalletsToConnect/useHandleWalletsToConnect.js +15 -1
- package/src/lib/utils/hooks/useKYCFlag/useKYCFlag.cjs +1 -0
- package/src/lib/utils/hooks/useKYCFlag/useKYCFlag.js +1 -0
- package/src/lib/utils/hooks/useMultiWalletFlag/useMultiWalletFlag.cjs +0 -4
- package/src/lib/utils/hooks/useMultiWalletFlag/useMultiWalletFlag.js +0 -4
- package/src/lib/utils/hooks/usePrimaryWalletId/usePrimaryWalletId.cjs +1 -0
- package/src/lib/utils/hooks/usePrimaryWalletId/usePrimaryWalletId.js +1 -0
- package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.cjs +15 -165
- package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.d.ts +2 -2
- package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.js +17 -167
- package/src/lib/utils/hooks/useSocialAuth/index.d.ts +1 -0
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.cjs +277 -0
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.d.ts +20 -0
- package/src/lib/utils/hooks/useSocialAuth/useSocialAuth.js +273 -0
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs +1 -0
- package/src/lib/utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js +1 -0
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.cjs +14 -3
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +14 -3
- package/src/lib/utils/hooks/useWalletConnectors/reconnectSocialWallet.cjs +1 -0
- package/src/lib/utils/hooks/useWalletConnectors/reconnectSocialWallet.js +1 -0
- package/src/lib/utils/hooks/useWalletConnectors/utils/createLinkedWalletsFromWalletOptions/createLinkedWalletsFromWalletOptions.cjs +1 -0
- package/src/lib/utils/hooks/useWalletConnectors/utils/createLinkedWalletsFromWalletOptions/createLinkedWalletsFromWalletOptions.js +1 -0
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.cjs +1 -1
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.js +1 -1
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.cjs +1 -1
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.js +1 -1
- package/src/lib/utils/hooks/useWallets/useWallets.cjs +15 -26
- package/src/lib/utils/hooks/useWallets/useWallets.js +16 -27
- package/src/lib/utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.cjs +1 -0
- package/src/lib/utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.js +1 -0
- package/src/lib/utils/hooks/useWalletsConnectionState/useWalletsConnectionState.cjs +1 -0
- package/src/lib/utils/hooks/useWalletsConnectionState/useWalletsConnectionState.js +1 -0
- package/src/lib/views/AccountExistsView/AccountExistsView.cjs +5 -3
- package/src/lib/views/AccountExistsView/AccountExistsView.js +5 -3
- package/src/lib/views/BridgeSummaryView/BridgeSummaryView.cjs +1 -1
- package/src/lib/views/BridgeSummaryView/BridgeSummaryView.js +1 -1
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.cjs +1 -1
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.js +1 -1
- package/src/lib/views/CollectUserDataView/CollectUserDataView.cjs +1 -1
- package/src/lib/views/CollectUserDataView/CollectUserDataView.js +1 -1
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.cjs +1 -1
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.js +1 -1
- package/src/lib/views/CollectUserDataView/UserDataFields/index.cjs +1 -1
- package/src/lib/views/CollectUserDataView/UserDataFields/index.js +1 -1
- package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.cjs +4 -3
- package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.js +4 -3
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.cjs +1 -1
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.js +1 -1
- package/src/lib/views/EmailUpdate/EmailUpdate.cjs +1 -0
- package/src/lib/views/EmailUpdate/EmailUpdate.js +1 -0
- package/src/lib/views/EmailVerification/EmailVerification.cjs +1 -0
- package/src/lib/views/EmailVerification/EmailVerification.js +1 -0
- package/src/lib/views/LoginView/LoginView.cjs +1 -1
- package/src/lib/views/LoginView/LoginView.js +1 -1
- package/src/lib/views/LoginView/sections/EmailSignInSection/LoginEmailForm.cjs +12 -4
- package/src/lib/views/LoginView/sections/EmailSignInSection/LoginEmailForm.js +12 -4
- package/src/lib/views/LoginView/sections/LoginWidget.d.ts +5 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/DynamicSocialSignIn/DynamicSocialSignIn.cjs +77 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/DynamicSocialSignIn/DynamicSocialSignIn.d.ts +3 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/DynamicSocialSignIn/DynamicSocialSignIn.js +73 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/DynamicSocialSignIn/index.d.ts +1 -0
- package/src/lib/views/LoginView/sections/SocialSignInSection/MagicSocialSignIn/MagicSocialSignIn.cjs +4 -3
- package/src/lib/views/LoginView/sections/SocialSignInSection/MagicSocialSignIn/MagicSocialSignIn.d.ts +2 -1
- package/src/lib/views/LoginView/sections/SocialSignInSection/MagicSocialSignIn/MagicSocialSignIn.js +4 -3
- package/src/lib/views/LoginView/sections/SocialSignInSection/SocialSignInSection.cjs +19 -4
- package/src/lib/views/LoginView/sections/SocialSignInSection/SocialSignInSection.d.ts +6 -1
- package/src/lib/views/LoginView/sections/SocialSignInSection/SocialSignInSection.js +19 -4
- package/src/lib/views/LoginView/sections/WalletSignInSection/ListItemButton/ListItemButton.cjs +1 -1
- package/src/lib/views/LoginView/sections/WalletSignInSection/ListItemButton/ListItemButton.js +1 -1
- package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSignInSection.cjs +4 -3
- package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSignInSection.js +4 -3
- package/src/lib/views/LoginView/useLoginView.cjs +9 -10
- package/src/lib/views/LoginView/useLoginView.js +9 -10
- package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.cjs +2 -1
- package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.js +2 -1
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.cjs +2 -2
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +2 -2
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.cjs +2 -2
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.js +2 -2
- package/src/lib/views/NoAccess/NoAccess.cjs +1 -1
- package/src/lib/views/NoAccess/NoAccess.js +1 -1
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.cjs +3 -3
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.js +3 -3
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.cjs +1 -1
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.js +1 -1
- package/src/lib/views/PasskeyIntroView/PasskeyIntroView.cjs +90 -0
- package/src/lib/views/PasskeyIntroView/PasskeyIntroView.d.ts +2 -0
- package/src/lib/views/PasskeyIntroView/PasskeyIntroView.js +86 -0
- package/src/lib/views/PasskeyIntroView/index.d.ts +1 -0
- package/src/lib/views/PasskeySuccessView/PasskeySuccessView.cjs +63 -0
- package/src/lib/views/PasskeySuccessView/PasskeySuccessView.d.ts +2 -0
- package/src/lib/views/PasskeySuccessView/PasskeySuccessView.js +59 -0
- package/src/lib/views/PasskeySuccessView/index.d.ts +1 -0
- package/src/lib/views/PendingConnectView/PendingConnectView.cjs +2 -2
- package/src/lib/views/PendingConnectView/PendingConnectView.js +2 -2
- package/src/lib/views/PendingSignatureView/PendingSignatureView.cjs +2 -2
- package/src/lib/views/PendingSignatureView/PendingSignatureView.js +2 -2
- package/src/lib/views/QrCodeView/QRCode.cjs +3 -3
- package/src/lib/views/QrCodeView/QRCode.d.ts +2 -2
- package/src/lib/views/QrCodeView/QRCode.js +3 -3
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.cjs +3 -3
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.d.ts +2 -1
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.js +3 -3
- package/src/lib/views/QrCodeView/QrCodeView.cjs +3 -3
- package/src/lib/views/QrCodeView/QrCodeView.js +3 -3
- package/src/lib/views/SendBalanceView/SendBalanceView.cjs +1 -1
- package/src/lib/views/SendBalanceView/SendBalanceView.js +1 -1
- package/src/lib/views/SocialRedirectView/SocialRedirectView.cjs +5 -7
- package/src/lib/views/SocialRedirectView/SocialRedirectView.d.ts +1 -1
- package/src/lib/views/SocialRedirectView/SocialRedirectView.js +5 -7
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.cjs +1 -1
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.js +1 -1
- package/src/lib/views/UserFieldEditorView/UserFieldEditorView.cjs +1 -1
- package/src/lib/views/UserFieldEditorView/UserFieldEditorView.js +1 -1
- package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.cjs +4 -2
- package/src/lib/views/WalletCannotBeTransferredView/WalletCannotBeTransferredView.js +4 -2
- package/src/lib/views/WalletGroupView/WalletGroupView.cjs +1 -1
- package/src/lib/views/WalletGroupView/WalletGroupView.js +1 -1
- package/src/lib/views/WalletList/SearchNotFoundMessage/SearchNotFoundMessage.cjs +1 -1
- package/src/lib/views/WalletList/SearchNotFoundMessage/SearchNotFoundMessage.js +1 -1
- package/src/lib/views/WalletList/WalletList.cjs +1 -4
- package/src/lib/views/WalletList/WalletList.js +1 -4
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.cjs +3 -3
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.js +3 -3
- package/src/lib/views/WalletList/data.cjs +3 -15
- package/src/lib/views/WalletList/data.d.ts +4 -2
- package/src/lib/views/WalletList/data.js +3 -14
- package/src/lib/views/WalletLockedView/WalletLockedView.cjs +2 -2
- package/src/lib/views/WalletLockedView/WalletLockedView.js +2 -2
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.cjs +3 -3
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.js +3 -3
- package/src/lib/views/WalletUsedView/WalletUsedView.cjs +2 -1
- package/src/lib/views/WalletUsedView/WalletUsedView.js +2 -1
- package/src/lib/views/viewToComponentMap.cjs +4 -0
- package/src/lib/views/viewToComponentMap.js +4 -0
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.cjs +1 -1
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.js +1 -1
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.cjs +1 -1
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.js +1 -1
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCard/DynamicBridgeWalletCard.cjs +1 -1
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCard/DynamicBridgeWalletCard.js +1 -1
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.cjs +3 -3
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.d.ts +1 -1
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.js +3 -3
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetEmptyCard/DynamicBridgeWidgetEmptyCard.cjs +1 -1
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetEmptyCard/DynamicBridgeWidgetEmptyCard.js +1 -1
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.cjs +4 -4
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.js +4 -4
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs +1 -1
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js +1 -1
- package/src/lib/widgets/DynamicWidget/DynamicWidget.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/DynamicWidget.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.cjs +19 -4
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.js +19 -4
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.cjs +13 -4
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.d.ts +1 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.js +13 -4
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.cjs +3 -3
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.js +3 -3
- package/src/lib/widgets/DynamicWidget/components/WalletIconWithStatus/WalletIconWithStatus.cjs +3 -2
- package/src/lib/widgets/DynamicWidget/components/WalletIconWithStatus/WalletIconWithStatus.d.ts +2 -2
- package/src/lib/widgets/DynamicWidget/components/WalletIconWithStatus/WalletIconWithStatus.js +3 -2
- package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.js +1 -1
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.cjs +7 -10
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.js +8 -11
- package/src/lib/widgets/DynamicWidget/hooks/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/hooks/useFetchBalance/useFetchBalance.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/hooks/useFetchBalance/useFetchBalance.js +1 -0
- package/src/lib/widgets/DynamicWidget/hooks/useViewController/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/hooks/useViewController/useViewController.cjs +17 -0
- package/src/lib/widgets/DynamicWidget/hooks/useViewController/useViewController.d.ts +6 -0
- package/src/lib/widgets/DynamicWidget/hooks/useViewController/useViewController.js +13 -0
- package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.js +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.js +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.cjs +4 -4
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.js +4 -4
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/PendingAccountSwitchModal.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/PendingAccountSwitchModal.js +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.js +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.cjs +2 -2
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.js +2 -2
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.cjs +2 -2
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.js +2 -2
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.js +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.cjs +2 -2
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.js +2 -2
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.cjs +2 -2
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.js +2 -2
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.cjs +8 -7
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.js +8 -7
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.cjs +4 -4
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.js +4 -4
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.js +1 -1
- package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.js +1 -1
- package/src/lib/widgets/DynamicWidget/views/SendBalanceWidgetView/SendBalanceWidgetView.cjs +2 -3
- package/src/lib/widgets/DynamicWidget/views/SendBalanceWidgetView/SendBalanceWidgetView.js +2 -3
- package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.cjs +4 -4
- package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.js +4 -4
- package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.cjs +1 -1
- package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.js +1 -1
- package/src/lib/widgets/index.d.ts +0 -1
- package/src/lib/utils/functions/getRedirectURIOrigin/getRedirectURIOrigin.cjs +0 -33
- package/src/lib/utils/functions/getRedirectURIOrigin/getRedirectURIOrigin.js +0 -29
- package/src/lib/widgets/OAuthIFrameContainer/OAuthIFrameContainer.cjs +0 -13
- package/src/lib/widgets/OAuthIFrameContainer/OAuthIFrameContainer.d.ts +0 -2
- package/src/lib/widgets/OAuthIFrameContainer/OAuthIFrameContainer.js +0 -9
- package/src/lib/widgets/OAuthIFrameContainer/index.d.ts +0 -1
|
@@ -19,6 +19,7 @@ require('../../../../shared/consts/index.cjs');
|
|
|
19
19
|
var useInternalDynamicContext = require('../../../../context/DynamicContext/useInternalDynamicContext.cjs');
|
|
20
20
|
require('@dynamic-labs/multi-wallet');
|
|
21
21
|
var pixelToRem = require('../../../../utils/functions/pixelToRem/pixelToRem.cjs');
|
|
22
|
+
require('../../../../config/ApiEndpoint.cjs');
|
|
22
23
|
require('../../../../components/ShadowDOM/ShadowDOM.cjs');
|
|
23
24
|
require('../../../../context/ThemeContext/ThemeContext.cjs');
|
|
24
25
|
require('react-dom');
|
|
@@ -26,7 +27,6 @@ require('react-focus-lock');
|
|
|
26
27
|
require('../../../../components/Transition/ZoomTransition/ZoomTransition.cjs');
|
|
27
28
|
require('../../../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
28
29
|
require('../../../../components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
29
|
-
require('../../../../config/ApiEndpoint.cjs');
|
|
30
30
|
require('@dynamic-labs/rpc-providers');
|
|
31
31
|
require('../../../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.cjs');
|
|
32
32
|
require('../../../../context/ErrorContext/ErrorContext.cjs');
|
|
@@ -58,14 +58,14 @@ const NoQrNotInstalledModalView = () => {
|
|
|
58
58
|
if (!selectedWalletConnector) {
|
|
59
59
|
return null;
|
|
60
60
|
}
|
|
61
|
-
const walletName = walletBook.getWalletBookWallet(walletBook$1, selectedWalletConnector.
|
|
62
|
-
const walletLinks = walletBook.getWalletLinks(walletBook$1, selectedWalletConnector.
|
|
61
|
+
const walletName = walletBook.getWalletBookWallet(walletBook$1, selectedWalletConnector.key).name;
|
|
62
|
+
const walletLinks = walletBook.getWalletLinks(walletBook$1, selectedWalletConnector.key);
|
|
63
63
|
const { currentDesktopUrl, userBrowser } = parseWalletLinks.parseWalletLinks(walletLinks);
|
|
64
64
|
const downloadLinks = userBrowser && currentDesktopUrl ? (jsxRuntime.jsx(WalletHelpLink.WalletHelpLink, { name: userBrowser, link: currentDesktopUrl, Icon: getBrowserIcon.getBrowserIcon(userBrowser) }, userBrowser)) : (Object.entries(walletLinks)
|
|
65
65
|
.filter(([, link]) => link !== '')
|
|
66
66
|
.filter(([name]) => name !== 'ios' && name !== 'android')
|
|
67
67
|
.map(([name, link]) => (jsxRuntime.jsx(WalletHelpLink.WalletHelpLink, { name: name, link: link, Icon: getBrowserIcon.getBrowserIcon(name) }, name))));
|
|
68
|
-
return (jsxRuntime.jsxs("div", Object.assign({ className: 'no-qr-code-not-installed-modal-view', "data-testid": 'no-qr-code-not-installed' }, { children: [jsxRuntime.jsx(walletBook.WalletIcon, {
|
|
68
|
+
return (jsxRuntime.jsxs("div", Object.assign({ className: 'no-qr-code-not-installed-modal-view', "data-testid": 'no-qr-code-not-installed' }, { children: [jsxRuntime.jsx(walletBook.WalletIcon, { walletKey: selectedWalletConnector.key, style: { height: pixelToRem.pixelToRem(64), width: pixelToRem.pixelToRem(64) } }), jsxRuntime.jsxs(Typography.Typography, Object.assign({ variant: 'body_normal', color: 'primary' }, { children: ["We can\u2019t detect ", walletName, " extension"] })), Array.isArray(downloadLinks) && (jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', color: 'secondary' }, { children: "Select from your preferred options below:" }))), jsxRuntime.jsx("div", Object.assign({ className: 'no-qr-code-not-installed-modal-view__links-section' }, { children: downloadLinks })), jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_mini', color: 'secondary' }, { children: "Refresh the page once installed" }))] })));
|
|
69
69
|
};
|
|
70
70
|
|
|
71
71
|
exports.NoQrNotInstalledModalView = NoQrNotInstalledModalView;
|
package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.js
CHANGED
|
@@ -15,6 +15,7 @@ import '../../../../shared/consts/index.js';
|
|
|
15
15
|
import { useInternalDynamicContext } from '../../../../context/DynamicContext/useInternalDynamicContext.js';
|
|
16
16
|
import '@dynamic-labs/multi-wallet';
|
|
17
17
|
import { pixelToRem } from '../../../../utils/functions/pixelToRem/pixelToRem.js';
|
|
18
|
+
import '../../../../config/ApiEndpoint.js';
|
|
18
19
|
import '../../../../components/ShadowDOM/ShadowDOM.js';
|
|
19
20
|
import '../../../../context/ThemeContext/ThemeContext.js';
|
|
20
21
|
import 'react-dom';
|
|
@@ -22,7 +23,6 @@ import 'react-focus-lock';
|
|
|
22
23
|
import '../../../../components/Transition/ZoomTransition/ZoomTransition.js';
|
|
23
24
|
import '../../../../components/Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
24
25
|
import '../../../../components/Transition/OpacityTransition/OpacityTransition.js';
|
|
25
|
-
import '../../../../config/ApiEndpoint.js';
|
|
26
26
|
import '@dynamic-labs/rpc-providers';
|
|
27
27
|
import '../../../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.js';
|
|
28
28
|
import '../../../../context/ErrorContext/ErrorContext.js';
|
|
@@ -54,14 +54,14 @@ const NoQrNotInstalledModalView = () => {
|
|
|
54
54
|
if (!selectedWalletConnector) {
|
|
55
55
|
return null;
|
|
56
56
|
}
|
|
57
|
-
const walletName = getWalletBookWallet(walletBook, selectedWalletConnector.
|
|
58
|
-
const walletLinks = getWalletLinks(walletBook, selectedWalletConnector.
|
|
57
|
+
const walletName = getWalletBookWallet(walletBook, selectedWalletConnector.key).name;
|
|
58
|
+
const walletLinks = getWalletLinks(walletBook, selectedWalletConnector.key);
|
|
59
59
|
const { currentDesktopUrl, userBrowser } = parseWalletLinks(walletLinks);
|
|
60
60
|
const downloadLinks = userBrowser && currentDesktopUrl ? (jsx(WalletHelpLink, { name: userBrowser, link: currentDesktopUrl, Icon: getBrowserIcon(userBrowser) }, userBrowser)) : (Object.entries(walletLinks)
|
|
61
61
|
.filter(([, link]) => link !== '')
|
|
62
62
|
.filter(([name]) => name !== 'ios' && name !== 'android')
|
|
63
63
|
.map(([name, link]) => (jsx(WalletHelpLink, { name: name, link: link, Icon: getBrowserIcon(name) }, name))));
|
|
64
|
-
return (jsxs("div", Object.assign({ className: 'no-qr-code-not-installed-modal-view', "data-testid": 'no-qr-code-not-installed' }, { children: [jsx(WalletIcon, {
|
|
64
|
+
return (jsxs("div", Object.assign({ className: 'no-qr-code-not-installed-modal-view', "data-testid": 'no-qr-code-not-installed' }, { children: [jsx(WalletIcon, { walletKey: selectedWalletConnector.key, style: { height: pixelToRem(64), width: pixelToRem(64) } }), jsxs(Typography, Object.assign({ variant: 'body_normal', color: 'primary' }, { children: ["We can\u2019t detect ", walletName, " extension"] })), Array.isArray(downloadLinks) && (jsx(Typography, Object.assign({ variant: 'body_normal', color: 'secondary' }, { children: "Select from your preferred options below:" }))), jsx("div", Object.assign({ className: 'no-qr-code-not-installed-modal-view__links-section' }, { children: downloadLinks })), jsx(Typography, Object.assign({ variant: 'body_mini', color: 'secondary' }, { children: "Refresh the page once installed" }))] })));
|
|
65
65
|
};
|
|
66
66
|
|
|
67
67
|
export { NoQrNotInstalledModalView };
|
|
@@ -30,7 +30,7 @@ const PendingAccountSwitchModal = () => {
|
|
|
30
30
|
});
|
|
31
31
|
disconnectAndConnect();
|
|
32
32
|
}, [selectedConnector]);
|
|
33
|
-
return (jsxRuntime.jsx(DefaultPromptModal.DefaultPromptModal, Object.assign({ showCloseButton: true, dataTestId: 'pending-account-switch', icon: jsxRuntime.jsx(walletBook.WalletIcon, {
|
|
33
|
+
return (jsxRuntime.jsx(DefaultPromptModal.DefaultPromptModal, Object.assign({ showCloseButton: true, dataTestId: 'pending-account-switch', icon: jsxRuntime.jsx(walletBook.WalletIcon, { walletKey: selectedConnector === null || selectedConnector === void 0 ? void 0 : selectedConnector.key }), title: `Switch wallet in ${selectedWalletWithAction === null || selectedWalletWithAction === void 0 ? void 0 : selectedWalletWithAction.wallet.connector.name}` }, { children: isSameWallet || !connectedWallet ? (jsxRuntime.jsx(SwitchAccountView.SwitchAccountView, { selectedWalletToSwitchTo: selectedWalletWithAction === null || selectedWalletWithAction === void 0 ? void 0 : selectedWalletWithAction.wallet })) : (jsxRuntime.jsx(SwitchOrUseActiveAccountView.SwitchOrUseActiveAccountView, { connectedWallet: connectedWallet, selectedWalletToSwitchTo: selectedWalletWithAction === null || selectedWalletWithAction === void 0 ? void 0 : selectedWalletWithAction.wallet })) })));
|
|
34
34
|
};
|
|
35
35
|
|
|
36
36
|
exports.PendingAccountSwitchModal = PendingAccountSwitchModal;
|
package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/PendingAccountSwitchModal.js
CHANGED
|
@@ -26,7 +26,7 @@ const PendingAccountSwitchModal = () => {
|
|
|
26
26
|
});
|
|
27
27
|
disconnectAndConnect();
|
|
28
28
|
}, [selectedConnector]);
|
|
29
|
-
return (jsx(DefaultPromptModal, Object.assign({ showCloseButton: true, dataTestId: 'pending-account-switch', icon: jsx(WalletIcon, {
|
|
29
|
+
return (jsx(DefaultPromptModal, Object.assign({ showCloseButton: true, dataTestId: 'pending-account-switch', icon: jsx(WalletIcon, { walletKey: selectedConnector === null || selectedConnector === void 0 ? void 0 : selectedConnector.key }), title: `Switch wallet in ${selectedWalletWithAction === null || selectedWalletWithAction === void 0 ? void 0 : selectedWalletWithAction.wallet.connector.name}` }, { children: isSameWallet || !connectedWallet ? (jsx(SwitchAccountView, { selectedWalletToSwitchTo: selectedWalletWithAction === null || selectedWalletWithAction === void 0 ? void 0 : selectedWalletWithAction.wallet })) : (jsx(SwitchOrUseActiveAccountView, { connectedWallet: connectedWallet, selectedWalletToSwitchTo: selectedWalletWithAction === null || selectedWalletWithAction === void 0 ? void 0 : selectedWalletWithAction.wallet })) })));
|
|
30
30
|
};
|
|
31
31
|
|
|
32
32
|
export { PendingAccountSwitchModal };
|
|
@@ -19,6 +19,7 @@ require('ethers');
|
|
|
19
19
|
require('../../../../../shared/consts/index.cjs');
|
|
20
20
|
require('../../../../../context/DynamicContext/DynamicContext.cjs');
|
|
21
21
|
require('@dynamic-labs/multi-wallet');
|
|
22
|
+
require('../../../../../config/ApiEndpoint.cjs');
|
|
22
23
|
require('../../../../../components/ShadowDOM/ShadowDOM.cjs');
|
|
23
24
|
require('../../../../../context/ThemeContext/ThemeContext.cjs');
|
|
24
25
|
require('react-dom');
|
|
@@ -26,7 +27,6 @@ require('react-focus-lock');
|
|
|
26
27
|
require('../../../../../components/Transition/ZoomTransition/ZoomTransition.cjs');
|
|
27
28
|
require('../../../../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
28
29
|
require('../../../../../components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
29
|
-
require('../../../../../config/ApiEndpoint.cjs');
|
|
30
30
|
require('@dynamic-labs/rpc-providers');
|
|
31
31
|
require('../../../../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.cjs');
|
|
32
32
|
require('../../../../../context/ErrorContext/ErrorContext.cjs');
|
|
@@ -15,6 +15,7 @@ import 'ethers';
|
|
|
15
15
|
import '../../../../../shared/consts/index.js';
|
|
16
16
|
import '../../../../../context/DynamicContext/DynamicContext.js';
|
|
17
17
|
import '@dynamic-labs/multi-wallet';
|
|
18
|
+
import '../../../../../config/ApiEndpoint.js';
|
|
18
19
|
import '../../../../../components/ShadowDOM/ShadowDOM.js';
|
|
19
20
|
import '../../../../../context/ThemeContext/ThemeContext.js';
|
|
20
21
|
import 'react-dom';
|
|
@@ -22,7 +23,6 @@ import 'react-focus-lock';
|
|
|
22
23
|
import '../../../../../components/Transition/ZoomTransition/ZoomTransition.js';
|
|
23
24
|
import '../../../../../components/Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
24
25
|
import '../../../../../components/Transition/OpacityTransition/OpacityTransition.js';
|
|
25
|
-
import '../../../../../config/ApiEndpoint.js';
|
|
26
26
|
import '@dynamic-labs/rpc-providers';
|
|
27
27
|
import '../../../../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.js';
|
|
28
28
|
import '../../../../../context/ErrorContext/ErrorContext.js';
|
|
@@ -20,6 +20,7 @@ require('ethers');
|
|
|
20
20
|
require('../../../../../shared/consts/index.cjs');
|
|
21
21
|
var useInternalDynamicContext = require('../../../../../context/DynamicContext/useInternalDynamicContext.cjs');
|
|
22
22
|
require('@dynamic-labs/multi-wallet');
|
|
23
|
+
require('../../../../../config/ApiEndpoint.cjs');
|
|
23
24
|
require('../../../../../components/ShadowDOM/ShadowDOM.cjs');
|
|
24
25
|
require('../../../../../context/ThemeContext/ThemeContext.cjs');
|
|
25
26
|
var Icon = require('../../../../../components/Icon/Icon.cjs');
|
|
@@ -28,7 +29,6 @@ require('react-focus-lock');
|
|
|
28
29
|
require('../../../../../components/Transition/ZoomTransition/ZoomTransition.cjs');
|
|
29
30
|
require('../../../../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
30
31
|
require('../../../../../components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
31
|
-
require('../../../../../config/ApiEndpoint.cjs');
|
|
32
32
|
require('@dynamic-labs/rpc-providers');
|
|
33
33
|
require('../../../../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.cjs');
|
|
34
34
|
require('../../../../../context/ErrorContext/ErrorContext.cjs');
|
|
@@ -74,7 +74,7 @@ const SwitchOrUseActiveAccountView = ({ connectedWallet, selectedWalletToSwitchT
|
|
|
74
74
|
computeConnectedStateForWallets,
|
|
75
75
|
setSelectedWalletConnector,
|
|
76
76
|
]);
|
|
77
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(Typography.Typography, Object.assign({ variant: 'body_normal', color: 'secondary', weight: 'regular', "data-testid": 'content' }, { children: ["Wallet", ' ', jsxRuntime.jsx(Typography.Typography, Object.assign({ as: 'span', weight: 'medium', color: 'primary' }, { children: shortenWalletAddress.shortenWalletAddress(selectedWalletToSwitchTo === null || selectedWalletToSwitchTo === void 0 ? void 0 : selectedWalletToSwitchTo.address, 3, 3) })), ' ', "is not active in ", selectedWalletToSwitchTo === null || selectedWalletToSwitchTo === void 0 ? void 0 : selectedWalletToSwitchTo.connector.name, ". To make active, open your ", selectedWalletToSwitchTo === null || selectedWalletToSwitchTo === void 0 ? void 0 : selectedWalletToSwitchTo.connector.name, " wallet and switch to this account."] })), jsxRuntime.jsx(Divider.Divider, { fullWidth: true, text: 'Or' }), jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', color: 'primary' }, { children: "Use your active wallet" })), jsxRuntime.jsxs(Button.Button, Object.assign({ buttonClassName: 'default-prompt-modal__button', buttonRounded: 'small', expanded: true, type: 'button', buttonPadding: 'medium', typographyProps: { variant: 'button_secondary' }, onClick: onUseActiveWalletClick, dataTestId: 'use-active-wallet-button' }, { children: ["Select", ' ', jsxRuntime.jsx(Icon.Icon, Object.assign({ size: 'xsmall' }, { children: jsxRuntime.jsx(walletBook.WalletIcon, {
|
|
77
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs(Typography.Typography, Object.assign({ variant: 'body_normal', color: 'secondary', weight: 'regular', "data-testid": 'content' }, { children: ["Wallet", ' ', jsxRuntime.jsx(Typography.Typography, Object.assign({ as: 'span', weight: 'medium', color: 'primary' }, { children: shortenWalletAddress.shortenWalletAddress(selectedWalletToSwitchTo === null || selectedWalletToSwitchTo === void 0 ? void 0 : selectedWalletToSwitchTo.address, 3, 3) })), ' ', "is not active in ", selectedWalletToSwitchTo === null || selectedWalletToSwitchTo === void 0 ? void 0 : selectedWalletToSwitchTo.connector.name, ". To make active, open your ", selectedWalletToSwitchTo === null || selectedWalletToSwitchTo === void 0 ? void 0 : selectedWalletToSwitchTo.connector.name, " wallet and switch to this account."] })), jsxRuntime.jsx(Divider.Divider, { fullWidth: true, text: 'Or' }), jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', color: 'primary' }, { children: "Use your active wallet" })), jsxRuntime.jsxs(Button.Button, Object.assign({ buttonClassName: 'default-prompt-modal__button', buttonRounded: 'small', expanded: true, type: 'button', buttonPadding: 'medium', typographyProps: { variant: 'button_secondary' }, onClick: onUseActiveWalletClick, dataTestId: 'use-active-wallet-button' }, { children: ["Select", ' ', jsxRuntime.jsx(Icon.Icon, Object.assign({ size: 'xsmall' }, { children: jsxRuntime.jsx(walletBook.WalletIcon, { walletKey: selectedWalletToSwitchTo === null || selectedWalletToSwitchTo === void 0 ? void 0 : selectedWalletToSwitchTo.connector.key }) })), ' ', shortenWalletAddress.shortenWalletAddress(connectedWallet === null || connectedWallet === void 0 ? void 0 : connectedWallet.address, 3, 3)] }))] }));
|
|
78
78
|
};
|
|
79
79
|
|
|
80
80
|
exports.SwitchOrUseActiveAccountView = SwitchOrUseActiveAccountView;
|
|
@@ -16,6 +16,7 @@ import 'ethers';
|
|
|
16
16
|
import '../../../../../shared/consts/index.js';
|
|
17
17
|
import { useInternalDynamicContext } from '../../../../../context/DynamicContext/useInternalDynamicContext.js';
|
|
18
18
|
import '@dynamic-labs/multi-wallet';
|
|
19
|
+
import '../../../../../config/ApiEndpoint.js';
|
|
19
20
|
import '../../../../../components/ShadowDOM/ShadowDOM.js';
|
|
20
21
|
import '../../../../../context/ThemeContext/ThemeContext.js';
|
|
21
22
|
import { Icon } from '../../../../../components/Icon/Icon.js';
|
|
@@ -24,7 +25,6 @@ import 'react-focus-lock';
|
|
|
24
25
|
import '../../../../../components/Transition/ZoomTransition/ZoomTransition.js';
|
|
25
26
|
import '../../../../../components/Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
26
27
|
import '../../../../../components/Transition/OpacityTransition/OpacityTransition.js';
|
|
27
|
-
import '../../../../../config/ApiEndpoint.js';
|
|
28
28
|
import '@dynamic-labs/rpc-providers';
|
|
29
29
|
import '../../../../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.js';
|
|
30
30
|
import '../../../../../context/ErrorContext/ErrorContext.js';
|
|
@@ -70,7 +70,7 @@ const SwitchOrUseActiveAccountView = ({ connectedWallet, selectedWalletToSwitchT
|
|
|
70
70
|
computeConnectedStateForWallets,
|
|
71
71
|
setSelectedWalletConnector,
|
|
72
72
|
]);
|
|
73
|
-
return (jsxs(Fragment, { children: [jsxs(Typography, Object.assign({ variant: 'body_normal', color: 'secondary', weight: 'regular', "data-testid": 'content' }, { children: ["Wallet", ' ', jsx(Typography, Object.assign({ as: 'span', weight: 'medium', color: 'primary' }, { children: shortenWalletAddress(selectedWalletToSwitchTo === null || selectedWalletToSwitchTo === void 0 ? void 0 : selectedWalletToSwitchTo.address, 3, 3) })), ' ', "is not active in ", selectedWalletToSwitchTo === null || selectedWalletToSwitchTo === void 0 ? void 0 : selectedWalletToSwitchTo.connector.name, ". To make active, open your ", selectedWalletToSwitchTo === null || selectedWalletToSwitchTo === void 0 ? void 0 : selectedWalletToSwitchTo.connector.name, " wallet and switch to this account."] })), jsx(Divider, { fullWidth: true, text: 'Or' }), jsx(Typography, Object.assign({ variant: 'body_normal', color: 'primary' }, { children: "Use your active wallet" })), jsxs(Button, Object.assign({ buttonClassName: 'default-prompt-modal__button', buttonRounded: 'small', expanded: true, type: 'button', buttonPadding: 'medium', typographyProps: { variant: 'button_secondary' }, onClick: onUseActiveWalletClick, dataTestId: 'use-active-wallet-button' }, { children: ["Select", ' ', jsx(Icon, Object.assign({ size: 'xsmall' }, { children: jsx(WalletIcon, {
|
|
73
|
+
return (jsxs(Fragment, { children: [jsxs(Typography, Object.assign({ variant: 'body_normal', color: 'secondary', weight: 'regular', "data-testid": 'content' }, { children: ["Wallet", ' ', jsx(Typography, Object.assign({ as: 'span', weight: 'medium', color: 'primary' }, { children: shortenWalletAddress(selectedWalletToSwitchTo === null || selectedWalletToSwitchTo === void 0 ? void 0 : selectedWalletToSwitchTo.address, 3, 3) })), ' ', "is not active in ", selectedWalletToSwitchTo === null || selectedWalletToSwitchTo === void 0 ? void 0 : selectedWalletToSwitchTo.connector.name, ". To make active, open your ", selectedWalletToSwitchTo === null || selectedWalletToSwitchTo === void 0 ? void 0 : selectedWalletToSwitchTo.connector.name, " wallet and switch to this account."] })), jsx(Divider, { fullWidth: true, text: 'Or' }), jsx(Typography, Object.assign({ variant: 'body_normal', color: 'primary' }, { children: "Use your active wallet" })), jsxs(Button, Object.assign({ buttonClassName: 'default-prompt-modal__button', buttonRounded: 'small', expanded: true, type: 'button', buttonPadding: 'medium', typographyProps: { variant: 'button_secondary' }, onClick: onUseActiveWalletClick, dataTestId: 'use-active-wallet-button' }, { children: ["Select", ' ', jsx(Icon, Object.assign({ size: 'xsmall' }, { children: jsx(WalletIcon, { walletKey: selectedWalletToSwitchTo === null || selectedWalletToSwitchTo === void 0 ? void 0 : selectedWalletToSwitchTo.connector.key }) })), ' ', shortenWalletAddress(connectedWallet === null || connectedWallet === void 0 ? void 0 : connectedWallet.address, 3, 3)] }))] }));
|
|
74
74
|
};
|
|
75
75
|
|
|
76
76
|
export { SwitchOrUseActiveAccountView };
|
|
@@ -19,6 +19,7 @@ require('../../../../shared/utils/classes/storage/localStorage.cjs');
|
|
|
19
19
|
require('ethers');
|
|
20
20
|
require('../../../../shared/consts/index.cjs');
|
|
21
21
|
require('@dynamic-labs/multi-wallet');
|
|
22
|
+
require('../../../../config/ApiEndpoint.cjs');
|
|
22
23
|
require('../../../../components/ShadowDOM/ShadowDOM.cjs');
|
|
23
24
|
require('../../../../context/ThemeContext/ThemeContext.cjs');
|
|
24
25
|
require('react-dom');
|
|
@@ -26,7 +27,6 @@ require('react-focus-lock');
|
|
|
26
27
|
require('../../../../components/Transition/ZoomTransition/ZoomTransition.cjs');
|
|
27
28
|
require('../../../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
28
29
|
require('../../../../components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
29
|
-
require('../../../../config/ApiEndpoint.cjs');
|
|
30
30
|
require('@dynamic-labs/rpc-providers');
|
|
31
31
|
require('../../../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.cjs');
|
|
32
32
|
require('../../../../context/ErrorContext/ErrorContext.cjs');
|
|
@@ -64,7 +64,7 @@ const PendingAccountSwitchToLinkModal = () => {
|
|
|
64
64
|
});
|
|
65
65
|
disconnectAndConnect();
|
|
66
66
|
}, [selectedWalletConnector]);
|
|
67
|
-
return (jsxRuntime.jsx(DefaultPromptModal.DefaultPromptModal, Object.assign({ showCloseButton: true, dataTestId: 'pending-account-switch', icon: jsxRuntime.jsx(walletBook.WalletIcon, {
|
|
67
|
+
return (jsxRuntime.jsx(DefaultPromptModal.DefaultPromptModal, Object.assign({ showCloseButton: true, dataTestId: 'pending-account-switch', icon: jsxRuntime.jsx(walletBook.WalletIcon, { walletKey: selectedWalletConnector === null || selectedWalletConnector === void 0 ? void 0 : selectedWalletConnector.key }), title: `Switch wallet in ${selectedWalletConnector === null || selectedWalletConnector === void 0 ? void 0 : selectedWalletConnector.name}` }, { children: jsxRuntime.jsxs(Typography.Typography, Object.assign({ variant: 'body_normal', color: 'secondary', weight: 'regular', "data-testid": 'content' }, { children: ["To link a new wallet, open", ' ', jsxRuntime.jsx(Typography.Typography, Object.assign({ as: 'span', weight: 'medium', color: 'primary' }, { children: selectedWalletConnector === null || selectedWalletConnector === void 0 ? void 0 : selectedWalletConnector.name })), ' ', "and switch to the account you want to link."] })) })));
|
|
68
68
|
};
|
|
69
69
|
|
|
70
70
|
exports.PendingAccountSwitchToLinkModal = PendingAccountSwitchToLinkModal;
|
|
@@ -15,6 +15,7 @@ import '../../../../shared/utils/classes/storage/localStorage.js';
|
|
|
15
15
|
import 'ethers';
|
|
16
16
|
import '../../../../shared/consts/index.js';
|
|
17
17
|
import '@dynamic-labs/multi-wallet';
|
|
18
|
+
import '../../../../config/ApiEndpoint.js';
|
|
18
19
|
import '../../../../components/ShadowDOM/ShadowDOM.js';
|
|
19
20
|
import '../../../../context/ThemeContext/ThemeContext.js';
|
|
20
21
|
import 'react-dom';
|
|
@@ -22,7 +23,6 @@ import 'react-focus-lock';
|
|
|
22
23
|
import '../../../../components/Transition/ZoomTransition/ZoomTransition.js';
|
|
23
24
|
import '../../../../components/Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
24
25
|
import '../../../../components/Transition/OpacityTransition/OpacityTransition.js';
|
|
25
|
-
import '../../../../config/ApiEndpoint.js';
|
|
26
26
|
import '@dynamic-labs/rpc-providers';
|
|
27
27
|
import '../../../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.js';
|
|
28
28
|
import '../../../../context/ErrorContext/ErrorContext.js';
|
|
@@ -60,7 +60,7 @@ const PendingAccountSwitchToLinkModal = () => {
|
|
|
60
60
|
});
|
|
61
61
|
disconnectAndConnect();
|
|
62
62
|
}, [selectedWalletConnector]);
|
|
63
|
-
return (jsx(DefaultPromptModal, Object.assign({ showCloseButton: true, dataTestId: 'pending-account-switch', icon: jsx(WalletIcon, {
|
|
63
|
+
return (jsx(DefaultPromptModal, Object.assign({ showCloseButton: true, dataTestId: 'pending-account-switch', icon: jsx(WalletIcon, { walletKey: selectedWalletConnector === null || selectedWalletConnector === void 0 ? void 0 : selectedWalletConnector.key }), title: `Switch wallet in ${selectedWalletConnector === null || selectedWalletConnector === void 0 ? void 0 : selectedWalletConnector.name}` }, { children: jsxs(Typography, Object.assign({ variant: 'body_normal', color: 'secondary', weight: 'regular', "data-testid": 'content' }, { children: ["To link a new wallet, open", ' ', jsx(Typography, Object.assign({ as: 'span', weight: 'medium', color: 'primary' }, { children: selectedWalletConnector === null || selectedWalletConnector === void 0 ? void 0 : selectedWalletConnector.name })), ' ', "and switch to the account you want to link."] })) })));
|
|
64
64
|
};
|
|
65
65
|
|
|
66
66
|
export { PendingAccountSwitchToLinkModal };
|
package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.cjs
CHANGED
|
@@ -20,6 +20,7 @@ require('ethers');
|
|
|
20
20
|
require('../../../../shared/consts/index.cjs');
|
|
21
21
|
require('@dynamic-labs/multi-wallet');
|
|
22
22
|
var getReferencedAccount = require('../../../../utils/functions/getReferencedAccount/getReferencedAccount.cjs');
|
|
23
|
+
require('../../../../config/ApiEndpoint.cjs');
|
|
23
24
|
require('../../../../components/ShadowDOM/ShadowDOM.cjs');
|
|
24
25
|
require('../../../../context/ThemeContext/ThemeContext.cjs');
|
|
25
26
|
require('react-dom');
|
|
@@ -27,7 +28,6 @@ require('react-focus-lock');
|
|
|
27
28
|
require('../../../../components/Transition/ZoomTransition/ZoomTransition.cjs');
|
|
28
29
|
require('../../../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
29
30
|
require('../../../../components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
30
|
-
require('../../../../config/ApiEndpoint.cjs');
|
|
31
31
|
require('@dynamic-labs/rpc-providers');
|
|
32
32
|
require('../../../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.cjs');
|
|
33
33
|
require('../../../../context/ErrorContext/ErrorContext.cjs');
|
package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.js
CHANGED
|
@@ -16,6 +16,7 @@ import 'ethers';
|
|
|
16
16
|
import '../../../../shared/consts/index.js';
|
|
17
17
|
import '@dynamic-labs/multi-wallet';
|
|
18
18
|
import { getReferencedAccount } from '../../../../utils/functions/getReferencedAccount/getReferencedAccount.js';
|
|
19
|
+
import '../../../../config/ApiEndpoint.js';
|
|
19
20
|
import '../../../../components/ShadowDOM/ShadowDOM.js';
|
|
20
21
|
import '../../../../context/ThemeContext/ThemeContext.js';
|
|
21
22
|
import 'react-dom';
|
|
@@ -23,7 +24,6 @@ import 'react-focus-lock';
|
|
|
23
24
|
import '../../../../components/Transition/ZoomTransition/ZoomTransition.js';
|
|
24
25
|
import '../../../../components/Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
25
26
|
import '../../../../components/Transition/OpacityTransition/OpacityTransition.js';
|
|
26
|
-
import '../../../../config/ApiEndpoint.js';
|
|
27
27
|
import '@dynamic-labs/rpc-providers';
|
|
28
28
|
import '../../../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.js';
|
|
29
29
|
import '../../../../context/ErrorContext/ErrorContext.js';
|
|
@@ -19,6 +19,7 @@ require('ethers');
|
|
|
19
19
|
require('../../../../../shared/consts/index.cjs');
|
|
20
20
|
var useInternalDynamicContext = require('../../../../../context/DynamicContext/useInternalDynamicContext.cjs');
|
|
21
21
|
require('@dynamic-labs/multi-wallet');
|
|
22
|
+
require('../../../../../config/ApiEndpoint.cjs');
|
|
22
23
|
require('../../../../../components/ShadowDOM/ShadowDOM.cjs');
|
|
23
24
|
require('../../../../../context/ThemeContext/ThemeContext.cjs');
|
|
24
25
|
require('react-dom');
|
|
@@ -26,7 +27,6 @@ require('react-focus-lock');
|
|
|
26
27
|
require('../../../../../components/Transition/ZoomTransition/ZoomTransition.cjs');
|
|
27
28
|
require('../../../../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
28
29
|
require('../../../../../components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
29
|
-
require('../../../../../config/ApiEndpoint.cjs');
|
|
30
30
|
require('@dynamic-labs/rpc-providers');
|
|
31
31
|
require('../../../../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.cjs');
|
|
32
32
|
require('../../../../../context/ErrorContext/ErrorContext.cjs');
|
|
@@ -70,7 +70,7 @@ const DefaultPendingSignModalContent = () => {
|
|
|
70
70
|
setMultiWalletWidgetState('idle');
|
|
71
71
|
}
|
|
72
72
|
});
|
|
73
|
-
return (jsxRuntime.jsxs(DefaultPromptModal.DefaultPromptModal, Object.assign({ showCloseButton: true, dataTestId: 'pending-account-switch', icon: jsxRuntime.jsx(walletBook.WalletIcon, {
|
|
73
|
+
return (jsxRuntime.jsxs(DefaultPromptModal.DefaultPromptModal, Object.assign({ showCloseButton: true, dataTestId: 'pending-account-switch', icon: jsxRuntime.jsx(walletBook.WalletIcon, { walletKey: selectedWalletConnector === null || selectedWalletConnector === void 0 ? void 0 : selectedWalletConnector.key }), title: `Sign in with ${selectedWalletConnector === null || selectedWalletConnector === void 0 ? void 0 : selectedWalletConnector.name}` }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', color: 'secondary', weight: 'regular', "data-testid": 'content' }, { children: "Sign the message in your wallet to approve linking this wallet to your account" })), utils.isMobile() &&
|
|
74
74
|
!(selectedWalletConnector === null || selectedWalletConnector === void 0 ? void 0 : selectedWalletConnector.canConnectViaCustodialService) && (jsxRuntime.jsx(Button.Button, Object.assign({ buttonClassName: 'default-prompt-modal__button', buttonRounded: 'small', expanded: true, type: 'button', buttonPadding: 'medium', typographyProps: { variant: 'button_secondary' }, onClick: onClickToSign, dataTestId: 'click-to-sign-button' }, { children: "Click to Sign" })))] })));
|
|
75
75
|
};
|
|
76
76
|
|
|
@@ -15,6 +15,7 @@ import 'ethers';
|
|
|
15
15
|
import '../../../../../shared/consts/index.js';
|
|
16
16
|
import { useInternalDynamicContext } from '../../../../../context/DynamicContext/useInternalDynamicContext.js';
|
|
17
17
|
import '@dynamic-labs/multi-wallet';
|
|
18
|
+
import '../../../../../config/ApiEndpoint.js';
|
|
18
19
|
import '../../../../../components/ShadowDOM/ShadowDOM.js';
|
|
19
20
|
import '../../../../../context/ThemeContext/ThemeContext.js';
|
|
20
21
|
import 'react-dom';
|
|
@@ -22,7 +23,6 @@ import 'react-focus-lock';
|
|
|
22
23
|
import '../../../../../components/Transition/ZoomTransition/ZoomTransition.js';
|
|
23
24
|
import '../../../../../components/Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
24
25
|
import '../../../../../components/Transition/OpacityTransition/OpacityTransition.js';
|
|
25
|
-
import '../../../../../config/ApiEndpoint.js';
|
|
26
26
|
import '@dynamic-labs/rpc-providers';
|
|
27
27
|
import '../../../../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.js';
|
|
28
28
|
import '../../../../../context/ErrorContext/ErrorContext.js';
|
|
@@ -66,7 +66,7 @@ const DefaultPendingSignModalContent = () => {
|
|
|
66
66
|
setMultiWalletWidgetState('idle');
|
|
67
67
|
}
|
|
68
68
|
});
|
|
69
|
-
return (jsxs(DefaultPromptModal, Object.assign({ showCloseButton: true, dataTestId: 'pending-account-switch', icon: jsx(WalletIcon, {
|
|
69
|
+
return (jsxs(DefaultPromptModal, Object.assign({ showCloseButton: true, dataTestId: 'pending-account-switch', icon: jsx(WalletIcon, { walletKey: selectedWalletConnector === null || selectedWalletConnector === void 0 ? void 0 : selectedWalletConnector.key }), title: `Sign in with ${selectedWalletConnector === null || selectedWalletConnector === void 0 ? void 0 : selectedWalletConnector.name}` }, { children: [jsx(Typography, Object.assign({ variant: 'body_normal', color: 'secondary', weight: 'regular', "data-testid": 'content' }, { children: "Sign the message in your wallet to approve linking this wallet to your account" })), isMobile() &&
|
|
70
70
|
!(selectedWalletConnector === null || selectedWalletConnector === void 0 ? void 0 : selectedWalletConnector.canConnectViaCustodialService) && (jsx(Button, Object.assign({ buttonClassName: 'default-prompt-modal__button', buttonRounded: 'small', expanded: true, type: 'button', buttonPadding: 'medium', typographyProps: { variant: 'button_secondary' }, onClick: onClickToSign, dataTestId: 'click-to-sign-button' }, { children: "Click to Sign" })))] })));
|
|
71
71
|
};
|
|
72
72
|
|
package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.cjs
CHANGED
|
@@ -19,6 +19,7 @@ require('ethers');
|
|
|
19
19
|
require('../../../../shared/consts/index.cjs');
|
|
20
20
|
var useInternalDynamicContext = require('../../../../context/DynamicContext/useInternalDynamicContext.cjs');
|
|
21
21
|
require('@dynamic-labs/multi-wallet');
|
|
22
|
+
require('../../../../config/ApiEndpoint.cjs');
|
|
22
23
|
require('../../../../components/ShadowDOM/ShadowDOM.cjs');
|
|
23
24
|
require('../../../../context/ThemeContext/ThemeContext.cjs');
|
|
24
25
|
require('react-dom');
|
|
@@ -26,7 +27,6 @@ require('react-focus-lock');
|
|
|
26
27
|
require('../../../../components/Transition/ZoomTransition/ZoomTransition.cjs');
|
|
27
28
|
require('../../../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
28
29
|
require('../../../../components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
29
|
-
require('../../../../config/ApiEndpoint.cjs');
|
|
30
30
|
require('@dynamic-labs/rpc-providers');
|
|
31
31
|
require('../../../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.cjs');
|
|
32
32
|
require('../../../../context/ErrorContext/ErrorContext.cjs');
|
|
@@ -55,7 +55,7 @@ var DefaultPromptModal = require('../DefaultPromptModal/DefaultPromptModal.cjs')
|
|
|
55
55
|
const PrimaryNotConnectedModal = () => {
|
|
56
56
|
var _a;
|
|
57
57
|
const { primaryWallet } = useInternalDynamicContext.useInternalDynamicContext();
|
|
58
|
-
return (jsxRuntime.jsxs(DefaultPromptModal.DefaultPromptModal, Object.assign({ dataTestId: 'wallet-not-connected', icon: jsxRuntime.jsx(walletBook.WalletIcon, {
|
|
58
|
+
return (jsxRuntime.jsxs(DefaultPromptModal.DefaultPromptModal, Object.assign({ dataTestId: 'wallet-not-connected', icon: jsxRuntime.jsx(walletBook.WalletIcon, { walletKey: (_a = primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector) === null || _a === void 0 ? void 0 : _a.key }), title: `Switch wallet in ${primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector.name}` }, { children: [jsxRuntime.jsxs(Typography.Typography, Object.assign({ variant: 'body_normal', color: 'secondary', weight: 'regular', "data-testid": 'content' }, { children: ["Your active wallet in", ' ', jsxRuntime.jsx(Typography.Typography, Object.assign({ as: 'span', weight: 'medium', color: 'primary' }, { children: primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector.name })), ' ', "is not linked. Please switch to wallet", ' ', jsxRuntime.jsx(Typography.Typography, Object.assign({ as: 'span', weight: 'medium', color: 'primary' }, { children: shortenWalletAddress.shortenWalletAddress(primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.address, 3, 3) })), ' ', "to log in."] })), jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', color: 'secondary', weight: 'regular', "data-testid": 'content' }, { children: "You can link this wallet to this account after you log in." })), jsxRuntime.jsx(Divider.Divider, { fullWidth: true, text: 'Or' }), jsxRuntime.jsx(LogoutButton.LogoutButton, { isTextButton: false, buttonClassName: 'primary-not-connected__log-out-button' })] })));
|
|
59
59
|
};
|
|
60
60
|
|
|
61
61
|
exports.PrimaryNotConnectedModal = PrimaryNotConnectedModal;
|
package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.js
CHANGED
|
@@ -15,6 +15,7 @@ import 'ethers';
|
|
|
15
15
|
import '../../../../shared/consts/index.js';
|
|
16
16
|
import { useInternalDynamicContext } from '../../../../context/DynamicContext/useInternalDynamicContext.js';
|
|
17
17
|
import '@dynamic-labs/multi-wallet';
|
|
18
|
+
import '../../../../config/ApiEndpoint.js';
|
|
18
19
|
import '../../../../components/ShadowDOM/ShadowDOM.js';
|
|
19
20
|
import '../../../../context/ThemeContext/ThemeContext.js';
|
|
20
21
|
import 'react-dom';
|
|
@@ -22,7 +23,6 @@ import 'react-focus-lock';
|
|
|
22
23
|
import '../../../../components/Transition/ZoomTransition/ZoomTransition.js';
|
|
23
24
|
import '../../../../components/Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
24
25
|
import '../../../../components/Transition/OpacityTransition/OpacityTransition.js';
|
|
25
|
-
import '../../../../config/ApiEndpoint.js';
|
|
26
26
|
import '@dynamic-labs/rpc-providers';
|
|
27
27
|
import '../../../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.js';
|
|
28
28
|
import '../../../../context/ErrorContext/ErrorContext.js';
|
|
@@ -51,7 +51,7 @@ import { DefaultPromptModal } from '../DefaultPromptModal/DefaultPromptModal.js'
|
|
|
51
51
|
const PrimaryNotConnectedModal = () => {
|
|
52
52
|
var _a;
|
|
53
53
|
const { primaryWallet } = useInternalDynamicContext();
|
|
54
|
-
return (jsxs(DefaultPromptModal, Object.assign({ dataTestId: 'wallet-not-connected', icon: jsx(WalletIcon, {
|
|
54
|
+
return (jsxs(DefaultPromptModal, Object.assign({ dataTestId: 'wallet-not-connected', icon: jsx(WalletIcon, { walletKey: (_a = primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector) === null || _a === void 0 ? void 0 : _a.key }), title: `Switch wallet in ${primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector.name}` }, { children: [jsxs(Typography, Object.assign({ variant: 'body_normal', color: 'secondary', weight: 'regular', "data-testid": 'content' }, { children: ["Your active wallet in", ' ', jsx(Typography, Object.assign({ as: 'span', weight: 'medium', color: 'primary' }, { children: primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector.name })), ' ', "is not linked. Please switch to wallet", ' ', jsx(Typography, Object.assign({ as: 'span', weight: 'medium', color: 'primary' }, { children: shortenWalletAddress(primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.address, 3, 3) })), ' ', "to log in."] })), jsx(Typography, Object.assign({ variant: 'body_normal', color: 'secondary', weight: 'regular', "data-testid": 'content' }, { children: "You can link this wallet to this account after you log in." })), jsx(Divider, { fullWidth: true, text: 'Or' }), jsx(LogoutButton, { isTextButton: false, buttonClassName: 'primary-not-connected__log-out-button' })] })));
|
|
55
55
|
};
|
|
56
56
|
|
|
57
57
|
export { PrimaryNotConnectedModal };
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
-
var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
|
|
7
6
|
var walletBook = require('@dynamic-labs/wallet-book');
|
|
7
|
+
var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
|
|
8
8
|
var QRCode = require('../../../../views/QrCodeView/QRCode.cjs');
|
|
9
9
|
require('react');
|
|
10
10
|
var Typography = require('../../../../components/Typography/Typography.cjs');
|
|
@@ -23,6 +23,7 @@ require('../../../../shared/consts/index.cjs');
|
|
|
23
23
|
var useInternalDynamicContext = require('../../../../context/DynamicContext/useInternalDynamicContext.cjs');
|
|
24
24
|
require('@dynamic-labs/multi-wallet');
|
|
25
25
|
var pixelToRem = require('../../../../utils/functions/pixelToRem/pixelToRem.cjs');
|
|
26
|
+
require('../../../../config/ApiEndpoint.cjs');
|
|
26
27
|
require('../../../../components/ShadowDOM/ShadowDOM.cjs');
|
|
27
28
|
var ThemeContext = require('../../../../context/ThemeContext/ThemeContext.cjs');
|
|
28
29
|
var Icon = require('../../../../components/Icon/Icon.cjs');
|
|
@@ -31,7 +32,6 @@ require('react-focus-lock');
|
|
|
31
32
|
require('../../../../components/Transition/ZoomTransition/ZoomTransition.cjs');
|
|
32
33
|
require('../../../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
33
34
|
require('../../../../components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
34
|
-
require('../../../../config/ApiEndpoint.cjs');
|
|
35
35
|
require('@dynamic-labs/rpc-providers');
|
|
36
36
|
require('../../../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.cjs');
|
|
37
37
|
require('../../../../context/ErrorContext/ErrorContext.cjs');
|
|
@@ -57,25 +57,26 @@ require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
|
57
57
|
require('../../../../components/OverlayCard/OverlayCard.context.cjs');
|
|
58
58
|
|
|
59
59
|
const QrCodeModalView = ({ walletId }) => {
|
|
60
|
-
var _a;
|
|
60
|
+
var _a, _b;
|
|
61
61
|
const { secondaryWallets, qrcodeUri, desktopUri } = useInternalDynamicContext.useInternalDynamicContext();
|
|
62
62
|
const { walletBook: walletBook$1 } = walletBook.useWalletBookContext();
|
|
63
63
|
const newPrimaryWallet = secondaryWallets.find(({ id }) => id === walletId);
|
|
64
|
-
const
|
|
64
|
+
const walletKey = ((_a = newPrimaryWallet === null || newPrimaryWallet === void 0 ? void 0 : newPrimaryWallet.connector) === null || _a === void 0 ? void 0 : _a.key) || '';
|
|
65
|
+
const walletName = ((_b = newPrimaryWallet === null || newPrimaryWallet === void 0 ? void 0 : newPrimaryWallet.connector) === null || _b === void 0 ? void 0 : _b.name) || '';
|
|
65
66
|
const { theme } = ThemeContext.useThemeContext();
|
|
66
67
|
const qrCodeColorsByTheme = {
|
|
67
68
|
dark: {
|
|
68
69
|
accentColor: 'var(--dynamic-text-primary)',
|
|
69
70
|
},
|
|
70
71
|
light: {
|
|
71
|
-
accentColor: walletBook.getWalletPrimaryColor(walletBook$1,
|
|
72
|
+
accentColor: walletBook.getWalletPrimaryColor(walletBook$1, walletKey) ||
|
|
72
73
|
'var(--dynamic-text-primary)',
|
|
73
74
|
},
|
|
74
75
|
};
|
|
75
76
|
// can't use theme because it's string instead of 'light' | 'dark'
|
|
76
77
|
const typedTheme = theme.theme.name === 'light' ? 'light' : 'dark';
|
|
77
|
-
const icon = (jsxRuntime.jsx(walletBook.WalletIcon, {
|
|
78
|
-
return (jsxRuntime.jsxs("div", Object.assign({ className: 'qr-code-modal-view' }, { children: [jsxRuntime.jsxs(Typography.Typography, Object.assign({ variant: 'button_primary', color: 'primary', className: 'qr-code-modal-view__title' }, { children: ["Connect with ", newPrimaryWallet === null || newPrimaryWallet === void 0 ? void 0 : newPrimaryWallet.connector.name] })), jsxRuntime.jsxs(Typography.Typography, Object.assign({ variant: 'body_small', color: 'secondary', className: 'qr-code-modal-view__title' }, { children: ["Connect wallet", ' ', jsxRuntime.jsx(Typography.Typography, Object.assign({ as: 'span', weight: 'medium', color: 'primary' }, { children: shortenWalletAddress.shortenWalletAddress(newPrimaryWallet === null || newPrimaryWallet === void 0 ? void 0 : newPrimaryWallet.address, 4, 4) })), ' ', "to switch active account."] })), jsxRuntime.jsx("div", Object.assign({ className: 'qr-code-modal-view__container' }, { children: jsxRuntime.jsx("div", Object.assign({ className: 'qr-code-modal-view__wrapper' }, { children: qrcodeUri ? (jsxRuntime.jsx(QRCode.QRCode, { Icon: icon, accentColor: qrCodeColorsByTheme[typedTheme].accentColor, value: qrcodeUri, size: 175, logoSize: 40,
|
|
78
|
+
const icon = (jsxRuntime.jsx(walletBook.WalletIcon, { walletKey: walletKey, style: { height: pixelToRem.pixelToRem(24), width: pixelToRem.pixelToRem(24) } }));
|
|
79
|
+
return (jsxRuntime.jsxs("div", Object.assign({ className: 'qr-code-modal-view' }, { children: [jsxRuntime.jsxs(Typography.Typography, Object.assign({ variant: 'button_primary', color: 'primary', className: 'qr-code-modal-view__title' }, { children: ["Connect with ", newPrimaryWallet === null || newPrimaryWallet === void 0 ? void 0 : newPrimaryWallet.connector.name] })), jsxRuntime.jsxs(Typography.Typography, Object.assign({ variant: 'body_small', color: 'secondary', className: 'qr-code-modal-view__title' }, { children: ["Connect wallet", ' ', jsxRuntime.jsx(Typography.Typography, Object.assign({ as: 'span', weight: 'medium', color: 'primary' }, { children: shortenWalletAddress.shortenWalletAddress(newPrimaryWallet === null || newPrimaryWallet === void 0 ? void 0 : newPrimaryWallet.address, 4, 4) })), ' ', "to switch active account."] })), jsxRuntime.jsx("div", Object.assign({ className: 'qr-code-modal-view__container' }, { children: jsxRuntime.jsx("div", Object.assign({ className: 'qr-code-modal-view__wrapper' }, { children: qrcodeUri ? (jsxRuntime.jsx(QRCode.QRCode, { Icon: icon, accentColor: qrCodeColorsByTheme[typedTheme].accentColor, value: qrcodeUri, size: 175, logoSize: 40, walletKey: walletConnectorCore.normalizeWalletName(walletKey) })) : (
|
|
79
80
|
// this div exists to give the parent a child, so that the parent
|
|
80
81
|
// takes on its given width and height. the result is stable
|
|
81
82
|
// rendering of this component, without this there is a brief flash
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
-
import { normalizeWalletName } from '@dynamic-labs/wallet-connector-core';
|
|
3
2
|
import { useWalletBookContext, getWalletPrimaryColor, WalletIcon } from '@dynamic-labs/wallet-book';
|
|
3
|
+
import { normalizeWalletName } from '@dynamic-labs/wallet-connector-core';
|
|
4
4
|
import { QRCode } from '../../../../views/QrCodeView/QRCode.js';
|
|
5
5
|
import 'react';
|
|
6
6
|
import { Typography } from '../../../../components/Typography/Typography.js';
|
|
@@ -19,6 +19,7 @@ import '../../../../shared/consts/index.js';
|
|
|
19
19
|
import { useInternalDynamicContext } from '../../../../context/DynamicContext/useInternalDynamicContext.js';
|
|
20
20
|
import '@dynamic-labs/multi-wallet';
|
|
21
21
|
import { pixelToRem } from '../../../../utils/functions/pixelToRem/pixelToRem.js';
|
|
22
|
+
import '../../../../config/ApiEndpoint.js';
|
|
22
23
|
import '../../../../components/ShadowDOM/ShadowDOM.js';
|
|
23
24
|
import { useThemeContext } from '../../../../context/ThemeContext/ThemeContext.js';
|
|
24
25
|
import { Icon } from '../../../../components/Icon/Icon.js';
|
|
@@ -27,7 +28,6 @@ import 'react-focus-lock';
|
|
|
27
28
|
import '../../../../components/Transition/ZoomTransition/ZoomTransition.js';
|
|
28
29
|
import '../../../../components/Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
29
30
|
import '../../../../components/Transition/OpacityTransition/OpacityTransition.js';
|
|
30
|
-
import '../../../../config/ApiEndpoint.js';
|
|
31
31
|
import '@dynamic-labs/rpc-providers';
|
|
32
32
|
import '../../../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.js';
|
|
33
33
|
import '../../../../context/ErrorContext/ErrorContext.js';
|
|
@@ -53,25 +53,26 @@ import '../../../../components/MenuList/Dropdown/Dropdown.js';
|
|
|
53
53
|
import '../../../../components/OverlayCard/OverlayCard.context.js';
|
|
54
54
|
|
|
55
55
|
const QrCodeModalView = ({ walletId }) => {
|
|
56
|
-
var _a;
|
|
56
|
+
var _a, _b;
|
|
57
57
|
const { secondaryWallets, qrcodeUri, desktopUri } = useInternalDynamicContext();
|
|
58
58
|
const { walletBook } = useWalletBookContext();
|
|
59
59
|
const newPrimaryWallet = secondaryWallets.find(({ id }) => id === walletId);
|
|
60
|
-
const
|
|
60
|
+
const walletKey = ((_a = newPrimaryWallet === null || newPrimaryWallet === void 0 ? void 0 : newPrimaryWallet.connector) === null || _a === void 0 ? void 0 : _a.key) || '';
|
|
61
|
+
const walletName = ((_b = newPrimaryWallet === null || newPrimaryWallet === void 0 ? void 0 : newPrimaryWallet.connector) === null || _b === void 0 ? void 0 : _b.name) || '';
|
|
61
62
|
const { theme } = useThemeContext();
|
|
62
63
|
const qrCodeColorsByTheme = {
|
|
63
64
|
dark: {
|
|
64
65
|
accentColor: 'var(--dynamic-text-primary)',
|
|
65
66
|
},
|
|
66
67
|
light: {
|
|
67
|
-
accentColor: getWalletPrimaryColor(walletBook,
|
|
68
|
+
accentColor: getWalletPrimaryColor(walletBook, walletKey) ||
|
|
68
69
|
'var(--dynamic-text-primary)',
|
|
69
70
|
},
|
|
70
71
|
};
|
|
71
72
|
// can't use theme because it's string instead of 'light' | 'dark'
|
|
72
73
|
const typedTheme = theme.theme.name === 'light' ? 'light' : 'dark';
|
|
73
|
-
const icon = (jsx(WalletIcon, {
|
|
74
|
-
return (jsxs("div", Object.assign({ className: 'qr-code-modal-view' }, { children: [jsxs(Typography, Object.assign({ variant: 'button_primary', color: 'primary', className: 'qr-code-modal-view__title' }, { children: ["Connect with ", newPrimaryWallet === null || newPrimaryWallet === void 0 ? void 0 : newPrimaryWallet.connector.name] })), jsxs(Typography, Object.assign({ variant: 'body_small', color: 'secondary', className: 'qr-code-modal-view__title' }, { children: ["Connect wallet", ' ', jsx(Typography, Object.assign({ as: 'span', weight: 'medium', color: 'primary' }, { children: shortenWalletAddress(newPrimaryWallet === null || newPrimaryWallet === void 0 ? void 0 : newPrimaryWallet.address, 4, 4) })), ' ', "to switch active account."] })), jsx("div", Object.assign({ className: 'qr-code-modal-view__container' }, { children: jsx("div", Object.assign({ className: 'qr-code-modal-view__wrapper' }, { children: qrcodeUri ? (jsx(QRCode, { Icon: icon, accentColor: qrCodeColorsByTheme[typedTheme].accentColor, value: qrcodeUri, size: 175, logoSize: 40,
|
|
74
|
+
const icon = (jsx(WalletIcon, { walletKey: walletKey, style: { height: pixelToRem(24), width: pixelToRem(24) } }));
|
|
75
|
+
return (jsxs("div", Object.assign({ className: 'qr-code-modal-view' }, { children: [jsxs(Typography, Object.assign({ variant: 'button_primary', color: 'primary', className: 'qr-code-modal-view__title' }, { children: ["Connect with ", newPrimaryWallet === null || newPrimaryWallet === void 0 ? void 0 : newPrimaryWallet.connector.name] })), jsxs(Typography, Object.assign({ variant: 'body_small', color: 'secondary', className: 'qr-code-modal-view__title' }, { children: ["Connect wallet", ' ', jsx(Typography, Object.assign({ as: 'span', weight: 'medium', color: 'primary' }, { children: shortenWalletAddress(newPrimaryWallet === null || newPrimaryWallet === void 0 ? void 0 : newPrimaryWallet.address, 4, 4) })), ' ', "to switch active account."] })), jsx("div", Object.assign({ className: 'qr-code-modal-view__container' }, { children: jsx("div", Object.assign({ className: 'qr-code-modal-view__wrapper' }, { children: qrcodeUri ? (jsx(QRCode, { Icon: icon, accentColor: qrCodeColorsByTheme[typedTheme].accentColor, value: qrcodeUri, size: 175, logoSize: 40, walletKey: normalizeWalletName(walletKey) })) : (
|
|
75
76
|
// this div exists to give the parent a child, so that the parent
|
|
76
77
|
// takes on its given width and height. the result is stable
|
|
77
78
|
// rendering of this component, without this there is a brief flash
|
|
@@ -21,6 +21,7 @@ require('../../../../shared/utils/classes/storage/localStorage.cjs');
|
|
|
21
21
|
require('ethers');
|
|
22
22
|
require('../../../../shared/consts/index.cjs');
|
|
23
23
|
require('@dynamic-labs/multi-wallet');
|
|
24
|
+
require('../../../../config/ApiEndpoint.cjs');
|
|
24
25
|
require('../../../../components/ShadowDOM/ShadowDOM.cjs');
|
|
25
26
|
require('../../../../context/ThemeContext/ThemeContext.cjs');
|
|
26
27
|
require('react-dom');
|
|
@@ -28,7 +29,6 @@ require('react-focus-lock');
|
|
|
28
29
|
require('../../../../components/Transition/ZoomTransition/ZoomTransition.cjs');
|
|
29
30
|
require('../../../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
30
31
|
require('../../../../components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
31
|
-
require('../../../../config/ApiEndpoint.cjs');
|
|
32
32
|
require('@dynamic-labs/rpc-providers');
|
|
33
33
|
require('../../../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.cjs');
|
|
34
34
|
require('../../../../context/ErrorContext/ErrorContext.cjs');
|
|
@@ -53,7 +53,7 @@ require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
|
|
|
53
53
|
require('../../../../components/OverlayCard/OverlayCard.context.cjs');
|
|
54
54
|
|
|
55
55
|
const UnlinkWalletPopUp = ({ walletId }) => {
|
|
56
|
-
const { handleUnlinkWallet, eventsCallbacks, setSelectedWalletWithAction, user, } = useInternalDynamicContext.useInternalDynamicContext();
|
|
56
|
+
const { handleUnlinkWallet, eventsCallbacks, setSelectedWalletWithAction, user, authMode, } = useInternalDynamicContext.useInternalDynamicContext();
|
|
57
57
|
const { loading, setLoading } = LoadingContext.useLoadingContext();
|
|
58
58
|
const onConfirmClick = () => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
59
59
|
var _a;
|
|
@@ -76,10 +76,10 @@ const UnlinkWalletPopUp = ({ walletId }) => {
|
|
|
76
76
|
const onCancelClick = () => {
|
|
77
77
|
setSelectedWalletWithAction(null);
|
|
78
78
|
};
|
|
79
|
-
return (jsxRuntime.jsx(WidgetPortal.WidgetPortal, Object.assign({ onBackdropClick: onCancelClick }, { children: jsxRuntime.jsxs("div", Object.assign({ className: 'unlink-wallet-popup__container' }, { children: [jsxRuntime.
|
|
79
|
+
return (jsxRuntime.jsx(WidgetPortal.WidgetPortal, Object.assign({ onBackdropClick: onCancelClick }, { children: jsxRuntime.jsxs("div", Object.assign({ className: 'unlink-wallet-popup__container' }, { children: [jsxRuntime.jsxs(Typography.Typography, Object.assign({ color: 'primary', className: 'unlink-wallet-popup__title', variant: 'body_normal', as: 'h6' }, { children: [authMode === 'connect-only' ? 'Disconnect' : 'Unlink', " your wallet?"] })), jsxRuntime.jsxs(Typography.Typography, Object.assign({ className: 'unlink-wallet-popup__label', variant: 'body_small', color: 'secondary' }, { children: ["Are you sure you want to", ' ', authMode === 'connect-only' ? 'disconnect' : 'unlink', " your wallet?"] })), jsxRuntime.jsxs(Button.Button, Object.assign({ buttonPadding: 'small', onClick: onConfirmClick, disabled: loading, buttonClassName: 'unlink-wallet-popup__button unlink-wallet-popup__button--shadow', color: 'primary', expanded: true, buttonRounded: 'small', typographyProps: {
|
|
80
80
|
variant: 'button_secondary',
|
|
81
81
|
weight: 'medium',
|
|
82
|
-
}, dataTestId: 'unlink-wallet-popup-yes-button' }, { children: "Yes,
|
|
82
|
+
}, dataTestId: 'unlink-wallet-popup-yes-button' }, { children: ["Yes, ", authMode === 'connect-only' ? 'disconnect' : 'unlink'] })), jsxRuntime.jsx(Button.Button, Object.assign({ expanded: true, buttonPadding: 'small', onClick: onCancelClick, buttonVariant: 'secondary', buttonClassName: 'unlink-wallet-popup__button', buttonRounded: 'small', typographyProps: {
|
|
83
83
|
variant: 'button_secondary',
|
|
84
84
|
weight: 'medium',
|
|
85
85
|
} }, { children: "No" }))] })) })));
|