@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
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { useState, useEffect, useCallback } from 'react';
|
|
2
|
-
import { DynamicError } from '@dynamic-labs/
|
|
2
|
+
import { DynamicError } from '@dynamic-labs/utils';
|
|
3
3
|
import { fetchNonce } from '../../../data/api.js';
|
|
4
4
|
import '@dynamic-labs/sdk-api';
|
|
5
5
|
import '../../../shared/logger.js';
|
|
6
6
|
import '@dynamic-labs/iconic';
|
|
7
|
+
import '@dynamic-labs/wallet-connector-core';
|
|
7
8
|
import 'react/jsx-runtime';
|
|
8
9
|
import '../../../context/ViewContext/ViewContext.js';
|
|
9
10
|
import { NONCE_STORAGE_KEY } from '../../constants/localStorage.js';
|
|
10
11
|
import '../../constants/colors.js';
|
|
12
|
+
import 'ethers';
|
|
11
13
|
import { useLocalStorage } from '../../../shared/utils/hooks/useLocalStorage/useLocalStorage.js';
|
|
12
14
|
import '../../../shared/consts/index.js';
|
|
13
15
|
import { validateLocalStorageExpiry } from '../../../context/DynamicContext/validators.js';
|
|
@@ -3,18 +3,21 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var
|
|
6
|
+
var utils = require('@dynamic-labs/utils');
|
|
7
7
|
var api = require('../../../data/api.cjs');
|
|
8
8
|
require('@dynamic-labs/sdk-api');
|
|
9
9
|
require('../../../shared/logger.cjs');
|
|
10
10
|
require('@dynamic-labs/iconic');
|
|
11
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
11
12
|
require('react/jsx-runtime');
|
|
12
13
|
require('../../../context/ViewContext/ViewContext.cjs');
|
|
13
14
|
var localStorage = require('../../constants/localStorage.cjs');
|
|
14
15
|
require('../../constants/colors.cjs');
|
|
16
|
+
require('ethers');
|
|
15
17
|
var useLocalStorage = require('../../../shared/utils/hooks/useLocalStorage/useLocalStorage.cjs');
|
|
16
18
|
require('../../../shared/consts/index.cjs');
|
|
17
19
|
var validators = require('../../../context/DynamicContext/validators.cjs');
|
|
20
|
+
require('@dynamic-labs/multi-wallet');
|
|
18
21
|
var index = require('../../functions/getEnabledProviders/index.cjs');
|
|
19
22
|
|
|
20
23
|
const useFetchProjectSettings = ({ authToken, environmentId, maxRetries = 2, }) => {
|
|
@@ -41,7 +44,7 @@ const useFetchProjectSettings = ({ authToken, environmentId, maxRetries = 2, })
|
|
|
41
44
|
api.fetchProjectSettings(environmentId)
|
|
42
45
|
.then((response) => {
|
|
43
46
|
if (!response)
|
|
44
|
-
throw new
|
|
47
|
+
throw new utils.DynamicError('Settings are not defined');
|
|
45
48
|
const expiry = new Date().getTime() + 60000 * 5;
|
|
46
49
|
setLsSettings({
|
|
47
50
|
environmentId,
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import { useState, useEffect, useMemo } from 'react';
|
|
2
|
-
import { DynamicError } from '@dynamic-labs/
|
|
2
|
+
import { DynamicError } from '@dynamic-labs/utils';
|
|
3
3
|
import { fetchProjectSettings } from '../../../data/api.js';
|
|
4
4
|
import '@dynamic-labs/sdk-api';
|
|
5
5
|
import '../../../shared/logger.js';
|
|
6
6
|
import '@dynamic-labs/iconic';
|
|
7
|
+
import '@dynamic-labs/wallet-connector-core';
|
|
7
8
|
import 'react/jsx-runtime';
|
|
8
9
|
import '../../../context/ViewContext/ViewContext.js';
|
|
9
10
|
import { PROJECT_SETTINGS_STORAGE_KEY } from '../../constants/localStorage.js';
|
|
10
11
|
import '../../constants/colors.js';
|
|
12
|
+
import 'ethers';
|
|
11
13
|
import { useLocalStorage } from '../../../shared/utils/hooks/useLocalStorage/useLocalStorage.js';
|
|
12
14
|
import '../../../shared/consts/index.js';
|
|
13
15
|
import { validateLocalStorageExpiry } from '../../../context/DynamicContext/validators.js';
|
|
16
|
+
import '@dynamic-labs/multi-wallet';
|
|
14
17
|
import { getEnabledProviders } from '../../functions/getEnabledProviders/index.js';
|
|
15
18
|
|
|
16
19
|
const useFetchProjectSettings = ({ authToken, environmentId, maxRetries = 2, }) => {
|
|
@@ -6,10 +6,12 @@ var React = require('react');
|
|
|
6
6
|
require('@dynamic-labs/sdk-api');
|
|
7
7
|
require('../../../shared/logger.cjs');
|
|
8
8
|
require('@dynamic-labs/iconic');
|
|
9
|
-
require('@dynamic-labs/
|
|
9
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
10
10
|
require('react/jsx-runtime');
|
|
11
11
|
require('../../../context/ViewContext/ViewContext.cjs');
|
|
12
|
+
require('@dynamic-labs/utils');
|
|
12
13
|
require('../../constants/colors.cjs');
|
|
14
|
+
require('ethers');
|
|
13
15
|
var index = require('../../../shared/consts/index.cjs');
|
|
14
16
|
|
|
15
17
|
const useFetchWalletsForChainsMap = (propsWalletsChainsMap) => {
|
|
@@ -2,10 +2,12 @@ import { useEffect } from 'react';
|
|
|
2
2
|
import '@dynamic-labs/sdk-api';
|
|
3
3
|
import '../../../shared/logger.js';
|
|
4
4
|
import '@dynamic-labs/iconic';
|
|
5
|
-
import '@dynamic-labs/
|
|
5
|
+
import '@dynamic-labs/wallet-connector-core';
|
|
6
6
|
import 'react/jsx-runtime';
|
|
7
7
|
import '../../../context/ViewContext/ViewContext.js';
|
|
8
|
+
import '@dynamic-labs/utils';
|
|
8
9
|
import '../../constants/colors.js';
|
|
10
|
+
import 'ethers';
|
|
9
11
|
import { defaultWalletsForChains } from '../../../shared/consts/index.js';
|
|
10
12
|
|
|
11
13
|
const useFetchWalletsForChainsMap = (propsWalletsChainsMap) => {
|
|
@@ -4,16 +4,39 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var _tslib = require('../../../../../_virtual/_tslib.cjs');
|
|
6
6
|
var React = require('react');
|
|
7
|
+
require('@dynamic-labs/sdk-api');
|
|
8
|
+
require('../../../shared/logger.cjs');
|
|
9
|
+
var getFromLS = require('../../../shared/utils/functions/storage/getFromLS.cjs');
|
|
10
|
+
require('@dynamic-labs/iconic');
|
|
11
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
12
|
+
require('react/jsx-runtime');
|
|
13
|
+
require('../../../context/ViewContext/ViewContext.cjs');
|
|
14
|
+
require('@dynamic-labs/utils');
|
|
15
|
+
var localStorage = require('../../constants/localStorage.cjs');
|
|
16
|
+
require('../../constants/colors.cjs');
|
|
17
|
+
require('ethers');
|
|
18
|
+
require('../../../shared/consts/index.cjs');
|
|
7
19
|
var handleUnlinkHelper = require('../../functions/handleUnlinkHelper/handleUnlinkHelper.cjs');
|
|
8
20
|
var isSameWalletName = require('../../functions/isSameWalletName/isSameWalletName.cjs');
|
|
9
21
|
|
|
10
22
|
const useHandleUnlinkWallet = ({ verifiedCredentials, environmentId, primaryWalletId, secondaryWallets, setUser, }) => {
|
|
11
23
|
const callback = React.useCallback((walletId) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
12
|
-
|
|
24
|
+
var _a;
|
|
25
|
+
// when we call handleUnlinkWallet on the same execution stack as setPrimaryWallet, the value of
|
|
26
|
+
// primaryWalletId coming from the DynamicContext will be the old one in this callback function
|
|
27
|
+
// so we need to get the latest value from LS
|
|
28
|
+
// e.g. primary wallet id is 1234, and we have a function like this:
|
|
29
|
+
// async function setPrimaryWalletAndUnlink() {
|
|
30
|
+
// await setPrimaryWallet('5678');
|
|
31
|
+
// handleUnlinkWallet('1234');
|
|
32
|
+
// }
|
|
33
|
+
// without fetching from LS, primaryWalletId would still be 1234 when handleUnlinkWallet runs in the example above
|
|
34
|
+
const currentPrimaryWalletId = (_a = getFromLS.getFromLS(localStorage.PRIMARY_WALLET_ID)) !== null && _a !== void 0 ? _a : primaryWalletId;
|
|
35
|
+
if (walletId === currentPrimaryWalletId)
|
|
13
36
|
return;
|
|
14
37
|
const newUser = yield handleUnlinkHelper.handleUnlinkHelper({
|
|
15
38
|
environmentId,
|
|
16
|
-
primaryWalletId,
|
|
39
|
+
primaryWalletId: currentPrimaryWalletId,
|
|
17
40
|
walletId,
|
|
18
41
|
});
|
|
19
42
|
if (newUser) {
|
|
@@ -1,15 +1,38 @@
|
|
|
1
1
|
import { __awaiter } from '../../../../../_virtual/_tslib.js';
|
|
2
2
|
import { useCallback } from 'react';
|
|
3
|
+
import '@dynamic-labs/sdk-api';
|
|
4
|
+
import '../../../shared/logger.js';
|
|
5
|
+
import { getFromLS } from '../../../shared/utils/functions/storage/getFromLS.js';
|
|
6
|
+
import '@dynamic-labs/iconic';
|
|
7
|
+
import '@dynamic-labs/wallet-connector-core';
|
|
8
|
+
import 'react/jsx-runtime';
|
|
9
|
+
import '../../../context/ViewContext/ViewContext.js';
|
|
10
|
+
import '@dynamic-labs/utils';
|
|
11
|
+
import { PRIMARY_WALLET_ID } from '../../constants/localStorage.js';
|
|
12
|
+
import '../../constants/colors.js';
|
|
13
|
+
import 'ethers';
|
|
14
|
+
import '../../../shared/consts/index.js';
|
|
3
15
|
import { handleUnlinkHelper } from '../../functions/handleUnlinkHelper/handleUnlinkHelper.js';
|
|
4
16
|
import { isSameWalletName } from '../../functions/isSameWalletName/isSameWalletName.js';
|
|
5
17
|
|
|
6
18
|
const useHandleUnlinkWallet = ({ verifiedCredentials, environmentId, primaryWalletId, secondaryWallets, setUser, }) => {
|
|
7
19
|
const callback = useCallback((walletId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
8
|
-
|
|
20
|
+
var _a;
|
|
21
|
+
// when we call handleUnlinkWallet on the same execution stack as setPrimaryWallet, the value of
|
|
22
|
+
// primaryWalletId coming from the DynamicContext will be the old one in this callback function
|
|
23
|
+
// so we need to get the latest value from LS
|
|
24
|
+
// e.g. primary wallet id is 1234, and we have a function like this:
|
|
25
|
+
// async function setPrimaryWalletAndUnlink() {
|
|
26
|
+
// await setPrimaryWallet('5678');
|
|
27
|
+
// handleUnlinkWallet('1234');
|
|
28
|
+
// }
|
|
29
|
+
// without fetching from LS, primaryWalletId would still be 1234 when handleUnlinkWallet runs in the example above
|
|
30
|
+
const currentPrimaryWalletId = (_a = getFromLS(PRIMARY_WALLET_ID)) !== null && _a !== void 0 ? _a : primaryWalletId;
|
|
31
|
+
if (walletId === currentPrimaryWalletId)
|
|
9
32
|
return;
|
|
10
33
|
const newUser = yield handleUnlinkHelper({
|
|
11
34
|
environmentId,
|
|
12
|
-
primaryWalletId,
|
|
35
|
+
primaryWalletId: currentPrimaryWalletId,
|
|
13
36
|
walletId,
|
|
14
37
|
});
|
|
15
38
|
if (newUser) {
|
|
@@ -3,15 +3,25 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var useInternalDynamicContext = require('../../../context/DynamicContext/useInternalDynamicContext.cjs');
|
|
6
|
-
var index = require('../../functions/getEnabledKYC/index.cjs');
|
|
7
6
|
var useOnlyConnectedMode = require('../useOnlyConnectedMode/useOnlyConnectedMode.cjs');
|
|
7
|
+
var getUserProfileFields = require('../../functions/getUserProfileFields/getUserProfileFields.cjs');
|
|
8
8
|
|
|
9
|
+
const isSocialEnabled = (kyc = []) => { var _a; return Boolean((_a = kyc.find(({ name }) => name === 'social')) === null || _a === void 0 ? void 0 : _a.enabled); };
|
|
10
|
+
/**
|
|
11
|
+
* A custom React hook that checks if KYC fields are enabled in the project settings or defined in the user profile.
|
|
12
|
+
*
|
|
13
|
+
* @returns {boolean} - A boolean value indicating whether the KYC fields are enabled in the project settings or defined in the user profile.
|
|
14
|
+
*/
|
|
9
15
|
const useKYCFlag = () => {
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
16
|
+
const isOnlyConnectedMode = useOnlyConnectedMode.useOnlyConnectedMode();
|
|
17
|
+
const { projectSettings, user } = useInternalDynamicContext.useInternalDynamicContext();
|
|
18
|
+
if (isOnlyConnectedMode)
|
|
19
|
+
return false;
|
|
20
|
+
const hasAnyKYCFields = getUserProfileFields.getUserProfileFields({
|
|
21
|
+
projectSettingsKyc: projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.kyc,
|
|
22
|
+
user,
|
|
23
|
+
});
|
|
24
|
+
return hasAnyKYCFields.length > 0 || isSocialEnabled(projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.kyc);
|
|
15
25
|
};
|
|
16
26
|
|
|
17
27
|
exports.useKYCFlag = useKYCFlag;
|
|
@@ -1 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A custom React hook that checks if KYC fields are enabled in the project settings or defined in the user profile.
|
|
3
|
+
*
|
|
4
|
+
* @returns {boolean} - A boolean value indicating whether the KYC fields are enabled in the project settings or defined in the user profile.
|
|
5
|
+
*/
|
|
1
6
|
export declare const useKYCFlag: () => boolean;
|
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
import { useInternalDynamicContext } from '../../../context/DynamicContext/useInternalDynamicContext.js';
|
|
2
|
-
import { getEnabledKYC } from '../../functions/getEnabledKYC/index.js';
|
|
3
2
|
import { useOnlyConnectedMode } from '../useOnlyConnectedMode/useOnlyConnectedMode.js';
|
|
3
|
+
import { getUserProfileFields } from '../../functions/getUserProfileFields/getUserProfileFields.js';
|
|
4
4
|
|
|
5
|
+
const isSocialEnabled = (kyc = []) => { var _a; return Boolean((_a = kyc.find(({ name }) => name === 'social')) === null || _a === void 0 ? void 0 : _a.enabled); };
|
|
6
|
+
/**
|
|
7
|
+
* A custom React hook that checks if KYC fields are enabled in the project settings or defined in the user profile.
|
|
8
|
+
*
|
|
9
|
+
* @returns {boolean} - A boolean value indicating whether the KYC fields are enabled in the project settings or defined in the user profile.
|
|
10
|
+
*/
|
|
5
11
|
const useKYCFlag = () => {
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
12
|
+
const isOnlyConnectedMode = useOnlyConnectedMode();
|
|
13
|
+
const { projectSettings, user } = useInternalDynamicContext();
|
|
14
|
+
if (isOnlyConnectedMode)
|
|
15
|
+
return false;
|
|
16
|
+
const hasAnyKYCFields = getUserProfileFields({
|
|
17
|
+
projectSettingsKyc: projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.kyc,
|
|
18
|
+
user,
|
|
19
|
+
});
|
|
20
|
+
return hasAnyKYCFields.length > 0 || isSocialEnabled(projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.kyc);
|
|
11
21
|
};
|
|
12
22
|
|
|
13
23
|
export { useKYCFlag };
|
|
@@ -6,12 +6,14 @@ var useInternalDynamicContext = require('../../../context/DynamicContext/useInte
|
|
|
6
6
|
require('@dynamic-labs/sdk-api');
|
|
7
7
|
require('../../../shared/logger.cjs');
|
|
8
8
|
require('@dynamic-labs/iconic');
|
|
9
|
-
require('@dynamic-labs/
|
|
9
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
10
10
|
require('react/jsx-runtime');
|
|
11
11
|
require('../../../context/ViewContext/ViewContext.cjs');
|
|
12
12
|
require('react');
|
|
13
13
|
var isSSR = require('../../../shared/utils/functions/isSSR/isSSR.cjs');
|
|
14
|
+
require('@dynamic-labs/utils');
|
|
14
15
|
require('../../constants/colors.cjs');
|
|
16
|
+
require('ethers');
|
|
15
17
|
require('../../../shared/consts/index.cjs');
|
|
16
18
|
var useOnlyConnectedMode = require('../useOnlyConnectedMode/useOnlyConnectedMode.cjs');
|
|
17
19
|
|
|
@@ -2,12 +2,14 @@ import { useInternalDynamicContext } from '../../../context/DynamicContext/useIn
|
|
|
2
2
|
import '@dynamic-labs/sdk-api';
|
|
3
3
|
import '../../../shared/logger.js';
|
|
4
4
|
import '@dynamic-labs/iconic';
|
|
5
|
-
import '@dynamic-labs/
|
|
5
|
+
import '@dynamic-labs/wallet-connector-core';
|
|
6
6
|
import 'react/jsx-runtime';
|
|
7
7
|
import '../../../context/ViewContext/ViewContext.js';
|
|
8
8
|
import 'react';
|
|
9
9
|
import { isSSR } from '../../../shared/utils/functions/isSSR/isSSR.js';
|
|
10
|
+
import '@dynamic-labs/utils';
|
|
10
11
|
import '../../constants/colors.js';
|
|
12
|
+
import 'ethers';
|
|
11
13
|
import '../../../shared/consts/index.js';
|
|
12
14
|
import { useOnlyConnectedMode } from '../useOnlyConnectedMode/useOnlyConnectedMode.js';
|
|
13
15
|
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var _tslib = require('../../../../../_virtual/_tslib.cjs');
|
|
6
6
|
var React = require('react');
|
|
7
|
-
var
|
|
7
|
+
var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
|
|
8
8
|
|
|
9
9
|
const useMutation = (mutation, options = {}) => {
|
|
10
10
|
const [state, setState] = React.useState({
|
|
@@ -32,18 +32,18 @@ const useMutation = (mutation, options = {}) => {
|
|
|
32
32
|
(_a = options === null || options === void 0 ? void 0 : options.onSuccess) === null || _a === void 0 ? void 0 : _a.call(options, data, variables);
|
|
33
33
|
}
|
|
34
34
|
catch (err) {
|
|
35
|
-
|
|
35
|
+
walletConnectorCore.logger.error(err);
|
|
36
36
|
}
|
|
37
37
|
return data;
|
|
38
38
|
}
|
|
39
39
|
catch (error) {
|
|
40
40
|
setState({ error: error, isLoading: false });
|
|
41
|
-
|
|
41
|
+
walletConnectorCore.logger.error(error);
|
|
42
42
|
try {
|
|
43
43
|
(_b = options === null || options === void 0 ? void 0 : options.onFailure) === null || _b === void 0 ? void 0 : _b.call(options, error, variables);
|
|
44
44
|
}
|
|
45
45
|
catch (err) {
|
|
46
|
-
|
|
46
|
+
walletConnectorCore.logger.error(err);
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
return undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __awaiter } from '../../../../../_virtual/_tslib.js';
|
|
2
2
|
import { useState, useCallback } from 'react';
|
|
3
|
-
import { logger } from '@dynamic-labs/
|
|
3
|
+
import { logger } from '@dynamic-labs/wallet-connector-core';
|
|
4
4
|
|
|
5
5
|
const useMutation = (mutation, options = {}) => {
|
|
6
6
|
const [state, setState] = useState({
|
|
@@ -22,7 +22,6 @@ var React = require('react');
|
|
|
22
22
|
* value = true, previousValue will have been set to true so the condition will be false and the
|
|
23
23
|
* effect will not run.
|
|
24
24
|
*/
|
|
25
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
26
25
|
const usePrevious = (value) => {
|
|
27
26
|
const ref = React.useRef();
|
|
28
27
|
React.useEffect(() => {
|
|
@@ -18,7 +18,6 @@ import { useRef, useEffect } from 'react';
|
|
|
18
18
|
* value = true, previousValue will have been set to true so the condition will be false and the
|
|
19
19
|
* effect will not run.
|
|
20
20
|
*/
|
|
21
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
22
21
|
const usePrevious = (value) => {
|
|
23
22
|
const ref = useRef();
|
|
24
23
|
useEffect(() => {
|
|
@@ -3,13 +3,16 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var
|
|
6
|
+
var rpcProviders = require('@dynamic-labs/rpc-providers');
|
|
7
7
|
require('@dynamic-labs/sdk-api');
|
|
8
8
|
var logger = require('../../../shared/logger.cjs');
|
|
9
9
|
require('@dynamic-labs/iconic');
|
|
10
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
10
11
|
require('react/jsx-runtime');
|
|
11
12
|
require('../../../context/ViewContext/ViewContext.cjs');
|
|
13
|
+
require('@dynamic-labs/utils');
|
|
12
14
|
require('../../constants/colors.cjs');
|
|
15
|
+
require('ethers');
|
|
13
16
|
require('../../../shared/consts/index.cjs');
|
|
14
17
|
|
|
15
18
|
const useRpcProviders = ({ networkConfigurations, }) => {
|
|
@@ -19,7 +22,7 @@ const useRpcProviders = ({ networkConfigurations, }) => {
|
|
|
19
22
|
React.useEffect(() => {
|
|
20
23
|
try {
|
|
21
24
|
if (networkConfigurations) {
|
|
22
|
-
setProviders(
|
|
25
|
+
setProviders(rpcProviders.ChainRpcProviders.getProviders(networkConfigurations));
|
|
23
26
|
}
|
|
24
27
|
}
|
|
25
28
|
catch (error) {
|
|
@@ -30,12 +33,12 @@ const useRpcProviders = ({ networkConfigurations, }) => {
|
|
|
30
33
|
if (!networkConfigurations) {
|
|
31
34
|
return undefined;
|
|
32
35
|
}
|
|
33
|
-
return
|
|
36
|
+
return rpcProviders.ChainRpcProviders.getEvmProviderByChainId(networkConfigurations, chainId);
|
|
34
37
|
}, [networkConfigurations]);
|
|
35
38
|
React.useEffect(() => {
|
|
36
39
|
try {
|
|
37
40
|
if (networkConfigurations) {
|
|
38
|
-
setEvmDefaultProvider(
|
|
41
|
+
setEvmDefaultProvider(rpcProviders.ChainRpcProviders.getEvmProviderByChainId(networkConfigurations, 1));
|
|
39
42
|
}
|
|
40
43
|
}
|
|
41
44
|
catch (error) {
|
|
@@ -45,7 +48,7 @@ const useRpcProviders = ({ networkConfigurations, }) => {
|
|
|
45
48
|
React.useEffect(() => {
|
|
46
49
|
try {
|
|
47
50
|
if (networkConfigurations) {
|
|
48
|
-
setSolanaDefaultProvider(
|
|
51
|
+
setSolanaDefaultProvider(rpcProviders.ChainRpcProviders.getSolanaRpcProviderByChainId(networkConfigurations, '101'));
|
|
49
52
|
}
|
|
50
53
|
}
|
|
51
54
|
catch (error) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { NetworkConfigurationMap } from '@dynamic-labs/
|
|
1
|
+
import { NetworkConfigurationMap } from '@dynamic-labs/types';
|
|
2
2
|
import { DynamicRPCProviders } from '../../../shared';
|
|
3
3
|
type Props = {
|
|
4
4
|
networkConfigurations: NetworkConfigurationMap | undefined;
|
|
5
|
-
networkId: number | undefined;
|
|
5
|
+
networkId: string | number | undefined;
|
|
6
6
|
};
|
|
7
7
|
export declare const useRpcProviders: ({ networkConfigurations, }: Props) => DynamicRPCProviders;
|
|
8
8
|
export {};
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { useState, useEffect, useCallback } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ChainRpcProviders } from '@dynamic-labs/rpc-providers';
|
|
3
3
|
import '@dynamic-labs/sdk-api';
|
|
4
4
|
import { logger } from '../../../shared/logger.js';
|
|
5
5
|
import '@dynamic-labs/iconic';
|
|
6
|
+
import '@dynamic-labs/wallet-connector-core';
|
|
6
7
|
import 'react/jsx-runtime';
|
|
7
8
|
import '../../../context/ViewContext/ViewContext.js';
|
|
9
|
+
import '@dynamic-labs/utils';
|
|
8
10
|
import '../../constants/colors.js';
|
|
11
|
+
import 'ethers';
|
|
9
12
|
import '../../../shared/consts/index.js';
|
|
10
13
|
|
|
11
14
|
const useRpcProviders = ({ networkConfigurations, }) => {
|
|
@@ -15,23 +18,23 @@ const useRpcProviders = ({ networkConfigurations, }) => {
|
|
|
15
18
|
useEffect(() => {
|
|
16
19
|
try {
|
|
17
20
|
if (networkConfigurations) {
|
|
18
|
-
setProviders(
|
|
21
|
+
setProviders(ChainRpcProviders.getProviders(networkConfigurations));
|
|
19
22
|
}
|
|
20
23
|
}
|
|
21
24
|
catch (error) {
|
|
22
25
|
logger.error(error);
|
|
23
26
|
}
|
|
24
27
|
}, [networkConfigurations]);
|
|
25
|
-
const getEvmRpcProviderByChainId
|
|
28
|
+
const getEvmRpcProviderByChainId = useCallback((chainId) => {
|
|
26
29
|
if (!networkConfigurations) {
|
|
27
30
|
return undefined;
|
|
28
31
|
}
|
|
29
|
-
return
|
|
32
|
+
return ChainRpcProviders.getEvmProviderByChainId(networkConfigurations, chainId);
|
|
30
33
|
}, [networkConfigurations]);
|
|
31
34
|
useEffect(() => {
|
|
32
35
|
try {
|
|
33
36
|
if (networkConfigurations) {
|
|
34
|
-
setEvmDefaultProvider(
|
|
37
|
+
setEvmDefaultProvider(ChainRpcProviders.getEvmProviderByChainId(networkConfigurations, 1));
|
|
35
38
|
}
|
|
36
39
|
}
|
|
37
40
|
catch (error) {
|
|
@@ -41,7 +44,7 @@ const useRpcProviders = ({ networkConfigurations, }) => {
|
|
|
41
44
|
useEffect(() => {
|
|
42
45
|
try {
|
|
43
46
|
if (networkConfigurations) {
|
|
44
|
-
setSolanaDefaultProvider(
|
|
47
|
+
setSolanaDefaultProvider(ChainRpcProviders.getSolanaRpcProviderByChainId(networkConfigurations, '101'));
|
|
45
48
|
}
|
|
46
49
|
}
|
|
47
50
|
catch (error) {
|
|
@@ -51,7 +54,7 @@ const useRpcProviders = ({ networkConfigurations, }) => {
|
|
|
51
54
|
return {
|
|
52
55
|
evmDefaultProvider,
|
|
53
56
|
evmProviders: providers === null || providers === void 0 ? void 0 : providers.evm,
|
|
54
|
-
getEvmRpcProviderByChainId
|
|
57
|
+
getEvmRpcProviderByChainId,
|
|
55
58
|
solanaDefaultProvider,
|
|
56
59
|
solanaProviders: providers === null || providers === void 0 ? void 0 : providers.solana,
|
|
57
60
|
};
|
package/src/lib/utils/hooks/useUpdateUserProfileByJWTCallback/useUpdateUserProfileByJWTCallback.cjs
CHANGED
|
@@ -6,6 +6,13 @@ var React = require('react');
|
|
|
6
6
|
var useInternalDynamicContext = require('../../../context/DynamicContext/useInternalDynamicContext.cjs');
|
|
7
7
|
var useCreateUserProfileByJWTCallback = require('../useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.cjs');
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
* A custom React hook that returns a function to update the user profile using a JSON Web Token (JWT).
|
|
11
|
+
* This hook internally uses the 'useCreateUserProfileByJWTCallback' hook to create the user profile by JWT
|
|
12
|
+
* and the 'useInternalDynamicContext' hook to set the callback for when the user profile is updated.
|
|
13
|
+
* The returned function uses 'useCallback' to memoize the function and optimize performance.
|
|
14
|
+
* @returns An object with the 'updateUserProfileByJWT' function.
|
|
15
|
+
*/
|
|
9
16
|
const useUpdateUserProfileByJWTCallback = () => {
|
|
10
17
|
const { createUserProfileByJWT } = useCreateUserProfileByJWTCallback.useCreateUserProfileByJWTCallback();
|
|
11
18
|
const { setCallback } = useInternalDynamicContext.useInternalDynamicContext();
|
package/src/lib/utils/hooks/useUpdateUserProfileByJWTCallback/useUpdateUserProfileByJWTCallback.d.ts
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A custom React hook that returns a function to update the user profile using a JSON Web Token (JWT).
|
|
3
|
+
* This hook internally uses the 'useCreateUserProfileByJWTCallback' hook to create the user profile by JWT
|
|
4
|
+
* and the 'useInternalDynamicContext' hook to set the callback for when the user profile is updated.
|
|
5
|
+
* The returned function uses 'useCallback' to memoize the function and optimize performance.
|
|
6
|
+
* @returns An object with the 'updateUserProfileByJWT' function.
|
|
7
|
+
*/
|
|
1
8
|
export declare const useUpdateUserProfileByJWTCallback: () => {
|
|
2
9
|
updateUserProfileByJWT: (jwt: string) => void;
|
|
3
10
|
};
|
package/src/lib/utils/hooks/useUpdateUserProfileByJWTCallback/useUpdateUserProfileByJWTCallback.js
CHANGED
|
@@ -2,6 +2,13 @@ import { useCallback } from 'react';
|
|
|
2
2
|
import { useInternalDynamicContext } from '../../../context/DynamicContext/useInternalDynamicContext.js';
|
|
3
3
|
import { useCreateUserProfileByJWTCallback } from '../useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.js';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* A custom React hook that returns a function to update the user profile using a JSON Web Token (JWT).
|
|
7
|
+
* This hook internally uses the 'useCreateUserProfileByJWTCallback' hook to create the user profile by JWT
|
|
8
|
+
* and the 'useInternalDynamicContext' hook to set the callback for when the user profile is updated.
|
|
9
|
+
* The returned function uses 'useCallback' to memoize the function and optimize performance.
|
|
10
|
+
* @returns An object with the 'updateUserProfileByJWT' function.
|
|
11
|
+
*/
|
|
5
12
|
const useUpdateUserProfileByJWTCallback = () => {
|
|
6
13
|
const { createUserProfileByJWT } = useCreateUserProfileByJWTCallback();
|
|
7
14
|
const { setCallback } = useInternalDynamicContext();
|
|
@@ -5,14 +5,16 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var _tslib = require('../../../../../_virtual/_tslib.cjs');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var yup = require('yup');
|
|
8
|
-
var
|
|
8
|
+
var utils = require('@dynamic-labs/utils');
|
|
9
9
|
require('@dynamic-labs/sdk-api');
|
|
10
10
|
var logger = require('../../../shared/logger.cjs');
|
|
11
11
|
require('@dynamic-labs/iconic');
|
|
12
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
12
13
|
require('react/jsx-runtime');
|
|
13
14
|
require('../../../context/ViewContext/ViewContext.cjs');
|
|
14
15
|
var index = require('../../../shared/utils/functions/getValueByKey/index.cjs');
|
|
15
16
|
require('../../constants/colors.cjs');
|
|
17
|
+
require('ethers');
|
|
16
18
|
var index$1 = require('../../../shared/consts/index.cjs');
|
|
17
19
|
var fieldsConfig = require('../../../views/CollectUserDataView/fieldsConfig.cjs');
|
|
18
20
|
var MockContext = require('../../../context/MockContext/MockContext.cjs');
|
|
@@ -48,7 +50,7 @@ const useUserDataForm = ({ onSubmit, onError, userProfile, shouldEnforcePolicies
|
|
|
48
50
|
return;
|
|
49
51
|
try {
|
|
50
52
|
if (!(userProfile === null || userProfile === void 0 ? void 0 : userProfile.environmentId))
|
|
51
|
-
throw new
|
|
53
|
+
throw new utils.DynamicError('Invalid environment ID');
|
|
52
54
|
setFetch(true);
|
|
53
55
|
let updatedUserFields = values;
|
|
54
56
|
if (enforcePolicies) {
|
|
@@ -60,10 +62,10 @@ const useUserDataForm = ({ onSubmit, onError, userProfile, shouldEnforcePolicies
|
|
|
60
62
|
catch (e) {
|
|
61
63
|
logger.logger.error(e);
|
|
62
64
|
onError === null || onError === void 0 ? void 0 : onError(e);
|
|
63
|
-
if (e
|
|
65
|
+
if (e instanceof utils.EmailAlreadyExistsError) {
|
|
64
66
|
formikHelper.setErrors({ email: 'Email already exists' });
|
|
65
67
|
}
|
|
66
|
-
else if (e
|
|
68
|
+
else if (e instanceof utils.UsernameAlreadyExistsError) {
|
|
67
69
|
formikHelper.setErrors({ username: 'Username already exists' });
|
|
68
70
|
}
|
|
69
71
|
else {
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { __awaiter } from '../../../../../_virtual/_tslib.js';
|
|
2
2
|
import { useState, useMemo, useCallback } from 'react';
|
|
3
3
|
import { object } from 'yup';
|
|
4
|
-
import { DynamicError } from '@dynamic-labs/
|
|
4
|
+
import { DynamicError, EmailAlreadyExistsError, UsernameAlreadyExistsError } from '@dynamic-labs/utils';
|
|
5
5
|
import '@dynamic-labs/sdk-api';
|
|
6
6
|
import { logger } from '../../../shared/logger.js';
|
|
7
7
|
import '@dynamic-labs/iconic';
|
|
8
|
+
import '@dynamic-labs/wallet-connector-core';
|
|
8
9
|
import 'react/jsx-runtime';
|
|
9
10
|
import '../../../context/ViewContext/ViewContext.js';
|
|
10
11
|
import { getValueByKey } from '../../../shared/utils/functions/getValueByKey/index.js';
|
|
11
12
|
import '../../constants/colors.js';
|
|
13
|
+
import 'ethers';
|
|
12
14
|
import { countryCodes, tShirtSizes, teamNames } from '../../../shared/consts/index.js';
|
|
13
15
|
import { fieldsConfig } from '../../../views/CollectUserDataView/fieldsConfig.js';
|
|
14
16
|
import { useMockContext } from '../../../context/MockContext/MockContext.js';
|
|
@@ -56,10 +58,10 @@ const useUserDataForm = ({ onSubmit, onError, userProfile, shouldEnforcePolicies
|
|
|
56
58
|
catch (e) {
|
|
57
59
|
logger.error(e);
|
|
58
60
|
onError === null || onError === void 0 ? void 0 : onError(e);
|
|
59
|
-
if (e
|
|
61
|
+
if (e instanceof EmailAlreadyExistsError) {
|
|
60
62
|
formikHelper.setErrors({ email: 'Email already exists' });
|
|
61
63
|
}
|
|
62
|
-
else if (e
|
|
64
|
+
else if (e instanceof UsernameAlreadyExistsError) {
|
|
63
65
|
formikHelper.setErrors({ username: 'Username already exists' });
|
|
64
66
|
}
|
|
65
67
|
else {
|
|
@@ -14,15 +14,16 @@ var useUpdateUserProfileByJWTCallback = require('../useUpdateUserProfileByJWTCal
|
|
|
14
14
|
|
|
15
15
|
// User Fields Schema without captchaToken and policiesConsent properties
|
|
16
16
|
const userFieldsSchema = yup.object().shape({
|
|
17
|
-
email: yup.string(),
|
|
18
17
|
alias: yup.string(),
|
|
18
|
+
country: yup.string(),
|
|
19
|
+
email: yup.string(),
|
|
19
20
|
firstName: yup.string(),
|
|
20
|
-
lastName: yup.string(),
|
|
21
21
|
jobTitle: yup.string(),
|
|
22
|
+
lastName: yup.string(),
|
|
22
23
|
phoneNumber: yup.string(),
|
|
23
24
|
tShirtSize: yup.string(),
|
|
24
25
|
team: yup.string(),
|
|
25
|
-
|
|
26
|
+
username: yup.string(),
|
|
26
27
|
});
|
|
27
28
|
// Hook exposed to the public
|
|
28
29
|
const useUserUpdateRequestInternal = ({ validationSchemaStripUnknown, }) => {
|