@dynamic-labs/sdk-react-core 0.17.0-RC.12 → 0.17.0-RC.14
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 +27 -0
- package/package.cjs +3 -3
- package/package.js +3 -3
- package/package.json +9 -9
- package/src/index.cjs +3 -0
- package/src/index.d.ts +1 -0
- package/src/index.js +3 -0
- package/src/lib/Main.cjs +2 -0
- package/src/lib/Main.js +2 -0
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.cjs +2 -0
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.js +2 -0
- package/src/lib/components/AnimatePresence/AnimatePresence.cjs +2 -0
- package/src/lib/components/AnimatePresence/AnimatePresence.js +2 -0
- package/src/lib/components/Divider/Divider.cjs +2 -0
- package/src/lib/components/Divider/Divider.js +2 -0
- package/src/lib/components/NetworkPicker/components/ActionList/ActionList.cjs +2 -0
- package/src/lib/components/NetworkPicker/components/ActionList/ActionList.js +2 -0
- package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.cjs +2 -0
- package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.js +2 -0
- package/src/lib/components/NetworkPicker/components/Network/Network.cjs +2 -0
- package/src/lib/components/NetworkPicker/components/Network/Network.js +2 -0
- package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.cjs +2 -0
- package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.js +2 -0
- package/src/lib/components/OTPVerificationView/OTPVerificationView.cjs +2 -0
- package/src/lib/components/OTPVerificationView/OTPVerificationView.js +2 -0
- package/src/lib/components/OverlayCard/OverlayCard.cjs +2 -0
- package/src/lib/components/OverlayCard/OverlayCard.js +2 -0
- package/src/lib/components/Popper/Popper/Popper.cjs +54 -0
- package/src/lib/components/Popper/Popper/Popper.d.ts +12 -0
- package/src/lib/components/Popper/Popper/Popper.js +50 -0
- package/src/lib/components/Popper/Popper/index.d.ts +1 -0
- package/src/lib/components/Popper/Popper.types.d.ts +6 -0
- package/src/lib/components/Popper/PopperContent/PopperContent.cjs +18 -0
- package/src/lib/components/Popper/PopperContent/PopperContent.d.ts +9 -0
- package/src/lib/components/Popper/PopperContent/PopperContent.js +14 -0
- package/src/lib/components/Popper/PopperContent/index.d.ts +1 -0
- package/src/lib/components/Popper/PopperContext/PopperContext.cjs +26 -0
- package/src/lib/components/Popper/PopperContext/PopperContext.d.ts +8 -0
- package/src/lib/components/Popper/PopperContext/PopperContext.js +20 -0
- package/src/lib/components/Popper/PopperContext/index.d.ts +1 -0
- package/src/lib/components/Popper/index.d.ts +2 -0
- package/src/lib/components/Popper/utils/getChildPosition/getChildPosition.cjs +14 -0
- package/src/lib/components/Popper/utils/getChildPosition/getChildPosition.d.ts +2 -0
- package/src/lib/components/Popper/utils/getChildPosition/getChildPosition.js +10 -0
- package/src/lib/components/Popper/utils/getChildPosition/index.d.ts +1 -0
- package/src/lib/components/Popper/utils/index.d.ts +3 -0
- package/src/lib/components/Popper/utils/isScrollable/index.d.ts +1 -0
- package/src/lib/components/Popper/utils/isScrollable/isScrollable.cjs +16 -0
- package/src/lib/components/Popper/utils/isScrollable/isScrollable.d.ts +1 -0
- package/src/lib/components/Popper/utils/isScrollable/isScrollable.js +12 -0
- package/src/lib/components/Popper/utils/watchToScrollInHierarchy/index.d.ts +1 -0
- package/src/lib/components/Popper/utils/watchToScrollInHierarchy/watchToScrollInHierarchy.cjs +24 -0
- package/src/lib/components/Popper/utils/watchToScrollInHierarchy/watchToScrollInHierarchy.d.ts +1 -0
- package/src/lib/components/Popper/utils/watchToScrollInHierarchy/watchToScrollInHierarchy.js +20 -0
- package/src/lib/components/Portal/Portal.cjs +2 -0
- package/src/lib/components/Portal/Portal.js +2 -0
- package/src/lib/components/Tooltip/Tooltip.cjs +2 -0
- package/src/lib/components/Tooltip/Tooltip.js +2 -0
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.cjs +2 -0
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.js +2 -0
- package/src/lib/components/UserProfile/UserProfile.cjs +2 -2
- package/src/lib/components/UserProfile/UserProfile.js +1 -1
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.cjs +2 -0
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.js +2 -0
- package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.cjs +2 -0
- package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.js +2 -0
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs +2 -0
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js +2 -0
- package/src/lib/components/index.d.ts +1 -0
- package/src/lib/context/DynamicContext/DynamicContext.cjs +19 -7
- package/src/lib/context/DynamicContext/DynamicContext.d.ts +9 -2
- package/src/lib/context/DynamicContext/DynamicContext.js +19 -7
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerAuthFlowCallbacks.cjs +2 -0
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerAuthFlowCallbacks.js +2 -0
- package/src/lib/context/QrCodeContext/QrCodeContext.cjs +2 -0
- package/src/lib/context/QrCodeContext/QrCodeContext.js +2 -0
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.cjs +2 -0
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +2 -0
- package/src/lib/data/api.cjs +2 -1
- package/src/lib/data/api.d.ts +1 -1
- package/src/lib/data/api.js +2 -1
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.cjs +2 -0
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.js +2 -0
- package/src/lib/layout/DynamicAuthLayout/Footer/Footer.cjs +2 -0
- package/src/lib/layout/DynamicAuthLayout/Footer/Footer.js +2 -0
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/Item/Item.cjs +2 -0
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/Item/Item.js +2 -0
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.cjs +2 -0
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.js +2 -0
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/WalletListFooterContent.cjs +2 -0
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/WalletListFooterContent.js +2 -0
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletMoreInfoContent/WalletMoreInfoContent.cjs +2 -0
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletMoreInfoContent/WalletMoreInfoContent.js +2 -0
- package/src/lib/layout/DynamicAuthLayout/Header/header.cjs +2 -0
- package/src/lib/layout/DynamicAuthLayout/Header/header.js +2 -0
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.cjs +2 -0
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js +2 -0
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.cjs +2 -0
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.js +2 -0
- package/src/lib/modals/TransactionConfirmationModal/hooks/useTransactionData/useTransactionData.cjs +2 -0
- package/src/lib/modals/TransactionConfirmationModal/hooks/useTransactionData/useTransactionData.js +2 -0
- package/src/lib/shared/types/index.d.ts +6 -0
- package/src/lib/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +1 -1
- package/src/lib/utils/functions/{getEnabledUserProfileFields/getEnabledUserProfileFields.cjs → getUserProfileFields/getUserProfileFields.cjs} +4 -0
- package/src/lib/utils/functions/{getEnabledUserProfileFields/getEnabledUserProfileFields.js → getUserProfileFields/getUserProfileFields.js} +4 -0
- package/src/lib/utils/functions/getVerifyArgs/getVerifyArgs.cjs +2 -0
- package/src/lib/utils/functions/getVerifyArgs/getVerifyArgs.d.ts +1 -0
- package/src/lib/utils/functions/getVerifyArgs/getVerifyArgs.js +2 -0
- package/src/lib/utils/hooks/useKYCFlag/useKYCFlag.cjs +4 -4
- package/src/lib/utils/hooks/useKYCFlag/useKYCFlag.js +3 -3
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.cjs +79 -44
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.d.ts +4 -2
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.js +80 -45
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.cjs +7 -10
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.js +7 -10
- package/src/lib/utils/hooks/useWallets/useWallets.cjs +4 -1
- package/src/lib/utils/hooks/useWallets/useWallets.d.ts +2 -1
- package/src/lib/utils/hooks/useWallets/useWallets.js +4 -1
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.cjs +2 -0
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.js +2 -0
- package/src/lib/views/CollectUserDataView/CollectUserDataView.cjs +2 -0
- package/src/lib/views/CollectUserDataView/CollectUserDataView.js +2 -0
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.cjs +2 -0
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.js +2 -0
- package/src/lib/views/CollectUserDataView/UserDataFields/index.cjs +2 -0
- package/src/lib/views/CollectUserDataView/UserDataFields/index.js +2 -0
- package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.cjs +2 -0
- package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.js +2 -0
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.cjs +2 -0
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.js +2 -0
- package/src/lib/views/EmailUpdate/EmailUpdate.cjs +2 -0
- package/src/lib/views/EmailUpdate/EmailUpdate.js +2 -0
- package/src/lib/views/EmailVerification/EmailVerification.cjs +2 -0
- package/src/lib/views/EmailVerification/EmailVerification.js +2 -0
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +2 -0
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +2 -0
- package/src/lib/views/LoginWithEmailView/components/ListItemButton/ListItemButton.cjs +2 -0
- package/src/lib/views/LoginWithEmailView/components/ListItemButton/ListItemButton.js +2 -0
- package/src/lib/views/LoginWithEmailView/components/LoginWithEmailForm/LoginWithEmailForm.cjs +2 -0
- package/src/lib/views/LoginWithEmailView/components/LoginWithEmailForm/LoginWithEmailForm.js +2 -0
- package/src/lib/views/LoginWithEmailView/components/SocialSignIn/SocialSignIn.cjs +2 -0
- package/src/lib/views/LoginWithEmailView/components/SocialSignIn/SocialSignIn.js +2 -0
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.cjs +2 -0
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +2 -0
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.cjs +2 -0
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.js +2 -0
- package/src/lib/views/NoAccess/NoAccess.cjs +2 -0
- package/src/lib/views/NoAccess/NoAccess.js +2 -0
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.cjs +2 -0
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.js +2 -0
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.cjs +2 -0
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.js +2 -0
- package/src/lib/views/PendingConnectView/PendingConnectView.cjs +2 -0
- package/src/lib/views/PendingConnectView/PendingConnectView.js +2 -0
- package/src/lib/views/PendingSignatureView/PendingSignatureView.cjs +2 -0
- package/src/lib/views/PendingSignatureView/PendingSignatureView.js +2 -0
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.cjs +2 -0
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.js +2 -0
- package/src/lib/views/QrCodeView/QrCodeView.cjs +2 -0
- package/src/lib/views/QrCodeView/QrCodeView.js +2 -0
- package/src/lib/views/SocialRedirectView/SocialRedirectView.cjs +2 -0
- package/src/lib/views/SocialRedirectView/SocialRedirectView.js +2 -0
- package/src/lib/views/WalletList/SearchInstead/SearchInstead.cjs +2 -0
- package/src/lib/views/WalletList/SearchInstead/SearchInstead.js +2 -0
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.cjs +2 -0
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.js +2 -0
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.cjs +2 -0
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.js +2 -0
- package/src/lib/views/WalletUsedView/WalletUsedView.cjs +2 -0
- package/src/lib/views/WalletUsedView/WalletUsedView.js +2 -0
- package/src/lib/widgets/DynamicWidget/DynamicWidget.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/DynamicWidget.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/DefaultPendingSignModalContent/DefaultPendingSignModalContent.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/DefaultPendingSignModalContent/DefaultPendingSignModalContent.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.cjs +7 -27
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.js +8 -28
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.cjs +4 -2
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.js +4 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetPrompts/DynamicWidgetPrompts.cjs +4 -5
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetPrompts/DynamicWidgetPrompts.js +4 -5
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetSwitcher/DynamicWidgetSwitcher.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetSwitcher/DynamicWidgetSwitcher.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.cjs +3 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.js +3 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.cjs +4 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js +4 -2
- package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.cjs +13 -14
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.d.ts +2 -3
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.js +13 -14
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.cjs +2 -8
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.d.ts +0 -4
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.js +3 -9
- package/src/lib/widgets/DynamicWidget/hooks/useFetchChain/useFetchChain.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/hooks/useFetchChain/useFetchChain.js +1 -1
- package/src/lib/widgets/DynamicWidget/prompts/DetectedKnownSecondaryWalletModal/DetectedKnownSecondaryWalletModal.cjs +4 -2
- package/src/lib/widgets/DynamicWidget/prompts/DetectedKnownSecondaryWalletModal/DetectedKnownSecondaryWalletModal.d.ts +4 -3
- package/src/lib/widgets/DynamicWidget/prompts/DetectedKnownSecondaryWalletModal/DetectedKnownSecondaryWalletModal.js +4 -2
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.js +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.js +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/PendingAccountSwitchModal.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/PendingAccountSwitchModal.js +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.js +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.js +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.cjs +5 -5
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.js +5 -5
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.cjs +6 -4
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.js +6 -4
- package/src/lib/widgets/DynamicWidget/views/IndexView/IndexView.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/views/IndexView/IndexView.js +2 -0
- package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.cjs +5 -2
- package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.js +4 -1
- package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.cjs +2 -0
- package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.js +2 -0
- package/src/polyfills.cjs +11 -0
- package/src/polyfills.d.ts +1 -0
- package/src/polyfills.js +9 -0
- package/src/shim/process.cjs +238 -0
- package/src/shim/process.d.ts +34 -0
- package/src/shim/process.js +234 -0
- package/src/lib/widgets/DynamicWidget/components/DotsMenuWrapper/DotsMenuWrapper.cjs +0 -68
- package/src/lib/widgets/DynamicWidget/components/DotsMenuWrapper/DotsMenuWrapper.js +0 -64
- /package/src/lib/utils/functions/{getEnabledUserProfileFields/getEnabledUserProfileFields.d.ts → getUserProfileFields/getUserProfileFields.d.ts} +0 -0
|
@@ -35,6 +35,8 @@ require('../../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
|
35
35
|
require('../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
36
36
|
require('../../../../components/IconButton/IconButton.cjs');
|
|
37
37
|
require('../../../../components/Alert/Alert.cjs');
|
|
38
|
+
require('../../../../components/Popper/Popper/Popper.cjs');
|
|
39
|
+
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
38
40
|
var IsBrowser = require('../../../../components/IsBrowser/IsBrowser.cjs');
|
|
39
41
|
|
|
40
42
|
const DynamicUserProfile = ({ variant, }) => {
|
|
@@ -31,6 +31,8 @@ import '../../../../context/CaptchaContext/CaptchaContext.js';
|
|
|
31
31
|
import '../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
32
32
|
import '../../../../components/IconButton/IconButton.js';
|
|
33
33
|
import '../../../../components/Alert/Alert.js';
|
|
34
|
+
import '../../../../components/Popper/Popper/Popper.js';
|
|
35
|
+
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
34
36
|
import { IsBrowser } from '../../../../components/IsBrowser/IsBrowser.js';
|
|
35
37
|
|
|
36
38
|
const DynamicUserProfile = ({ variant, }) => {
|
package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs
CHANGED
|
@@ -27,6 +27,8 @@ require('../../../../components/Transition/SlideInUpTransition/SlideInUpTransiti
|
|
|
27
27
|
require('../../../../components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
28
28
|
require('../../../../components/IconButton/IconButton.cjs');
|
|
29
29
|
require('../../../../components/Alert/Alert.cjs');
|
|
30
|
+
require('../../../../components/Popper/Popper/Popper.cjs');
|
|
31
|
+
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
30
32
|
var useKYCFlag = require('../../../../utils/hooks/useKYCFlag/useKYCFlag.cjs');
|
|
31
33
|
var useMultiWalletFlag = require('../../../../utils/hooks/useMultiWalletFlag/useMultiWalletFlag.cjs');
|
|
32
34
|
require('../../../../context/MockContext/MockContext.cjs');
|
|
@@ -23,6 +23,8 @@ import '../../../../components/Transition/SlideInUpTransition/SlideInUpTransitio
|
|
|
23
23
|
import '../../../../components/Transition/OpacityTransition/OpacityTransition.js';
|
|
24
24
|
import '../../../../components/IconButton/IconButton.js';
|
|
25
25
|
import '../../../../components/Alert/Alert.js';
|
|
26
|
+
import '../../../../components/Popper/Popper/Popper.js';
|
|
27
|
+
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
26
28
|
import { useKYCFlag } from '../../../../utils/hooks/useKYCFlag/useKYCFlag.js';
|
|
27
29
|
import { useMultiWalletFlag } from '../../../../utils/hooks/useMultiWalletFlag/useMultiWalletFlag.js';
|
|
28
30
|
import '../../../../context/MockContext/MockContext.js';
|
|
@@ -38,6 +38,8 @@ var Button = require('../../../../../components/Button/Button.cjs');
|
|
|
38
38
|
require('../../../../../components/IconButton/IconButton.cjs');
|
|
39
39
|
require('../../../../../components/Alert/Alert.cjs');
|
|
40
40
|
var StatusDot = require('../../../../../components/StatusDot/StatusDot.cjs');
|
|
41
|
+
require('../../../../../components/Popper/Popper/Popper.cjs');
|
|
42
|
+
require('../../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
41
43
|
var Balance = require('../../Balance/Balance.cjs');
|
|
42
44
|
var useFetchNameService = require('../../../hooks/useFetchNameService/useFetchNameService.cjs');
|
|
43
45
|
var NetworkPicker = require('../../../../../components/NetworkPicker/NetworkPicker.cjs');
|
|
@@ -34,6 +34,8 @@ import { Button } from '../../../../../components/Button/Button.js';
|
|
|
34
34
|
import '../../../../../components/IconButton/IconButton.js';
|
|
35
35
|
import '../../../../../components/Alert/Alert.js';
|
|
36
36
|
import { StatusDot } from '../../../../../components/StatusDot/StatusDot.js';
|
|
37
|
+
import '../../../../../components/Popper/Popper/Popper.js';
|
|
38
|
+
import '../../../../../components/Popper/PopperContext/PopperContext.js';
|
|
37
39
|
import { Balance } from '../../Balance/Balance.js';
|
|
38
40
|
import { useFetchNameService } from '../../../hooks/useFetchNameService/useFetchNameService.js';
|
|
39
41
|
import { NetworkPicker } from '../../../../../components/NetworkPicker/NetworkPicker.js';
|
package/src/lib/widgets/DynamicWidget/components/DynamicWidgetPrompts/DynamicWidgetPrompts.cjs
CHANGED
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var useInternalDynamicContext = require('../../../../context/DynamicContext/useInternalDynamicContext.cjs');
|
|
8
|
-
var DynamicWidgetContext = require('../../context/DynamicWidgetContext.cjs');
|
|
9
8
|
var DetectedKnownSecondaryWalletModal = require('../../prompts/DetectedKnownSecondaryWalletModal/DetectedKnownSecondaryWalletModal.cjs');
|
|
10
9
|
var DetectedNewWalletModal = require('../../prompts/DetectedNewWalletModal/DetectedNewWalletModal.cjs');
|
|
11
10
|
var PendingAccountSwitchModal = require('../../prompts/PendingAccountSwitchModal/PendingAccountSwitchModal.cjs');
|
|
@@ -22,18 +21,18 @@ const mapAccountSwitchStateToPromptComponent = {
|
|
|
22
21
|
switching_primary: PendingAccountSwitchModal.PendingAccountSwitchModal,
|
|
23
22
|
};
|
|
24
23
|
const DynamicWidgetPrompts = () => {
|
|
25
|
-
|
|
26
|
-
const {
|
|
24
|
+
var _a, _b, _c;
|
|
25
|
+
const { setDesktopUri, accountSwitchState, multiWalletWidgetState, showQrcodeModal, setShowQrcodeModal, selectedWalletConnector, selectedWalletWithAction, setSelectedWalletWithAction, } = useInternalDynamicContext.useInternalDynamicContext();
|
|
27
26
|
const AccountSwitchModal = React.useMemo(() => {
|
|
28
27
|
if (multiWalletWidgetState !== 'awaiting_account_switch')
|
|
29
28
|
return null;
|
|
30
29
|
return mapAccountSwitchStateToPromptComponent[accountSwitchState] || null;
|
|
31
30
|
}, [accountSwitchState, multiWalletWidgetState]);
|
|
32
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [multiWalletWidgetState === 'awaiting_signature' && jsxRuntime.jsx(PendingSignModal.PendingSignModal, {}), AccountSwitchModal && jsxRuntime.jsx(AccountSwitchModal, {}),
|
|
31
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [multiWalletWidgetState === 'awaiting_signature' && jsxRuntime.jsx(PendingSignModal.PendingSignModal, {}), AccountSwitchModal && jsxRuntime.jsx(AccountSwitchModal, {}), (selectedWalletWithAction === null || selectedWalletWithAction === void 0 ? void 0 : selectedWalletWithAction.action) === 'unlink' && (jsxRuntime.jsx(UnlinkWalletPopUp.UnlinkWalletPopUp, { walletId: (_a = selectedWalletWithAction.wallet) === null || _a === void 0 ? void 0 : _a.id })), multiWalletWidgetState === 'awaiting_connection' &&
|
|
33
32
|
(showQrcodeModal ? (jsxRuntime.jsx(WidgetPortal.WidgetPortal, Object.assign({ onBackdropClick: () => {
|
|
34
33
|
setShowQrcodeModal(false);
|
|
35
34
|
setDesktopUri('');
|
|
36
|
-
} }, { children: (selectedWalletConnector === null || selectedWalletConnector === void 0 ? void 0 : selectedWalletConnector.canConnectViaQrCode) ? (jsxRuntime.jsx(QrCodeModalView.QrCodeModalView, { walletId:
|
|
35
|
+
} }, { children: (selectedWalletConnector === null || selectedWalletConnector === void 0 ? void 0 : selectedWalletConnector.canConnectViaQrCode) ? (jsxRuntime.jsx(QrCodeModalView.QrCodeModalView, { walletId: (_c = (_b = selectedWalletWithAction === null || selectedWalletWithAction === void 0 ? void 0 : selectedWalletWithAction.wallet) === null || _b === void 0 ? void 0 : _b.id) !== null && _c !== void 0 ? _c : '' })) : (jsxRuntime.jsx(NoQrNotInstalledModalView.NoQrNotInstalledModalView, {})) }))) : (jsxRuntime.jsx(PendingSignModal.PendingSignModal, {}))), multiWalletWidgetState === 'detected_known_secondary_wallet' && (jsxRuntime.jsx(DetectedKnownSecondaryWalletModal.DetectedKnownSecondaryWalletModal, { setSelectedWalletWithAction: setSelectedWalletWithAction })), multiWalletWidgetState === 'detected_new_wallet' && (jsxRuntime.jsx(DetectedNewWalletModal.DetectedNewWalletModal, {}))] }));
|
|
37
36
|
};
|
|
38
37
|
|
|
39
38
|
exports.DynamicWidgetPrompts = DynamicWidgetPrompts;
|
package/src/lib/widgets/DynamicWidget/components/DynamicWidgetPrompts/DynamicWidgetPrompts.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
3
|
import { useInternalDynamicContext } from '../../../../context/DynamicContext/useInternalDynamicContext.js';
|
|
4
|
-
import { useWidgetContext } from '../../context/DynamicWidgetContext.js';
|
|
5
4
|
import { DetectedKnownSecondaryWalletModal } from '../../prompts/DetectedKnownSecondaryWalletModal/DetectedKnownSecondaryWalletModal.js';
|
|
6
5
|
import { DetectedNewWalletModal } from '../../prompts/DetectedNewWalletModal/DetectedNewWalletModal.js';
|
|
7
6
|
import { PendingAccountSwitchModal } from '../../prompts/PendingAccountSwitchModal/PendingAccountSwitchModal.js';
|
|
@@ -18,18 +17,18 @@ const mapAccountSwitchStateToPromptComponent = {
|
|
|
18
17
|
switching_primary: PendingAccountSwitchModal,
|
|
19
18
|
};
|
|
20
19
|
const DynamicWidgetPrompts = () => {
|
|
21
|
-
|
|
22
|
-
const {
|
|
20
|
+
var _a, _b, _c;
|
|
21
|
+
const { setDesktopUri, accountSwitchState, multiWalletWidgetState, showQrcodeModal, setShowQrcodeModal, selectedWalletConnector, selectedWalletWithAction, setSelectedWalletWithAction, } = useInternalDynamicContext();
|
|
23
22
|
const AccountSwitchModal = useMemo(() => {
|
|
24
23
|
if (multiWalletWidgetState !== 'awaiting_account_switch')
|
|
25
24
|
return null;
|
|
26
25
|
return mapAccountSwitchStateToPromptComponent[accountSwitchState] || null;
|
|
27
26
|
}, [accountSwitchState, multiWalletWidgetState]);
|
|
28
|
-
return (jsxs(Fragment, { children: [multiWalletWidgetState === 'awaiting_signature' && jsx(PendingSignModal, {}), AccountSwitchModal && jsx(AccountSwitchModal, {}),
|
|
27
|
+
return (jsxs(Fragment, { children: [multiWalletWidgetState === 'awaiting_signature' && jsx(PendingSignModal, {}), AccountSwitchModal && jsx(AccountSwitchModal, {}), (selectedWalletWithAction === null || selectedWalletWithAction === void 0 ? void 0 : selectedWalletWithAction.action) === 'unlink' && (jsx(UnlinkWalletPopUp, { walletId: (_a = selectedWalletWithAction.wallet) === null || _a === void 0 ? void 0 : _a.id })), multiWalletWidgetState === 'awaiting_connection' &&
|
|
29
28
|
(showQrcodeModal ? (jsx(WidgetPortal, Object.assign({ onBackdropClick: () => {
|
|
30
29
|
setShowQrcodeModal(false);
|
|
31
30
|
setDesktopUri('');
|
|
32
|
-
} }, { children: (selectedWalletConnector === null || selectedWalletConnector === void 0 ? void 0 : selectedWalletConnector.canConnectViaQrCode) ? (jsx(QrCodeModalView, { walletId:
|
|
31
|
+
} }, { children: (selectedWalletConnector === null || selectedWalletConnector === void 0 ? void 0 : selectedWalletConnector.canConnectViaQrCode) ? (jsx(QrCodeModalView, { walletId: (_c = (_b = selectedWalletWithAction === null || selectedWalletWithAction === void 0 ? void 0 : selectedWalletWithAction.wallet) === null || _b === void 0 ? void 0 : _b.id) !== null && _c !== void 0 ? _c : '' })) : (jsx(NoQrNotInstalledModalView, {})) }))) : (jsx(PendingSignModal, {}))), multiWalletWidgetState === 'detected_known_secondary_wallet' && (jsx(DetectedKnownSecondaryWalletModal, { setSelectedWalletWithAction: setSelectedWalletWithAction })), multiWalletWidgetState === 'detected_new_wallet' && (jsx(DetectedNewWalletModal, {}))] }));
|
|
33
32
|
};
|
|
34
33
|
|
|
35
34
|
export { DynamicWidgetPrompts };
|
package/src/lib/widgets/DynamicWidget/components/DynamicWidgetSwitcher/DynamicWidgetSwitcher.cjs
CHANGED
|
@@ -31,6 +31,8 @@ require('../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs')
|
|
|
31
31
|
require('../../../../components/IconButton/IconButton.cjs');
|
|
32
32
|
require('../../../../components/Alert/Alert.cjs');
|
|
33
33
|
var OptionsSwitcher = require('../../../../components/OptionsSwitcher/OptionsSwitcher.cjs');
|
|
34
|
+
require('../../../../components/Popper/Popper/Popper.cjs');
|
|
35
|
+
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
34
36
|
var DynamicWidgetContext = require('../../context/DynamicWidgetContext.cjs');
|
|
35
37
|
|
|
36
38
|
const options = [
|
package/src/lib/widgets/DynamicWidget/components/DynamicWidgetSwitcher/DynamicWidgetSwitcher.js
CHANGED
|
@@ -27,6 +27,8 @@ import '../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
|
27
27
|
import '../../../../components/IconButton/IconButton.js';
|
|
28
28
|
import '../../../../components/Alert/Alert.js';
|
|
29
29
|
import { OptionsSwitcher } from '../../../../components/OptionsSwitcher/OptionsSwitcher.js';
|
|
30
|
+
import '../../../../components/Popper/Popper/Popper.js';
|
|
31
|
+
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
30
32
|
import { useWidgetContext } from '../../context/DynamicWidgetContext.js';
|
|
31
33
|
|
|
32
34
|
const options = [
|
|
@@ -28,6 +28,8 @@ require('../../../../../../context/ThemeContext/ThemeContext.cjs');
|
|
|
28
28
|
require('react-focus-lock');
|
|
29
29
|
require('../../../../../../components/IconButton/IconButton.cjs');
|
|
30
30
|
require('../../../../../../components/Alert/Alert.cjs');
|
|
31
|
+
require('../../../../../../components/Popper/Popper/Popper.cjs');
|
|
32
|
+
require('../../../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
31
33
|
require('../../../../../../context/MockContext/MockContext.cjs');
|
|
32
34
|
require('../../../../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
33
35
|
require('../../../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
@@ -24,6 +24,8 @@ import '../../../../../../context/ThemeContext/ThemeContext.js';
|
|
|
24
24
|
import 'react-focus-lock';
|
|
25
25
|
import '../../../../../../components/IconButton/IconButton.js';
|
|
26
26
|
import '../../../../../../components/Alert/Alert.js';
|
|
27
|
+
import '../../../../../../components/Popper/Popper/Popper.js';
|
|
28
|
+
import '../../../../../../components/Popper/PopperContext/PopperContext.js';
|
|
27
29
|
import '../../../../../../context/MockContext/MockContext.js';
|
|
28
30
|
import '../../../../../../context/CaptchaContext/CaptchaContext.js';
|
|
29
31
|
import '../../../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
@@ -32,10 +32,12 @@ require('../../../../../../components/Alert/Alert.cjs');
|
|
|
32
32
|
require('../../../../../../components/Transition/ZoomTransition/ZoomTransition.cjs');
|
|
33
33
|
require('../../../../../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
34
34
|
require('../../../../../../components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
35
|
+
require('../../../../../../components/Popper/Popper/Popper.cjs');
|
|
36
|
+
var PopperContext = require('../../../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
35
37
|
|
|
36
38
|
const DynamicWidgetModal = ({ children, isShown, onClose, zIndex, className, }) => {
|
|
37
39
|
usePreventPageScroll.usePreventPageScroll(Boolean(isShown));
|
|
38
|
-
return (jsxRuntime.jsx(Portal.Portal, Object.assign({ zIndex: zIndex, handleClose: () => onClose === null || onClose === void 0 ? void 0 : onClose(), isShown: isShown, withBackdrop: true }, { children: jsxRuntime.jsx("div", Object.assign({ className: classNames.classNames('dynamic-widget-modal', className) }, { children: children })) })));
|
|
40
|
+
return (jsxRuntime.jsx(Portal.Portal, Object.assign({ zIndex: zIndex, handleClose: () => onClose === null || onClose === void 0 ? void 0 : onClose(), isShown: isShown, withBackdrop: true }, { children: jsxRuntime.jsx("div", Object.assign({ className: classNames.classNames('dynamic-widget-modal', className) }, { children: jsxRuntime.jsx(PopperContext.PopperProvider, { children: children }) })) })));
|
|
39
41
|
};
|
|
40
42
|
|
|
41
43
|
exports.DynamicWidgetModal = DynamicWidgetModal;
|
|
@@ -28,10 +28,12 @@ import '../../../../../../components/Alert/Alert.js';
|
|
|
28
28
|
import '../../../../../../components/Transition/ZoomTransition/ZoomTransition.js';
|
|
29
29
|
import '../../../../../../components/Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
30
30
|
import '../../../../../../components/Transition/OpacityTransition/OpacityTransition.js';
|
|
31
|
+
import '../../../../../../components/Popper/Popper/Popper.js';
|
|
32
|
+
import { PopperProvider } from '../../../../../../components/Popper/PopperContext/PopperContext.js';
|
|
31
33
|
|
|
32
34
|
const DynamicWidgetModal = ({ children, isShown, onClose, zIndex, className, }) => {
|
|
33
35
|
usePreventPageScroll(Boolean(isShown));
|
|
34
|
-
return (jsx(Portal, Object.assign({ zIndex: zIndex, handleClose: () => onClose === null || onClose === void 0 ? void 0 : onClose(), isShown: isShown, withBackdrop: true }, { children: jsx("div", Object.assign({ className: classNames('dynamic-widget-modal', className) }, { children: children })) })));
|
|
36
|
+
return (jsx(Portal, Object.assign({ zIndex: zIndex, handleClose: () => onClose === null || onClose === void 0 ? void 0 : onClose(), isShown: isShown, withBackdrop: true }, { children: jsx("div", Object.assign({ className: classNames('dynamic-widget-modal', className) }, { children: jsx(PopperProvider, { children: children }) })) })));
|
|
35
37
|
};
|
|
36
38
|
|
|
37
39
|
export { DynamicWidgetModal };
|
package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.cjs
CHANGED
|
@@ -33,6 +33,8 @@ require('../../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
|
33
33
|
require('../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
34
34
|
require('../../../../components/IconButton/IconButton.cjs');
|
|
35
35
|
require('../../../../components/Alert/Alert.cjs');
|
|
36
|
+
require('../../../../components/Popper/Popper/Popper.cjs');
|
|
37
|
+
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
36
38
|
var getWalletVerifiedCredential = require('../../../../utils/functions/getWalletVerifiedCredential/getWalletVerifiedCredential.cjs');
|
|
37
39
|
var DynamicWidgetContext = require('../../context/DynamicWidgetContext.cjs');
|
|
38
40
|
var EmptyWallets = require('../EmptyWallets/EmptyWallets.cjs');
|
|
@@ -40,14 +42,14 @@ var Wallet = require('../Wallet/Wallet.cjs');
|
|
|
40
42
|
|
|
41
43
|
const DynamicWidgetWallets = () => {
|
|
42
44
|
const { secondaryWallets, user } = useInternalDynamicContext.useInternalDynamicContext();
|
|
43
|
-
const {
|
|
45
|
+
const { availableWalletsContainerRef } = DynamicWidgetContext.useWidgetContext();
|
|
44
46
|
const isEmpty = secondaryWallets.length === 0;
|
|
45
47
|
const isKYCEnabled = useKYCFlag.useKYCFlag();
|
|
46
48
|
return (jsxRuntime.jsxs("div", Object.assign({ ref: availableWalletsContainerRef, className: 'dynamic-widget-wallets', "data-testid": 'dynamicWidgetWallets' }, { children: [!isKYCEnabled && (jsxRuntime.jsx(Typography.Typography, Object.assign({ weight: 'regular', variant: 'body_normal', color: 'secondary', className: 'dynamic-widget-wallets__title' }, { children: "My wallets" }))), jsxRuntime.jsx("div", Object.assign({ className: classNames.classNames('available-wallets__body', {
|
|
47
49
|
'dynamic-widget-wallets__body--apply-height': !isEmpty,
|
|
48
50
|
}) }, { children: isEmpty ? (jsxRuntime.jsx(EmptyWallets.EmptyWallets, {})) : (jsxRuntime.jsx("div", Object.assign({ className: 'available-wallets__wallet-list' }, { children: secondaryWallets.map((wallet, index) => {
|
|
49
51
|
var _a;
|
|
50
|
-
return (jsxRuntime.jsx(Wallet.Wallet, { ens: (_a = getWalletVerifiedCredential.getWalletVerifiedCredential(wallet.address, user === null || user === void 0 ? void 0 : user.verifiedCredentials)) === null || _a === void 0 ? void 0 : _a.nameService, wallet: wallet
|
|
52
|
+
return (jsxRuntime.jsx(Wallet.Wallet, { ens: (_a = getWalletVerifiedCredential.getWalletVerifiedCredential(wallet.address, user === null || user === void 0 ? void 0 : user.verifiedCredentials)) === null || _a === void 0 ? void 0 : _a.nameService, wallet: wallet }, wallet.id));
|
|
51
53
|
}) }))) }))] })));
|
|
52
54
|
};
|
|
53
55
|
|
package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js
CHANGED
|
@@ -29,6 +29,8 @@ import '../../../../context/CaptchaContext/CaptchaContext.js';
|
|
|
29
29
|
import '../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
30
30
|
import '../../../../components/IconButton/IconButton.js';
|
|
31
31
|
import '../../../../components/Alert/Alert.js';
|
|
32
|
+
import '../../../../components/Popper/Popper/Popper.js';
|
|
33
|
+
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
32
34
|
import { getWalletVerifiedCredential } from '../../../../utils/functions/getWalletVerifiedCredential/getWalletVerifiedCredential.js';
|
|
33
35
|
import { useWidgetContext } from '../../context/DynamicWidgetContext.js';
|
|
34
36
|
import { EmptyWallets } from '../EmptyWallets/EmptyWallets.js';
|
|
@@ -36,14 +38,14 @@ import { Wallet } from '../Wallet/Wallet.js';
|
|
|
36
38
|
|
|
37
39
|
const DynamicWidgetWallets = () => {
|
|
38
40
|
const { secondaryWallets, user } = useInternalDynamicContext();
|
|
39
|
-
const {
|
|
41
|
+
const { availableWalletsContainerRef } = useWidgetContext();
|
|
40
42
|
const isEmpty = secondaryWallets.length === 0;
|
|
41
43
|
const isKYCEnabled = useKYCFlag();
|
|
42
44
|
return (jsxs("div", Object.assign({ ref: availableWalletsContainerRef, className: 'dynamic-widget-wallets', "data-testid": 'dynamicWidgetWallets' }, { children: [!isKYCEnabled && (jsx(Typography, Object.assign({ weight: 'regular', variant: 'body_normal', color: 'secondary', className: 'dynamic-widget-wallets__title' }, { children: "My wallets" }))), jsx("div", Object.assign({ className: classNames('available-wallets__body', {
|
|
43
45
|
'dynamic-widget-wallets__body--apply-height': !isEmpty,
|
|
44
46
|
}) }, { children: isEmpty ? (jsx(EmptyWallets, {})) : (jsx("div", Object.assign({ className: 'available-wallets__wallet-list' }, { children: secondaryWallets.map((wallet, index) => {
|
|
45
47
|
var _a;
|
|
46
|
-
return (jsx(Wallet, { ens: (_a = getWalletVerifiedCredential(wallet.address, user === null || user === void 0 ? void 0 : user.verifiedCredentials)) === null || _a === void 0 ? void 0 : _a.nameService, wallet: wallet
|
|
48
|
+
return (jsx(Wallet, { ens: (_a = getWalletVerifiedCredential(wallet.address, user === null || user === void 0 ? void 0 : user.verifiedCredentials)) === null || _a === void 0 ? void 0 : _a.nameService, wallet: wallet }, wallet.id));
|
|
47
49
|
}) }))) }))] })));
|
|
48
50
|
};
|
|
49
51
|
|
|
@@ -32,6 +32,8 @@ require('../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs')
|
|
|
32
32
|
require('../../../../components/IconButton/IconButton.cjs');
|
|
33
33
|
require('../../../../components/Alert/Alert.cjs');
|
|
34
34
|
var IconWithSpinner = require('../../../../components/IconWithSpinner/IconWithSpinner.cjs');
|
|
35
|
+
require('../../../../components/Popper/Popper/Popper.cjs');
|
|
36
|
+
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
35
37
|
|
|
36
38
|
const EmailConnectorPendingSignModalContent = ({ emailWalletConnector }) => (jsxRuntime.jsxs("div", Object.assign({ className: 'email-connector-pending-sign-modal-content' }, { children: [jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: iconic.SignInWithEmailIcon, iconSize: 80, isSpinning: true }), jsxRuntime.jsxs("div", Object.assign({ className: 'email-connector-pending-sign-modal-content__body' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ weight: 'medium', variant: 'title', color: 'primary', className: 'email-connector-pending-sign-modal-content__title' }, { children: "Confirm your email" })), jsxRuntime.jsxs(Typography.Typography, Object.assign({ weight: 'regular', variant: 'body_normal', color: 'secondary' }, { children: ["We\u2019ve sent a verification email to", ' ', jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', color: 'secondary', weight: 'medium', as: 'span' }, { children: emailWalletConnector.email }))] })), jsxRuntime.jsx(Typography.Typography, Object.assign({ weight: 'regular', variant: 'body_small', color: 'secondary' }, { children: "Note: it might take a few seconds to proceed after clicking the link in your email" }))] }))] })));
|
|
37
39
|
|
|
@@ -28,6 +28,8 @@ import '../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
|
28
28
|
import '../../../../components/IconButton/IconButton.js';
|
|
29
29
|
import '../../../../components/Alert/Alert.js';
|
|
30
30
|
import { IconWithSpinner } from '../../../../components/IconWithSpinner/IconWithSpinner.js';
|
|
31
|
+
import '../../../../components/Popper/Popper/Popper.js';
|
|
32
|
+
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
31
33
|
|
|
32
34
|
const EmailConnectorPendingSignModalContent = ({ emailWalletConnector }) => (jsxs("div", Object.assign({ className: 'email-connector-pending-sign-modal-content' }, { children: [jsx(IconWithSpinner, { Icon: SignInWithEmailIcon, iconSize: 80, isSpinning: true }), jsxs("div", Object.assign({ className: 'email-connector-pending-sign-modal-content__body' }, { children: [jsx(Typography, Object.assign({ weight: 'medium', variant: 'title', color: 'primary', className: 'email-connector-pending-sign-modal-content__title' }, { children: "Confirm your email" })), jsxs(Typography, Object.assign({ weight: 'regular', variant: 'body_normal', color: 'secondary' }, { children: ["We\u2019ve sent a verification email to", ' ', jsx(Typography, Object.assign({ variant: 'body_normal', color: 'secondary', weight: 'medium', as: 'span' }, { children: emailWalletConnector.email }))] })), jsx(Typography, Object.assign({ weight: 'regular', variant: 'body_small', color: 'secondary' }, { children: "Note: it might take a few seconds to proceed after clicking the link in your email" }))] }))] })));
|
|
33
35
|
|
|
@@ -32,6 +32,8 @@ require('../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs')
|
|
|
32
32
|
require('../../../../components/IconButton/IconButton.cjs');
|
|
33
33
|
require('../../../../components/Alert/Alert.cjs');
|
|
34
34
|
var OTPVerificationView = require('../../../../components/OTPVerificationView/OTPVerificationView.cjs');
|
|
35
|
+
require('../../../../components/Popper/Popper/Popper.cjs');
|
|
36
|
+
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
35
37
|
|
|
36
38
|
const EmailOTPConnectorPendingSignModalContent = ({ walletConnector }) => {
|
|
37
39
|
const [error, setError] = React.useState();
|
|
@@ -28,6 +28,8 @@ import '../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
|
28
28
|
import '../../../../components/IconButton/IconButton.js';
|
|
29
29
|
import '../../../../components/Alert/Alert.js';
|
|
30
30
|
import { OTPVerificationView } from '../../../../components/OTPVerificationView/OTPVerificationView.js';
|
|
31
|
+
import '../../../../components/Popper/Popper/Popper.js';
|
|
32
|
+
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
31
33
|
|
|
32
34
|
const EmailOTPConnectorPendingSignModalContent = ({ walletConnector }) => {
|
|
33
35
|
const [error, setError] = useState();
|
|
@@ -33,6 +33,8 @@ require('../../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
|
33
33
|
require('../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
34
34
|
require('../../../../components/IconButton/IconButton.cjs');
|
|
35
35
|
require('../../../../components/Alert/Alert.cjs');
|
|
36
|
+
require('../../../../components/Popper/Popper/Popper.cjs');
|
|
37
|
+
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
36
38
|
|
|
37
39
|
const EmptyWallets = () => (jsxRuntime.jsxs("div", Object.assign({ className: 'empty-wallet__container' }, { children: [jsxRuntime.jsx("div", Object.assign({ className: 'empty-wallet__icon-container' }, { children: jsxRuntime.jsx(Icon.Icon, Object.assign({ color: 'text-primary', size: 'medium' }, { children: jsxRuntime.jsx(addWallet.ReactComponent, {}) })) })), jsxRuntime.jsx("div", Object.assign({ className: 'empty-wallet__text-container' }, { children: jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_small', color: 'primary' }, { children: "Link additional wallets to see them here." })) }))] })));
|
|
38
40
|
|
|
@@ -29,6 +29,8 @@ import '../../../../context/CaptchaContext/CaptchaContext.js';
|
|
|
29
29
|
import '../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
30
30
|
import '../../../../components/IconButton/IconButton.js';
|
|
31
31
|
import '../../../../components/Alert/Alert.js';
|
|
32
|
+
import '../../../../components/Popper/Popper/Popper.js';
|
|
33
|
+
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
32
34
|
|
|
33
35
|
const EmptyWallets = () => (jsxs("div", Object.assign({ className: 'empty-wallet__container' }, { children: [jsx("div", Object.assign({ className: 'empty-wallet__icon-container' }, { children: jsx(Icon, Object.assign({ color: 'text-primary', size: 'medium' }, { children: jsx(SvgAddWallet, {}) })) })), jsx("div", Object.assign({ className: 'empty-wallet__text-container' }, { children: jsx(Typography, Object.assign({ variant: 'body_small', color: 'primary' }, { children: "Link additional wallets to see them here." })) }))] })));
|
|
34
36
|
|
package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.cjs
CHANGED
|
@@ -32,6 +32,8 @@ require('../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs')
|
|
|
32
32
|
var Button = require('../../../../components/Button/Button.cjs');
|
|
33
33
|
require('../../../../components/IconButton/IconButton.cjs');
|
|
34
34
|
require('../../../../components/Alert/Alert.cjs');
|
|
35
|
+
require('../../../../components/Popper/Popper/Popper.cjs');
|
|
36
|
+
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
35
37
|
var helpers = require('../../helpers/helpers.cjs');
|
|
36
38
|
|
|
37
39
|
const SingleWalletButtons = () => {
|
|
@@ -28,6 +28,8 @@ import '../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
|
28
28
|
import { Button } from '../../../../components/Button/Button.js';
|
|
29
29
|
import '../../../../components/IconButton/IconButton.js';
|
|
30
30
|
import '../../../../components/Alert/Alert.js';
|
|
31
|
+
import '../../../../components/Popper/Popper/Popper.js';
|
|
32
|
+
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
31
33
|
import { copyToClipboard } from '../../helpers/helpers.js';
|
|
32
34
|
|
|
33
35
|
const SingleWalletButtons = () => {
|
|
@@ -36,17 +36,15 @@ require('../../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
|
36
36
|
require('../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
37
37
|
require('../../../../components/IconButton/IconButton.cjs');
|
|
38
38
|
require('../../../../components/Alert/Alert.cjs');
|
|
39
|
+
require('../../../../components/Popper/Popper/Popper.cjs');
|
|
40
|
+
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
39
41
|
var DotsMenu = require('../DotsMenu/DotsMenu.cjs');
|
|
40
42
|
var helpers = require('../../helpers/helpers.cjs');
|
|
41
43
|
var WalletIconWithStatus = require('../WalletIconWithStatus/WalletIconWithStatus.cjs');
|
|
42
|
-
var DynamicWidgetContext = require('../../context/DynamicWidgetContext.cjs');
|
|
43
44
|
|
|
44
|
-
const Wallet = ({
|
|
45
|
-
const
|
|
46
|
-
const
|
|
47
|
-
const { connector } = wallet;
|
|
48
|
-
const { computeConnectedStateForWallets, setPrimaryWallet, setSelectedWalletConnector, } = useInternalDynamicContext.useInternalDynamicContext();
|
|
49
|
-
const { setWalletIdToUnlink } = DynamicWidgetContext.useWidgetContext();
|
|
45
|
+
const Wallet = ({ wallet, ens }) => {
|
|
46
|
+
const { id: walletId, connector, address, connected } = wallet;
|
|
47
|
+
const { computeConnectedStateForWallets, setPrimaryWallet, setSelectedWalletConnector, setSelectedWalletWithAction, } = useInternalDynamicContext.useInternalDynamicContext();
|
|
50
48
|
const iconSize = 20;
|
|
51
49
|
const options = [
|
|
52
50
|
{
|
|
@@ -64,23 +62,24 @@ const Wallet = ({ setNewWalletId, wallet, ens }) => {
|
|
|
64
62
|
}
|
|
65
63
|
options.push({
|
|
66
64
|
Icon: jsxRuntime.jsx(copy.ReactComponent, {}),
|
|
67
|
-
callback: () => helpers.copyToClipboard(
|
|
65
|
+
callback: () => helpers.copyToClipboard(address || ''),
|
|
68
66
|
text: 'Copy address',
|
|
69
67
|
}, {
|
|
70
68
|
Icon: jsxRuntime.jsx(unlink.ReactComponent, {}),
|
|
71
|
-
callback: () =>
|
|
69
|
+
callback: () => setSelectedWalletWithAction({ action: 'unlink', wallet }),
|
|
72
70
|
text: 'Unlink from my account',
|
|
73
71
|
});
|
|
74
72
|
const onSelectWalletClick = () => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
75
|
-
|
|
76
|
-
|
|
73
|
+
var _a;
|
|
74
|
+
if (connector.connectedChain === 'FLOW') {
|
|
75
|
+
(_a = connector.endSession) === null || _a === void 0 ? void 0 : _a.call(connector);
|
|
77
76
|
}
|
|
78
|
-
|
|
77
|
+
setSelectedWalletWithAction({ action: 'select', wallet });
|
|
79
78
|
setPrimaryWallet(walletId);
|
|
80
79
|
computeConnectedStateForWallets();
|
|
81
|
-
setSelectedWalletConnector(
|
|
80
|
+
setSelectedWalletConnector(connector);
|
|
82
81
|
});
|
|
83
|
-
return (jsxRuntime.jsxs("div", Object.assign({ className: 'wallet__container', "data-testid": 'wallet' }, { children: [jsxRuntime.jsxs("div", Object.assign({ className: 'wallet__row' }, { children: [jsxRuntime.jsx("div", Object.assign({ className: 'wallet__icon-container' }, { children: jsxRuntime.jsx(WalletIconWithStatus.WalletIconWithStatus, { iconSize: iconSize, walletName: connector.name, connected:
|
|
82
|
+
return (jsxRuntime.jsxs("div", Object.assign({ className: 'wallet__container', "data-testid": 'wallet' }, { children: [jsxRuntime.jsxs("div", Object.assign({ className: 'wallet__row' }, { children: [jsxRuntime.jsx("div", Object.assign({ className: 'wallet__icon-container' }, { children: jsxRuntime.jsx(WalletIconWithStatus.WalletIconWithStatus, { iconSize: iconSize, walletName: connector.name, connected: connected, variant: 'secondary' }) })), (ens === null || ens === void 0 ? void 0 : ens.name) ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ className: 'wallet__ens-name', variant: 'body_small', color: 'primary', truncate: true }, { children: ens === null || ens === void 0 ? void 0 : ens.name })), jsxRuntime.jsx("div", { className: 'wallet__row__seperator' }), jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_mini', color: 'secondary' }, { children: shortenWalletAddress.shortenWalletAddress(address, 3, 3) }))] })) : (jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_small', color: 'primary' }, { children: shortenWalletAddress.shortenWalletAddress(address, 4, 4) })))] })), jsxRuntime.jsx(DotsMenu.DotsMenu, { "data-testid": 'dots-menu', options: options, title: 'Wallet options', buttonClassName: 'wallet__menu' })] })));
|
|
84
83
|
};
|
|
85
84
|
|
|
86
85
|
exports.Wallet = Wallet;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { NameServiceData } from '@dynamic-labs/sdk-api';
|
|
3
3
|
import { Wallet as WalletType } from '../../../../shared/types';
|
|
4
4
|
type Props = {
|
|
@@ -6,8 +6,7 @@ type Props = {
|
|
|
6
6
|
expanded?: boolean;
|
|
7
7
|
expandedWallet?: string;
|
|
8
8
|
setExpandedWallet?: (str?: string) => void;
|
|
9
|
-
setNewWalletId?: Dispatch<SetStateAction<string>>;
|
|
10
9
|
wallet: WalletType;
|
|
11
10
|
};
|
|
12
|
-
export declare const Wallet: ({
|
|
11
|
+
export declare const Wallet: ({ wallet, ens }: Props) => JSX.Element;
|
|
13
12
|
export {};
|
|
@@ -32,17 +32,15 @@ import '../../../../context/CaptchaContext/CaptchaContext.js';
|
|
|
32
32
|
import '../../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
33
33
|
import '../../../../components/IconButton/IconButton.js';
|
|
34
34
|
import '../../../../components/Alert/Alert.js';
|
|
35
|
+
import '../../../../components/Popper/Popper/Popper.js';
|
|
36
|
+
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
35
37
|
import { DotsMenu } from '../DotsMenu/DotsMenu.js';
|
|
36
38
|
import { copyToClipboard } from '../../helpers/helpers.js';
|
|
37
39
|
import { WalletIconWithStatus } from '../WalletIconWithStatus/WalletIconWithStatus.js';
|
|
38
|
-
import { useWidgetContext } from '../../context/DynamicWidgetContext.js';
|
|
39
40
|
|
|
40
|
-
const Wallet = ({
|
|
41
|
-
const
|
|
42
|
-
const
|
|
43
|
-
const { connector } = wallet;
|
|
44
|
-
const { computeConnectedStateForWallets, setPrimaryWallet, setSelectedWalletConnector, } = useInternalDynamicContext();
|
|
45
|
-
const { setWalletIdToUnlink } = useWidgetContext();
|
|
41
|
+
const Wallet = ({ wallet, ens }) => {
|
|
42
|
+
const { id: walletId, connector, address, connected } = wallet;
|
|
43
|
+
const { computeConnectedStateForWallets, setPrimaryWallet, setSelectedWalletConnector, setSelectedWalletWithAction, } = useInternalDynamicContext();
|
|
46
44
|
const iconSize = 20;
|
|
47
45
|
const options = [
|
|
48
46
|
{
|
|
@@ -60,23 +58,24 @@ const Wallet = ({ setNewWalletId, wallet, ens }) => {
|
|
|
60
58
|
}
|
|
61
59
|
options.push({
|
|
62
60
|
Icon: jsx(SvgCopy, {}),
|
|
63
|
-
callback: () => copyToClipboard(
|
|
61
|
+
callback: () => copyToClipboard(address || ''),
|
|
64
62
|
text: 'Copy address',
|
|
65
63
|
}, {
|
|
66
64
|
Icon: jsx(SvgUnlink, {}),
|
|
67
|
-
callback: () =>
|
|
65
|
+
callback: () => setSelectedWalletWithAction({ action: 'unlink', wallet }),
|
|
68
66
|
text: 'Unlink from my account',
|
|
69
67
|
});
|
|
70
68
|
const onSelectWalletClick = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
71
|
-
|
|
72
|
-
|
|
69
|
+
var _a;
|
|
70
|
+
if (connector.connectedChain === 'FLOW') {
|
|
71
|
+
(_a = connector.endSession) === null || _a === void 0 ? void 0 : _a.call(connector);
|
|
73
72
|
}
|
|
74
|
-
|
|
73
|
+
setSelectedWalletWithAction({ action: 'select', wallet });
|
|
75
74
|
setPrimaryWallet(walletId);
|
|
76
75
|
computeConnectedStateForWallets();
|
|
77
|
-
setSelectedWalletConnector(
|
|
76
|
+
setSelectedWalletConnector(connector);
|
|
78
77
|
});
|
|
79
|
-
return (jsxs("div", Object.assign({ className: 'wallet__container', "data-testid": 'wallet' }, { children: [jsxs("div", Object.assign({ className: 'wallet__row' }, { children: [jsx("div", Object.assign({ className: 'wallet__icon-container' }, { children: jsx(WalletIconWithStatus, { iconSize: iconSize, walletName: connector.name, connected:
|
|
78
|
+
return (jsxs("div", Object.assign({ className: 'wallet__container', "data-testid": 'wallet' }, { children: [jsxs("div", Object.assign({ className: 'wallet__row' }, { children: [jsx("div", Object.assign({ className: 'wallet__icon-container' }, { children: jsx(WalletIconWithStatus, { iconSize: iconSize, walletName: connector.name, connected: connected, variant: 'secondary' }) })), (ens === null || ens === void 0 ? void 0 : ens.name) ? (jsxs(Fragment, { children: [jsx(Typography, Object.assign({ className: 'wallet__ens-name', variant: 'body_small', color: 'primary', truncate: true }, { children: ens === null || ens === void 0 ? void 0 : ens.name })), jsx("div", { className: 'wallet__row__seperator' }), jsx(Typography, Object.assign({ variant: 'body_mini', color: 'secondary' }, { children: shortenWalletAddress(address, 3, 3) }))] })) : (jsx(Typography, Object.assign({ variant: 'body_small', color: 'primary' }, { children: shortenWalletAddress(address, 4, 4) })))] })), jsx(DotsMenu, { "data-testid": 'dots-menu', options: options, title: 'Wallet options', buttonClassName: 'wallet__menu' })] })));
|
|
80
79
|
};
|
|
81
80
|
|
|
82
81
|
export { Wallet };
|
|
@@ -27,6 +27,8 @@ require('../../../components/Transition/SlideInUpTransition/SlideInUpTransition.
|
|
|
27
27
|
require('../../../components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
28
28
|
require('../../../components/IconButton/IconButton.cjs');
|
|
29
29
|
require('../../../components/Alert/Alert.cjs');
|
|
30
|
+
require('../../../components/Popper/Popper/Popper.cjs');
|
|
31
|
+
require('../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
30
32
|
var useKYCFlag = require('../../../utils/hooks/useKYCFlag/useKYCFlag.cjs');
|
|
31
33
|
var useMultiWalletFlag = require('../../../utils/hooks/useMultiWalletFlag/useMultiWalletFlag.cjs');
|
|
32
34
|
require('../../../context/MockContext/MockContext.cjs');
|
|
@@ -39,8 +41,6 @@ const DynamicWidgetContextProvider = ({ children, }) => {
|
|
|
39
41
|
const inlineControlsRef = React.useRef(null);
|
|
40
42
|
const availableWalletsContainerRef = React.useRef(null);
|
|
41
43
|
const { setShowDynamicUserProfile, showDynamicUserProfile } = useInternalDynamicContext.useInternalDynamicContext();
|
|
42
|
-
const [newWalletId, setNewWalletId] = React.useState('');
|
|
43
|
-
const [walletIdToUnlink, setWalletIdToUnlink] = React.useState(undefined);
|
|
44
44
|
const isKYCEnabled = useKYCFlag.useKYCFlag();
|
|
45
45
|
const isMultiWalletEnabled = useMultiWalletFlag.useMultiWalletFlag();
|
|
46
46
|
const initialView = React.useMemo(() => (isKYCEnabled && !isMultiWalletEnabled ? 'profile' : 'index'), [isKYCEnabled, isMultiWalletEnabled]);
|
|
@@ -70,20 +70,14 @@ const DynamicWidgetContextProvider = ({ children, }) => {
|
|
|
70
70
|
goToProfileView,
|
|
71
71
|
inlineControlsRef,
|
|
72
72
|
isOpen: showDynamicUserProfile,
|
|
73
|
-
newWalletId,
|
|
74
73
|
setDynamicWidgetView,
|
|
75
74
|
setIsOpen: setShowDynamicUserProfile,
|
|
76
|
-
setNewWalletId,
|
|
77
|
-
setWalletIdToUnlink,
|
|
78
|
-
walletIdToUnlink,
|
|
79
75
|
widgetRef,
|
|
80
76
|
}), [
|
|
81
77
|
dynamicWidgetView,
|
|
82
78
|
goToProfileView,
|
|
83
|
-
newWalletId,
|
|
84
79
|
setShowDynamicUserProfile,
|
|
85
80
|
showDynamicUserProfile,
|
|
86
|
-
walletIdToUnlink,
|
|
87
81
|
]);
|
|
88
82
|
return (jsxRuntime.jsx(DynamicWidgetContext.Provider, Object.assign({ value: value }, { children: children })));
|
|
89
83
|
};
|
|
@@ -5,12 +5,8 @@ export interface WidgetContextProps {
|
|
|
5
5
|
goToProfileView: () => void;
|
|
6
6
|
inlineControlsRef: RefObject<HTMLDivElement>;
|
|
7
7
|
isOpen: boolean;
|
|
8
|
-
newWalletId: string;
|
|
9
8
|
setDynamicWidgetView: Dispatch<SetStateAction<DynamicWidgetViews>>;
|
|
10
9
|
setIsOpen: Dispatch<SetStateAction<boolean>>;
|
|
11
|
-
setNewWalletId: Dispatch<SetStateAction<string>>;
|
|
12
|
-
setWalletIdToUnlink: Dispatch<SetStateAction<string | undefined>>;
|
|
13
|
-
walletIdToUnlink?: string;
|
|
14
10
|
widgetRef: RefObject<HTMLDivElement>;
|
|
15
11
|
}
|
|
16
12
|
export type DynamicWidgetViews = 'index' | 'profile' | 'edit-profile';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { createContext, useRef,
|
|
2
|
+
import { createContext, useRef, useMemo, useState, useCallback, useEffect, useContext } from 'react';
|
|
3
3
|
import '@dynamic-labs/utils';
|
|
4
4
|
import '@dynamic-labs/sdk-api';
|
|
5
5
|
import '../../../config/ApiEndpoint.js';
|
|
@@ -23,6 +23,8 @@ import '../../../components/Transition/SlideInUpTransition/SlideInUpTransition.j
|
|
|
23
23
|
import '../../../components/Transition/OpacityTransition/OpacityTransition.js';
|
|
24
24
|
import '../../../components/IconButton/IconButton.js';
|
|
25
25
|
import '../../../components/Alert/Alert.js';
|
|
26
|
+
import '../../../components/Popper/Popper/Popper.js';
|
|
27
|
+
import '../../../components/Popper/PopperContext/PopperContext.js';
|
|
26
28
|
import { useKYCFlag } from '../../../utils/hooks/useKYCFlag/useKYCFlag.js';
|
|
27
29
|
import { useMultiWalletFlag } from '../../../utils/hooks/useMultiWalletFlag/useMultiWalletFlag.js';
|
|
28
30
|
import '../../../context/MockContext/MockContext.js';
|
|
@@ -35,8 +37,6 @@ const DynamicWidgetContextProvider = ({ children, }) => {
|
|
|
35
37
|
const inlineControlsRef = useRef(null);
|
|
36
38
|
const availableWalletsContainerRef = useRef(null);
|
|
37
39
|
const { setShowDynamicUserProfile, showDynamicUserProfile } = useInternalDynamicContext();
|
|
38
|
-
const [newWalletId, setNewWalletId] = useState('');
|
|
39
|
-
const [walletIdToUnlink, setWalletIdToUnlink] = useState(undefined);
|
|
40
40
|
const isKYCEnabled = useKYCFlag();
|
|
41
41
|
const isMultiWalletEnabled = useMultiWalletFlag();
|
|
42
42
|
const initialView = useMemo(() => (isKYCEnabled && !isMultiWalletEnabled ? 'profile' : 'index'), [isKYCEnabled, isMultiWalletEnabled]);
|
|
@@ -66,20 +66,14 @@ const DynamicWidgetContextProvider = ({ children, }) => {
|
|
|
66
66
|
goToProfileView,
|
|
67
67
|
inlineControlsRef,
|
|
68
68
|
isOpen: showDynamicUserProfile,
|
|
69
|
-
newWalletId,
|
|
70
69
|
setDynamicWidgetView,
|
|
71
70
|
setIsOpen: setShowDynamicUserProfile,
|
|
72
|
-
setNewWalletId,
|
|
73
|
-
setWalletIdToUnlink,
|
|
74
|
-
walletIdToUnlink,
|
|
75
71
|
widgetRef,
|
|
76
72
|
}), [
|
|
77
73
|
dynamicWidgetView,
|
|
78
74
|
goToProfileView,
|
|
79
|
-
newWalletId,
|
|
80
75
|
setShowDynamicUserProfile,
|
|
81
76
|
showDynamicUserProfile,
|
|
82
|
-
walletIdToUnlink,
|
|
83
77
|
]);
|
|
84
78
|
return (jsx(DynamicWidgetContext.Provider, Object.assign({ value: value }, { children: children })));
|
|
85
79
|
};
|