@dynamic-labs/sdk-react-core 0.18.0-RC.9 → 0.18.0-beta.29
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 +272 -0
- package/package.cjs +2 -2
- package/package.js +2 -2
- package/package.json +9 -9
- package/src/index.cjs +11 -0
- package/src/index.d.ts +3 -1
- package/src/index.js +7 -0
- package/src/lib/Main.cjs +52 -8
- package/src/lib/Main.js +52 -8
- package/src/lib/assets/index.d.ts +1 -0
- package/src/lib/assets/no-wallet-found.cjs +75 -0
- package/src/lib/assets/no-wallet-found.js +51 -0
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.cjs +3 -0
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.js +3 -0
- package/src/lib/components/AnimatePresence/AnimatePresence.cjs +3 -0
- package/src/lib/components/AnimatePresence/AnimatePresence.js +3 -0
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.cjs +3 -0
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.js +3 -0
- package/src/lib/components/Button/Button.cjs +12 -4
- package/src/lib/components/Button/Button.d.ts +3 -2
- package/src/lib/components/Button/Button.js +12 -4
- package/src/lib/components/ChainCard/ChainCard.cjs +1 -1
- package/src/lib/components/ChainCard/ChainCard.js +1 -1
- package/src/lib/components/Divider/Divider.cjs +3 -0
- package/src/lib/components/Divider/Divider.js +3 -0
- package/src/lib/components/IconWithSpinner/IconWithSpinner.cjs +2 -2
- package/src/lib/components/IconWithSpinner/IconWithSpinner.js +2 -2
- package/src/lib/components/InlineWidget/InlineWidget.cjs +12 -0
- package/src/lib/components/InlineWidget/InlineWidget.d.ts +7 -0
- package/src/lib/components/InlineWidget/InlineWidget.js +8 -0
- package/src/lib/components/InlineWidget/components/InlineWidgetButton/InlineWidgetButton.cjs +12 -0
- package/src/lib/components/InlineWidget/components/InlineWidgetButton/InlineWidgetButton.d.ts +8 -0
- package/src/lib/components/InlineWidget/components/InlineWidgetButton/InlineWidgetButton.js +8 -0
- package/src/lib/components/InlineWidget/components/InlineWidgetButton/index.d.ts +1 -0
- package/src/lib/components/InlineWidget/components/index.d.ts +1 -0
- package/src/lib/components/InlineWidget/index.d.ts +2 -0
- package/src/lib/components/LegacySafariCssOverrides/LegacySafariCssOverrides.cjs +9 -0
- package/src/lib/components/LegacySafariCssOverrides/LegacySafariCssOverrides.d.ts +2 -0
- package/src/lib/components/LegacySafariCssOverrides/LegacySafariCssOverrides.js +5 -0
- package/src/lib/components/LegacySafariCssOverrides/index.d.ts +1 -0
- package/src/lib/components/LogoutButton/LogoutButton.cjs +17 -3
- package/src/lib/components/LogoutButton/LogoutButton.js +17 -3
- package/src/lib/components/MenuList/Dropdown/Dropdown.cjs +86 -0
- package/src/lib/components/MenuList/Dropdown/Dropdown.d.ts +16 -0
- package/src/lib/components/MenuList/Dropdown/Dropdown.js +82 -0
- package/src/lib/components/MenuList/Dropdown/index.d.ts +1 -0
- package/src/lib/components/MenuList/MenuList/MenuList.cjs +34 -0
- package/src/lib/components/MenuList/MenuList/MenuList.d.ts +15 -0
- package/src/lib/components/MenuList/MenuList/MenuList.js +30 -0
- package/src/lib/components/MenuList/MenuList/index.d.ts +1 -0
- package/src/lib/components/MenuList/index.d.ts +1 -0
- package/src/lib/components/MenuList/utils/index.d.ts +1 -0
- package/src/lib/components/{Popper → MenuList}/utils/watchToScrollInHierarchy/watchToScrollInHierarchy.cjs +6 -1
- package/src/lib/components/MenuList/utils/watchToScrollInHierarchy/watchToScrollInHierarchy.d.ts +5 -0
- package/src/lib/components/{Popper → MenuList}/utils/watchToScrollInHierarchy/watchToScrollInHierarchy.js +6 -1
- package/src/lib/components/Modal/Modal.cjs +3 -0
- package/src/lib/components/Modal/Modal.js +3 -0
- package/src/lib/components/NetworkPicker/NetworkPicker.cjs +12 -13
- package/src/lib/components/NetworkPicker/NetworkPicker.js +12 -13
- package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.cjs +3 -0
- package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.js +3 -0
- package/src/lib/components/NetworkPicker/components/Network/Network.cjs +3 -0
- package/src/lib/components/NetworkPicker/components/Network/Network.js +3 -0
- package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.cjs +3 -0
- package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.js +3 -0
- package/src/lib/components/OTPVerificationView/OTPVerificationView.cjs +3 -0
- package/src/lib/components/OTPVerificationView/OTPVerificationView.js +3 -0
- package/src/lib/components/OverlayCard/OverlayCard.cjs +12 -11
- package/src/lib/components/OverlayCard/OverlayCard.d.ts +4 -2
- package/src/lib/components/OverlayCard/OverlayCard.js +13 -11
- package/src/lib/components/Popper/Popper/Popper.cjs +12 -12
- package/src/lib/components/Popper/Popper/Popper.d.ts +7 -4
- package/src/lib/components/Popper/Popper/Popper.js +12 -12
- package/src/lib/components/Popper/PopperContent/PopperContent.cjs +1 -1
- package/src/lib/components/Popper/PopperContent/PopperContent.d.ts +2 -1
- package/src/lib/components/Popper/PopperContent/PopperContent.js +1 -1
- package/src/lib/components/Popper/PopperContext/PopperContext.js +1 -1
- package/src/lib/components/Popper/utils/getChildPosition/getChildPosition.cjs +1 -0
- package/src/lib/components/Popper/utils/getChildPosition/getChildPosition.d.ts +1 -0
- package/src/lib/components/Popper/utils/getChildPosition/getChildPosition.js +1 -0
- package/src/lib/components/Popper/utils/index.d.ts +0 -1
- package/src/lib/components/Portal/Portal.cjs +5 -2
- package/src/lib/components/Portal/Portal.js +5 -2
- package/src/lib/components/PoweredByDynamic/PoweredByDynamic.cjs +9 -1
- package/src/lib/components/PoweredByDynamic/PoweredByDynamic.js +9 -1
- package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.cjs +1 -1
- package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.js +1 -1
- package/src/lib/components/ShadowDOM/ShadowDOM.cjs +4 -2
- package/src/lib/components/ShadowDOM/ShadowDOM.js +4 -2
- package/src/lib/components/Step/Step.cjs +23 -2
- package/src/lib/components/Step/Step.d.ts +2 -3
- package/src/lib/components/Step/Step.js +24 -3
- package/src/lib/components/Toolkit/Toolkit.cjs +3 -3
- package/src/lib/components/Toolkit/Toolkit.js +3 -3
- package/src/lib/components/Toolkit/components/MultiWalletSwitch.cjs +18 -0
- package/src/lib/components/Toolkit/components/MultiWalletSwitch.d.ts +8 -0
- package/src/lib/components/Toolkit/components/MultiWalletSwitch.js +14 -0
- package/src/lib/components/Toolkit/components/index.d.ts +1 -1
- package/src/lib/components/Tooltip/Tooltip.cjs +3 -0
- package/src/lib/components/Tooltip/Tooltip.js +3 -0
- package/src/lib/components/TosAndPp/TosAndPp.cjs +18 -3
- package/src/lib/components/TosAndPp/TosAndPp.d.ts +1 -6
- package/src/lib/components/TosAndPp/TosAndPp.js +19 -4
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.cjs +1 -1
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.js +1 -1
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.cjs +4 -1
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.js +4 -1
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.cjs +3 -0
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.js +3 -0
- package/src/lib/components/UserAddress/UserAddress.cjs +4 -1
- package/src/lib/components/UserAddress/UserAddress.js +4 -1
- package/src/lib/components/UserProfile/UserProfile.cjs +6 -14
- package/src/lib/components/UserProfile/UserProfile.js +6 -14
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.cjs +3 -0
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.js +3 -0
- package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.cjs +3 -0
- package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.js +3 -0
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs +15 -64
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.d.ts +2 -4
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js +15 -64
- package/src/lib/components/WalletInformationCard/WalletInformationCard.cjs +33 -0
- package/src/lib/components/WalletInformationCard/WalletInformationCard.d.ts +11 -0
- package/src/lib/components/WalletInformationCard/WalletInformationCard.js +29 -0
- package/src/lib/components/WalletInformationCard/index.d.ts +1 -0
- package/src/lib/components/index.d.ts +3 -0
- package/src/lib/context/AccountExistsContext/AccountExistsContext.cjs +27 -0
- package/src/lib/context/AccountExistsContext/AccountExistsContext.d.ts +17 -0
- package/src/lib/context/AccountExistsContext/AccountExistsContext.js +21 -0
- package/src/lib/context/AccountExistsContext/index.d.ts +1 -0
- package/src/lib/context/DynamicContext/DynamicContext.cjs +156 -76
- package/src/lib/context/DynamicContext/DynamicContext.d.ts +12 -132
- package/src/lib/context/DynamicContext/DynamicContext.js +157 -78
- package/src/lib/context/DynamicContext/helpers.cjs +6 -5
- package/src/lib/context/DynamicContext/helpers.d.ts +4 -2
- package/src/lib/context/DynamicContext/helpers.js +6 -5
- package/src/lib/context/DynamicContext/hooks/index.d.ts +4 -1
- package/src/lib/context/DynamicContext/hooks/useNameService/useNameService.cjs +1 -1
- package/src/lib/context/DynamicContext/hooks/useNameService/useNameService.js +1 -1
- package/src/lib/context/DynamicContext/hooks/useVerificationInProgress/index.d.ts +1 -0
- package/src/lib/context/DynamicContext/hooks/useVerificationInProgress/useVerificationInProgress.cjs +33 -0
- package/src/lib/context/DynamicContext/hooks/useVerificationInProgress/useVerificationInProgress.d.ts +1 -0
- package/src/lib/context/DynamicContext/hooks/useVerificationInProgress/useVerificationInProgress.js +29 -0
- package/src/lib/context/DynamicContext/types/index.d.ts +146 -0
- package/src/lib/context/DynamicContext/useCustomerCallbacks/types.d.ts +7 -2
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerAuthFlowCallbacks.cjs +3 -0
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerAuthFlowCallbacks.js +3 -0
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerCallbacks.cjs +9 -3
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerCallbacks.d.ts +1 -1
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerCallbacks.js +9 -3
- package/src/lib/context/DynamicContext/useDynamicContext.cjs +8 -3
- package/src/lib/context/DynamicContext/useDynamicContext.d.ts +2 -2
- package/src/lib/context/DynamicContext/useDynamicContext.js +8 -3
- package/src/lib/context/DynamicContext/useInternalDynamicContext.d.ts +1 -1
- package/src/lib/context/FundingContext/FundingContext.cjs +13 -1
- package/src/lib/context/FundingContext/FundingContext.js +13 -1
- package/src/lib/context/MockContext/MockContext.cjs +36 -2
- package/src/lib/context/MockContext/MockContext.d.ts +1 -1
- package/src/lib/context/MockContext/MockContext.js +36 -2
- package/src/lib/context/MockContext/constants/index.cjs +64 -0
- package/src/lib/context/MockContext/constants/index.d.ts +2 -0
- package/src/lib/context/MockContext/constants/index.js +60 -0
- package/src/lib/context/QrCodeContext/QrCodeContext.cjs +3 -0
- package/src/lib/context/QrCodeContext/QrCodeContext.js +3 -0
- package/src/lib/context/SendBalanceContext/SendBalanceContext.cjs +3 -0
- package/src/lib/context/SendBalanceContext/SendBalanceContext.js +3 -0
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.cjs +5 -3
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +5 -3
- package/src/lib/context/ViewContext/ViewContext.d.ts +1 -1
- package/src/lib/context/WalletContext/WalletContext.cjs +4 -1
- package/src/lib/context/WalletContext/WalletContext.js +4 -1
- package/src/lib/data/api.cjs +27 -0
- package/src/lib/data/api.d.ts +4 -0
- package/src/lib/data/api.js +28 -2
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.cjs +3 -0
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.js +3 -0
- package/src/lib/layout/DynamicAuthLayout/Header/header.cjs +6 -1
- package/src/lib/layout/DynamicAuthLayout/Header/header.js +6 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.cjs +4 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/HelpHeader/HelpHeader.js +4 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/Item/Item.cjs +3 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/Item/Item.js +3 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/NewToWeb3WalletItem/NewToWeb3WalletItem.cjs +1 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/NewToWeb3WalletItem/NewToWeb3WalletItem.js +1 -1
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.cjs +3 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.js +3 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletListHelpContent.cjs +3 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletListHelpContent/WalletListHelpContent.js +3 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletMoreInfoContent/WalletMoreInfoContent.cjs +3 -0
- package/src/lib/layout/DynamicAuthLayout/HelpContent/WalletMoreInfoContent/WalletMoreInfoContent.js +3 -0
- package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.cjs +7 -3
- package/src/lib/layout/DynamicAuthLayout/ToSFooter/ToSFooter.js +7 -3
- package/src/lib/layout/DynamicAuthLayout/WalletProgressStepper/WalletProgressStepper.cjs +7 -4
- package/src/lib/layout/DynamicAuthLayout/WalletProgressStepper/WalletProgressStepper.js +7 -4
- package/src/lib/layout/DynamicAuthLayout/utils/getChainStepState/getChainStepState.cjs +18 -0
- package/src/lib/layout/DynamicAuthLayout/utils/getChainStepState/getChainStepState.d.ts +3 -0
- package/src/lib/layout/DynamicAuthLayout/utils/getChainStepState/getChainStepState.js +14 -0
- package/src/lib/layout/DynamicAuthLayout/utils/getChainStepState/index.d.ts +1 -0
- package/src/lib/layout/DynamicAuthLayout/utils/index.d.ts +1 -0
- package/src/lib/layouts/BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.cjs +54 -0
- package/src/lib/layouts/BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.d.ts +9 -0
- package/src/lib/layouts/BridgeNextWalletToConnectLayout/BridgeNextWalletToConnectLayout.js +50 -0
- package/src/lib/layouts/BridgeNextWalletToConnectLayout/index.d.ts +1 -0
- package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.cjs +3 -0
- package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.js +3 -0
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.cjs +5 -2
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.d.ts +1 -0
- package/src/lib/layouts/ConnectedWalletsListLayout/ConnectedWalletsListLayout.js +5 -2
- package/src/lib/modals/SendBalanceModal/SendBalanceModal.cjs +3 -0
- package/src/lib/modals/SendBalanceModal/SendBalanceModal.js +3 -0
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.cjs +3 -0
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js +3 -0
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.cjs +3 -0
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.js +3 -0
- package/src/lib/shared/types/index.d.ts +6 -2
- package/src/lib/shared/utils/classes/storage/localStorage.cjs +36 -24
- package/src/lib/shared/utils/classes/storage/localStorage.d.ts +16 -3
- package/src/lib/shared/utils/classes/storage/localStorage.js +37 -25
- package/src/lib/shared/utils/hooks/index.d.ts +2 -0
- package/src/lib/shared/utils/hooks/useEffectOnce/index.d.ts +1 -0
- package/src/lib/shared/utils/hooks/useEffectOnce/useEffectOnce.cjs +27 -0
- package/src/lib/shared/utils/hooks/useEffectOnce/useEffectOnce.d.ts +17 -0
- package/src/lib/shared/utils/hooks/useEffectOnce/useEffectOnce.js +23 -0
- package/src/lib/shared/utils/hooks/useForwardedRef/index.d.ts +1 -0
- package/src/lib/shared/utils/hooks/useForwardedRef/useForwardedRef.cjs +25 -0
- package/src/lib/shared/utils/hooks/useForwardedRef/useForwardedRef.d.ts +2 -0
- package/src/lib/shared/utils/hooks/useForwardedRef/useForwardedRef.js +21 -0
- 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 +3 -1
- package/src/lib/utils/constants/localStorage.d.ts +1 -0
- package/src/lib/utils/constants/localStorage.js +3 -2
- package/src/lib/utils/constants/onrampProviders.cjs +7 -0
- package/src/lib/utils/constants/onrampProviders.d.ts +1 -0
- package/src/lib/utils/constants/onrampProviders.js +3 -0
- package/src/lib/utils/functions/createUserProfile/createUserProfile.cjs +10 -1
- package/src/lib/utils/functions/createUserProfile/createUserProfile.js +10 -1
- package/src/lib/utils/functions/generateMessages/index.cjs +3 -3
- package/src/lib/utils/functions/generateMessages/index.d.ts +1 -1
- package/src/lib/utils/functions/generateMessages/index.js +3 -3
- package/src/lib/utils/functions/getAuthToken/getAuthToken.cjs +2 -1
- package/src/lib/utils/functions/getAuthToken/getAuthToken.d.ts +1 -1
- package/src/lib/utils/functions/getAuthToken/getAuthToken.js +2 -1
- package/src/lib/utils/functions/getDynamicLayoutData/getDynamicLayoutData.cjs +1 -0
- package/src/lib/utils/functions/getDynamicLayoutData/getDynamicLayoutData.js +1 -0
- package/src/lib/utils/functions/getMissingChains/getMissingChains.cjs +1 -1
- package/src/lib/utils/functions/getMissingChains/getMissingChains.d.ts +1 -1
- package/src/lib/utils/functions/getMissingChains/getMissingChains.js +1 -1
- package/src/lib/utils/functions/getVerifyArgs/getVerifyArgs.cjs +2 -2
- package/src/lib/utils/functions/getVerifyArgs/getVerifyArgs.d.ts +3 -3
- package/src/lib/utils/functions/getVerifyArgs/getVerifyArgs.js +2 -2
- package/src/lib/utils/functions/getWalletConnectorNetworks/getWalletConnectorNetworks.cjs +12 -0
- package/src/lib/utils/functions/getWalletConnectorNetworks/getWalletConnectorNetworks.d.ts +3 -0
- package/src/lib/utils/functions/getWalletConnectorNetworks/getWalletConnectorNetworks.js +8 -0
- package/src/lib/utils/functions/getWalletVerifiedCredential/getWalletVerifiedCredential.cjs +3 -1
- package/src/lib/utils/functions/getWalletVerifiedCredential/getWalletVerifiedCredential.d.ts +1 -1
- package/src/lib/utils/functions/getWalletVerifiedCredential/getWalletVerifiedCredential.js +3 -1
- package/src/lib/utils/functions/index.d.ts +3 -0
- package/src/lib/utils/functions/isEmailProviderEnabled/isEmailProviderEnabled.cjs +1 -0
- package/src/lib/utils/functions/isEmailProviderEnabled/isEmailProviderEnabled.js +1 -0
- package/src/lib/utils/functions/isOnrampProvider/index.d.ts +1 -0
- package/src/lib/utils/functions/isOnrampProvider/isOnrampProvider.cjs +9 -0
- package/src/lib/utils/functions/isOnrampProvider/isOnrampProvider.d.ts +2 -0
- package/src/lib/utils/functions/isOnrampProvider/isOnrampProvider.js +5 -0
- package/src/lib/utils/functions/isSelectedWalletAlreadyConnected/isSelectedWalletAlreadyConnected.cjs +2 -2
- package/src/lib/utils/functions/isSelectedWalletAlreadyConnected/isSelectedWalletAlreadyConnected.d.ts +1 -1
- package/src/lib/utils/functions/isSelectedWalletAlreadyConnected/isSelectedWalletAlreadyConnected.js +2 -2
- package/src/lib/utils/functions/isSocialKycEnabled/index.d.ts +1 -0
- package/src/lib/utils/functions/isSocialKycEnabled/isSocialKycEnabled.cjs +7 -0
- package/src/lib/utils/functions/isSocialKycEnabled/isSocialKycEnabled.d.ts +2 -0
- package/src/lib/utils/functions/isSocialKycEnabled/isSocialKycEnabled.js +3 -0
- package/src/lib/utils/functions/isSupportedNetwork/isSupportedNetwork.cjs +8 -8
- package/src/lib/utils/functions/isSupportedNetwork/isSupportedNetwork.js +8 -8
- package/src/lib/utils/functions/storeAuthToken/index.cjs +1 -3
- package/src/lib/utils/functions/storeAuthToken/index.js +1 -3
- package/src/lib/utils/hooks/authenticationHooks/helpers/showPendingConnectView.cjs +1 -1
- package/src/lib/utils/hooks/authenticationHooks/helpers/showPendingConnectView.js +1 -1
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.cjs +21 -9
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.d.ts +3 -1
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.js +22 -10
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.cjs +11 -2
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.js +11 -2
- package/src/lib/utils/hooks/authenticationHooks/useEmailVerificationRequest/useEmailVerificationRequest.cjs +1 -16
- package/src/lib/utils/hooks/authenticationHooks/useEmailVerificationRequest/useEmailVerificationRequest.js +1 -16
- package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.cjs +5 -2
- package/src/lib/utils/hooks/authenticationHooks/useSignConnectOnlyUser/useSignConnectOnlyUser.js +5 -2
- package/src/lib/utils/hooks/index.d.ts +2 -0
- package/src/lib/utils/hooks/multiWallet/useMultiWallet/index.d.ts +1 -0
- package/src/lib/utils/hooks/multiWallet/useMultiWallet/useMultiWallet.cjs +16 -0
- package/src/lib/utils/hooks/multiWallet/useMultiWallet/useMultiWallet.d.ts +5 -0
- package/src/lib/utils/hooks/multiWallet/useMultiWallet/useMultiWallet.js +12 -0
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.cjs +22 -5
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.d.ts +5 -2
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.js +22 -5
- package/src/lib/utils/hooks/multiWallet/useVerifyOnAwaitingSignature/useVerifyOnAwaitingSignature.cjs +9 -11
- package/src/lib/utils/hooks/multiWallet/useVerifyOnAwaitingSignature/useVerifyOnAwaitingSignature.js +9 -11
- package/src/lib/utils/hooks/useApplyWalletConnectorNetwork/useApplyWalletConnectorNetwork.cjs +29 -0
- package/src/lib/utils/hooks/useApplyWalletConnectorNetwork/useApplyWalletConnectorNetwork.d.ts +5 -0
- package/src/lib/utils/hooks/useApplyWalletConnectorNetwork/useApplyWalletConnectorNetwork.js +25 -0
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.cjs +13 -6
- package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js +13 -6
- package/src/lib/utils/hooks/useAuthenticateConnectedUser/useAuthenticateConnectedUser.cjs +1 -0
- package/src/lib/utils/hooks/useAuthenticateConnectedUser/useAuthenticateConnectedUser.js +1 -0
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.cjs +124 -83
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.d.ts +14 -10
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.js +126 -85
- package/src/lib/utils/hooks/useConnectWithEmail/index.d.ts +1 -0
- package/src/lib/utils/hooks/useConnectWithEmail/useConnectWithEmail.cjs +6 -4
- package/src/lib/utils/hooks/useConnectWithEmail/useConnectWithEmail.d.ts +1 -4
- package/src/lib/utils/hooks/useConnectWithEmail/useConnectWithEmail.js +6 -4
- package/src/lib/utils/hooks/useConnectedAccountWallet/useConnectedAccountWallet.cjs +13 -23
- package/src/lib/utils/hooks/useConnectedAccountWallet/useConnectedAccountWallet.d.ts +1 -1
- package/src/lib/utils/hooks/useConnectedAccountWallet/useConnectedAccountWallet.js +13 -23
- package/src/lib/utils/hooks/useConnectedWalletsNetworkValidation/useConnectedWalletsNetworkValidation.cjs +69 -0
- package/src/lib/utils/hooks/useConnectedWalletsNetworkValidation/useConnectedWalletsNetworkValidation.d.ts +1 -0
- package/src/lib/utils/hooks/useConnectedWalletsNetworkValidation/useConnectedWalletsNetworkValidation.js +65 -0
- package/src/lib/utils/hooks/useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.cjs +4 -3
- package/src/lib/utils/hooks/useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.d.ts +1 -1
- package/src/lib/utils/hooks/useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.js +4 -3
- package/src/lib/utils/hooks/useDynamicScopes/index.d.ts +1 -0
- package/src/lib/utils/hooks/useDynamicScopes/useDynamicScopes.cjs +40 -0
- package/src/lib/utils/hooks/useDynamicScopes/useDynamicScopes.d.ts +6 -0
- package/src/lib/utils/hooks/useDynamicScopes/useDynamicScopes.js +36 -0
- package/src/lib/utils/hooks/useEmailProvider/index.d.ts +1 -0
- package/src/lib/utils/hooks/useEmailProvider/useEmailProvider.cjs +54 -0
- package/src/lib/utils/hooks/useEmailProvider/useEmailProvider.d.ts +10 -0
- package/src/lib/utils/hooks/useEmailProvider/useEmailProvider.js +50 -0
- package/src/lib/utils/hooks/useEventListener/index.d.ts +1 -0
- package/src/lib/utils/hooks/useEventListener/useEventListener.cjs +25 -0
- package/src/lib/utils/hooks/useEventListener/useEventListener.d.ts +1 -0
- package/src/lib/utils/hooks/useEventListener/useEventListener.js +21 -0
- package/src/lib/utils/hooks/useFetchProjectSettings/useFetchProjectSettings.cjs +2 -1
- package/src/lib/utils/hooks/useFetchProjectSettings/useFetchProjectSettings.d.ts +3 -1
- package/src/lib/utils/hooks/useFetchProjectSettings/useFetchProjectSettings.js +3 -2
- package/src/lib/utils/hooks/useHandleWalletsToConnect/useHandleWalletsToConnect.cjs +10 -5
- package/src/lib/utils/hooks/useHandleWalletsToConnect/useHandleWalletsToConnect.js +10 -5
- package/src/lib/utils/hooks/useKYCFlag/useKYCFlag.cjs +17 -2
- package/src/lib/utils/hooks/useKYCFlag/useKYCFlag.js +17 -2
- package/src/lib/utils/hooks/usePromise/usePromise.cjs +92 -32
- package/src/lib/utils/hooks/usePromise/usePromise.d.ts +33 -6
- package/src/lib/utils/hooks/usePromise/usePromise.js +93 -33
- package/src/lib/utils/hooks/usePromise/usePromise.types.d.ts +9 -0
- package/src/lib/utils/hooks/usePromise/utils/createReducer/createReducer.cjs +18 -0
- package/src/lib/utils/hooks/usePromise/utils/createReducer/createReducer.d.ts +13 -0
- package/src/lib/utils/hooks/usePromise/utils/createReducer/createReducer.js +14 -0
- package/src/lib/utils/hooks/usePromise/utils/createReducer/index.d.ts +1 -0
- package/src/lib/utils/hooks/usePromise/utils/index.d.ts +2 -0
- package/src/lib/utils/hooks/usePromise/utils/resolveFetcher/index.d.ts +1 -0
- package/src/lib/utils/hooks/usePromise/utils/resolveFetcher/resolveFetcher.cjs +32 -0
- package/src/lib/utils/hooks/usePromise/utils/resolveFetcher/resolveFetcher.d.ts +5 -0
- package/src/lib/utils/hooks/usePromise/utils/resolveFetcher/resolveFetcher.js +28 -0
- package/src/lib/utils/hooks/useSocialAccounts/index.d.ts +1 -0
- package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.cjs +159 -0
- package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.d.ts +10 -0
- package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.js +155 -0
- package/src/lib/utils/hooks/useUpdateUserProfileByJWTCallback/useUpdateUserProfileByJWTCallback.cjs +4 -3
- package/src/lib/utils/hooks/useUpdateUserProfileByJWTCallback/useUpdateUserProfileByJWTCallback.d.ts +1 -1
- package/src/lib/utils/hooks/useUpdateUserProfileByJWTCallback/useUpdateUserProfileByJWTCallback.js +4 -3
- package/src/lib/utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs +32 -6
- package/src/lib/utils/hooks/useUserUpdateRequest/useUserUpdateRequest.d.ts +8 -4
- package/src/lib/utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js +33 -7
- package/src/lib/utils/hooks/useValidateSession/useValidateSession.cjs +3 -0
- package/src/lib/utils/hooks/useValidateSession/useValidateSession.js +3 -0
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.cjs +18 -3
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.d.ts +2 -2
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +19 -4
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.cjs +12 -2
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.d.ts +4 -2
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.js +12 -2
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.cjs +43 -10
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.d.ts +5 -4
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.js +43 -10
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.cjs +7 -6
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.js +7 -6
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.cjs +3 -0
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.js +3 -0
- package/src/lib/views/AccountExistsView/AccountExistsView.cjs +73 -0
- package/src/lib/views/AccountExistsView/AccountExistsView.d.ts +2 -0
- package/src/lib/views/AccountExistsView/AccountExistsView.js +69 -0
- package/src/lib/views/AccountExistsView/index.d.ts +1 -0
- package/src/lib/views/BridgeNextWalletConnectionView/BridgeNextWalletConnectionView.cjs +38 -0
- package/src/lib/views/BridgeNextWalletConnectionView/BridgeNextWalletConnectionView.d.ts +2 -0
- package/src/lib/views/BridgeNextWalletConnectionView/BridgeNextWalletConnectionView.js +34 -0
- package/src/lib/views/BridgeNextWalletConnectionView/index.d.ts +1 -0
- package/src/lib/views/BridgeSummaryView/BridgeSummaryView.cjs +17 -12
- package/src/lib/views/BridgeSummaryView/BridgeSummaryView.js +17 -12
- package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.cjs +2 -2
- package/src/lib/views/BridgeWelcomeView/BridgeWelcomeView.js +2 -2
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.cjs +5 -3
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.js +5 -3
- package/src/lib/views/CollectUserDataView/CollectUserDataView.cjs +4 -1
- package/src/lib/views/CollectUserDataView/CollectUserDataView.js +4 -1
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.cjs +13 -3
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.js +13 -3
- package/src/lib/views/CollectUserDataView/UserDataFields/index.cjs +3 -0
- package/src/lib/views/CollectUserDataView/UserDataFields/index.js +3 -0
- package/src/lib/views/CollectUserDataView/fieldsConfig.cjs +8 -4
- package/src/lib/views/CollectUserDataView/fieldsConfig.js +8 -4
- package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.cjs +4 -1
- package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.js +4 -1
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.cjs +4 -1
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.js +4 -1
- package/src/lib/views/EmailUpdate/EmailUpdate.cjs +3 -0
- package/src/lib/views/EmailUpdate/EmailUpdate.js +3 -0
- package/src/lib/views/EmailVerification/EmailVerification.cjs +13 -4
- package/src/lib/views/EmailVerification/EmailVerification.js +14 -5
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +3 -0
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +3 -0
- package/src/lib/views/LoginWithEmailView/components/ListItemButton/ListItemButton.cjs +3 -0
- package/src/lib/views/LoginWithEmailView/components/ListItemButton/ListItemButton.js +3 -0
- package/src/lib/views/LoginWithEmailView/components/LoginWithEmailForm/LoginWithEmailForm.cjs +27 -51
- package/src/lib/views/LoginWithEmailView/components/LoginWithEmailForm/LoginWithEmailForm.js +27 -51
- package/src/lib/views/LoginWithEmailView/components/LoginWithEmailWalletList/LoginWithEmailWalletList.cjs +2 -2
- package/src/lib/views/LoginWithEmailView/components/LoginWithEmailWalletList/LoginWithEmailWalletList.js +2 -2
- package/src/lib/views/LoginWithEmailView/components/SocialSignIn/SocialSignIn.cjs +10 -5
- package/src/lib/views/LoginWithEmailView/components/SocialSignIn/SocialSignIn.js +10 -5
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.cjs +34 -22
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +35 -23
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.cjs +36 -26
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.js +36 -26
- package/src/lib/views/NoAccess/NoAccess.cjs +14 -20
- package/src/lib/views/NoAccess/NoAccess.js +14 -20
- package/src/lib/views/NoAccess/useNoAccessText.cjs +93 -0
- package/src/lib/views/NoAccess/useNoAccessText.d.ts +31 -0
- package/src/lib/views/NoAccess/useNoAccessText.js +88 -0
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.cjs +3 -0
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.js +3 -0
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.cjs +3 -0
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.js +3 -0
- package/src/lib/views/PendingConnectView/PendingConnectView.cjs +3 -0
- package/src/lib/views/PendingConnectView/PendingConnectView.js +3 -0
- package/src/lib/views/PendingSignatureView/PendingSignatureView.cjs +3 -0
- package/src/lib/views/PendingSignatureView/PendingSignatureView.js +3 -0
- package/src/lib/views/QrCodeView/QRCode.cjs +3 -0
- package/src/lib/views/QrCodeView/QRCode.js +3 -0
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.cjs +3 -0
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.js +3 -0
- package/src/lib/views/QrCodeView/QrCodeView.cjs +3 -0
- package/src/lib/views/QrCodeView/QrCodeView.js +3 -0
- package/src/lib/views/SendBalanceView/SendBalanceView.cjs +5 -2
- package/src/lib/views/SendBalanceView/SendBalanceView.js +5 -2
- package/src/lib/views/SocialRedirectView/SocialRedirectView.cjs +3 -0
- package/src/lib/views/SocialRedirectView/SocialRedirectView.js +3 -0
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.cjs +3 -0
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.js +3 -0
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.cjs +3 -0
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.js +3 -0
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionData/useTransactionData.cjs +4 -1
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionData/useTransactionData.js +4 -1
- package/src/lib/views/WalletList/{SearchInstead/SearchInstead.cjs → SearchNotFoundMessage/SearchNotFoundMessage.cjs} +6 -2
- package/src/lib/views/WalletList/SearchNotFoundMessage/SearchNotFoundMessage.d.ts +8 -0
- package/src/lib/views/WalletList/{SearchInstead/SearchInstead.js → SearchNotFoundMessage/SearchNotFoundMessage.js} +6 -2
- package/src/lib/views/WalletList/SearchNotFoundMessage/index.d.ts +1 -0
- package/src/lib/views/WalletList/WalletList.cjs +4 -3
- package/src/lib/views/WalletList/WalletList.js +4 -3
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.cjs +5 -2
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.js +5 -2
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.types.d.ts +1 -2
- package/src/lib/views/WalletLockedView/WalletLockedView.cjs +4 -1
- package/src/lib/views/WalletLockedView/WalletLockedView.js +4 -1
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.cjs +3 -0
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.js +3 -0
- package/src/lib/views/WalletUsedView/WalletUsedView.cjs +8 -2
- package/src/lib/views/WalletUsedView/WalletUsedView.js +8 -2
- package/src/lib/views/viewToComponentMap.cjs +5 -0
- package/src/lib/views/viewToComponentMap.js +5 -0
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.cjs +18 -7
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.d.ts +2 -4
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.js +19 -8
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.cjs +3 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.js +3 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCard/DynamicBridgeWalletCard.cjs +3 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCard/DynamicBridgeWalletCard.js +3 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.cjs +30 -8
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.d.ts +0 -1
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWalletCardBody/DynamicBridgeWalletCardBody.js +31 -9
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetEmptyCard/DynamicBridgeWidgetEmptyCard.cjs +3 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetEmptyCard/DynamicBridgeWidgetEmptyCard.js +3 -0
- package/src/lib/widgets/DynamicBridgeWidget/context/DynamicBridgeWidgetContext/DynamicBridgeWidgetContext.cjs +2 -0
- package/src/lib/widgets/DynamicBridgeWidget/context/DynamicBridgeWidgetContext/DynamicBridgeWidgetContext.js +2 -0
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.cjs +16 -10
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.js +16 -10
- 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 +12 -3
- package/src/lib/widgets/DynamicWidget/DynamicWidget.js +14 -5
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.cjs +3 -0
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.js +3 -0
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs +8 -5
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js +8 -5
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.cjs +3 -0
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.js +3 -0
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.cjs +7 -4
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.d.ts +4 -7
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.js +7 -4
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.cjs +3 -0
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.js +3 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.cjs +6 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.js +6 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs +3 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js +3 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.cjs +6 -3
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.js +6 -3
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.cjs +3 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.js +3 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.cjs +3 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.js +3 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.cjs +4 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js +4 -1
- package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.cjs +3 -0
- package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.js +3 -0
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.cjs +3 -0
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.js +3 -0
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.cjs +3 -0
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.js +3 -0
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.cjs +3 -0
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.js +3 -0
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.cjs +4 -1
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.js +4 -1
- package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.cjs +3 -0
- package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.js +3 -0
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.cjs +3 -0
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.js +3 -0
- package/src/lib/widgets/DynamicWidget/helpers/helpers.cjs +17 -1
- package/src/lib/widgets/DynamicWidget/helpers/helpers.js +17 -1
- package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.cjs +3 -0
- package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.js +3 -0
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.cjs +3 -0
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.js +3 -0
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.cjs +3 -0
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.js +3 -0
- 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 +3 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.js +3 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.cjs +3 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.js +3 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.cjs +3 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.js +3 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.cjs +3 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.js +3 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.cjs +3 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.js +3 -0
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.cjs +3 -0
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.js +3 -0
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.cjs +3 -0
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.js +3 -0
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.cjs +3 -0
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.js +3 -0
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.cjs +3 -0
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.js +3 -0
- package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.cjs +3 -0
- package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.js +3 -0
- package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.cjs +3 -0
- package/src/lib/widgets/DynamicWidget/views/WalletsView/WalletsView.js +3 -0
- package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.cjs +3 -0
- package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.js +3 -0
- package/src/lib/components/NetworkPicker/components/ActionList/ActionList.cjs +0 -70
- package/src/lib/components/NetworkPicker/components/ActionList/ActionList.d.ts +0 -12
- package/src/lib/components/NetworkPicker/components/ActionList/ActionList.js +0 -64
- package/src/lib/components/NetworkPicker/components/ActionList/index.d.ts +0 -1
- package/src/lib/components/Popper/utils/watchToScrollInHierarchy/watchToScrollInHierarchy.d.ts +0 -1
- package/src/lib/components/Toolkit/components/BrandStyleSwitch.cjs +0 -22
- package/src/lib/components/Toolkit/components/BrandStyleSwitch.d.ts +0 -2
- package/src/lib/components/Toolkit/components/BrandStyleSwitch.js +0 -18
- package/src/lib/views/WalletList/SearchInstead/SearchInstead.d.ts +0 -2
- package/src/lib/views/WalletList/SearchInstead/index.d.ts +0 -1
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNav/DynamicBridgeWidgetNav.cjs +0 -17
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNav/DynamicBridgeWidgetNav.d.ts +0 -6
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNav/DynamicBridgeWidgetNav.js +0 -9
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNavPrimary/DynamicBridgeWidgetNavPrimary.cjs +0 -57
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNavPrimary/DynamicBridgeWidgetNavPrimary.d.ts +0 -6
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNavPrimary/DynamicBridgeWidgetNavPrimary.js +0 -53
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNavPrimary/index.d.ts +0 -1
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNavSecondary/DynamicBridgeWidgetNavSecondary.cjs +0 -58
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNavSecondary/DynamicBridgeWidgetNavSecondary.d.ts +0 -6
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNavSecondary/DynamicBridgeWidgetNavSecondary.js +0 -54
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNavSecondary/index.d.ts +0 -1
- /package/src/lib/components/{Popper → MenuList}/utils/watchToScrollInHierarchy/index.d.ts +0 -0
|
@@ -29,6 +29,7 @@ import '../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup
|
|
|
29
29
|
import '../../context/DynamicContext/DynamicContext.js';
|
|
30
30
|
import '../../context/ErrorContext/ErrorContext.js';
|
|
31
31
|
import '../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
32
|
+
import '../../context/AccountExistsContext/AccountExistsContext.js';
|
|
32
33
|
import 'react-dom';
|
|
33
34
|
import '../ShadowDOM/ShadowDOM.js';
|
|
34
35
|
import 'react-focus-lock';
|
|
@@ -40,6 +41,8 @@ import '../Popper/Popper/Popper.js';
|
|
|
40
41
|
import '../Popper/PopperContext/PopperContext.js';
|
|
41
42
|
import 'formik';
|
|
42
43
|
import 'yup';
|
|
44
|
+
import '../InlineWidget/InlineWidget.js';
|
|
45
|
+
import '../MenuList/Dropdown/Dropdown.js';
|
|
43
46
|
import '../../context/MockContext/MockContext.js';
|
|
44
47
|
import '../../context/CaptchaContext/CaptchaContext.js';
|
|
45
48
|
import '../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
@@ -48,7 +51,7 @@ import { TransactionRow } from '../TransactionConfirmationPageLayout/components/
|
|
|
48
51
|
const TransactionStatusLayout = ({ destinationAddress, amount, networkName, networkCurrency, NetworkIcon, onDone, displayPoweredByDynamicFooter = true, onClickClose, }) => {
|
|
49
52
|
const closeButton = onClickClose && (jsx(IconButton, Object.assign({ type: 'button', onClick: onClickClose, "data-testid": 'close' }, { children: jsx(SvgClose, {}) })));
|
|
50
53
|
const networkIcon = (jsx("div", Object.assign({ className: 'transaction-status-layout__network-icon' }, { children: NetworkIcon })));
|
|
51
|
-
return (jsxs("div", Object.assign({ className: 'transaction-status-layout' }, { children: [jsx(ModalHeader, Object.assign({ trailing: closeButton, alignContent: 'bottom' }, { children: jsx(IconWithStatus, { containerClassName: 'transaction-status-layout__status-icon', iconSize: 50, Icon: SvgSignCircle, InnerIcon: SvgCheck }) })), jsxs("div", Object.assign({ className: 'transaction-status-layout__body' }, { children: [jsx(Typography, Object.assign({ weight: 'medium', variant: 'title', color: 'primary', className: 'transaction-status-layout__title' }, { children: "Transaction successfully sent" })), jsx("div", Object.assign({ className: 'transaction-status-layout__content' }, { children: jsxs("div", Object.assign({ className: 'transaction-status-layout__rows' }, { children: [jsx(TransactionRow, Object.assign({ label: 'Recipient' }, { children: shortenWalletAddress(destinationAddress, 3, 3) })), jsxs(TransactionRow, Object.assign({ label: 'Network' }, { children: [networkIcon, jsx("span", Object.assign({ className: 'transaction-status-layout__network-name' }, { children: networkName }))] })), jsxs(TransactionRow, Object.assign({ label: 'Total amount' }, { children: [amount, jsx(Typography, Object.assign({ as: 'span', color: 'secondary', className: 'transaction-status-layout__network-currency' }, { children: networkCurrency }))] }))] })) })), jsx("div", Object.assign({ className: 'transaction-status-layout__actions' }, { children: jsx(Button, Object.assign({ buttonVariant: 'primary', buttonPadding: 'large', expanded: true, buttonRounded: 'default', onClick: onDone }, { children: "Continue" })) })), displayPoweredByDynamicFooter && (jsx(
|
|
54
|
+
return (jsxs("div", Object.assign({ className: 'transaction-status-layout' }, { children: [jsx(ModalHeader, Object.assign({ trailing: closeButton, alignContent: 'bottom' }, { children: jsx(IconWithStatus, { containerClassName: 'transaction-status-layout__status-icon', iconSize: 50, Icon: SvgSignCircle, InnerIcon: SvgCheck }) })), jsxs("div", Object.assign({ className: 'transaction-status-layout__body' }, { children: [jsx(Typography, Object.assign({ weight: 'medium', variant: 'title', color: 'primary', className: 'transaction-status-layout__title' }, { children: "Transaction successfully sent" })), jsx("div", Object.assign({ className: 'transaction-status-layout__content' }, { children: jsxs("div", Object.assign({ className: 'transaction-status-layout__rows' }, { children: [jsx(TransactionRow, Object.assign({ label: 'Recipient' }, { children: shortenWalletAddress(destinationAddress, 3, 3) })), jsxs(TransactionRow, Object.assign({ label: 'Network' }, { children: [networkIcon, jsx("span", Object.assign({ className: 'transaction-status-layout__network-name' }, { children: networkName }))] })), jsxs(TransactionRow, Object.assign({ label: 'Total amount' }, { children: [amount, jsx(Typography, Object.assign({ as: 'span', color: 'secondary', className: 'transaction-status-layout__network-currency' }, { children: networkCurrency }))] }))] })) })), jsx("div", Object.assign({ className: 'transaction-status-layout__actions' }, { children: jsx(Button, Object.assign({ buttonVariant: 'primary', buttonPadding: 'large', expanded: true, buttonRounded: 'default', onClick: onDone }, { children: "Continue" })) })), displayPoweredByDynamicFooter && (jsx(PoweredByDynamic, { classNameRoot: 'transaction-status-layout__footer' }))] }))] })));
|
|
52
55
|
};
|
|
53
56
|
|
|
54
57
|
export { TransactionStatusLayout };
|
|
@@ -23,6 +23,7 @@ require('../../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsS
|
|
|
23
23
|
require('../../../context/DynamicContext/DynamicContext.cjs');
|
|
24
24
|
require('../../../context/ErrorContext/ErrorContext.cjs');
|
|
25
25
|
require('../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
26
|
+
require('../../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
26
27
|
var useResizeObserver = require('../../../utils/hooks/useResizeObserver/useResizeObserver.cjs');
|
|
27
28
|
var useTransition = require('../../../utils/hooks/useTransition/useTransition.cjs');
|
|
28
29
|
require('react-dom');
|
|
@@ -39,6 +40,8 @@ require('../../Popper/Popper/Popper.cjs');
|
|
|
39
40
|
require('../../Popper/PopperContext/PopperContext.cjs');
|
|
40
41
|
require('formik');
|
|
41
42
|
require('yup');
|
|
43
|
+
require('../../InlineWidget/InlineWidget.cjs');
|
|
44
|
+
require('../../MenuList/Dropdown/Dropdown.cjs');
|
|
42
45
|
require('../../../context/MockContext/MockContext.cjs');
|
|
43
46
|
require('../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
44
47
|
require('../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
@@ -19,6 +19,7 @@ import '../../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSe
|
|
|
19
19
|
import '../../../context/DynamicContext/DynamicContext.js';
|
|
20
20
|
import '../../../context/ErrorContext/ErrorContext.js';
|
|
21
21
|
import '../../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
22
|
+
import '../../../context/AccountExistsContext/AccountExistsContext.js';
|
|
22
23
|
import { useResizeObserver } from '../../../utils/hooks/useResizeObserver/useResizeObserver.js';
|
|
23
24
|
import { useTransition } from '../../../utils/hooks/useTransition/useTransition.js';
|
|
24
25
|
import 'react-dom';
|
|
@@ -35,6 +36,8 @@ import '../../Popper/Popper/Popper.js';
|
|
|
35
36
|
import '../../Popper/PopperContext/PopperContext.js';
|
|
36
37
|
import 'formik';
|
|
37
38
|
import 'yup';
|
|
39
|
+
import '../../InlineWidget/InlineWidget.js';
|
|
40
|
+
import '../../MenuList/Dropdown/Dropdown.js';
|
|
38
41
|
import '../../../context/MockContext/MockContext.js';
|
|
39
42
|
import '../../../context/CaptchaContext/CaptchaContext.js';
|
|
40
43
|
import '../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
@@ -26,6 +26,7 @@ require('../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetu
|
|
|
26
26
|
require('../../context/DynamicContext/DynamicContext.cjs');
|
|
27
27
|
require('../../context/ErrorContext/ErrorContext.cjs');
|
|
28
28
|
require('../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
29
|
+
require('../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
29
30
|
require('react-dom');
|
|
30
31
|
require('../ShadowDOM/ShadowDOM.cjs');
|
|
31
32
|
require('../../context/ThemeContext/ThemeContext.cjs');
|
|
@@ -39,6 +40,8 @@ require('../Popper/Popper/Popper.cjs');
|
|
|
39
40
|
require('../Popper/PopperContext/PopperContext.cjs');
|
|
40
41
|
require('formik');
|
|
41
42
|
require('yup');
|
|
43
|
+
require('../InlineWidget/InlineWidget.cjs');
|
|
44
|
+
require('../MenuList/Dropdown/Dropdown.cjs');
|
|
42
45
|
require('../../context/MockContext/MockContext.cjs');
|
|
43
46
|
require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
44
47
|
var usePromise = require('../../utils/hooks/usePromise/usePromise.cjs');
|
|
@@ -48,7 +51,7 @@ const UserAddress = ({ userProfile, walletConnector }) => {
|
|
|
48
51
|
var _a;
|
|
49
52
|
const walletAddress = (_a = userProfile === null || userProfile === void 0 ? void 0 : userProfile.verifiedCredentials.find((verifiedCredential) => verifiedCredential.id === userProfile.lastVerifiedCredentialId)) === null || _a === void 0 ? void 0 : _a.address;
|
|
50
53
|
const nameService = useFetchNameService.useFetchNameService(walletAddress);
|
|
51
|
-
const { data: walletConnectorAddress } = usePromise.usePromise(() => walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.fetchPublicAddress(),
|
|
54
|
+
const { data: walletConnectorAddress } = usePromise.usePromise(() => walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.fetchPublicAddress(), {
|
|
52
55
|
enabled: !userProfile && Boolean(walletConnector),
|
|
53
56
|
});
|
|
54
57
|
return (jsxRuntime.jsxs("div", Object.assign({ className: 'user-address__container' }, { children: [jsxRuntime.jsx(StatusDot.StatusDot, { variant: 'green', containerClassName: 'user-address__status-dot' }), (nameService === null || nameService === void 0 ? void 0 : nameService.name) ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'numbers_big', color: 'primary', className: 'user-address' }, { children: nameService.name })), jsxRuntime.jsx("div", { className: 'dynamic-widget-wallet-header__seperator' }), jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'numbers_medium', color: 'secondary', className: 'user-address' }, { children: shortenWalletAddress.shortenWalletAddress(walletAddress, 3, 3) }))] })) : (jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'numbers_big', color: 'primary', className: 'user-address' }, { children: shortenWalletAddress.shortenWalletAddress(walletAddress || walletConnectorAddress, 4, 4) })))] })));
|
|
@@ -22,6 +22,7 @@ import '../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup
|
|
|
22
22
|
import '../../context/DynamicContext/DynamicContext.js';
|
|
23
23
|
import '../../context/ErrorContext/ErrorContext.js';
|
|
24
24
|
import '../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
25
|
+
import '../../context/AccountExistsContext/AccountExistsContext.js';
|
|
25
26
|
import 'react-dom';
|
|
26
27
|
import '../ShadowDOM/ShadowDOM.js';
|
|
27
28
|
import '../../context/ThemeContext/ThemeContext.js';
|
|
@@ -35,6 +36,8 @@ import '../Popper/Popper/Popper.js';
|
|
|
35
36
|
import '../Popper/PopperContext/PopperContext.js';
|
|
36
37
|
import 'formik';
|
|
37
38
|
import 'yup';
|
|
39
|
+
import '../InlineWidget/InlineWidget.js';
|
|
40
|
+
import '../MenuList/Dropdown/Dropdown.js';
|
|
38
41
|
import '../../context/MockContext/MockContext.js';
|
|
39
42
|
import '../../context/CaptchaContext/CaptchaContext.js';
|
|
40
43
|
import { usePromise } from '../../utils/hooks/usePromise/usePromise.js';
|
|
@@ -44,7 +47,7 @@ const UserAddress = ({ userProfile, walletConnector }) => {
|
|
|
44
47
|
var _a;
|
|
45
48
|
const walletAddress = (_a = userProfile === null || userProfile === void 0 ? void 0 : userProfile.verifiedCredentials.find((verifiedCredential) => verifiedCredential.id === userProfile.lastVerifiedCredentialId)) === null || _a === void 0 ? void 0 : _a.address;
|
|
46
49
|
const nameService = useFetchNameService(walletAddress);
|
|
47
|
-
const { data: walletConnectorAddress } = usePromise(() => walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.fetchPublicAddress(),
|
|
50
|
+
const { data: walletConnectorAddress } = usePromise(() => walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.fetchPublicAddress(), {
|
|
48
51
|
enabled: !userProfile && Boolean(walletConnector),
|
|
49
52
|
});
|
|
50
53
|
return (jsxs("div", Object.assign({ className: 'user-address__container' }, { children: [jsx(StatusDot, { variant: 'green', containerClassName: 'user-address__status-dot' }), (nameService === null || nameService === void 0 ? void 0 : nameService.name) ? (jsxs(Fragment, { children: [jsx(Typography, Object.assign({ variant: 'numbers_big', color: 'primary', className: 'user-address' }, { children: nameService.name })), jsx("div", { className: 'dynamic-widget-wallet-header__seperator' }), jsx(Typography, Object.assign({ variant: 'numbers_medium', color: 'secondary', className: 'user-address' }, { children: shortenWalletAddress(walletAddress, 3, 3) }))] })) : (jsx(Typography, Object.assign({ variant: 'numbers_big', color: 'primary', className: 'user-address' }, { children: shortenWalletAddress(walletAddress || walletConnectorAddress, 4, 4) })))] })));
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
-
var React = require('react');
|
|
7
6
|
var fieldsConfig = require('../../views/CollectUserDataView/fieldsConfig.cjs');
|
|
8
7
|
require('@dynamic-labs/sdk-api');
|
|
9
8
|
require('../../shared/logger.cjs');
|
|
10
9
|
require('@dynamic-labs/iconic');
|
|
11
10
|
require('@dynamic-labs/wallet-connector-core');
|
|
12
11
|
require('../../context/ViewContext/ViewContext.cjs');
|
|
12
|
+
require('react');
|
|
13
13
|
require('@dynamic-labs/wallet-book');
|
|
14
14
|
var index$1 = require('../../shared/utils/functions/getValueByKey/index.cjs');
|
|
15
15
|
require('@dynamic-labs/utils');
|
|
@@ -21,6 +21,7 @@ var classNames = require('../../utils/functions/classNames/classNames.cjs');
|
|
|
21
21
|
var useInternalDynamicContext = require('../../context/DynamicContext/useInternalDynamicContext.cjs');
|
|
22
22
|
require('@dynamic-labs/multi-wallet');
|
|
23
23
|
var index = require('../../utils/functions/getEnabledOAuthProviders/index.cjs');
|
|
24
|
+
var isSocialKycEnabled = require('../../utils/functions/isSocialKycEnabled/isSocialKycEnabled.cjs');
|
|
24
25
|
var getUserProfileFields = require('../../utils/functions/getUserProfileFields/getUserProfileFields.cjs');
|
|
25
26
|
var UserProfileField = require('./parts/UserProfileField/UserProfileField.cjs');
|
|
26
27
|
var UserProfileSection = require('./parts/UserProfileSection/UserProfileSection.cjs');
|
|
@@ -32,18 +33,9 @@ const UserProfile = ({ rootClassName }) => {
|
|
|
32
33
|
projectSettingsKyc: projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.kyc,
|
|
33
34
|
user,
|
|
34
35
|
});
|
|
35
|
-
const providers =
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
const verifiedOAuthCredential = (_b = (_a = user === null || user === void 0 ? void 0 : user.verifiedCredentials) === null || _a === void 0 ? void 0 : _a.filter((credential) => credential.format === 'oauth')) !== null && _b !== void 0 ? _b : [];
|
|
39
|
-
return Object.fromEntries(new Map(verifiedOAuthCredential.map((credential) => {
|
|
40
|
-
var _a;
|
|
41
|
-
return [
|
|
42
|
-
(_a = credential.oauthProvider) !== null && _a !== void 0 ? _a : credential.id,
|
|
43
|
-
credential,
|
|
44
|
-
];
|
|
45
|
-
})));
|
|
46
|
-
}, [user === null || user === void 0 ? void 0 : user.verifiedCredentials]);
|
|
36
|
+
const providers = isSocialKycEnabled.isSocialKycEnabled(projectSettings)
|
|
37
|
+
? index.getEnabledOAuthProviders(projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.providers)
|
|
38
|
+
: [];
|
|
47
39
|
const mapFieldKeyToValue = (fieldKey) => user === null || user === void 0 ? void 0 : user[fieldKey];
|
|
48
40
|
if (!user)
|
|
49
41
|
return null;
|
|
@@ -51,7 +43,7 @@ const UserProfile = ({ rootClassName }) => {
|
|
|
51
43
|
const { label } = index$1.getValueByKey(fieldsConfig.fieldsConfig, name);
|
|
52
44
|
const value = mapFieldKeyToValue(name);
|
|
53
45
|
return (jsxRuntime.jsx(UserProfileField.UserProfileField, { name: name, label: label, value: value }, name));
|
|
54
|
-
}) })) }))), (providers === null || providers === void 0 ? void 0 : providers.length) > 0 && (jsxRuntime.jsx(UserProfileSection.UserProfileSection, Object.assign({ title: 'Social accounts' }, { children: jsxRuntime.jsx("div", Object.assign({ className: 'user-profile__social-accounts' }, { children: providers.map(({ authorizationUrl, provider }) => (jsxRuntime.jsx(UserProfileSocialAccount.UserProfileSocialAccount, { provider: provider
|
|
46
|
+
}) })) }))), (providers === null || providers === void 0 ? void 0 : providers.length) > 0 && (jsxRuntime.jsx(UserProfileSection.UserProfileSection, Object.assign({ title: 'Social accounts' }, { children: jsxRuntime.jsx("div", Object.assign({ className: 'user-profile__social-accounts' }, { children: providers.map(({ authorizationUrl, provider }) => (jsxRuntime.jsx(UserProfileSocialAccount.UserProfileSocialAccount, { provider: provider }, provider))) })) })))] })));
|
|
55
47
|
};
|
|
56
48
|
|
|
57
49
|
exports.UserProfile = UserProfile;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { useMemo } from 'react';
|
|
3
2
|
import { fieldsConfig } from '../../views/CollectUserDataView/fieldsConfig.js';
|
|
4
3
|
import '@dynamic-labs/sdk-api';
|
|
5
4
|
import '../../shared/logger.js';
|
|
6
5
|
import '@dynamic-labs/iconic';
|
|
7
6
|
import '@dynamic-labs/wallet-connector-core';
|
|
8
7
|
import '../../context/ViewContext/ViewContext.js';
|
|
8
|
+
import 'react';
|
|
9
9
|
import '@dynamic-labs/wallet-book';
|
|
10
10
|
import { getValueByKey } from '../../shared/utils/functions/getValueByKey/index.js';
|
|
11
11
|
import '@dynamic-labs/utils';
|
|
@@ -17,6 +17,7 @@ import { classNames } from '../../utils/functions/classNames/classNames.js';
|
|
|
17
17
|
import { useInternalDynamicContext } from '../../context/DynamicContext/useInternalDynamicContext.js';
|
|
18
18
|
import '@dynamic-labs/multi-wallet';
|
|
19
19
|
import { getEnabledOAuthProviders } from '../../utils/functions/getEnabledOAuthProviders/index.js';
|
|
20
|
+
import { isSocialKycEnabled } from '../../utils/functions/isSocialKycEnabled/isSocialKycEnabled.js';
|
|
20
21
|
import { getUserProfileFields } from '../../utils/functions/getUserProfileFields/getUserProfileFields.js';
|
|
21
22
|
import { UserProfileField } from './parts/UserProfileField/UserProfileField.js';
|
|
22
23
|
import { UserProfileSection } from './parts/UserProfileSection/UserProfileSection.js';
|
|
@@ -28,18 +29,9 @@ const UserProfile = ({ rootClassName }) => {
|
|
|
28
29
|
projectSettingsKyc: projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.kyc,
|
|
29
30
|
user,
|
|
30
31
|
});
|
|
31
|
-
const providers =
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
const verifiedOAuthCredential = (_b = (_a = user === null || user === void 0 ? void 0 : user.verifiedCredentials) === null || _a === void 0 ? void 0 : _a.filter((credential) => credential.format === 'oauth')) !== null && _b !== void 0 ? _b : [];
|
|
35
|
-
return Object.fromEntries(new Map(verifiedOAuthCredential.map((credential) => {
|
|
36
|
-
var _a;
|
|
37
|
-
return [
|
|
38
|
-
(_a = credential.oauthProvider) !== null && _a !== void 0 ? _a : credential.id,
|
|
39
|
-
credential,
|
|
40
|
-
];
|
|
41
|
-
})));
|
|
42
|
-
}, [user === null || user === void 0 ? void 0 : user.verifiedCredentials]);
|
|
32
|
+
const providers = isSocialKycEnabled(projectSettings)
|
|
33
|
+
? getEnabledOAuthProviders(projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.providers)
|
|
34
|
+
: [];
|
|
43
35
|
const mapFieldKeyToValue = (fieldKey) => user === null || user === void 0 ? void 0 : user[fieldKey];
|
|
44
36
|
if (!user)
|
|
45
37
|
return null;
|
|
@@ -47,7 +39,7 @@ const UserProfile = ({ rootClassName }) => {
|
|
|
47
39
|
const { label } = getValueByKey(fieldsConfig, name);
|
|
48
40
|
const value = mapFieldKeyToValue(name);
|
|
49
41
|
return (jsx(UserProfileField, { name: name, label: label, value: value }, name));
|
|
50
|
-
}) })) }))), (providers === null || providers === void 0 ? void 0 : providers.length) > 0 && (jsx(UserProfileSection, Object.assign({ title: 'Social accounts' }, { children: jsx("div", Object.assign({ className: 'user-profile__social-accounts' }, { children: providers.map(({ authorizationUrl, provider }) => (jsx(UserProfileSocialAccount, { provider: provider
|
|
42
|
+
}) })) }))), (providers === null || providers === void 0 ? void 0 : providers.length) > 0 && (jsx(UserProfileSection, Object.assign({ title: 'Social accounts' }, { children: jsx("div", Object.assign({ className: 'user-profile__social-accounts' }, { children: providers.map(({ authorizationUrl, provider }) => (jsx(UserProfileSocialAccount, { provider: provider }, provider))) })) })))] })));
|
|
51
43
|
};
|
|
52
44
|
|
|
53
45
|
export { UserProfile };
|
|
@@ -30,6 +30,7 @@ require('@dynamic-labs/rpc-providers');
|
|
|
30
30
|
require('../../../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.cjs');
|
|
31
31
|
require('../../../../context/ErrorContext/ErrorContext.cjs');
|
|
32
32
|
require('../../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
33
|
+
require('../../../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
33
34
|
require('../../../IconButton/IconButton.cjs');
|
|
34
35
|
require('../../../Alert/Alert.cjs');
|
|
35
36
|
require('../../../../context/MockContext/MockContext.cjs');
|
|
@@ -39,6 +40,8 @@ require('../../../Popper/Popper/Popper.cjs');
|
|
|
39
40
|
require('../../../Popper/PopperContext/PopperContext.cjs');
|
|
40
41
|
require('formik');
|
|
41
42
|
require('yup');
|
|
43
|
+
require('../../../InlineWidget/InlineWidget.cjs');
|
|
44
|
+
require('../../../MenuList/Dropdown/Dropdown.cjs');
|
|
42
45
|
var VerifiedEmailIcon = require('./components/VerifiedEmailIcon/VerifiedEmailIcon.cjs');
|
|
43
46
|
|
|
44
47
|
const UserProfileField = ({ name, label, value, }) => {
|
|
@@ -26,6 +26,7 @@ import '@dynamic-labs/rpc-providers';
|
|
|
26
26
|
import '../../../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.js';
|
|
27
27
|
import '../../../../context/ErrorContext/ErrorContext.js';
|
|
28
28
|
import '../../../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
29
|
+
import '../../../../context/AccountExistsContext/AccountExistsContext.js';
|
|
29
30
|
import '../../../IconButton/IconButton.js';
|
|
30
31
|
import '../../../Alert/Alert.js';
|
|
31
32
|
import '../../../../context/MockContext/MockContext.js';
|
|
@@ -35,6 +36,8 @@ import '../../../Popper/Popper/Popper.js';
|
|
|
35
36
|
import '../../../Popper/PopperContext/PopperContext.js';
|
|
36
37
|
import 'formik';
|
|
37
38
|
import 'yup';
|
|
39
|
+
import '../../../InlineWidget/InlineWidget.js';
|
|
40
|
+
import '../../../MenuList/Dropdown/Dropdown.js';
|
|
38
41
|
import { VerifiedEmailIcon } from './components/VerifiedEmailIcon/VerifiedEmailIcon.js';
|
|
39
42
|
|
|
40
43
|
const UserProfileField = ({ name, label, value, }) => {
|
|
@@ -30,6 +30,7 @@ require('@dynamic-labs/rpc-providers');
|
|
|
30
30
|
require('../../../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.cjs');
|
|
31
31
|
require('../../../../context/ErrorContext/ErrorContext.cjs');
|
|
32
32
|
require('../../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
33
|
+
require('../../../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
33
34
|
require('../../../IconButton/IconButton.cjs');
|
|
34
35
|
require('../../../Alert/Alert.cjs');
|
|
35
36
|
require('../../../../context/MockContext/MockContext.cjs');
|
|
@@ -39,6 +40,8 @@ require('../../../Popper/Popper/Popper.cjs');
|
|
|
39
40
|
require('../../../Popper/PopperContext/PopperContext.cjs');
|
|
40
41
|
require('formik');
|
|
41
42
|
require('yup');
|
|
43
|
+
require('../../../InlineWidget/InlineWidget.cjs');
|
|
44
|
+
require('../../../MenuList/Dropdown/Dropdown.cjs');
|
|
42
45
|
|
|
43
46
|
const UserProfileSection = ({ title, children, }) => (jsxRuntime.jsxs("div", Object.assign({ className: 'user-profile-section' }, { children: [title && (jsxRuntime.jsx(Typography.Typography, Object.assign({ as: 'h6', color: 'secondary', weight: 'medium', variant: 'body_small', className: 'user-profile-section__title' }, { children: title }))), children] })));
|
|
44
47
|
|
|
@@ -26,6 +26,7 @@ import '@dynamic-labs/rpc-providers';
|
|
|
26
26
|
import '../../../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.js';
|
|
27
27
|
import '../../../../context/ErrorContext/ErrorContext.js';
|
|
28
28
|
import '../../../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
29
|
+
import '../../../../context/AccountExistsContext/AccountExistsContext.js';
|
|
29
30
|
import '../../../IconButton/IconButton.js';
|
|
30
31
|
import '../../../Alert/Alert.js';
|
|
31
32
|
import '../../../../context/MockContext/MockContext.js';
|
|
@@ -35,6 +36,8 @@ import '../../../Popper/Popper/Popper.js';
|
|
|
35
36
|
import '../../../Popper/PopperContext/PopperContext.js';
|
|
36
37
|
import 'formik';
|
|
37
38
|
import 'yup';
|
|
39
|
+
import '../../../InlineWidget/InlineWidget.js';
|
|
40
|
+
import '../../../MenuList/Dropdown/Dropdown.js';
|
|
38
41
|
|
|
39
42
|
const UserProfileSection = ({ title, children, }) => (jsxs("div", Object.assign({ className: 'user-profile-section' }, { children: [title && (jsx(Typography, Object.assign({ as: 'h6', color: 'secondary', weight: 'medium', variant: 'body_small', className: 'user-profile-section__title' }, { children: title }))), children] })));
|
|
40
43
|
|
package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs
CHANGED
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var _tslib = require('../../../../../../_virtual/_tslib.cjs');
|
|
6
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
-
var React = require('react');
|
|
8
6
|
var iconic = require('@dynamic-labs/iconic');
|
|
7
|
+
require('react');
|
|
9
8
|
var Typography = require('../../../Typography/Typography.cjs');
|
|
10
9
|
require('@dynamic-labs/sdk-api');
|
|
11
|
-
|
|
10
|
+
require('../../../../shared/logger.cjs');
|
|
12
11
|
require('@dynamic-labs/wallet-connector-core');
|
|
13
12
|
require('../../../../context/ViewContext/ViewContext.cjs');
|
|
14
13
|
var add = require('../../../../shared/assets/add.cjs');
|
|
@@ -19,7 +18,7 @@ require('../../../../utils/constants/colors.cjs');
|
|
|
19
18
|
require('../../../../shared/utils/classes/storage/localStorage.cjs');
|
|
20
19
|
require('ethers');
|
|
21
20
|
require('../../../../shared/consts/index.cjs');
|
|
22
|
-
|
|
21
|
+
require('../../../../context/DynamicContext/DynamicContext.cjs');
|
|
23
22
|
require('@dynamic-labs/multi-wallet');
|
|
24
23
|
require('../../../ShadowDOM/ShadowDOM.cjs');
|
|
25
24
|
require('../../../../context/ThemeContext/ThemeContext.cjs');
|
|
@@ -29,11 +28,12 @@ require('react-focus-lock');
|
|
|
29
28
|
require('../../../Transition/ZoomTransition/ZoomTransition.cjs');
|
|
30
29
|
require('../../../Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
31
30
|
require('../../../Transition/OpacityTransition/OpacityTransition.cjs');
|
|
32
|
-
|
|
31
|
+
require('../../../../config/ApiEndpoint.cjs');
|
|
33
32
|
require('@dynamic-labs/rpc-providers');
|
|
34
33
|
require('../../../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.cjs');
|
|
35
34
|
require('../../../../context/ErrorContext/ErrorContext.cjs');
|
|
36
35
|
require('../../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
36
|
+
require('../../../../context/AccountExistsContext/AccountExistsContext.cjs');
|
|
37
37
|
require('../../../IconButton/IconButton.cjs');
|
|
38
38
|
var Button = require('../../../Button/Button.cjs');
|
|
39
39
|
require('../../../Alert/Alert.cjs');
|
|
@@ -45,73 +45,24 @@ require('../../../Popper/Popper/Popper.cjs');
|
|
|
45
45
|
require('../../../Popper/PopperContext/PopperContext.cjs');
|
|
46
46
|
require('formik');
|
|
47
47
|
require('yup');
|
|
48
|
+
require('../../../InlineWidget/InlineWidget.cjs');
|
|
49
|
+
require('../../../MenuList/Dropdown/Dropdown.cjs');
|
|
48
50
|
var helpers = require('../../../../widgets/DynamicWidget/helpers/helpers.cjs');
|
|
49
|
-
var
|
|
51
|
+
var useSocialAccounts = require('../../../../utils/hooks/useSocialAccounts/useSocialAccounts.cjs');
|
|
50
52
|
var ConnectedAccountAvatar = require('./components/ConnectedAccountAvatar/ConnectedAccountAvatar.cjs');
|
|
51
53
|
|
|
52
|
-
const UserProfileSocialAccount = ({ provider,
|
|
53
|
-
var _a
|
|
54
|
-
const {
|
|
55
|
-
const
|
|
56
|
-
const
|
|
57
|
-
const connectAccount = () => {
|
|
58
|
-
setLoading(true);
|
|
59
|
-
const authWindow = window.open(authorizationUrl, '_blank', 'width=500,height=600');
|
|
60
|
-
const handleAuthWindowMessage = (event) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
61
|
-
var _a, _b;
|
|
62
|
-
if (((_a = event.data) === null || _a === void 0 ? void 0 : _a.type) !== 'authorization_response' ||
|
|
63
|
-
((_b = event.data) === null || _b === void 0 ? void 0 : _b.provider) !== provider) {
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
const { code } = event.data;
|
|
67
|
-
const jwt = yield api.verifyOAuth(environmentId, provider, {
|
|
68
|
-
code,
|
|
69
|
-
}, String(authToken || onboardingOnlyJwt));
|
|
70
|
-
if (!jwt) {
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
yield updateUserProfileByJWT(jwt);
|
|
74
|
-
setLoading(false);
|
|
75
|
-
});
|
|
76
|
-
window.addEventListener('message', handleAuthWindowMessage);
|
|
77
|
-
const authWindowInterval = setInterval(() => {
|
|
78
|
-
if (authWindow === null || authWindow === void 0 ? void 0 : authWindow.closed) {
|
|
79
|
-
window.removeEventListener('message', handleAuthWindowMessage);
|
|
80
|
-
clearInterval(authWindowInterval);
|
|
81
|
-
setLoading(false);
|
|
82
|
-
}
|
|
83
|
-
}, 1000);
|
|
84
|
-
};
|
|
85
|
-
const disconnectAccount = () => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
86
|
-
var _c;
|
|
87
|
-
try {
|
|
88
|
-
setLoading(true);
|
|
89
|
-
const jwt = yield api.unlinkOAuth({
|
|
90
|
-
environmentId,
|
|
91
|
-
verifiedCrentialId: (_c = verifiedCredential === null || verifiedCredential === void 0 ? void 0 : verifiedCredential.id) !== null && _c !== void 0 ? _c : '',
|
|
92
|
-
}, String(authToken || onboardingOnlyJwt));
|
|
93
|
-
if (!jwt) {
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
updateUserProfileByJWT(jwt);
|
|
97
|
-
}
|
|
98
|
-
catch (err) {
|
|
99
|
-
logger.logger.error(err);
|
|
100
|
-
}
|
|
101
|
-
finally {
|
|
102
|
-
setLoading(false);
|
|
103
|
-
}
|
|
104
|
-
});
|
|
54
|
+
const UserProfileSocialAccount = ({ provider, }) => {
|
|
55
|
+
var _a;
|
|
56
|
+
const { linkSocialAccount, unlinkSocialAccount, isProcessing, isLinked, getLinkedAccountInformation, } = useSocialAccounts.useSocialAccounts();
|
|
57
|
+
const isProviderLinked = isLinked(provider);
|
|
58
|
+
const connectedAccountInfo = getLinkedAccountInformation(provider);
|
|
105
59
|
const iconThemeVariant = useIconThemeVariant.useIconThemeVariant();
|
|
106
|
-
|
|
107
|
-
return null;
|
|
108
|
-
}
|
|
109
|
-
return (jsxRuntime.jsxs("div", Object.assign({ className: 'user-profile-social-account', "data-testid": `social-account-${provider}` }, { children: [jsxRuntime.jsx("div", Object.assign({ className: 'user-profile-social-account__icon' }, { children: verifiedCredential ? (jsxRuntime.jsx(ConnectedAccountAvatar.ConnectedAccountAvatar, { provider: provider, avatarUrl: (_a = verifiedCredential.oauthAccountPhotos) === null || _a === void 0 ? void 0 : _a[0], iconThemeVariant: iconThemeVariant })) : (jsxRuntime.jsx(iconic.SocialIcon, { name: provider, variant: iconThemeVariant })) })), jsxRuntime.jsx("div", Object.assign({ className: 'user-profile-social-account__label' }, { children: jsxRuntime.jsx(Typography.Typography, Object.assign({ weight: 'medium', variant: 'body_normal', color: 'primary' }, { children: (_b = verifiedCredential === null || verifiedCredential === void 0 ? void 0 : verifiedCredential.publicIdentifier) !== null && _b !== void 0 ? _b : helpers.capitalize(provider) })) })), verifiedCredential ? (jsxRuntime.jsx(Button.Button, { buttonClassName: 'user-profile-social-account__button', buttonVariant: 'secondary', buttonRounded: 'small', buttonPadding: 'none', onClick: disconnectAccount, loading: loading, dataTestId: 'social-account-disconnect-button', typographyProps: {
|
|
60
|
+
return (jsxRuntime.jsxs("div", Object.assign({ className: 'user-profile-social-account', "data-testid": `social-account-${provider}` }, { children: [jsxRuntime.jsx("div", Object.assign({ className: 'user-profile-social-account__icon' }, { children: isProviderLinked ? (jsxRuntime.jsx(ConnectedAccountAvatar.ConnectedAccountAvatar, { provider: provider, avatarUrl: connectedAccountInfo === null || connectedAccountInfo === void 0 ? void 0 : connectedAccountInfo.avatar, iconThemeVariant: iconThemeVariant })) : (jsxRuntime.jsx(iconic.SocialIcon, { name: provider, variant: iconThemeVariant })) })), jsxRuntime.jsx("div", Object.assign({ className: 'user-profile-social-account__label' }, { children: jsxRuntime.jsx(Typography.Typography, Object.assign({ weight: 'medium', variant: 'body_normal', color: 'primary' }, { children: (_a = connectedAccountInfo === null || connectedAccountInfo === void 0 ? void 0 : connectedAccountInfo.publicIdentifier) !== null && _a !== void 0 ? _a : helpers.capitalize(provider) })) })), isProviderLinked ? (jsxRuntime.jsx(Button.Button, { buttonClassName: 'user-profile-social-account__button', buttonVariant: 'secondary', buttonRounded: 'small', buttonPadding: 'none', onClick: () => unlinkSocialAccount(provider), loading: isProcessing, dataTestId: 'social-account-disconnect-button', typographyProps: {
|
|
110
61
|
color: 'secondary',
|
|
111
62
|
variant: 'button_tertiary',
|
|
112
63
|
}, startSlot:
|
|
113
64
|
// eslint-disable-next-line react/jsx-wrap-multilines
|
|
114
|
-
jsxRuntime.jsx(Icon.Icon, Object.assign({ color: 'text-tertiary', size: 'small' }, { children: jsxRuntime.jsx(unlink.ReactComponent, {}) })) })) : (jsxRuntime.jsx(Button.Button, Object.assign({ buttonClassName: 'user-profile-social-account__button', buttonVariant: 'secondary', buttonRounded: 'small', buttonPadding: 'none', onClick:
|
|
65
|
+
jsxRuntime.jsx(Icon.Icon, Object.assign({ color: 'text-tertiary', size: 'small' }, { children: jsxRuntime.jsx(unlink.ReactComponent, {}) })) })) : (jsxRuntime.jsx(Button.Button, Object.assign({ buttonClassName: 'user-profile-social-account__button', buttonVariant: 'secondary', buttonRounded: 'small', buttonPadding: 'none', onClick: () => linkSocialAccount(provider), loading: isProcessing, dataTestId: 'social-account-connect-button', typographyProps: {
|
|
115
66
|
color: 'secondary',
|
|
116
67
|
variant: 'button_tertiary',
|
|
117
68
|
weight: 'medium',
|
package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { ProviderEnum } from '@dynamic-labs/sdk-api';
|
|
3
3
|
export type UserProfileSocialAccountProps = {
|
|
4
|
-
authorizationUrl: string | undefined;
|
|
5
4
|
provider: ProviderEnum;
|
|
6
|
-
verifiedCredential: JwtVerifiedCredential | null;
|
|
7
5
|
};
|
|
8
|
-
export declare const UserProfileSocialAccount: ({ provider,
|
|
6
|
+
export declare const UserProfileSocialAccount: ({ provider, }: UserProfileSocialAccountProps) => JSX.Element;
|
package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { __awaiter } from '../../../../../../_virtual/_tslib.js';
|
|
2
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
-
import { useState } from 'react';
|
|
4
2
|
import { SocialIcon } from '@dynamic-labs/iconic';
|
|
3
|
+
import 'react';
|
|
5
4
|
import { Typography } from '../../../Typography/Typography.js';
|
|
6
5
|
import '@dynamic-labs/sdk-api';
|
|
7
|
-
import
|
|
6
|
+
import '../../../../shared/logger.js';
|
|
8
7
|
import '@dynamic-labs/wallet-connector-core';
|
|
9
8
|
import '../../../../context/ViewContext/ViewContext.js';
|
|
10
9
|
import { ReactComponent as SvgAdd } from '../../../../shared/assets/add.js';
|
|
@@ -15,7 +14,7 @@ import '../../../../utils/constants/colors.js';
|
|
|
15
14
|
import '../../../../shared/utils/classes/storage/localStorage.js';
|
|
16
15
|
import 'ethers';
|
|
17
16
|
import '../../../../shared/consts/index.js';
|
|
18
|
-
import
|
|
17
|
+
import '../../../../context/DynamicContext/DynamicContext.js';
|
|
19
18
|
import '@dynamic-labs/multi-wallet';
|
|
20
19
|
import '../../../ShadowDOM/ShadowDOM.js';
|
|
21
20
|
import '../../../../context/ThemeContext/ThemeContext.js';
|
|
@@ -25,11 +24,12 @@ import 'react-focus-lock';
|
|
|
25
24
|
import '../../../Transition/ZoomTransition/ZoomTransition.js';
|
|
26
25
|
import '../../../Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
27
26
|
import '../../../Transition/OpacityTransition/OpacityTransition.js';
|
|
28
|
-
import
|
|
27
|
+
import '../../../../config/ApiEndpoint.js';
|
|
29
28
|
import '@dynamic-labs/rpc-providers';
|
|
30
29
|
import '../../../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.js';
|
|
31
30
|
import '../../../../context/ErrorContext/ErrorContext.js';
|
|
32
31
|
import '../../../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
32
|
+
import '../../../../context/AccountExistsContext/AccountExistsContext.js';
|
|
33
33
|
import '../../../IconButton/IconButton.js';
|
|
34
34
|
import { Button } from '../../../Button/Button.js';
|
|
35
35
|
import '../../../Alert/Alert.js';
|
|
@@ -41,73 +41,24 @@ import '../../../Popper/Popper/Popper.js';
|
|
|
41
41
|
import '../../../Popper/PopperContext/PopperContext.js';
|
|
42
42
|
import 'formik';
|
|
43
43
|
import 'yup';
|
|
44
|
+
import '../../../InlineWidget/InlineWidget.js';
|
|
45
|
+
import '../../../MenuList/Dropdown/Dropdown.js';
|
|
44
46
|
import { capitalize } from '../../../../widgets/DynamicWidget/helpers/helpers.js';
|
|
45
|
-
import {
|
|
47
|
+
import { useSocialAccounts } from '../../../../utils/hooks/useSocialAccounts/useSocialAccounts.js';
|
|
46
48
|
import { ConnectedAccountAvatar } from './components/ConnectedAccountAvatar/ConnectedAccountAvatar.js';
|
|
47
49
|
|
|
48
|
-
const UserProfileSocialAccount = ({ provider,
|
|
49
|
-
var _a
|
|
50
|
-
const {
|
|
51
|
-
const
|
|
52
|
-
const
|
|
53
|
-
const connectAccount = () => {
|
|
54
|
-
setLoading(true);
|
|
55
|
-
const authWindow = window.open(authorizationUrl, '_blank', 'width=500,height=600');
|
|
56
|
-
const handleAuthWindowMessage = (event) => __awaiter(void 0, void 0, void 0, function* () {
|
|
57
|
-
var _a, _b;
|
|
58
|
-
if (((_a = event.data) === null || _a === void 0 ? void 0 : _a.type) !== 'authorization_response' ||
|
|
59
|
-
((_b = event.data) === null || _b === void 0 ? void 0 : _b.provider) !== provider) {
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
const { code } = event.data;
|
|
63
|
-
const jwt = yield verifyOAuth(environmentId, provider, {
|
|
64
|
-
code,
|
|
65
|
-
}, String(authToken || onboardingOnlyJwt));
|
|
66
|
-
if (!jwt) {
|
|
67
|
-
return;
|
|
68
|
-
}
|
|
69
|
-
yield updateUserProfileByJWT(jwt);
|
|
70
|
-
setLoading(false);
|
|
71
|
-
});
|
|
72
|
-
window.addEventListener('message', handleAuthWindowMessage);
|
|
73
|
-
const authWindowInterval = setInterval(() => {
|
|
74
|
-
if (authWindow === null || authWindow === void 0 ? void 0 : authWindow.closed) {
|
|
75
|
-
window.removeEventListener('message', handleAuthWindowMessage);
|
|
76
|
-
clearInterval(authWindowInterval);
|
|
77
|
-
setLoading(false);
|
|
78
|
-
}
|
|
79
|
-
}, 1000);
|
|
80
|
-
};
|
|
81
|
-
const disconnectAccount = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
82
|
-
var _c;
|
|
83
|
-
try {
|
|
84
|
-
setLoading(true);
|
|
85
|
-
const jwt = yield unlinkOAuth({
|
|
86
|
-
environmentId,
|
|
87
|
-
verifiedCrentialId: (_c = verifiedCredential === null || verifiedCredential === void 0 ? void 0 : verifiedCredential.id) !== null && _c !== void 0 ? _c : '',
|
|
88
|
-
}, String(authToken || onboardingOnlyJwt));
|
|
89
|
-
if (!jwt) {
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
updateUserProfileByJWT(jwt);
|
|
93
|
-
}
|
|
94
|
-
catch (err) {
|
|
95
|
-
logger.error(err);
|
|
96
|
-
}
|
|
97
|
-
finally {
|
|
98
|
-
setLoading(false);
|
|
99
|
-
}
|
|
100
|
-
});
|
|
50
|
+
const UserProfileSocialAccount = ({ provider, }) => {
|
|
51
|
+
var _a;
|
|
52
|
+
const { linkSocialAccount, unlinkSocialAccount, isProcessing, isLinked, getLinkedAccountInformation, } = useSocialAccounts();
|
|
53
|
+
const isProviderLinked = isLinked(provider);
|
|
54
|
+
const connectedAccountInfo = getLinkedAccountInformation(provider);
|
|
101
55
|
const iconThemeVariant = useIconThemeVariant();
|
|
102
|
-
|
|
103
|
-
return null;
|
|
104
|
-
}
|
|
105
|
-
return (jsxs("div", Object.assign({ className: 'user-profile-social-account', "data-testid": `social-account-${provider}` }, { children: [jsx("div", Object.assign({ className: 'user-profile-social-account__icon' }, { children: verifiedCredential ? (jsx(ConnectedAccountAvatar, { provider: provider, avatarUrl: (_a = verifiedCredential.oauthAccountPhotos) === null || _a === void 0 ? void 0 : _a[0], iconThemeVariant: iconThemeVariant })) : (jsx(SocialIcon, { name: provider, variant: iconThemeVariant })) })), jsx("div", Object.assign({ className: 'user-profile-social-account__label' }, { children: jsx(Typography, Object.assign({ weight: 'medium', variant: 'body_normal', color: 'primary' }, { children: (_b = verifiedCredential === null || verifiedCredential === void 0 ? void 0 : verifiedCredential.publicIdentifier) !== null && _b !== void 0 ? _b : capitalize(provider) })) })), verifiedCredential ? (jsx(Button, { buttonClassName: 'user-profile-social-account__button', buttonVariant: 'secondary', buttonRounded: 'small', buttonPadding: 'none', onClick: disconnectAccount, loading: loading, dataTestId: 'social-account-disconnect-button', typographyProps: {
|
|
56
|
+
return (jsxs("div", Object.assign({ className: 'user-profile-social-account', "data-testid": `social-account-${provider}` }, { children: [jsx("div", Object.assign({ className: 'user-profile-social-account__icon' }, { children: isProviderLinked ? (jsx(ConnectedAccountAvatar, { provider: provider, avatarUrl: connectedAccountInfo === null || connectedAccountInfo === void 0 ? void 0 : connectedAccountInfo.avatar, iconThemeVariant: iconThemeVariant })) : (jsx(SocialIcon, { name: provider, variant: iconThemeVariant })) })), jsx("div", Object.assign({ className: 'user-profile-social-account__label' }, { children: jsx(Typography, Object.assign({ weight: 'medium', variant: 'body_normal', color: 'primary' }, { children: (_a = connectedAccountInfo === null || connectedAccountInfo === void 0 ? void 0 : connectedAccountInfo.publicIdentifier) !== null && _a !== void 0 ? _a : capitalize(provider) })) })), isProviderLinked ? (jsx(Button, { buttonClassName: 'user-profile-social-account__button', buttonVariant: 'secondary', buttonRounded: 'small', buttonPadding: 'none', onClick: () => unlinkSocialAccount(provider), loading: isProcessing, dataTestId: 'social-account-disconnect-button', typographyProps: {
|
|
106
57
|
color: 'secondary',
|
|
107
58
|
variant: 'button_tertiary',
|
|
108
59
|
}, startSlot:
|
|
109
60
|
// eslint-disable-next-line react/jsx-wrap-multilines
|
|
110
|
-
jsx(Icon, Object.assign({ color: 'text-tertiary', size: 'small' }, { children: jsx(SvgUnlink, {}) })) })) : (jsx(Button, Object.assign({ buttonClassName: 'user-profile-social-account__button', buttonVariant: 'secondary', buttonRounded: 'small', buttonPadding: 'none', onClick:
|
|
61
|
+
jsx(Icon, Object.assign({ color: 'text-tertiary', size: 'small' }, { children: jsx(SvgUnlink, {}) })) })) : (jsx(Button, Object.assign({ buttonClassName: 'user-profile-social-account__button', buttonVariant: 'secondary', buttonRounded: 'small', buttonPadding: 'none', onClick: () => linkSocialAccount(provider), loading: isProcessing, dataTestId: 'social-account-connect-button', typographyProps: {
|
|
111
62
|
color: 'secondary',
|
|
112
63
|
variant: 'button_tertiary',
|
|
113
64
|
weight: 'medium',
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
var Typography = require('../Typography/Typography.cjs');
|
|
8
|
+
require('@dynamic-labs/sdk-api');
|
|
9
|
+
require('../../shared/logger.cjs');
|
|
10
|
+
require('@dynamic-labs/iconic');
|
|
11
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
12
|
+
require('../../context/ViewContext/ViewContext.cjs');
|
|
13
|
+
require('@dynamic-labs/wallet-book');
|
|
14
|
+
var shortenWalletAddress = require('../../shared/utils/functions/shortenWalletAddress/shortenWalletAddress.cjs');
|
|
15
|
+
require('@dynamic-labs/utils');
|
|
16
|
+
require('../../utils/constants/colors.cjs');
|
|
17
|
+
require('../../shared/utils/classes/storage/localStorage.cjs');
|
|
18
|
+
require('ethers');
|
|
19
|
+
require('../../shared/consts/index.cjs');
|
|
20
|
+
var Icon = require('../Icon/Icon.cjs');
|
|
21
|
+
|
|
22
|
+
const WalletInformationCard = ({ address, ens, balance, icon, network, menu, }) => {
|
|
23
|
+
const details = React.useMemo(() => {
|
|
24
|
+
const shortenAddress = shortenWalletAddress.shortenWalletAddress(address, 4, 4);
|
|
25
|
+
if (ens) {
|
|
26
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ color: 'primary', variant: 'body_normal', truncate: true }, { children: ens })), jsxRuntime.jsx(Typography.Typography, Object.assign({ weight: 'regular', variant: 'body_small', color: 'secondary' }, { children: shortenAddress }))] }));
|
|
27
|
+
}
|
|
28
|
+
return (jsxRuntime.jsx(Typography.Typography, Object.assign({ weight: 'medium', variant: 'body_normal', color: 'primary' }, { children: shortenAddress })));
|
|
29
|
+
}, [ens, address]);
|
|
30
|
+
return (jsxRuntime.jsxs("div", Object.assign({ className: 'wallet-information-card' }, { children: [jsxRuntime.jsxs("div", Object.assign({ className: 'wallet-information-card__header' }, { children: [jsxRuntime.jsxs("div", Object.assign({ className: 'wallet-information-card__details-container' }, { children: [icon && (jsxRuntime.jsx(Icon.Icon, Object.assign({ className: 'wallet-information-card__icon' }, { children: icon }))), jsxRuntime.jsx("div", Object.assign({ className: 'wallet-information-card__details' }, { children: details })), jsxRuntime.jsx("div", Object.assign({ className: 'wallet-information-card__menu' }, { children: menu }))] })), network] })), jsxRuntime.jsxs("div", Object.assign({ className: 'wallet-information-card__balance-container' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ color: 'secondary', variant: 'body_small' }, { children: "Balance" })), balance] }))] })));
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
exports.WalletInformationCard = WalletInformationCard;
|