@dynamic-labs/sdk-react-core 0.17.0-RC.3 → 0.17.0-RC.30
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 +312 -0
- package/package.cjs +9 -10
- package/package.js +9 -10
- package/package.json +17 -14
- package/src/index.cjs +32 -4
- package/src/index.d.ts +6 -2
- package/src/index.js +20 -3
- package/src/lib/Main.cjs +22 -9
- package/src/lib/Main.js +21 -8
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.cjs +12 -2
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.js +12 -2
- package/src/lib/components/Alert/Alert.cjs +29 -0
- package/src/lib/components/Alert/Alert.js +25 -0
- package/src/lib/components/Alert/Alert.types.d.ts +4 -1
- package/src/lib/components/AnimatePresence/AnimatePresence.cjs +12 -2
- package/src/lib/components/AnimatePresence/AnimatePresence.js +12 -2
- package/src/lib/components/AppOriginTile/AppOriginTile.types.d.ts +1 -1
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.cjs +66 -0
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.d.ts +10 -0
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.js +62 -0
- package/src/lib/components/AuthProviderIcon/index.d.ts +1 -0
- package/src/lib/components/ChainCard/ChainCard.d.ts +7 -0
- package/src/lib/components/Checkbox/Checkbox.cjs +3 -1
- package/src/lib/components/Checkbox/Checkbox.js +3 -1
- package/src/lib/components/Chip/Chip.cjs +13 -0
- package/src/lib/components/Chip/Chip.d.ts +7 -0
- package/src/lib/components/Chip/Chip.js +9 -0
- package/src/lib/components/Chip/index.d.ts +1 -0
- package/src/lib/components/Divider/Divider.cjs +17 -4
- package/src/lib/components/Divider/Divider.d.ts +6 -2
- package/src/lib/components/Divider/Divider.js +17 -4
- package/src/lib/components/ErrorContainer/ErrorContainer.cjs +5 -3
- package/src/lib/components/ErrorContainer/ErrorContainer.d.ts +3 -1
- package/src/lib/components/ErrorContainer/ErrorContainer.js +5 -3
- package/src/lib/components/FormFieldLabel/FormFieldLabel.cjs +10 -0
- package/src/lib/components/FormFieldLabel/FormFieldLabel.d.ts +8 -0
- package/src/lib/components/FormFieldLabel/FormFieldLabel.js +6 -0
- package/src/lib/components/FormFieldLabel/index.d.ts +1 -0
- package/src/lib/components/IconWithSpinner/IconWithSpinner.cjs +5 -1
- package/src/lib/components/IconWithSpinner/IconWithSpinner.js +5 -1
- package/src/lib/components/IconWithSpinner/Indicator/Indicator.cjs +4 -1
- package/src/lib/components/IconWithSpinner/Indicator/Indicator.js +4 -1
- package/src/lib/components/IconWithSpinner/Spinner/Spinner.cjs +4 -0
- package/src/lib/components/IconWithSpinner/Spinner/Spinner.js +4 -0
- package/src/lib/components/IconWithStatus/IconWithStatus.cjs +11 -5
- package/src/lib/components/IconWithStatus/IconWithStatus.d.ts +2 -1
- package/src/lib/components/IconWithStatus/IconWithStatus.js +11 -5
- package/src/lib/components/Input/Input.cjs +13 -6
- package/src/lib/components/Input/Input.js +13 -6
- package/src/lib/components/Input/Input.types.d.ts +4 -0
- package/src/lib/components/LogoutButton/LogoutButton.cjs +3 -1
- package/src/lib/components/LogoutButton/LogoutButton.js +3 -1
- package/src/lib/components/NetworkPicker/NetworkPicker.cjs +9 -3
- package/src/lib/components/NetworkPicker/NetworkPicker.d.ts +3 -2
- package/src/lib/components/NetworkPicker/NetworkPicker.js +9 -3
- package/src/lib/components/NetworkPicker/components/ActionList/ActionList.cjs +12 -2
- package/src/lib/components/NetworkPicker/components/ActionList/ActionList.js +12 -2
- package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.cjs +18 -8
- package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.d.ts +2 -2
- package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.js +18 -8
- package/src/lib/components/NetworkPicker/components/Network/Network.cjs +14 -4
- package/src/lib/components/NetworkPicker/components/Network/Network.js +14 -4
- package/src/lib/components/NetworkPicker/components/NetworkAction/NetworkAction.d.ts +4 -4
- package/src/lib/components/NetworkPicker/components/NetworkControl/NetworkControl.d.ts +2 -2
- package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.cjs +13 -3
- package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.js +13 -3
- package/src/lib/components/NetworkPicker/components/UnsupportedNetwork/UnsupportedNetwork.cjs +3 -1
- package/src/lib/components/NetworkPicker/components/UnsupportedNetwork/UnsupportedNetwork.js +3 -1
- package/src/lib/components/OTPVerificationView/OTPVerificationView.cjs +19 -8
- package/src/lib/components/OTPVerificationView/OTPVerificationView.js +19 -8
- package/src/lib/components/OverlayCard/OverlayCard.cjs +12 -2
- package/src/lib/components/OverlayCard/OverlayCard.js +12 -2
- 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 +12 -3
- package/src/lib/components/Portal/Portal.js +12 -3
- package/src/lib/components/Select/Select.cjs +3 -1
- package/src/lib/components/Select/Select.js +3 -1
- package/src/lib/components/SelectNetworkButton/SelectNetworkButton.cjs +13 -0
- package/src/lib/components/SelectNetworkButton/SelectNetworkButton.d.ts +8 -0
- package/src/lib/components/SelectNetworkButton/SelectNetworkButton.js +9 -0
- package/src/lib/components/SelectWalletChainLayout/SelectWalletChainLayout.d.ts +8 -0
- package/src/lib/components/SendBalanceForm/SendBalanceForm.cjs +61 -0
- package/src/lib/components/SendBalanceForm/SendBalanceForm.d.ts +11 -0
- package/src/lib/components/SendBalanceForm/SendBalanceForm.js +57 -0
- package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.cjs +50 -0
- package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.d.ts +19 -0
- package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.js +46 -0
- package/src/lib/components/SendBalancePageLayout/components/TokenBalanceCard/TokenBalanceCard.cjs +25 -0
- package/src/lib/components/SendBalancePageLayout/components/TokenBalanceCard/TokenBalanceCard.d.ts +8 -0
- package/src/lib/components/SendBalancePageLayout/components/TokenBalanceCard/TokenBalanceCard.js +21 -0
- package/src/lib/components/SendBalancePageLayout/components/TokenBalanceCard/index.d.ts +1 -0
- package/src/lib/components/SendBalancePageLayout/components/index.d.ts +1 -0
- package/src/lib/components/SendBalancePageLayout/index.d.ts +2 -0
- package/src/lib/components/ShadowDOM/utils.cjs +3 -1
- package/src/lib/components/ShadowDOM/utils.js +3 -1
- package/src/lib/components/Spinner/spinner.cjs +3 -1
- package/src/lib/components/Spinner/spinner.js +3 -1
- package/src/lib/components/Toolkit/Toolkit.cjs +4 -1
- package/src/lib/components/Toolkit/Toolkit.js +4 -1
- package/src/lib/components/Toolkit/components/LoginWithEmailViewDisplayPriorityOrderSwitch.cjs +3 -1
- package/src/lib/components/Toolkit/components/LoginWithEmailViewDisplayPriorityOrderSwitch.js +3 -1
- package/src/lib/components/Tooltip/Tooltip.cjs +12 -2
- package/src/lib/components/Tooltip/Tooltip.js +12 -2
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.cjs +40 -0
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.d.ts +17 -0
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.js +36 -0
- package/src/lib/components/TransactionConfirmationPageLayout/components/TransactionRow/TransactionRow.cjs +11 -0
- package/src/lib/components/TransactionConfirmationPageLayout/components/TransactionRow/TransactionRow.d.ts +12 -0
- package/src/lib/components/TransactionConfirmationPageLayout/components/TransactionRow/TransactionRow.js +7 -0
- package/src/lib/components/TransactionConfirmationPageLayout/components/TransactionRow/index.d.ts +1 -0
- package/src/lib/components/TransactionConfirmationPageLayout/components/index.d.ts +1 -0
- package/src/lib/components/TransactionConfirmationPageLayout/index.d.ts +2 -0
- package/src/lib/components/TransactionOriginDestination/TransactionOriginDestination.d.ts +11 -0
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.cjs +56 -0
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.d.ts +12 -0
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.js +52 -0
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.cjs +12 -2
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.js +12 -2
- package/src/lib/components/UserAddress/UserAddress.cjs +7 -7
- package/src/lib/components/UserAddress/UserAddress.js +8 -8
- package/src/lib/components/UserProfile/UserProfile.cjs +16 -8
- package/src/lib/components/UserProfile/UserProfile.js +12 -4
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.cjs +14 -4
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.d.ts +1 -0
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.js +14 -4
- package/src/lib/components/UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.cjs +5 -3
- package/src/lib/components/UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.d.ts +2 -0
- package/src/lib/components/UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.js +5 -3
- package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.cjs +14 -4
- package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.js +14 -4
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs +32 -13
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js +32 -13
- package/src/lib/components/index.d.ts +5 -0
- package/src/lib/context/AccessDeniedContext/AccessDeniedContext.cjs +30 -0
- package/src/lib/context/AccessDeniedContext/AccessDeniedContext.d.ts +13 -0
- package/src/lib/context/AccessDeniedContext/AccessDeniedContext.js +24 -0
- package/src/lib/context/AccessDeniedContext/index.d.ts +1 -0
- package/src/lib/context/DynamicContext/DynamicContext.cjs +83 -32
- package/src/lib/context/DynamicContext/DynamicContext.d.ts +20 -11
- package/src/lib/context/DynamicContext/DynamicContext.js +78 -27
- package/src/lib/context/DynamicContext/helpers.cjs +3 -1
- package/src/lib/context/DynamicContext/helpers.js +3 -1
- package/src/lib/context/DynamicContext/hooks/useDisplayOrderState/useDisplayOrderState.cjs +3 -1
- package/src/lib/context/DynamicContext/hooks/useDisplayOrderState/useDisplayOrderState.js +3 -1
- package/src/lib/context/DynamicContext/hooks/useEmailLoginState/useEmailLoginState.cjs +4 -0
- package/src/lib/context/DynamicContext/hooks/useEmailLoginState/useEmailLoginState.js +4 -0
- package/src/lib/context/DynamicContext/hooks/useNameService/index.d.ts +1 -0
- package/src/lib/context/DynamicContext/hooks/useNameService/useNameService.cjs +84 -0
- package/src/lib/context/DynamicContext/hooks/useNameService/useNameService.d.ts +11 -0
- package/src/lib/context/DynamicContext/hooks/useNameService/useNameService.js +80 -0
- package/src/lib/context/DynamicContext/hooks/useNameService/useNameService.types.d.ts +4 -0
- package/src/lib/context/DynamicContext/hooks/useSetShowAuthFlowWithInit/index.d.ts +1 -0
- package/src/lib/context/DynamicContext/hooks/useSetShowAuthFlowWithInit/useSetShowAuthFlowWithInit.cjs +27 -0
- package/src/lib/context/DynamicContext/hooks/useSetShowAuthFlowWithInit/useSetShowAuthFlowWithInit.d.ts +14 -0
- package/src/lib/context/DynamicContext/hooks/useSetShowAuthFlowWithInit/useSetShowAuthFlowWithInit.js +23 -0
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerAuthFlowCallbacks.cjs +12 -2
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerAuthFlowCallbacks.js +12 -2
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerCallbacks.cjs +4 -1
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerCallbacks.js +4 -1
- package/src/lib/context/DynamicContext/useDynamicContext.cjs +2 -1
- package/src/lib/context/DynamicContext/useDynamicContext.d.ts +1 -1
- package/src/lib/context/DynamicContext/useDynamicContext.js +2 -1
- package/src/lib/context/DynamicContext/validators.cjs +3 -1
- package/src/lib/context/DynamicContext/validators.js +3 -1
- package/src/lib/context/FundingContext/FundingContext.cjs +69 -0
- package/src/lib/context/FundingContext/FundingContext.d.ts +14 -0
- package/src/lib/context/FundingContext/FundingContext.js +63 -0
- package/src/lib/context/FundingContext/index.d.ts +1 -0
- package/src/lib/context/MockContext/MockContext.cjs +4 -1
- package/src/lib/context/MockContext/MockContext.js +4 -1
- package/src/lib/context/QrCodeContext/QrCodeContext.cjs +12 -2
- package/src/lib/context/QrCodeContext/QrCodeContext.js +12 -2
- package/src/lib/context/SendBalanceContext/SendBalanceContext.cjs +73 -0
- package/src/lib/context/SendBalanceContext/SendBalanceContext.d.ts +4 -0
- package/src/lib/context/SendBalanceContext/SendBalanceContext.errors.cjs +11 -0
- package/src/lib/context/SendBalanceContext/SendBalanceContext.errors.d.ts +3 -0
- package/src/lib/context/SendBalanceContext/SendBalanceContext.errors.js +6 -0
- package/src/lib/context/SendBalanceContext/SendBalanceContext.js +68 -0
- package/src/lib/context/SendBalanceContext/SendBalanceContext.types.d.ts +9 -0
- package/src/lib/context/SendBalanceContext/index.d.ts +1 -0
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.cjs +109 -22
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.d.ts +4 -2
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +109 -22
- package/src/lib/context/ThemeContext/themesData.cjs +21 -19
- package/src/lib/context/ThemeContext/themesData.d.ts +3 -3
- package/src/lib/context/ThemeContext/themesData.js +21 -19
- package/src/lib/context/ViewContext/ViewContext.cjs +21 -12
- package/src/lib/context/ViewContext/ViewContext.d.ts +10 -8
- package/src/lib/context/ViewContext/ViewContext.js +22 -13
- package/src/lib/data/api.cjs +38 -19
- package/src/lib/data/api.d.ts +10 -3
- package/src/lib/data/api.js +23 -5
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.cjs +14 -4
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.js +14 -4
- package/src/lib/layout/DynamicAuthLayout/Footer/Footer.cjs +13 -3
- package/src/lib/layout/DynamicAuthLayout/Footer/Footer.js +13 -3
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/Item/Item.cjs +13 -3
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/Item/Item.js +13 -3
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.cjs +14 -4
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.js +13 -3
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/WalletListFooterContent.cjs +14 -5
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/WalletListFooterContent.js +12 -3
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletMoreInfoContent/WalletMoreInfoContent.cjs +16 -6
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletMoreInfoContent/WalletMoreInfoContent.js +16 -6
- package/src/lib/layout/DynamicAuthLayout/Header/header.cjs +23 -10
- package/src/lib/layout/DynamicAuthLayout/Header/header.js +23 -10
- package/src/lib/main.global.cjs +1 -1
- package/src/lib/main.global.js +1 -1
- package/src/lib/modals/SendBalanceModal/SendBalanceModal.cjs +66 -0
- package/src/lib/modals/SendBalanceModal/SendBalanceModal.d.ts +10 -0
- package/src/lib/modals/SendBalanceModal/SendBalanceModal.js +62 -0
- package/src/lib/modals/SendBalanceModal/index.d.ts +1 -0
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.cjs +20 -10
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js +20 -10
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.cjs +35 -99
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.js +37 -101
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.types.d.ts +0 -4
- package/src/lib/modals/index.d.ts +1 -0
- package/src/lib/shared/assets/add.cjs +8 -9
- package/src/lib/shared/assets/add.js +8 -9
- package/src/lib/shared/assets/index.d.ts +1 -0
- package/src/lib/shared/assets/send.cjs +56 -0
- package/src/lib/shared/assets/send.js +32 -0
- package/src/lib/shared/types/index.d.ts +14 -4
- package/src/lib/shared/utils/functions/ceil/ceil.cjs +10 -0
- package/src/lib/shared/utils/functions/ceil/ceil.d.ts +1 -0
- package/src/lib/shared/utils/functions/ceil/ceil.js +6 -0
- package/src/lib/shared/utils/functions/ceil/index.d.ts +1 -0
- package/src/lib/shared/utils/functions/chain/getChainDisplayName.cjs +2 -2
- package/src/lib/shared/utils/functions/chain/getChainDisplayName.js +1 -1
- package/src/lib/shared/utils/functions/chain/getChainIcon.cjs +2 -2
- package/src/lib/shared/utils/functions/chain/getChainIcon.js +1 -1
- package/src/lib/shared/utils/functions/formatBigNumber/formatBigNumber.cjs +21 -0
- package/src/lib/shared/utils/functions/formatBigNumber/formatBigNumber.d.ts +2 -0
- package/src/lib/shared/utils/functions/formatBigNumber/formatBigNumber.js +17 -0
- package/src/lib/shared/utils/functions/formatBigNumber/index.d.ts +1 -0
- package/src/lib/shared/utils/functions/getWalletListItemLabel/getWalletListItemLabel.cjs +5 -10
- package/src/lib/shared/utils/functions/getWalletListItemLabel/getWalletListItemLabel.js +3 -8
- package/src/lib/shared/utils/functions/index.d.ts +3 -0
- package/src/lib/shared/utils/functions/shortenEmail/shortenEmail.cjs +27 -0
- package/src/lib/shared/utils/functions/shortenEmail/shortenEmail.d.ts +6 -0
- package/src/lib/shared/utils/functions/shortenEmail/shortenEmail.js +23 -0
- package/src/lib/shared/utils/functions/trimEnd/index.d.ts +1 -0
- package/src/lib/shared/utils/functions/trimEnd/trimEnd.cjs +13 -0
- package/src/lib/shared/utils/functions/trimEnd/trimEnd.d.ts +1 -0
- package/src/lib/shared/utils/functions/trimEnd/trimEnd.js +9 -0
- package/src/lib/shared/utils/hooks/index.d.ts +1 -0
- package/src/lib/shared/utils/hooks/useLocalStorage/useLocalStorage.cjs +3 -1
- package/src/lib/shared/utils/hooks/useLocalStorage/useLocalStorage.js +3 -1
- 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/functions/generateMessages/index.cjs +4 -3
- package/src/lib/utils/functions/generateMessages/index.js +2 -1
- package/src/lib/utils/functions/getAppOrigin/getAppOrigin.cjs +12 -0
- package/src/lib/utils/functions/getAppOrigin/getAppOrigin.d.ts +1 -0
- package/src/lib/utils/functions/getAppOrigin/getAppOrigin.js +8 -0
- package/src/lib/utils/functions/getAppOrigin/index.d.ts +1 -0
- package/src/lib/utils/functions/getDynamicLayoutData/getDynamicLayoutData.cjs +3 -1
- package/src/lib/utils/functions/getDynamicLayoutData/getDynamicLayoutData.js +3 -1
- package/src/lib/utils/functions/getEnabledKYC/index.cjs +5 -0
- package/src/lib/utils/functions/getEnabledKYC/index.d.ts +5 -0
- package/src/lib/utils/functions/getEnabledKYC/index.js +5 -0
- package/src/lib/utils/functions/getNetwork/getNetwork.cjs +1 -6
- package/src/lib/utils/functions/getNetwork/getNetwork.d.ts +1 -1
- package/src/lib/utils/functions/getNetwork/getNetwork.js +1 -6
- package/src/lib/utils/functions/getReferencedAccount/getReferencedAccount.cjs +29 -0
- package/src/lib/utils/functions/getReferencedAccount/getReferencedAccount.d.ts +7 -0
- package/src/lib/utils/functions/getReferencedAccount/getReferencedAccount.js +25 -0
- package/src/lib/utils/functions/getReferencedAccount/index.d.ts +1 -0
- package/src/lib/utils/functions/getUserProfileFields/getUserProfileFields.cjs +78 -0
- package/src/lib/utils/functions/getUserProfileFields/getUserProfileFields.d.ts +29 -0
- package/src/lib/utils/functions/getUserProfileFields/getUserProfileFields.js +72 -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/functions/getWalletProvider/getWalletProvider.cjs +2 -2
- package/src/lib/utils/functions/getWalletProvider/getWalletProvider.js +1 -1
- package/src/lib/utils/functions/getWalletVerifiedCredential/getWalletVerifiedCredential.cjs +1 -1
- package/src/lib/utils/functions/getWalletVerifiedCredential/getWalletVerifiedCredential.d.ts +1 -2
- package/src/lib/utils/functions/getWalletVerifiedCredential/getWalletVerifiedCredential.js +1 -1
- package/src/lib/utils/functions/handleUnlinkHelper/handleUnlinkHelper.cjs +6 -3
- package/src/lib/utils/functions/handleUnlinkHelper/handleUnlinkHelper.js +4 -1
- package/src/lib/utils/functions/hasWalletGroupFlag/hasWalletGroupFlag.d.ts +1 -0
- package/src/lib/utils/functions/index.d.ts +3 -0
- package/src/lib/utils/functions/isNetworkUnsupported/index.d.ts +1 -0
- package/src/lib/utils/functions/isNetworkUnsupported/isNetworkUnsupported.cjs +12 -0
- package/src/lib/utils/functions/isNetworkUnsupported/isNetworkUnsupported.d.ts +2 -0
- package/src/lib/utils/functions/isNetworkUnsupported/isNetworkUnsupported.js +8 -0
- package/src/lib/utils/functions/isProgrammableNetworkSwitchSupported/isProgrammableNetworkSwitchSupported.cjs +16 -1
- package/src/lib/utils/functions/isProgrammableNetworkSwitchSupported/isProgrammableNetworkSwitchSupported.d.ts +6 -0
- package/src/lib/utils/functions/isProgrammableNetworkSwitchSupported/isProgrammableNetworkSwitchSupported.js +16 -1
- package/src/lib/utils/functions/isSameWalletName/isSameWalletName.cjs +2 -2
- package/src/lib/utils/functions/isSameWalletName/isSameWalletName.js +1 -1
- package/src/lib/utils/functions/isSelectedWalletAlreadyConnected/isSelectedWalletAlreadyConnected.cjs +3 -3
- package/src/lib/utils/functions/isSelectedWalletAlreadyConnected/isSelectedWalletAlreadyConnected.js +1 -1
- package/src/lib/utils/functions/isSupportedNetwork/isSupportedNetwork.cjs +6 -1
- package/src/lib/utils/functions/isSupportedNetwork/isSupportedNetwork.d.ts +1 -1
- package/src/lib/utils/functions/isSupportedNetwork/isSupportedNetwork.js +6 -1
- package/src/lib/utils/functions/isWalletConnected/isWalletConnected.cjs +2 -2
- package/src/lib/utils/functions/isWalletConnected/isWalletConnected.js +1 -1
- package/src/lib/utils/functions/isWalletLinked/index.d.ts +1 -0
- package/src/lib/utils/functions/isWalletLinked/isWalletLinked.cjs +15 -0
- package/src/lib/utils/functions/isWalletLinked/isWalletLinked.d.ts +2 -0
- package/src/lib/utils/functions/isWalletLinked/isWalletLinked.js +11 -0
- package/src/lib/utils/functions/parseWalletLinks/parseWalletLinks.cjs +6 -3
- package/src/lib/utils/functions/parseWalletLinks/parseWalletLinks.d.ts +2 -0
- package/src/lib/utils/functions/parseWalletLinks/parseWalletLinks.js +4 -1
- package/src/lib/utils/functions/requiresTwoStepAuthentication/requiresTwoStepAuthentication.cjs +2 -2
- package/src/lib/utils/functions/requiresTwoStepAuthentication/requiresTwoStepAuthentication.js +1 -1
- package/src/lib/utils/functions/walletListBuilder/walletListBuilder.cjs +6 -7
- package/src/lib/utils/functions/walletListBuilder/walletListBuilder.js +1 -2
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.cjs +7 -5
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.js +4 -2
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.cjs +3 -1
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.js +3 -1
- package/src/lib/utils/hooks/authenticationHooks/useEmailVerificationRequest/useEmailVerificationRequest.cjs +4 -0
- package/src/lib/utils/hooks/authenticationHooks/useEmailVerificationRequest/useEmailVerificationRequest.js +4 -0
- package/src/lib/utils/hooks/multiWallet/index.d.ts +1 -0
- package/src/lib/utils/hooks/multiWallet/useMultiWalletWidgetState/useMultiWalletWidgetState.cjs +0 -2
- package/src/lib/utils/hooks/multiWallet/useMultiWalletWidgetState/useMultiWalletWidgetState.js +0 -2
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.cjs +67 -8
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.d.ts +10 -3
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.js +68 -9
- package/src/lib/utils/hooks/multiWallet/useVerifyOnAwaitingSignature/useVerifyOnAwaitingSignature.cjs +5 -1
- package/src/lib/utils/hooks/multiWallet/useVerifyOnAwaitingSignature/useVerifyOnAwaitingSignature.js +5 -1
- package/src/lib/utils/hooks/useAuthenticateConnectedUser/useAuthenticateConnectedUser.cjs +7 -3
- package/src/lib/utils/hooks/useAuthenticateConnectedUser/useAuthenticateConnectedUser.js +5 -1
- package/src/lib/utils/hooks/useClearWalletConnectSessions/useClearWalletConnectSessions.cjs +2 -2
- package/src/lib/utils/hooks/useClearWalletConnectSessions/useClearWalletConnectSessions.js +1 -1
- package/src/lib/utils/hooks/useConfirmationModal/useConfirmationModal.cjs +6 -1
- package/src/lib/utils/hooks/useConfirmationModal/useConfirmationModal.js +6 -1
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.cjs +6 -3
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.d.ts +1 -1
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.js +4 -1
- package/src/lib/utils/hooks/useConnectWithEmail/useConnectWithEmail.cjs +3 -1
- package/src/lib/utils/hooks/useConnectWithEmail/useConnectWithEmail.js +3 -1
- package/src/lib/utils/hooks/useConnectedAccountWallet/index.d.ts +1 -0
- package/src/lib/utils/hooks/useConnectedAccountWallet/useConnectedAccountWallet.cjs +30 -0
- package/src/lib/utils/hooks/useConnectedAccountWallet/useConnectedAccountWallet.d.ts +2 -0
- package/src/lib/utils/hooks/useConnectedAccountWallet/useConnectedAccountWallet.js +26 -0
- package/src/lib/utils/hooks/useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.cjs +4 -1
- package/src/lib/utils/hooks/useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.js +4 -1
- package/src/lib/utils/hooks/useFetchNetworkConfigurations/useFetchNetworkConfigurations.cjs +53 -31
- package/src/lib/utils/hooks/useFetchNetworkConfigurations/useFetchNetworkConfigurations.d.ts +5 -5
- package/src/lib/utils/hooks/useFetchNetworkConfigurations/useFetchNetworkConfigurations.js +53 -31
- package/src/lib/utils/hooks/useFetchNonce/useFetchNonce.cjs +4 -2
- package/src/lib/utils/hooks/useFetchNonce/useFetchNonce.js +3 -1
- package/src/lib/utils/hooks/useFetchProjectSettings/useFetchProjectSettings.cjs +5 -2
- package/src/lib/utils/hooks/useFetchProjectSettings/useFetchProjectSettings.js +4 -1
- package/src/lib/utils/hooks/useFetchWalletsForChainsMap/useFetchWalletsForChainsMap.cjs +3 -1
- package/src/lib/utils/hooks/useFetchWalletsForChainsMap/useFetchWalletsForChainsMap.js +3 -1
- package/src/lib/utils/hooks/useHandleUnlinkWallet/useHandleUnlinkWallet.cjs +25 -2
- package/src/lib/utils/hooks/useHandleUnlinkWallet/useHandleUnlinkWallet.js +25 -2
- package/src/lib/utils/hooks/useKYCFlag/useKYCFlag.cjs +16 -6
- package/src/lib/utils/hooks/useKYCFlag/useKYCFlag.d.ts +5 -0
- package/src/lib/utils/hooks/useKYCFlag/useKYCFlag.js +16 -6
- package/src/lib/utils/hooks/useMultiWalletFlag/useMultiWalletFlag.cjs +3 -1
- package/src/lib/utils/hooks/useMultiWalletFlag/useMultiWalletFlag.js +3 -1
- package/src/lib/utils/hooks/useMutation/useMutation.cjs +4 -4
- package/src/lib/utils/hooks/useMutation/useMutation.js +1 -1
- package/src/lib/utils/hooks/usePrevious/usePrevious.cjs +0 -1
- package/src/lib/utils/hooks/usePrevious/usePrevious.d.ts +1 -1
- package/src/lib/utils/hooks/usePrevious/usePrevious.js +0 -1
- package/src/lib/utils/hooks/useRpcProviders/useRpcProviders.cjs +8 -5
- package/src/lib/utils/hooks/useRpcProviders/useRpcProviders.d.ts +2 -2
- package/src/lib/utils/hooks/useRpcProviders/useRpcProviders.js +10 -7
- package/src/lib/utils/hooks/useUpdateUserProfileByJWTCallback/useUpdateUserProfileByJWTCallback.cjs +7 -0
- package/src/lib/utils/hooks/useUpdateUserProfileByJWTCallback/useUpdateUserProfileByJWTCallback.d.ts +7 -0
- package/src/lib/utils/hooks/useUpdateUserProfileByJWTCallback/useUpdateUserProfileByJWTCallback.js +7 -0
- package/src/lib/utils/hooks/useUserDataForm/useUserDataForm.cjs +6 -4
- package/src/lib/utils/hooks/useUserDataForm/useUserDataForm.js +5 -3
- package/src/lib/utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs +4 -3
- package/src/lib/utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js +4 -3
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.cjs +30 -20
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.d.ts +1 -1
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +26 -16
- package/src/lib/utils/hooks/useWalletConnectors/reconnectSocialWallet.cjs +37 -0
- package/src/lib/utils/hooks/useWalletConnectors/reconnectSocialWallet.d.ts +8 -0
- package/src/lib/utils/hooks/useWalletConnectors/reconnectSocialWallet.js +33 -0
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.cjs +54 -75
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.d.ts +2 -1
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.js +53 -74
- package/src/lib/utils/hooks/useWalletConnectors/utils/createLinkedWalletsFromWalletOptions/createLinkedWalletsFromWalletOptions.cjs +55 -0
- package/src/lib/utils/hooks/useWalletConnectors/utils/createLinkedWalletsFromWalletOptions/createLinkedWalletsFromWalletOptions.d.ts +8 -0
- package/src/lib/utils/hooks/useWalletConnectors/utils/createLinkedWalletsFromWalletOptions/createLinkedWalletsFromWalletOptions.js +51 -0
- package/src/lib/utils/hooks/useWalletConnectors/utils/createLinkedWalletsFromWalletOptions/index.d.ts +1 -0
- package/src/lib/utils/hooks/useWalletConnectors/utils/index.d.ts +2 -0
- package/src/lib/utils/hooks/useWalletConnectors/utils/primaryWalletIdValidator/index.d.ts +1 -0
- package/src/lib/utils/hooks/useWalletConnectors/utils/primaryWalletIdValidator/primaryWalletIdValidator.cjs +7 -0
- package/src/lib/utils/hooks/useWalletConnectors/utils/primaryWalletIdValidator/primaryWalletIdValidator.d.ts +1 -0
- package/src/lib/utils/hooks/useWalletConnectors/utils/primaryWalletIdValidator/primaryWalletIdValidator.js +3 -0
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.cjs +92 -55
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.d.ts +6 -4
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.js +91 -54
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.cjs +17 -15
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.js +15 -13
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.cjs +50 -14
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.d.ts +1 -1
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.js +50 -14
- package/src/lib/utils/hooks/useWallets/useWallets.cjs +28 -34
- package/src/lib/utils/hooks/useWallets/useWallets.d.ts +6 -6
- package/src/lib/utils/hooks/useWallets/useWallets.js +29 -35
- package/src/lib/utils/hooks/useWalletsConnectionState/index.d.ts +1 -0
- package/src/lib/utils/hooks/useWalletsConnectionState/useWalletsConnectionState.cjs +42 -0
- package/src/lib/utils/hooks/useWalletsConnectionState/useWalletsConnectionState.d.ts +11 -0
- package/src/lib/utils/hooks/useWalletsConnectionState/useWalletsConnectionState.js +38 -0
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.cjs +13 -4
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.js +13 -4
- package/src/lib/views/CollectUserDataView/CollectUserDataView.cjs +19 -9
- package/src/lib/views/CollectUserDataView/CollectUserDataView.js +19 -9
- package/src/lib/views/CollectUserDataView/{UserDataForm/UserDataForm.cjs → OnboardingUserDataForm/OnboardingUserDataForm.cjs} +22 -11
- package/src/lib/views/CollectUserDataView/{UserDataForm/UserDataForm.d.ts → OnboardingUserDataForm/OnboardingUserDataForm.d.ts} +1 -1
- package/src/lib/views/CollectUserDataView/{UserDataForm/UserDataForm.js → OnboardingUserDataForm/OnboardingUserDataForm.js} +22 -11
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/index.d.ts +1 -0
- package/src/lib/views/CollectUserDataView/UserDataFields/index.cjs +14 -5
- package/src/lib/views/CollectUserDataView/UserDataFields/index.js +14 -5
- package/src/lib/views/CollectUserDataView/fieldsConfig.cjs +5 -3
- package/src/lib/views/CollectUserDataView/fieldsConfig.js +5 -3
- package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.cjs +15 -5
- package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.js +15 -5
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.cjs +16 -6
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.js +15 -5
- package/src/lib/views/EmailUpdate/EmailUpdate.cjs +14 -4
- package/src/lib/views/EmailUpdate/EmailUpdate.js +14 -4
- package/src/lib/views/EmailVerification/EmailVerification.cjs +24 -11
- package/src/lib/views/EmailVerification/EmailVerification.js +23 -10
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +13 -3
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +12 -2
- package/src/lib/views/LoginWithEmailView/LoginWithEmailView.cjs +14 -7
- package/src/lib/views/LoginWithEmailView/LoginWithEmailView.js +14 -7
- package/src/lib/views/LoginWithEmailView/components/ListItemButton/ListItemButton.cjs +13 -3
- package/src/lib/views/LoginWithEmailView/components/ListItemButton/ListItemButton.js +13 -3
- package/src/lib/views/LoginWithEmailView/components/LoginWithEmailForm/LoginWithEmailForm.cjs +14 -7
- package/src/lib/views/LoginWithEmailView/components/LoginWithEmailForm/LoginWithEmailForm.js +14 -7
- package/src/lib/views/LoginWithEmailView/components/SocialSignIn/SocialSignIn.cjs +26 -10
- package/src/lib/views/LoginWithEmailView/components/SocialSignIn/SocialSignIn.js +26 -10
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.cjs +38 -10
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +38 -10
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.cjs +15 -5
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.js +15 -5
- package/src/lib/views/NoAccess/NoAccess.cjs +27 -30
- package/src/lib/views/NoAccess/NoAccess.js +28 -31
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.cjs +12 -3
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.js +12 -3
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.cjs +13 -3
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.js +13 -3
- package/src/lib/views/PendingConnectView/PendingConnectView.cjs +15 -6
- package/src/lib/views/PendingConnectView/PendingConnectView.js +14 -5
- package/src/lib/views/PendingSignatureView/PendingSignatureView.cjs +16 -7
- package/src/lib/views/PendingSignatureView/PendingSignatureView.js +16 -7
- package/src/lib/views/QrCodeView/QRCode.cjs +2 -2
- package/src/lib/views/QrCodeView/QRCode.js +1 -1
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.cjs +14 -4
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.js +13 -3
- package/src/lib/views/QrCodeView/QrCodeView.cjs +13 -4
- package/src/lib/views/QrCodeView/QrCodeView.js +13 -4
- package/src/lib/views/SendBalanceView/SendBalanceView.cjs +116 -0
- package/src/lib/views/SendBalanceView/SendBalanceView.d.ts +13 -0
- package/src/lib/views/SendBalanceView/SendBalanceView.js +112 -0
- package/src/lib/views/SendBalanceView/index.d.ts +1 -0
- package/src/lib/views/SocialRedirectView/SocialRedirectView.cjs +17 -12
- package/src/lib/views/SocialRedirectView/SocialRedirectView.js +17 -12
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.cjs +60 -0
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.d.ts +2 -0
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.js +56 -0
- package/src/lib/views/SocialWrongAccountView/index.d.ts +1 -0
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.cjs +94 -0
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.d.ts +14 -0
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.js +90 -0
- package/src/lib/{modals/TransactionConfirmationModal → views/TransactionConfirmationView}/helpers/transactionErrorMessage.cjs +7 -1
- package/src/lib/{modals/TransactionConfirmationModal → views/TransactionConfirmationView}/helpers/transactionErrorMessage.d.ts +1 -0
- package/src/lib/views/TransactionConfirmationView/helpers/transactionErrorMessage.js +18 -0
- package/src/lib/views/TransactionConfirmationView/hooks/index.d.ts +1 -0
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionData/index.d.ts +1 -0
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionData/useTransactionData.cjs +91 -0
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionData/useTransactionData.d.ts +18 -0
- package/src/lib/views/TransactionConfirmationView/hooks/useTransactionData/useTransactionData.js +87 -0
- package/src/lib/views/TransactionConfirmationView/index.d.ts +2 -0
- package/src/lib/views/WalletList/SearchInstead/SearchInstead.cjs +13 -3
- package/src/lib/views/WalletList/SearchInstead/SearchInstead.js +13 -3
- package/src/lib/views/WalletList/WalletList.cjs +6 -3
- package/src/lib/views/WalletList/WalletList.js +6 -3
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.cjs +12 -3
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.js +12 -3
- package/src/lib/views/WalletList/data.cjs +10 -7
- package/src/lib/views/WalletList/data.d.ts +3 -3
- package/src/lib/views/WalletList/data.js +10 -7
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.cjs +14 -5
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.js +14 -5
- package/src/lib/views/WalletUsedView/WalletUsedView.cjs +15 -6
- package/src/lib/views/WalletUsedView/WalletUsedView.js +13 -4
- package/src/lib/views/viewToComponentMap.cjs +2 -0
- package/src/lib/views/viewToComponentMap.js +2 -0
- package/src/lib/widgets/DynamicWidget/DynamicWidget.cjs +13 -3
- package/src/lib/widgets/DynamicWidget/DynamicWidget.js +13 -3
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.cjs +20 -10
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.js +20 -10
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs +79 -0
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.d.ts +2 -0
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js +75 -0
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.cjs +14 -4
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.d.ts +1 -1
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.js +14 -4
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.cjs +18 -30
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.d.ts +6 -2
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.js +19 -31
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.cjs +17 -6
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.js +17 -6
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.types.d.ts +3 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicNav/DynamicNav.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicNav/DynamicNav.js +1 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.cjs +18 -5
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.js +17 -4
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs +14 -4
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.d.ts +5 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js +14 -4
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.cjs +48 -26
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.d.ts +5 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.js +50 -28
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetPrompts/DynamicWidgetPrompts.cjs +18 -8
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetPrompts/DynamicWidgetPrompts.js +18 -8
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetSwitcher/DynamicWidgetSwitcher.cjs +13 -3
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetSwitcher/DynamicWidgetSwitcher.js +13 -3
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.cjs +13 -3
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.js +13 -3
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.cjs +16 -6
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.js +16 -6
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/DynamicWidgetViews.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/DynamicWidgetViews.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.cjs +16 -8
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js +16 -8
- package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.cjs +14 -4
- package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.js +14 -4
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.cjs +25 -4
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.js +25 -4
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.cjs +13 -3
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.js +13 -3
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.cjs +14 -4
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.js +14 -4
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.cjs +37 -21
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.d.ts +2 -3
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.js +37 -21
- package/src/lib/widgets/DynamicWidget/components/WalletIconWithStatus/WalletIconWithStatus.cjs +4 -0
- package/src/lib/widgets/DynamicWidget/components/WalletIconWithStatus/WalletIconWithStatus.js +4 -0
- package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.cjs +42 -6
- package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.d.ts +2 -1
- package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.js +43 -7
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.cjs +14 -12
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.d.ts +1 -5
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.js +15 -13
- package/src/lib/widgets/DynamicWidget/hooks/useFetchBalance/useFetchBalance.cjs +4 -0
- package/src/lib/widgets/DynamicWidget/hooks/useFetchBalance/useFetchBalance.d.ts +1 -1
- package/src/lib/widgets/DynamicWidget/hooks/useFetchBalance/useFetchBalance.js +4 -0
- package/src/lib/widgets/DynamicWidget/hooks/useFetchChain/useFetchChain.cjs +3 -3
- package/src/lib/widgets/DynamicWidget/hooks/useFetchChain/useFetchChain.js +2 -2
- package/src/lib/widgets/DynamicWidget/hooks/useFetchCurrency/useFetchCurrency.cjs +2 -2
- package/src/lib/widgets/DynamicWidget/hooks/useFetchCurrency/useFetchCurrency.d.ts +1 -1
- package/src/lib/widgets/DynamicWidget/hooks/useFetchCurrency/useFetchCurrency.js +1 -1
- package/src/lib/widgets/DynamicWidget/hooks/useFetchNameService/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.cjs +22 -0
- package/src/lib/widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.d.ts +2 -0
- package/src/lib/widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.js +18 -0
- package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.cjs +46 -0
- package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.d.ts +13 -0
- package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.js +42 -0
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.cjs +14 -4
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.js +14 -4
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.cjs +60 -0
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.d.ts +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.js +56 -0
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/PendingAccountSwitchModal.cjs +17 -36
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/PendingAccountSwitchModal.js +18 -37
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.cjs +44 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.d.ts +7 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.js +40 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.cjs +70 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.d.ts +8 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.js +66 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.cjs +60 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.d.ts +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.js +56 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.cjs +63 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.d.ts +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.js +59 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.cjs +67 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.d.ts +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.js +63 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/PendingSignModal.cjs +5 -33
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/PendingSignModal.js +3 -31
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.cjs +16 -9
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.js +17 -10
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.cjs +14 -4
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.js +14 -4
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.cjs +17 -9
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.js +17 -9
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.cjs +21 -9
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.js +20 -8
- package/src/lib/widgets/DynamicWidget/views/IndexView/IndexView.cjs +14 -4
- package/src/lib/widgets/DynamicWidget/views/IndexView/IndexView.js +14 -4
- package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.cjs +19 -9
- package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.js +19 -9
- package/src/lib/widgets/DynamicWidget/views/SendBalanceWidgetView/SendBalanceWidgetView.cjs +15 -0
- package/src/lib/widgets/DynamicWidget/views/SendBalanceWidgetView/SendBalanceWidgetView.d.ts +2 -0
- package/src/lib/widgets/DynamicWidget/views/SendBalanceWidgetView/SendBalanceWidgetView.js +11 -0
- package/src/lib/widgets/DynamicWidget/views/SendBalanceWidgetView/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/views/index.d.ts +1 -0
- package/src/lib/widgets/FundingWidget/FundingWidget.cjs +10 -0
- package/src/lib/widgets/FundingWidget/FundingWidget.d.ts +2 -0
- package/src/lib/widgets/FundingWidget/FundingWidget.js +6 -0
- package/src/lib/widgets/FundingWidget/index.d.ts +1 -0
- package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.cjs +63 -0
- package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.d.ts +5 -0
- package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.js +58 -0
- package/src/lib/widgets/FundingWidget/views/FundWalletView/index.d.ts +1 -0
- package/src/lib/widgets/index.d.ts +1 -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/modals/TransactionConfirmationModal/helpers/transactionErrorMessage.js +0 -12
- package/src/lib/utils/hooks/useWallets/utils/getMagicLinkApiKeyFromProviders/getMagicLinkApiKeyFromProviders.cjs +0 -12
- package/src/lib/utils/hooks/useWallets/utils/getMagicLinkApiKeyFromProviders/getMagicLinkApiKeyFromProviders.d.ts +0 -2
- package/src/lib/utils/hooks/useWallets/utils/getMagicLinkApiKeyFromProviders/getMagicLinkApiKeyFromProviders.js +0 -8
- package/src/lib/utils/hooks/useWallets/utils/getMagicLinkApiKeyFromProviders/index.d.ts +0 -1
- package/src/lib/utils/hooks/useWallets/utils/index.d.ts +0 -1
- package/src/lib/views/CollectUserDataView/UserDataForm/index.d.ts +0 -1
- package/src/lib/widgets/DynamicWidget/components/DefaultPendingSignModalContent/DefaultPendingSignModalContent.cjs +0 -43
- package/src/lib/widgets/DynamicWidget/components/DefaultPendingSignModalContent/DefaultPendingSignModalContent.d.ts +0 -2
- package/src/lib/widgets/DynamicWidget/components/DefaultPendingSignModalContent/DefaultPendingSignModalContent.js +0 -39
- package/src/lib/widgets/DynamicWidget/components/DefaultPendingSignModalContent/DefaultPendingSignModalContent.types.d.ts +0 -7
- package/src/lib/widgets/DynamicWidget/components/DotsMenuWrapper/DotsMenuWrapper.cjs +0 -64
- package/src/lib/widgets/DynamicWidget/components/DotsMenuWrapper/DotsMenuWrapper.js +0 -60
- package/src/lib/widgets/DynamicWidget/prompts/DetectedKnownSecondaryWalletModal/DetectedKnownSecondaryWalletModal.cjs +0 -55
- package/src/lib/widgets/DynamicWidget/prompts/DetectedKnownSecondaryWalletModal/DetectedKnownSecondaryWalletModal.d.ts +0 -6
- package/src/lib/widgets/DynamicWidget/prompts/DetectedKnownSecondaryWalletModal/DetectedKnownSecondaryWalletModal.js +0 -51
- package/src/lib/widgets/DynamicWidget/prompts/DetectedKnownSecondaryWalletModal/index.d.ts +0 -1
- /package/src/lib/widgets/DynamicWidget/{components → prompts/PendingSignModal}/DefaultPendingSignModalContent/index.d.ts +0 -0
|
@@ -2,48 +2,42 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var _tslib = require('../../../../../_virtual/_tslib.cjs');
|
|
6
5
|
var React = require('react');
|
|
7
6
|
var data = require('../../../views/WalletList/data.cjs');
|
|
8
|
-
var getMagicLinkApiKeyFromProviders = require('./utils/getMagicLinkApiKeyFromProviders/getMagicLinkApiKeyFromProviders.cjs');
|
|
9
7
|
|
|
10
|
-
const useWallets = ({ projectSettings, appLogoUrl, appName,
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
vendorCredentials,
|
|
24
|
-
walletUiUtils,
|
|
25
|
-
});
|
|
26
|
-
const notInstalledWallets = yield data.getNotInstalledWallets(projectSettings, {
|
|
27
|
-
appLogoUrl,
|
|
28
|
-
appName,
|
|
29
|
-
magicLinkApiKey,
|
|
30
|
-
magicLinkConfig,
|
|
31
|
-
networkConfigurations,
|
|
32
|
-
skipMemo: true,
|
|
33
|
-
vendorCredentials,
|
|
34
|
-
walletUiUtils,
|
|
35
|
-
});
|
|
36
|
-
const unfilteredWallets = [...installedWallets, ...notInstalledWallets];
|
|
37
|
-
setWallets(unfilteredWallets);
|
|
38
|
-
}
|
|
8
|
+
const useWallets = ({ projectSettings, appLogoUrl, appName, flowNetwork, networkConfigurations, walletUiUtils, walletConnectorsProp, }) => {
|
|
9
|
+
const wallets = React.useMemo(() => {
|
|
10
|
+
if (!projectSettings)
|
|
11
|
+
return [];
|
|
12
|
+
const installedWallets = data.getInstalledWallets(projectSettings, {
|
|
13
|
+
appLogoUrl,
|
|
14
|
+
appName,
|
|
15
|
+
customerApiProviders: projectSettings.providers || [],
|
|
16
|
+
flowNetwork,
|
|
17
|
+
networkConfigurations,
|
|
18
|
+
skipMemo: true,
|
|
19
|
+
walletConnectorsProp: walletConnectorsProp !== null && walletConnectorsProp !== void 0 ? walletConnectorsProp : [],
|
|
20
|
+
walletUiUtils,
|
|
39
21
|
});
|
|
40
|
-
|
|
22
|
+
const notInstalledWallets = data.getNotInstalledWallets(projectSettings, {
|
|
23
|
+
appLogoUrl,
|
|
24
|
+
appName,
|
|
25
|
+
customerApiProviders: projectSettings.providers || [],
|
|
26
|
+
flowNetwork,
|
|
27
|
+
networkConfigurations,
|
|
28
|
+
skipMemo: true,
|
|
29
|
+
walletConnectorsProp: walletConnectorsProp !== null && walletConnectorsProp !== void 0 ? walletConnectorsProp : [],
|
|
30
|
+
walletUiUtils,
|
|
31
|
+
});
|
|
32
|
+
return [...installedWallets, ...notInstalledWallets];
|
|
33
|
+
// Cannot include walletUiUtils in the dependency array because it will cause an infinite loop
|
|
41
34
|
}, [
|
|
42
|
-
projectSettings,
|
|
43
35
|
appLogoUrl,
|
|
44
36
|
appName,
|
|
45
|
-
vendorCredentials,
|
|
46
37
|
networkConfigurations,
|
|
38
|
+
projectSettings,
|
|
39
|
+
walletConnectorsProp,
|
|
40
|
+
flowNetwork,
|
|
47
41
|
]);
|
|
48
42
|
return { wallets };
|
|
49
43
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { MagicLinkConfig, NetworkConfigurationMap, VendorCredentials, WalletUiUtils } from '@dynamic-labs/multi-wallet';
|
|
2
1
|
import { ProjectSettings } from '@dynamic-labs/sdk-api';
|
|
3
|
-
import {
|
|
2
|
+
import { NetworkConfigurationMap, WalletUiUtils } from '@dynamic-labs/types';
|
|
3
|
+
import { WalletConnectorsMethod } from '@dynamic-labs/wallet-connector-core';
|
|
4
4
|
type Props = {
|
|
5
5
|
appLogoUrl?: string;
|
|
6
6
|
appName?: string;
|
|
7
|
-
|
|
7
|
+
flowNetwork?: 'mainnet' | 'testnet';
|
|
8
8
|
networkConfigurations: NetworkConfigurationMap | undefined;
|
|
9
9
|
projectSettings: ProjectSettings | undefined;
|
|
10
|
-
|
|
10
|
+
walletConnectorsProp?: WalletConnectorsMethod[];
|
|
11
11
|
walletUiUtils: WalletUiUtils;
|
|
12
12
|
};
|
|
13
|
-
export declare const useWallets: ({ projectSettings, appLogoUrl, appName,
|
|
14
|
-
wallets: WalletOption[];
|
|
13
|
+
export declare const useWallets: ({ projectSettings, appLogoUrl, appName, flowNetwork, networkConfigurations, walletUiUtils, walletConnectorsProp, }: Props) => {
|
|
14
|
+
wallets: import("../../../shared").WalletOption[];
|
|
15
15
|
};
|
|
16
16
|
export {};
|
|
@@ -1,45 +1,39 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useState, useEffect } from 'react';
|
|
1
|
+
import { useMemo } from 'react';
|
|
3
2
|
import { getInstalledWallets, getNotInstalledWallets } from '../../../views/WalletList/data.js';
|
|
4
|
-
import { getMagicLinkApiKeyFromProviders } from './utils/getMagicLinkApiKeyFromProviders/getMagicLinkApiKeyFromProviders.js';
|
|
5
3
|
|
|
6
|
-
const useWallets = ({ projectSettings, appLogoUrl, appName,
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
vendorCredentials,
|
|
20
|
-
walletUiUtils,
|
|
21
|
-
});
|
|
22
|
-
const notInstalledWallets = yield getNotInstalledWallets(projectSettings, {
|
|
23
|
-
appLogoUrl,
|
|
24
|
-
appName,
|
|
25
|
-
magicLinkApiKey,
|
|
26
|
-
magicLinkConfig,
|
|
27
|
-
networkConfigurations,
|
|
28
|
-
skipMemo: true,
|
|
29
|
-
vendorCredentials,
|
|
30
|
-
walletUiUtils,
|
|
31
|
-
});
|
|
32
|
-
const unfilteredWallets = [...installedWallets, ...notInstalledWallets];
|
|
33
|
-
setWallets(unfilteredWallets);
|
|
34
|
-
}
|
|
4
|
+
const useWallets = ({ projectSettings, appLogoUrl, appName, flowNetwork, networkConfigurations, walletUiUtils, walletConnectorsProp, }) => {
|
|
5
|
+
const wallets = useMemo(() => {
|
|
6
|
+
if (!projectSettings)
|
|
7
|
+
return [];
|
|
8
|
+
const installedWallets = getInstalledWallets(projectSettings, {
|
|
9
|
+
appLogoUrl,
|
|
10
|
+
appName,
|
|
11
|
+
customerApiProviders: projectSettings.providers || [],
|
|
12
|
+
flowNetwork,
|
|
13
|
+
networkConfigurations,
|
|
14
|
+
skipMemo: true,
|
|
15
|
+
walletConnectorsProp: walletConnectorsProp !== null && walletConnectorsProp !== void 0 ? walletConnectorsProp : [],
|
|
16
|
+
walletUiUtils,
|
|
35
17
|
});
|
|
36
|
-
|
|
18
|
+
const notInstalledWallets = getNotInstalledWallets(projectSettings, {
|
|
19
|
+
appLogoUrl,
|
|
20
|
+
appName,
|
|
21
|
+
customerApiProviders: projectSettings.providers || [],
|
|
22
|
+
flowNetwork,
|
|
23
|
+
networkConfigurations,
|
|
24
|
+
skipMemo: true,
|
|
25
|
+
walletConnectorsProp: walletConnectorsProp !== null && walletConnectorsProp !== void 0 ? walletConnectorsProp : [],
|
|
26
|
+
walletUiUtils,
|
|
27
|
+
});
|
|
28
|
+
return [...installedWallets, ...notInstalledWallets];
|
|
29
|
+
// Cannot include walletUiUtils in the dependency array because it will cause an infinite loop
|
|
37
30
|
}, [
|
|
38
|
-
projectSettings,
|
|
39
31
|
appLogoUrl,
|
|
40
32
|
appName,
|
|
41
|
-
vendorCredentials,
|
|
42
33
|
networkConfigurations,
|
|
34
|
+
projectSettings,
|
|
35
|
+
walletConnectorsProp,
|
|
36
|
+
flowNetwork,
|
|
43
37
|
]);
|
|
44
38
|
return { wallets };
|
|
45
39
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useWalletsConnectionState } from './useWalletsConnectionState';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var _tslib = require('../../../../../_virtual/_tslib.cjs');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
require('../../constants/colors.cjs');
|
|
8
|
+
require('@dynamic-labs/multi-wallet');
|
|
9
|
+
require('@dynamic-labs/utils');
|
|
10
|
+
require('@dynamic-labs/sdk-api');
|
|
11
|
+
require('../../../shared/logger.cjs');
|
|
12
|
+
require('@dynamic-labs/iconic');
|
|
13
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
14
|
+
require('react/jsx-runtime');
|
|
15
|
+
require('../../../context/ViewContext/ViewContext.cjs');
|
|
16
|
+
require('ethers');
|
|
17
|
+
var isWalletConnected = require('../../functions/isWalletConnected/isWalletConnected.cjs');
|
|
18
|
+
require('../../../shared/consts/index.cjs');
|
|
19
|
+
|
|
20
|
+
const useWalletsConnectionState = (linkedWallets) => {
|
|
21
|
+
const [connectedWalletMap, setConnectedWalletMap] = React.useState();
|
|
22
|
+
const computeConnectedStateForWallets = React.useCallback(() => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
23
|
+
const connectedWalletIds = (yield Promise.all(linkedWallets.map((wallet) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
24
|
+
const isConnected = yield isWalletConnected.isWalletConnected(wallet);
|
|
25
|
+
if (isConnected) {
|
|
26
|
+
return wallet.id;
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
return undefined;
|
|
30
|
+
}
|
|
31
|
+
})))).filter((connectedWalletId) => connectedWalletId !== undefined);
|
|
32
|
+
const newConnectedStateByWalletIdMap = connectedWalletIds.reduce((result, walletId) => (Object.assign(Object.assign({}, result), { [walletId]: true })), {});
|
|
33
|
+
setConnectedWalletMap(newConnectedStateByWalletIdMap);
|
|
34
|
+
}), [linkedWallets, setConnectedWalletMap]);
|
|
35
|
+
return {
|
|
36
|
+
computeConnectedStateForWallets,
|
|
37
|
+
connectedWalletMap: connectedWalletMap !== null && connectedWalletMap !== void 0 ? connectedWalletMap : {},
|
|
38
|
+
didConnectedStateLoad: Boolean(connectedWalletMap),
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
exports.useWalletsConnectionState = useWalletsConnectionState;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Wallet } from '../../../shared';
|
|
2
|
+
type ConnectedWalletsMap = {
|
|
3
|
+
[address: string]: boolean;
|
|
4
|
+
};
|
|
5
|
+
type WalletsConnectionStateHook = (wallets: Wallet[]) => {
|
|
6
|
+
computeConnectedStateForWallets: () => Promise<void>;
|
|
7
|
+
connectedWalletMap: ConnectedWalletsMap;
|
|
8
|
+
didConnectedStateLoad: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare const useWalletsConnectionState: WalletsConnectionStateHook;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { __awaiter } from '../../../../../_virtual/_tslib.js';
|
|
2
|
+
import { useState, useCallback } from 'react';
|
|
3
|
+
import '../../constants/colors.js';
|
|
4
|
+
import '@dynamic-labs/multi-wallet';
|
|
5
|
+
import '@dynamic-labs/utils';
|
|
6
|
+
import '@dynamic-labs/sdk-api';
|
|
7
|
+
import '../../../shared/logger.js';
|
|
8
|
+
import '@dynamic-labs/iconic';
|
|
9
|
+
import '@dynamic-labs/wallet-connector-core';
|
|
10
|
+
import 'react/jsx-runtime';
|
|
11
|
+
import '../../../context/ViewContext/ViewContext.js';
|
|
12
|
+
import 'ethers';
|
|
13
|
+
import { isWalletConnected } from '../../functions/isWalletConnected/isWalletConnected.js';
|
|
14
|
+
import '../../../shared/consts/index.js';
|
|
15
|
+
|
|
16
|
+
const useWalletsConnectionState = (linkedWallets) => {
|
|
17
|
+
const [connectedWalletMap, setConnectedWalletMap] = useState();
|
|
18
|
+
const computeConnectedStateForWallets = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
19
|
+
const connectedWalletIds = (yield Promise.all(linkedWallets.map((wallet) => __awaiter(void 0, void 0, void 0, function* () {
|
|
20
|
+
const isConnected = yield isWalletConnected(wallet);
|
|
21
|
+
if (isConnected) {
|
|
22
|
+
return wallet.id;
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
return undefined;
|
|
26
|
+
}
|
|
27
|
+
})))).filter((connectedWalletId) => connectedWalletId !== undefined);
|
|
28
|
+
const newConnectedStateByWalletIdMap = connectedWalletIds.reduce((result, walletId) => (Object.assign(Object.assign({}, result), { [walletId]: true })), {});
|
|
29
|
+
setConnectedWalletMap(newConnectedStateByWalletIdMap);
|
|
30
|
+
}), [linkedWallets, setConnectedWalletMap]);
|
|
31
|
+
return {
|
|
32
|
+
computeConnectedStateForWallets,
|
|
33
|
+
connectedWalletMap: connectedWalletMap !== null && connectedWalletMap !== void 0 ? connectedWalletMap : {},
|
|
34
|
+
didConnectedStateLoad: Boolean(connectedWalletMap),
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export { useWalletsConnectionState };
|
|
@@ -9,11 +9,14 @@ require('react');
|
|
|
9
9
|
var Typography = require('../../components/Typography/Typography.cjs');
|
|
10
10
|
require('@dynamic-labs/sdk-api');
|
|
11
11
|
require('../../shared/logger.cjs');
|
|
12
|
-
require('@dynamic-labs/
|
|
12
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
13
13
|
var ViewContext = require('../../context/ViewContext/ViewContext.cjs');
|
|
14
|
+
require('@dynamic-labs/utils');
|
|
14
15
|
require('../../utils/constants/colors.cjs');
|
|
16
|
+
require('ethers');
|
|
15
17
|
require('../../shared/consts/index.cjs');
|
|
16
18
|
var useInternalDynamicContext = require('../../context/DynamicContext/useInternalDynamicContext.cjs');
|
|
19
|
+
require('@dynamic-labs/multi-wallet');
|
|
17
20
|
var requiresTwoStepAuthentication = require('../../utils/functions/requiresTwoStepAuthentication/requiresTwoStepAuthentication.cjs');
|
|
18
21
|
require('../../components/ShadowDOM/ShadowDOM.cjs');
|
|
19
22
|
require('../../context/ThemeContext/ThemeContext.cjs');
|
|
@@ -23,14 +26,20 @@ require('../../components/Transition/ZoomTransition/ZoomTransition.cjs');
|
|
|
23
26
|
require('../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
24
27
|
require('../../components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
25
28
|
require('../../config/ApiEndpoint.cjs');
|
|
29
|
+
require('@dynamic-labs/rpc-providers');
|
|
26
30
|
var useVerifyWallet = require('../../utils/hooks/useVerifyWallet/useVerifyWallet.cjs');
|
|
27
|
-
require('
|
|
31
|
+
require('../../components/IconButton/IconButton.cjs');
|
|
32
|
+
require('@dynamic-labs/wallet-book');
|
|
33
|
+
var PoweredByDynamic = require('../../components/PoweredByDynamic/PoweredByDynamic.cjs');
|
|
34
|
+
require('../../components/Alert/Alert.cjs');
|
|
28
35
|
require('../../context/MockContext/MockContext.cjs');
|
|
29
36
|
require('../../context/ErrorContext/ErrorContext.cjs');
|
|
30
37
|
var CaptchaContext = require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
31
38
|
require('../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
32
|
-
require('../../components/
|
|
33
|
-
|
|
39
|
+
require('../../components/Popper/Popper/Popper.cjs');
|
|
40
|
+
require('../../components/Popper/PopperContext/PopperContext.cjs');
|
|
41
|
+
require('formik');
|
|
42
|
+
require('yup');
|
|
34
43
|
var Captcha = require('../../components/Captcha/Captcha.cjs');
|
|
35
44
|
|
|
36
45
|
const CaptchaVerifyUser = () => {
|
|
@@ -5,11 +5,14 @@ import 'react';
|
|
|
5
5
|
import { Typography } from '../../components/Typography/Typography.js';
|
|
6
6
|
import '@dynamic-labs/sdk-api';
|
|
7
7
|
import '../../shared/logger.js';
|
|
8
|
-
import '@dynamic-labs/
|
|
8
|
+
import '@dynamic-labs/wallet-connector-core';
|
|
9
9
|
import { useViewContext } from '../../context/ViewContext/ViewContext.js';
|
|
10
|
+
import '@dynamic-labs/utils';
|
|
10
11
|
import '../../utils/constants/colors.js';
|
|
12
|
+
import 'ethers';
|
|
11
13
|
import '../../shared/consts/index.js';
|
|
12
14
|
import { useInternalDynamicContext } from '../../context/DynamicContext/useInternalDynamicContext.js';
|
|
15
|
+
import '@dynamic-labs/multi-wallet';
|
|
13
16
|
import { requiresTwoStepAuthentication } from '../../utils/functions/requiresTwoStepAuthentication/requiresTwoStepAuthentication.js';
|
|
14
17
|
import '../../components/ShadowDOM/ShadowDOM.js';
|
|
15
18
|
import '../../context/ThemeContext/ThemeContext.js';
|
|
@@ -19,14 +22,20 @@ import '../../components/Transition/ZoomTransition/ZoomTransition.js';
|
|
|
19
22
|
import '../../components/Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
20
23
|
import '../../components/Transition/OpacityTransition/OpacityTransition.js';
|
|
21
24
|
import '../../config/ApiEndpoint.js';
|
|
25
|
+
import '@dynamic-labs/rpc-providers';
|
|
22
26
|
import { useVerifyWallet } from '../../utils/hooks/useVerifyWallet/useVerifyWallet.js';
|
|
23
|
-
import '
|
|
27
|
+
import '../../components/IconButton/IconButton.js';
|
|
28
|
+
import '@dynamic-labs/wallet-book';
|
|
29
|
+
import { PoweredByDynamic } from '../../components/PoweredByDynamic/PoweredByDynamic.js';
|
|
30
|
+
import '../../components/Alert/Alert.js';
|
|
24
31
|
import '../../context/MockContext/MockContext.js';
|
|
25
32
|
import '../../context/ErrorContext/ErrorContext.js';
|
|
26
33
|
import { useCaptchaContext } from '../../context/CaptchaContext/CaptchaContext.js';
|
|
27
34
|
import '../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
28
|
-
import '../../components/
|
|
29
|
-
import
|
|
35
|
+
import '../../components/Popper/Popper/Popper.js';
|
|
36
|
+
import '../../components/Popper/PopperContext/PopperContext.js';
|
|
37
|
+
import 'formik';
|
|
38
|
+
import 'yup';
|
|
30
39
|
import { Captcha } from '../../components/Captcha/Captcha.js';
|
|
31
40
|
|
|
32
41
|
const CaptchaVerifyUser = () => {
|
|
@@ -4,19 +4,20 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
var React = require('react');
|
|
7
|
-
var walletBook = require('@dynamic-labs/wallet-book');
|
|
8
7
|
var Typography = require('../../components/Typography/Typography.cjs');
|
|
9
8
|
require('@dynamic-labs/sdk-api');
|
|
10
9
|
require('../../shared/logger.cjs');
|
|
11
10
|
require('@dynamic-labs/iconic');
|
|
12
|
-
require('@dynamic-labs/
|
|
11
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
13
12
|
require('../../context/ViewContext/ViewContext.cjs');
|
|
13
|
+
require('@dynamic-labs/utils');
|
|
14
14
|
require('../../utils/constants/colors.cjs');
|
|
15
|
+
require('ethers');
|
|
15
16
|
require('../../shared/consts/index.cjs');
|
|
16
17
|
var useInternalDynamicContext = require('../../context/DynamicContext/useInternalDynamicContext.cjs');
|
|
18
|
+
require('@dynamic-labs/multi-wallet');
|
|
17
19
|
var createUserProfile = require('../../utils/functions/createUserProfile/createUserProfile.cjs');
|
|
18
20
|
var isSupportedNetwork = require('../../utils/functions/isSupportedNetwork/isSupportedNetwork.cjs');
|
|
19
|
-
var pixelToRem = require('../../utils/functions/pixelToRem/pixelToRem.cjs');
|
|
20
21
|
require('../../components/ShadowDOM/ShadowDOM.cjs');
|
|
21
22
|
require('../../context/ThemeContext/ThemeContext.cjs');
|
|
22
23
|
require('react-dom');
|
|
@@ -25,29 +26,38 @@ require('../../components/Transition/ZoomTransition/ZoomTransition.cjs');
|
|
|
25
26
|
require('../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
26
27
|
require('../../components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
27
28
|
require('../../config/ApiEndpoint.cjs');
|
|
29
|
+
require('@dynamic-labs/rpc-providers');
|
|
28
30
|
require('../../context/ErrorContext/ErrorContext.cjs');
|
|
29
|
-
require('
|
|
31
|
+
require('../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
32
|
+
require('../../components/IconButton/IconButton.cjs');
|
|
33
|
+
require('@dynamic-labs/wallet-book');
|
|
34
|
+
require('../../components/Alert/Alert.cjs');
|
|
30
35
|
require('../../context/MockContext/MockContext.cjs');
|
|
31
36
|
require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
32
37
|
require('../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
33
38
|
var TextButton = require('../../components/TextButton/TextButton.cjs');
|
|
34
|
-
require('../../components/IconButton/IconButton.cjs');
|
|
35
39
|
var ErrorContainer = require('../../components/ErrorContainer/ErrorContainer.cjs');
|
|
40
|
+
require('../../components/Popper/Popper/Popper.cjs');
|
|
41
|
+
require('../../components/Popper/PopperContext/PopperContext.cjs');
|
|
42
|
+
require('formik');
|
|
43
|
+
require('yup');
|
|
36
44
|
var NetworkPicker = require('../../components/NetworkPicker/NetworkPicker.cjs');
|
|
37
45
|
var UserAddress = require('../../components/UserAddress/UserAddress.cjs');
|
|
38
|
-
var
|
|
46
|
+
var useFetchNameService = require('../../widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.cjs');
|
|
47
|
+
var AuthProviderIcon = require('../../components/AuthProviderIcon/AuthProviderIcon.cjs');
|
|
48
|
+
var OnboardingUserDataForm = require('./OnboardingUserDataForm/OnboardingUserDataForm.cjs');
|
|
39
49
|
|
|
40
50
|
const CollectUserDataView = () => {
|
|
41
|
-
|
|
42
|
-
const { appName, handleLogOut, projectSettings, network, decodedOnboardingOnlyToken, selectedWalletConnector: walletConnector, onboardingImageUrl, } = useInternalDynamicContext.useInternalDynamicContext();
|
|
51
|
+
const { appName, onboardingOnlyJwt, handleLogOut, projectSettings, network, decodedOnboardingOnlyToken, selectedWalletConnector: walletConnector, onboardingImageUrl, } = useInternalDynamicContext.useInternalDynamicContext();
|
|
43
52
|
const [isNetworkPickerOpen, setIsNetworkPickerOpen] = React.useState(false);
|
|
53
|
+
const nameService = useFetchNameService.useFetchNameService();
|
|
44
54
|
if (!walletConnector || !decodedOnboardingOnlyToken) {
|
|
45
55
|
return null;
|
|
46
56
|
}
|
|
47
57
|
const userProfile = createUserProfile.createUserProfile(decodedOnboardingOnlyToken);
|
|
48
58
|
const evmNetworks = walletConnector.evmNetworks || [];
|
|
49
59
|
const _isSupportedNetwork = isSupportedNetwork.isSupportedNetwork({ network, walletConnector });
|
|
50
|
-
return (jsxRuntime.jsxs("div", Object.assign({ className: 'collect-user-data', "data-testid": 'collect-user-data-view' }, { children: [onboardingImageUrl && (jsxRuntime.jsx("img", { className: 'collect-user-data__main-img', src: onboardingImageUrl, alt: 'onboarding' })), !_isSupportedNetwork && (jsxRuntime.jsx(ErrorContainer.ErrorContainer, Object.assign({ withIcon: false, className: 'collect-user-data__error--not-supported' }, { children: "This network is not available, please update." }))), jsxRuntime.jsxs("div", Object.assign({ className: 'collect-user-data__form' }, { children: [jsxRuntime.jsxs(
|
|
60
|
+
return (jsxRuntime.jsxs("div", Object.assign({ className: 'collect-user-data', "data-testid": 'collect-user-data-view' }, { children: [onboardingImageUrl && (jsxRuntime.jsx("img", { className: 'collect-user-data__main-img', src: onboardingImageUrl, alt: 'onboarding' })), !_isSupportedNetwork && (jsxRuntime.jsx(ErrorContainer.ErrorContainer, Object.assign({ withIcon: false, className: 'collect-user-data__error--not-supported' }, { children: "This network is not available, please update." }))), jsxRuntime.jsxs("div", Object.assign({ className: 'collect-user-data__form' }, { children: [jsxRuntime.jsxs(OnboardingUserDataForm.OnboardingUserDataForm, Object.assign({ disableSubmit: !_isSupportedNetwork, userProfile: userProfile }, { children: [jsxRuntime.jsx("div", Object.assign({ className: 'collect-user-data__img-container' }, { children: (nameService === null || nameService === void 0 ? void 0 : nameService.avatar) ? (jsxRuntime.jsx("img", { src: nameService.avatar, alt: '', className: 'collect-user-data__img collect-user-data__img--rounded' })) : (jsxRuntime.jsx(AuthProviderIcon.AuthProviderIcon, { jwt: onboardingOnlyJwt })) })), jsxRuntime.jsx(UserAddress.UserAddress, { userProfile: userProfile }), jsxRuntime.jsx("div", Object.assign({ className: 'collect-user-data__network-container' }, { children: jsxRuntime.jsx(NetworkPicker.NetworkPicker, { evmNetworks: evmNetworks, connector: walletConnector, showNetworkName: true, isNetworkPickerOpen: isNetworkPickerOpen, setIsNetworkPickerOpen: setIsNetworkPickerOpen, buttonClassName: 'collect-user-data__network-picker-button', mainClassName: 'collect-user-data__network-picker' }) })), !_isSupportedNetwork ? (jsxRuntime.jsxs("div", Object.assign({ className: 'collect-user-data__welcome-container' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'title', color: 'primary', className: 'collect-user-data__welcome-title' }, { children: "Update Network" })), jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', weight: 'regular', color: 'secondary' }, { children: "Your wallet is not connected to a supported network. Please update before continuing." }))] }))) : (jsxRuntime.jsxs("div", Object.assign({ className: 'collect-user-data__welcome-container' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'title', color: 'primary', className: 'collect-user-data__welcome-title' }, { children: (projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general.collectUserDataWelcomeHeader) ||
|
|
51
61
|
`Welcome to ${appName}` })), jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', weight: 'regular', color: 'secondary' }, { children: (projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general.collectUserDataWelcomeMessage) ||
|
|
52
62
|
'We need a bit of information to get started' }))] })))] })), jsxRuntime.jsx(TextButton.TextButton, Object.assign({ className: 'collect-user-data__log-out', onClick: () => handleLogOut() }, { children: "Log out" }))] }))] })));
|
|
53
63
|
};
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { useState } from 'react';
|
|
3
|
-
import { WalletIcon } from '@dynamic-labs/wallet-book';
|
|
4
3
|
import { Typography } from '../../components/Typography/Typography.js';
|
|
5
4
|
import '@dynamic-labs/sdk-api';
|
|
6
5
|
import '../../shared/logger.js';
|
|
7
6
|
import '@dynamic-labs/iconic';
|
|
8
|
-
import '@dynamic-labs/
|
|
7
|
+
import '@dynamic-labs/wallet-connector-core';
|
|
9
8
|
import '../../context/ViewContext/ViewContext.js';
|
|
9
|
+
import '@dynamic-labs/utils';
|
|
10
10
|
import '../../utils/constants/colors.js';
|
|
11
|
+
import 'ethers';
|
|
11
12
|
import '../../shared/consts/index.js';
|
|
12
13
|
import { useInternalDynamicContext } from '../../context/DynamicContext/useInternalDynamicContext.js';
|
|
14
|
+
import '@dynamic-labs/multi-wallet';
|
|
13
15
|
import { createUserProfile } from '../../utils/functions/createUserProfile/createUserProfile.js';
|
|
14
16
|
import { isSupportedNetwork } from '../../utils/functions/isSupportedNetwork/isSupportedNetwork.js';
|
|
15
|
-
import { pixelToRem } from '../../utils/functions/pixelToRem/pixelToRem.js';
|
|
16
17
|
import '../../components/ShadowDOM/ShadowDOM.js';
|
|
17
18
|
import '../../context/ThemeContext/ThemeContext.js';
|
|
18
19
|
import 'react-dom';
|
|
@@ -21,29 +22,38 @@ import '../../components/Transition/ZoomTransition/ZoomTransition.js';
|
|
|
21
22
|
import '../../components/Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
22
23
|
import '../../components/Transition/OpacityTransition/OpacityTransition.js';
|
|
23
24
|
import '../../config/ApiEndpoint.js';
|
|
25
|
+
import '@dynamic-labs/rpc-providers';
|
|
24
26
|
import '../../context/ErrorContext/ErrorContext.js';
|
|
25
|
-
import '
|
|
27
|
+
import '../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
28
|
+
import '../../components/IconButton/IconButton.js';
|
|
29
|
+
import '@dynamic-labs/wallet-book';
|
|
30
|
+
import '../../components/Alert/Alert.js';
|
|
26
31
|
import '../../context/MockContext/MockContext.js';
|
|
27
32
|
import '../../context/CaptchaContext/CaptchaContext.js';
|
|
28
33
|
import '../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
29
34
|
import { TextButton } from '../../components/TextButton/TextButton.js';
|
|
30
|
-
import '../../components/IconButton/IconButton.js';
|
|
31
35
|
import { ErrorContainer } from '../../components/ErrorContainer/ErrorContainer.js';
|
|
36
|
+
import '../../components/Popper/Popper/Popper.js';
|
|
37
|
+
import '../../components/Popper/PopperContext/PopperContext.js';
|
|
38
|
+
import 'formik';
|
|
39
|
+
import 'yup';
|
|
32
40
|
import { NetworkPicker } from '../../components/NetworkPicker/NetworkPicker.js';
|
|
33
41
|
import { UserAddress } from '../../components/UserAddress/UserAddress.js';
|
|
34
|
-
import {
|
|
42
|
+
import { useFetchNameService } from '../../widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.js';
|
|
43
|
+
import { AuthProviderIcon } from '../../components/AuthProviderIcon/AuthProviderIcon.js';
|
|
44
|
+
import { OnboardingUserDataForm } from './OnboardingUserDataForm/OnboardingUserDataForm.js';
|
|
35
45
|
|
|
36
46
|
const CollectUserDataView = () => {
|
|
37
|
-
|
|
38
|
-
const { appName, handleLogOut, projectSettings, network, decodedOnboardingOnlyToken, selectedWalletConnector: walletConnector, onboardingImageUrl, } = useInternalDynamicContext();
|
|
47
|
+
const { appName, onboardingOnlyJwt, handleLogOut, projectSettings, network, decodedOnboardingOnlyToken, selectedWalletConnector: walletConnector, onboardingImageUrl, } = useInternalDynamicContext();
|
|
39
48
|
const [isNetworkPickerOpen, setIsNetworkPickerOpen] = useState(false);
|
|
49
|
+
const nameService = useFetchNameService();
|
|
40
50
|
if (!walletConnector || !decodedOnboardingOnlyToken) {
|
|
41
51
|
return null;
|
|
42
52
|
}
|
|
43
53
|
const userProfile = createUserProfile(decodedOnboardingOnlyToken);
|
|
44
54
|
const evmNetworks = walletConnector.evmNetworks || [];
|
|
45
55
|
const _isSupportedNetwork = isSupportedNetwork({ network, walletConnector });
|
|
46
|
-
return (jsxs("div", Object.assign({ className: 'collect-user-data', "data-testid": 'collect-user-data-view' }, { children: [onboardingImageUrl && (jsx("img", { className: 'collect-user-data__main-img', src: onboardingImageUrl, alt: 'onboarding' })), !_isSupportedNetwork && (jsx(ErrorContainer, Object.assign({ withIcon: false, className: 'collect-user-data__error--not-supported' }, { children: "This network is not available, please update." }))), jsxs("div", Object.assign({ className: 'collect-user-data__form' }, { children: [jsxs(
|
|
56
|
+
return (jsxs("div", Object.assign({ className: 'collect-user-data', "data-testid": 'collect-user-data-view' }, { children: [onboardingImageUrl && (jsx("img", { className: 'collect-user-data__main-img', src: onboardingImageUrl, alt: 'onboarding' })), !_isSupportedNetwork && (jsx(ErrorContainer, Object.assign({ withIcon: false, className: 'collect-user-data__error--not-supported' }, { children: "This network is not available, please update." }))), jsxs("div", Object.assign({ className: 'collect-user-data__form' }, { children: [jsxs(OnboardingUserDataForm, Object.assign({ disableSubmit: !_isSupportedNetwork, userProfile: userProfile }, { children: [jsx("div", Object.assign({ className: 'collect-user-data__img-container' }, { children: (nameService === null || nameService === void 0 ? void 0 : nameService.avatar) ? (jsx("img", { src: nameService.avatar, alt: '', className: 'collect-user-data__img collect-user-data__img--rounded' })) : (jsx(AuthProviderIcon, { jwt: onboardingOnlyJwt })) })), jsx(UserAddress, { userProfile: userProfile }), jsx("div", Object.assign({ className: 'collect-user-data__network-container' }, { children: jsx(NetworkPicker, { evmNetworks: evmNetworks, connector: walletConnector, showNetworkName: true, isNetworkPickerOpen: isNetworkPickerOpen, setIsNetworkPickerOpen: setIsNetworkPickerOpen, buttonClassName: 'collect-user-data__network-picker-button', mainClassName: 'collect-user-data__network-picker' }) })), !_isSupportedNetwork ? (jsxs("div", Object.assign({ className: 'collect-user-data__welcome-container' }, { children: [jsx(Typography, Object.assign({ variant: 'title', color: 'primary', className: 'collect-user-data__welcome-title' }, { children: "Update Network" })), jsx(Typography, Object.assign({ variant: 'body_normal', weight: 'regular', color: 'secondary' }, { children: "Your wallet is not connected to a supported network. Please update before continuing." }))] }))) : (jsxs("div", Object.assign({ className: 'collect-user-data__welcome-container' }, { children: [jsx(Typography, Object.assign({ variant: 'title', color: 'primary', className: 'collect-user-data__welcome-title' }, { children: (projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general.collectUserDataWelcomeHeader) ||
|
|
47
57
|
`Welcome to ${appName}` })), jsx(Typography, Object.assign({ variant: 'body_normal', weight: 'regular', color: 'secondary' }, { children: (projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general.collectUserDataWelcomeMessage) ||
|
|
48
58
|
'We need a bit of information to get started' }))] })))] })), jsx(TextButton, Object.assign({ className: 'collect-user-data__log-out', onClick: () => handleLogOut() }, { children: "Log out" }))] }))] })));
|
|
49
59
|
};
|
|
@@ -9,11 +9,14 @@ var formik = require('formik');
|
|
|
9
9
|
var decodeJwt = require('../../../shared/utils/functions/decodeJwt/decodeJwt.cjs');
|
|
10
10
|
require('../../../shared/logger.cjs');
|
|
11
11
|
require('@dynamic-labs/iconic');
|
|
12
|
-
require('@dynamic-labs/
|
|
12
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
13
13
|
var ViewContext = require('../../../context/ViewContext/ViewContext.cjs');
|
|
14
|
+
require('@dynamic-labs/utils');
|
|
14
15
|
require('../../../utils/constants/colors.cjs');
|
|
16
|
+
require('ethers');
|
|
15
17
|
require('../../../shared/consts/index.cjs');
|
|
16
18
|
var useInternalDynamicContext = require('../../../context/DynamicContext/useInternalDynamicContext.cjs');
|
|
19
|
+
require('@dynamic-labs/multi-wallet');
|
|
17
20
|
require('@dynamic-labs/sdk-api');
|
|
18
21
|
require('../../../components/ShadowDOM/ShadowDOM.cjs');
|
|
19
22
|
require('../../../context/ThemeContext/ThemeContext.cjs');
|
|
@@ -23,18 +26,24 @@ require('../../../components/Transition/ZoomTransition/ZoomTransition.cjs');
|
|
|
23
26
|
require('../../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
24
27
|
require('../../../components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
25
28
|
require('../../../config/ApiEndpoint.cjs');
|
|
29
|
+
require('@dynamic-labs/rpc-providers');
|
|
26
30
|
require('../../../context/ErrorContext/ErrorContext.cjs');
|
|
27
|
-
require('
|
|
31
|
+
require('../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
32
|
+
require('../../../components/IconButton/IconButton.cjs');
|
|
33
|
+
require('@dynamic-labs/wallet-book');
|
|
34
|
+
var Button = require('../../../components/Button/Button.cjs');
|
|
35
|
+
require('../../../components/Alert/Alert.cjs');
|
|
28
36
|
require('../../../context/MockContext/MockContext.cjs');
|
|
29
37
|
require('../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
30
38
|
var useUserUpdateRequest = require('../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
31
|
-
|
|
32
|
-
require('../../../components/
|
|
39
|
+
require('../../../components/Popper/Popper/Popper.cjs');
|
|
40
|
+
require('../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
41
|
+
require('yup');
|
|
33
42
|
var index = require('../UserDataFields/index.cjs');
|
|
34
43
|
var useUserDataForm = require('../../../utils/hooks/useUserDataForm/useUserDataForm.cjs');
|
|
35
44
|
|
|
36
|
-
const
|
|
37
|
-
const { policiesConsentInnerComponent, onboardingOnlyJwt, setShowAuthFlow } = useInternalDynamicContext.useInternalDynamicContext();
|
|
45
|
+
const OnboardingUserDataForm = ({ children, userProfile, disableSubmit, }) => {
|
|
46
|
+
const { policiesConsentInnerComponent, onboardingOnlyJwt, setShowAuthFlow, setCallback, } = useInternalDynamicContext.useInternalDynamicContext();
|
|
38
47
|
const { setView } = ViewContext.useViewContext();
|
|
39
48
|
const decodedJwt = decodeJwt.decodeJwt(onboardingOnlyJwt);
|
|
40
49
|
const { updateUser } = useUserUpdateRequest.useUserUpdateRequestInternal({
|
|
@@ -47,7 +56,8 @@ const UserDataForm = ({ children, userProfile }) => {
|
|
|
47
56
|
return;
|
|
48
57
|
}
|
|
49
58
|
setShowAuthFlow(false);
|
|
50
|
-
|
|
59
|
+
setCallback('authSuccess');
|
|
60
|
+
}), [setCallback, setShowAuthFlow, setView, updateUser]);
|
|
51
61
|
const { fetch: loading, formikInitialValues, formikValidationSchema, enforcePolicies, onFormSubmit, } = useUserDataForm.useUserDataForm({
|
|
52
62
|
fields: (decodedJwt === null || decodedJwt === void 0 ? void 0 : decodedJwt.missingFields) || [],
|
|
53
63
|
onSubmit,
|
|
@@ -58,11 +68,12 @@ const UserDataForm = ({ children, userProfile }) => {
|
|
|
58
68
|
].flat();
|
|
59
69
|
return (jsxRuntime.jsx(formik.Formik, Object.assign({ onSubmit: onFormSubmit, initialValues: formikInitialValues, validationSchema: formikValidationSchema }, { children: ({ errors, touched, values }) => {
|
|
60
70
|
var _a;
|
|
61
|
-
const isSubmitBtnDisabled =
|
|
62
|
-
(
|
|
63
|
-
(
|
|
71
|
+
const isSubmitBtnDisabled = disableSubmit ||
|
|
72
|
+
(enforcePolicies &&
|
|
73
|
+
(policiesConsentInnerComponentArray === null || policiesConsentInnerComponentArray === void 0 ? void 0 : policiesConsentInnerComponentArray.length) !==
|
|
74
|
+
((_a = values.policiesConsentArray) === null || _a === void 0 ? void 0 : _a.length));
|
|
64
75
|
return (jsxRuntime.jsx(formik.Form, Object.assign({ className: 'user-data-form__form' }, { children: jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [children, jsxRuntime.jsx(index.UserDataFields, { fields: decodedJwt === null || decodedJwt === void 0 ? void 0 : decodedJwt.missingFields, errors: errors, touched: touched, policiesConsentInnerComponentArray: policiesConsentInnerComponentArray }), jsxRuntime.jsx(Button.Button, Object.assign({ type: 'submit', loading: loading, disabled: isSubmitBtnDisabled, buttonVariant: 'primary', expanded: true, buttonRounded: 'default', buttonPadding: 'large' }, { children: "Continue" }))] }) })));
|
|
65
76
|
} })));
|
|
66
77
|
};
|
|
67
78
|
|
|
68
|
-
exports.
|
|
79
|
+
exports.OnboardingUserDataForm = OnboardingUserDataForm;
|
|
@@ -5,4 +5,4 @@ export type UserDataFormProps = {
|
|
|
5
5
|
disableSubmit?: boolean;
|
|
6
6
|
userProfile: UserProfile | undefined;
|
|
7
7
|
};
|
|
8
|
-
export declare const
|
|
8
|
+
export declare const OnboardingUserDataForm: ({ children, userProfile, disableSubmit, }: UserDataFormProps) => JSX.Element;
|