@dynamic-labs/sdk-react-core 0.17.0-RC.3 → 0.17.0-RC.31
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 +326 -0
- package/package.cjs +9 -10
- package/package.js +9 -10
- package/package.json +17 -14
- package/src/index.cjs +33 -5
- package/src/index.d.ts +6 -2
- package/src/index.js +21 -4
- 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 +88 -0
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.d.ts +10 -0
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.js +84 -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 +7 -3
- package/src/lib/components/Divider/Divider.js +18 -5
- 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 +84 -33
- package/src/lib/context/DynamicContext/DynamicContext.d.ts +20 -11
- package/src/lib/context/DynamicContext/DynamicContext.js +79 -28
- 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/index.d.ts +2 -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/useColorSchemePreference/index.d.ts +1 -0
- package/src/lib/utils/hooks/useColorSchemePreference/useColorSchemePreference.cjs +27 -0
- package/src/lib/utils/hooks/useColorSchemePreference/useColorSchemePreference.d.ts +1 -0
- package/src/lib/utils/hooks/useColorSchemePreference/useColorSchemePreference.js +23 -0
- 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 +56 -32
- package/src/lib/utils/hooks/useFetchNetworkConfigurations/useFetchNetworkConfigurations.d.ts +5 -5
- package/src/lib/utils/hooks/useFetchNetworkConfigurations/useFetchNetworkConfigurations.js +57 -33
- 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/useGetSocialIcon/index.d.ts +1 -0
- package/src/lib/utils/hooks/useGetSocialIcon/useGetSocialIcon.cjs +17 -0
- package/src/lib/utils/hooks/useGetSocialIcon/useGetSocialIcon.d.ts +2 -0
- package/src/lib/utils/hooks/useGetSocialIcon/useGetSocialIcon.js +13 -0
- 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 +46 -0
- package/src/lib/utils/hooks/useWalletsConnectionState/useWalletsConnectionState.d.ts +14 -0
- package/src/lib/utils/hooks/useWalletsConnectionState/useWalletsConnectionState.js +42 -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 +28 -11
- package/src/lib/views/LoginWithEmailView/components/SocialSignIn/SocialSignIn.js +28 -11
- 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 +19 -13
- package/src/lib/views/SocialRedirectView/SocialRedirectView.js +19 -13
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.cjs +61 -0
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.d.ts +2 -0
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.js +57 -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/functions/getSocialIcon/getSocialIcon.cjs +0 -22
- package/src/lib/utils/functions/getSocialIcon/getSocialIcon.d.ts +0 -3
- package/src/lib/utils/functions/getSocialIcon/getSocialIcon.js +0 -18
- package/src/lib/utils/functions/getSocialIcon/index.d.ts +0 -1
- 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,7 +1,7 @@
|
|
|
1
1
|
import { __awaiter } from '../../../../_virtual/_tslib.js';
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import { createContext, useState, useCallback, useEffect, useMemo } from 'react';
|
|
4
|
-
import { logger as logger$1 } from '@dynamic-labs/
|
|
4
|
+
import { logger as logger$1 } from '@dynamic-labs/wallet-connector-core';
|
|
5
5
|
import { ICONIC_SPRITE_URL } from '@dynamic-labs/iconic';
|
|
6
6
|
import { AUTH_TOKEN, AUTH_USER, AUTH_MODE } from '../../utils/constants/localStorage.js';
|
|
7
7
|
import '../../utils/constants/colors.js';
|
|
@@ -9,28 +9,33 @@ import { DEFAULT_NUMBER_OF_WALLETS_TO_SHOW } from '../../utils/constants/values.
|
|
|
9
9
|
import { decodeJwt } from '../../shared/utils/functions/decodeJwt/decodeJwt.js';
|
|
10
10
|
import { logger } from '../../shared/logger.js';
|
|
11
11
|
import { ViewContextProvider } from '../ViewContext/ViewContext.js';
|
|
12
|
+
import '@dynamic-labs/utils';
|
|
13
|
+
import 'ethers';
|
|
12
14
|
import { useLocalStorage } from '../../shared/utils/hooks/useLocalStorage/useLocalStorage.js';
|
|
15
|
+
import { useGlobalLoading } from '../../shared/utils/hooks/useGlobalLoading/useGlobalLoading.js';
|
|
13
16
|
import '../../shared/consts/index.js';
|
|
14
17
|
import { useFetchProjectSettings } from '../../utils/hooks/useFetchProjectSettings/useFetchProjectSettings.js';
|
|
15
18
|
import { useFetchNonce } from '../../utils/hooks/useFetchNonce/useFetchNonce.js';
|
|
16
19
|
import { useWallets } from '../../utils/hooks/useWallets/useWallets.js';
|
|
17
20
|
import { useWalletConnectors } from '../../utils/hooks/useWalletConnectors/useWalletConnectors.js';
|
|
18
21
|
import { revokeSession } from '../../data/api.js';
|
|
22
|
+
import '@dynamic-labs/multi-wallet';
|
|
19
23
|
import { getAuthToken } from '../../utils/functions/getAuthToken/getAuthToken.js';
|
|
20
24
|
import '@dynamic-labs/sdk-api';
|
|
21
25
|
import { ErrorContextProvider } from '../ErrorContext/ErrorContext.js';
|
|
26
|
+
import { AccessDeniedContextProvider } from '../AccessDeniedContext/AccessDeniedContext.js';
|
|
22
27
|
import 'react-dom';
|
|
23
28
|
import { useWalletUiUtils } from '../../utils/hooks/useWalletUiUtils/useWalletUiUtils.js';
|
|
24
29
|
import '../MockContext/MockContext.js';
|
|
25
30
|
import { CaptchaContextProvider } from '../CaptchaContext/CaptchaContext.js';
|
|
26
31
|
import '../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
27
|
-
import ApiEndpoint from '../../config/ApiEndpoint.js';
|
|
28
32
|
import { ThemeContextProvider } from '../ThemeContext/ThemeContext.js';
|
|
33
|
+
import ApiEndpoint from '../../config/ApiEndpoint.js';
|
|
29
34
|
import { useFetchNetworkConfigurations } from '../../utils/hooks/useFetchNetworkConfigurations/useFetchNetworkConfigurations.js';
|
|
30
35
|
import { useMultiWalletWidgetState } from '../../utils/hooks/multiWallet/useMultiWalletWidgetState/useMultiWalletWidgetState.js';
|
|
36
|
+
import { useSyncPrimaryWallet } from '../../utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.js';
|
|
31
37
|
import { useWalletEventListeners } from '../../utils/hooks/useWalletEventListeners/useWalletEventListeners.js';
|
|
32
38
|
import { LoadingContextProvider } from '../LoadingContext/LoadingContext.js';
|
|
33
|
-
import { useSyncPrimaryWallet } from '../../utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.js';
|
|
34
39
|
import { useFetchWalletsForChainsMap } from '../../utils/hooks/useFetchWalletsForChainsMap/useFetchWalletsForChainsMap.js';
|
|
35
40
|
import { useHandleUnlinkWallet } from '../../utils/hooks/useHandleUnlinkWallet/useHandleUnlinkWallet.js';
|
|
36
41
|
import { DynamicAuthFlow } from '../../app.js';
|
|
@@ -49,18 +54,32 @@ import '../../components/Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
|
49
54
|
import '../../components/Transition/OpacityTransition/OpacityTransition.js';
|
|
50
55
|
import '../../components/ShadowDOM/ShadowDOM.js';
|
|
51
56
|
import '../../components/IconButton/IconButton.js';
|
|
52
|
-
import
|
|
57
|
+
import '../../components/Alert/Alert.js';
|
|
58
|
+
import '@dynamic-labs/wallet-book';
|
|
59
|
+
import '../../components/Popper/Popper/Popper.js';
|
|
60
|
+
import '../../components/Popper/PopperContext/PopperContext.js';
|
|
61
|
+
import 'formik';
|
|
62
|
+
import 'yup';
|
|
63
|
+
import { FundingContextProvider } from '../FundingContext/FundingContext.js';
|
|
64
|
+
import '../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js';
|
|
65
|
+
import 'qrcode';
|
|
66
|
+
import '../../views/CollectUserDataView/fieldsConfig.js';
|
|
67
|
+
import '../../components/UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.js';
|
|
68
|
+
import { FundingWidget } from '../../widgets/FundingWidget/FundingWidget.js';
|
|
69
|
+
import { SendBalanceContextProvider } from '../SendBalanceContext/SendBalanceContext.js';
|
|
53
70
|
import { initExpirationTime } from './helpers.js';
|
|
54
71
|
import { validateAuthUser } from './validators.js';
|
|
55
72
|
import { useCustomerCallbacks } from './useCustomerCallbacks/useCustomerCallbacks.js';
|
|
56
73
|
import { useCustomerAuthFlowCallbacks } from './useCustomerCallbacks/useCustomerAuthFlowCallbacks.js';
|
|
57
74
|
import { useEmailLoginState } from './hooks/useEmailLoginState/useEmailLoginState.js';
|
|
58
75
|
import { useDisplayOrderState } from './hooks/useDisplayOrderState/useDisplayOrderState.js';
|
|
76
|
+
import { useNameService } from './hooks/useNameService/useNameService.js';
|
|
77
|
+
import { useSetShowAuthFlowWithInit } from './hooks/useSetShowAuthFlowWithInit/useSetShowAuthFlowWithInit.js';
|
|
59
78
|
|
|
60
79
|
const EMPTY_INITIAL_USER = undefined;
|
|
61
80
|
const DynamicContext = createContext(undefined);
|
|
62
|
-
const DynamicContextProvider = ({ settings: { accessDeniedMessagePrimary, accessDeniedMessageSecondary, apiBaseUrl, appLogoUrl = 'https://demo.dynamic.xyz/assets/dynamic-logo.svg', appName = 'Dynamic Example', cssOverrides, defaultNumberOfWalletsToShow = DEFAULT_NUMBER_OF_WALLETS_TO_SHOW, initialAuthenticationMode = 'connect-and-sign',
|
|
63
|
-
var _a, _b;
|
|
81
|
+
const DynamicContextProvider = ({ settings: { accessDeniedMessagePrimary, accessDeniedMessageSecondary, apiBaseUrl, appLogoUrl = 'https://demo.dynamic.xyz/assets/dynamic-logo.svg', appName = 'Dynamic Example', cssOverrides, defaultNumberOfWalletsToShow = DEFAULT_NUMBER_OF_WALLETS_TO_SHOW, flowNetwork, initialAuthenticationMode = 'connect-and-sign', debugError = false, displayTermsOfService = true, newToWeb3WalletChainMap, enableVisitTrackingOnConnectOnly = true, environmentId, eventsCallbacks, evmNetworks, walletsFilter, logLevel = 'WARN', multiWallet: deprecatedMultiWallet, notInTheListImageUrl, onboardingImageUrl, policiesConsentInnerComponent, privacyPolicyUrl, signWithEmailWalletName, socialMediaLinkText, socialMediaIconUrl, socialMediaUrl, termsOfServiceUrl, toolkitEnabled, siweStatement, shadowDOMEnabled = true, walletConnectors: walletConnectorsProp, }, children, theme, }) => {
|
|
82
|
+
var _a, _b, _c, _d, _e;
|
|
64
83
|
logger.setLogLevel(logLevel);
|
|
65
84
|
logger$1.setLogLevel(logLevel);
|
|
66
85
|
ApiEndpoint.setBaseUrl((_a = process.env.DYNAMIC_API_BASE_URL) !== null && _a !== void 0 ? _a : apiBaseUrl);
|
|
@@ -77,10 +96,13 @@ const DynamicContextProvider = ({ settings: { accessDeniedMessagePrimary, access
|
|
|
77
96
|
const [multiWalletWidgetState, setMultiWalletWidgetState, { awaiting_account_switch: [accountSwitchState], awaiting_signature: [awaitingSignatureState], },] = useMultiWalletWidgetState();
|
|
78
97
|
const [isVerifying, setIsVerifying] = useState(false);
|
|
79
98
|
const { projectSettings, isLoading: isProjectSettingsLoading } = useFetchProjectSettings({ authToken: getAuthToken(), environmentId });
|
|
80
|
-
const
|
|
99
|
+
const multiWallet = (_c = deprecatedMultiWallet !== null && deprecatedMultiWallet !== void 0 ? deprecatedMultiWallet : (_b = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _b === void 0 ? void 0 : _b.multiWallet) !== null && _c !== void 0 ? _c : false;
|
|
100
|
+
// ensures that when user comes back to site and primary wallet is out of sync, we don't show widget popup
|
|
101
|
+
const [showWidgetStatePopup, setShowWidgetStatePopup] = useState(!multiWallet);
|
|
102
|
+
const { configurations: serverNetworkConfigurations, handleRemoveLsNetworks, } = useFetchNetworkConfigurations({
|
|
81
103
|
authToken: getAuthToken(),
|
|
82
104
|
environmentId,
|
|
83
|
-
|
|
105
|
+
evmNetworks,
|
|
84
106
|
});
|
|
85
107
|
const { imageUserInAccessList, imageUserNotInAccessList, displayName, appLogo, } = (projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general) || {};
|
|
86
108
|
appLogoUrl = appLogo || appLogoUrl;
|
|
@@ -95,20 +117,22 @@ const DynamicContextProvider = ({ settings: { accessDeniedMessagePrimary, access
|
|
|
95
117
|
const { wallets } = useWallets({
|
|
96
118
|
appLogoUrl,
|
|
97
119
|
appName,
|
|
98
|
-
|
|
120
|
+
flowNetwork,
|
|
99
121
|
networkConfigurations: serverNetworkConfigurations,
|
|
100
122
|
projectSettings,
|
|
101
|
-
|
|
123
|
+
walletConnectorsProp,
|
|
102
124
|
walletUiUtils,
|
|
103
125
|
});
|
|
104
126
|
const [authMode, setAuthMode] = useLocalStorage(AUTH_MODE, initialAuthenticationMode);
|
|
105
127
|
const { connectWallet, removeConnectedInfo, connectedInfo, connectedWallet, setConnectedWallet, connectWalletByAddressAndChain, } = useConnectWallet(wallets, authMode, environmentId, enableVisitTrackingOnConnectOnly);
|
|
106
128
|
const [selectedWalletConnector, setSelectedWalletConnector] = useState(null);
|
|
129
|
+
//selected wallet to perform an action (become primary, unlink, etc)
|
|
130
|
+
const [selectedWalletWithAction, setSelectedWalletWithAction] = useState(null);
|
|
107
131
|
const removeAuthTokenAndUser = useCallback(() => {
|
|
108
132
|
localStorage.removeItem(AUTH_TOKEN);
|
|
109
133
|
removeUser();
|
|
110
134
|
}, [removeUser]);
|
|
111
|
-
const {
|
|
135
|
+
const { clearPrimaryWalletId, computeConnectedStateForWallets, didConnectedStateLoad, walletConnectors, primaryWallet, primaryWalletId, showQrcodeModal, secondaryWallets, setPrimaryWallet, setPrimaryWalletId, setShowQrcodeModal, } = useWalletConnectors({
|
|
112
136
|
authToken: getAuthToken() || onboardingOnlyJwt,
|
|
113
137
|
multiWalletWidgetState,
|
|
114
138
|
setDesktopUri,
|
|
@@ -124,12 +148,15 @@ const DynamicContextProvider = ({ settings: { accessDeniedMessagePrimary, access
|
|
|
124
148
|
projectSettings,
|
|
125
149
|
user,
|
|
126
150
|
});
|
|
127
|
-
const
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
primaryWallet,
|
|
131
|
-
setMultiWalletWidgetState,
|
|
151
|
+
const setShowAuthFlowWithInit = useSetShowAuthFlowWithInit({
|
|
152
|
+
setShowAuthFlow,
|
|
153
|
+
wallets,
|
|
132
154
|
});
|
|
155
|
+
const { getNameService, removeConnectedNameService } = useNameService({
|
|
156
|
+
authToken: (_d = getAuthToken()) !== null && _d !== void 0 ? _d : onboardingOnlyJwt,
|
|
157
|
+
currentWallet: primaryWallet !== null && primaryWallet !== void 0 ? primaryWallet : connectedWallet,
|
|
158
|
+
});
|
|
159
|
+
const walletForUserFacingContext = authMode === 'connect-and-sign' || user ? primaryWallet : connectedWallet;
|
|
133
160
|
const { clearAllWalletConnectSessions, clearOphanedWalletConnectSessions } = useClearWalletConnectSessions({
|
|
134
161
|
connectors: walletConnectors,
|
|
135
162
|
});
|
|
@@ -137,7 +164,7 @@ const DynamicContextProvider = ({ settings: { accessDeniedMessagePrimary, access
|
|
|
137
164
|
clearOphanedWalletConnectSessions,
|
|
138
165
|
]);
|
|
139
166
|
const handleLogOut = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
140
|
-
var
|
|
167
|
+
var _f, _g;
|
|
141
168
|
clearAllWalletConnectSessions();
|
|
142
169
|
const jwt = getAuthToken();
|
|
143
170
|
if (jwt && user) {
|
|
@@ -147,16 +174,17 @@ const DynamicContextProvider = ({ settings: { accessDeniedMessagePrimary, access
|
|
|
147
174
|
for (const connector of walletConnectors) {
|
|
148
175
|
yield connector.endSession();
|
|
149
176
|
}
|
|
150
|
-
(
|
|
177
|
+
(_f = connectedWallet === null || connectedWallet === void 0 ? void 0 : connectedWallet.connector) === null || _f === void 0 ? void 0 : _f.endSession();
|
|
151
178
|
setShowAuthFlow(false);
|
|
152
179
|
setMultiWalletWidgetState('idle');
|
|
153
180
|
removeAuthTokenAndUser();
|
|
154
181
|
setConnectedWallet(null);
|
|
155
|
-
|
|
182
|
+
handleRemoveLsNetworks();
|
|
156
183
|
setOnboardingOnlyJwt(undefined);
|
|
157
184
|
removeConnectedInfo();
|
|
158
|
-
|
|
159
|
-
(
|
|
185
|
+
clearPrimaryWalletId();
|
|
186
|
+
removeConnectedNameService();
|
|
187
|
+
(_g = eventsCallbacks === null || eventsCallbacks === void 0 ? void 0 : eventsCallbacks.onLogout) === null || _g === void 0 ? void 0 : _g.call(eventsCallbacks, user);
|
|
160
188
|
}), [
|
|
161
189
|
clearAllWalletConnectSessions,
|
|
162
190
|
user,
|
|
@@ -164,13 +192,26 @@ const DynamicContextProvider = ({ settings: { accessDeniedMessagePrimary, access
|
|
|
164
192
|
setMultiWalletWidgetState,
|
|
165
193
|
removeAuthTokenAndUser,
|
|
166
194
|
setConnectedWallet,
|
|
167
|
-
|
|
195
|
+
handleRemoveLsNetworks,
|
|
168
196
|
removeConnectedInfo,
|
|
169
|
-
|
|
197
|
+
removeConnectedNameService,
|
|
198
|
+
clearPrimaryWalletId,
|
|
170
199
|
eventsCallbacks,
|
|
171
200
|
environmentId,
|
|
172
201
|
walletConnectors,
|
|
173
202
|
]);
|
|
203
|
+
useSyncPrimaryWallet({
|
|
204
|
+
canSync: didConnectedStateLoad,
|
|
205
|
+
computeConnectedStateForWallets,
|
|
206
|
+
handleLogOut,
|
|
207
|
+
multiWalletWidgetState,
|
|
208
|
+
primaryWallet,
|
|
209
|
+
secondaryWallets,
|
|
210
|
+
setMultiWalletWidgetState,
|
|
211
|
+
setPrimaryWallet,
|
|
212
|
+
setShowWidgetStatePopup,
|
|
213
|
+
showWidgetStatePopup,
|
|
214
|
+
});
|
|
174
215
|
const handleUnlinkWallet = useHandleUnlinkWallet({
|
|
175
216
|
environmentId,
|
|
176
217
|
primaryWalletId,
|
|
@@ -187,9 +228,11 @@ const DynamicContextProvider = ({ settings: { accessDeniedMessagePrimary, access
|
|
|
187
228
|
primaryWallet: walletForUserFacingContext,
|
|
188
229
|
secondaryWallets,
|
|
189
230
|
selectedWalletConnector,
|
|
231
|
+
selectedWalletWithAction,
|
|
190
232
|
setMultiWalletWidgetState,
|
|
191
233
|
setPrimaryWalletId,
|
|
192
234
|
setSelectedWalletConnector,
|
|
235
|
+
setSelectedWalletWithAction,
|
|
193
236
|
user,
|
|
194
237
|
});
|
|
195
238
|
const { walletsForChainsMap } = useFetchWalletsForChainsMap(newToWeb3WalletChainMap);
|
|
@@ -272,6 +315,7 @@ const DynamicContextProvider = ({ settings: { accessDeniedMessagePrimary, access
|
|
|
272
315
|
displayTermsOfService,
|
|
273
316
|
environmentId,
|
|
274
317
|
eventsCallbacks,
|
|
318
|
+
getNameService,
|
|
275
319
|
handleLogOut,
|
|
276
320
|
handleUnlinkWallet,
|
|
277
321
|
isAuthenticated,
|
|
@@ -298,6 +342,7 @@ const DynamicContextProvider = ({ settings: { accessDeniedMessagePrimary, access
|
|
|
298
342
|
sdkHasLoaded,
|
|
299
343
|
secondaryWallets,
|
|
300
344
|
selectedWalletConnector,
|
|
345
|
+
selectedWalletWithAction,
|
|
301
346
|
setAuthMode,
|
|
302
347
|
setAuthorizationViewDisplayOrder,
|
|
303
348
|
setCallback,
|
|
@@ -313,14 +358,17 @@ const DynamicContextProvider = ({ settings: { accessDeniedMessagePrimary, access
|
|
|
313
358
|
setQrcodeUri,
|
|
314
359
|
setSdkHasLoaded,
|
|
315
360
|
setSelectedWalletConnector,
|
|
316
|
-
|
|
361
|
+
setSelectedWalletWithAction,
|
|
362
|
+
setShowAuthFlow: setShowAuthFlowWithInit,
|
|
317
363
|
setShowDynamicUserProfile,
|
|
318
364
|
setShowQrcodeModal,
|
|
365
|
+
setShowWidgetStatePopup,
|
|
319
366
|
setUser,
|
|
320
367
|
shadowDOMEnabled,
|
|
321
368
|
showAuthFlow,
|
|
322
369
|
showDynamicUserProfile,
|
|
323
370
|
showQrcodeModal,
|
|
371
|
+
showWidgetStatePopup,
|
|
324
372
|
signWithEmailWalletName,
|
|
325
373
|
siweStatement,
|
|
326
374
|
socialMediaIconUrl: ((_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general) === null || _a === void 0 ? void 0 : _a.supportUrls) || socialMediaIconUrl,
|
|
@@ -330,7 +378,6 @@ const DynamicContextProvider = ({ settings: { accessDeniedMessagePrimary, access
|
|
|
330
378
|
theme,
|
|
331
379
|
toolkitEnabled,
|
|
332
380
|
user,
|
|
333
|
-
vendorCredentials,
|
|
334
381
|
walletConnector: (_b = walletForUserFacingContext === null || walletForUserFacingContext === void 0 ? void 0 : walletForUserFacingContext.connector) !== null && _b !== void 0 ? _b : null,
|
|
335
382
|
walletUiUtils,
|
|
336
383
|
wallets,
|
|
@@ -360,6 +407,7 @@ const DynamicContextProvider = ({ settings: { accessDeniedMessagePrimary, access
|
|
|
360
407
|
displayTermsOfService,
|
|
361
408
|
environmentId,
|
|
362
409
|
eventsCallbacks,
|
|
410
|
+
getNameService,
|
|
363
411
|
handleLogOut,
|
|
364
412
|
handleUnlinkWallet,
|
|
365
413
|
isAuthenticated,
|
|
@@ -386,6 +434,7 @@ const DynamicContextProvider = ({ settings: { accessDeniedMessagePrimary, access
|
|
|
386
434
|
rpcProviders,
|
|
387
435
|
sdkHasLoaded,
|
|
388
436
|
selectedWalletConnector,
|
|
437
|
+
selectedWalletWithAction,
|
|
389
438
|
setAuthMode,
|
|
390
439
|
setAuthorizationViewDisplayOrder,
|
|
391
440
|
setCallback,
|
|
@@ -395,12 +444,14 @@ const DynamicContextProvider = ({ settings: { accessDeniedMessagePrimary, access
|
|
|
395
444
|
setPrimaryWallet,
|
|
396
445
|
setPrimaryWalletId,
|
|
397
446
|
setSdkHasLoaded,
|
|
447
|
+
setShowAuthFlowWithInit,
|
|
398
448
|
setShowQrcodeModal,
|
|
399
449
|
setUser,
|
|
400
450
|
shadowDOMEnabled,
|
|
401
451
|
showAuthFlow,
|
|
402
452
|
showDynamicUserProfile,
|
|
403
453
|
showQrcodeModal,
|
|
454
|
+
showWidgetStatePopup,
|
|
404
455
|
signWithEmailWalletName,
|
|
405
456
|
siweStatement,
|
|
406
457
|
socialMediaIconUrl,
|
|
@@ -410,7 +461,6 @@ const DynamicContextProvider = ({ settings: { accessDeniedMessagePrimary, access
|
|
|
410
461
|
theme,
|
|
411
462
|
toolkitEnabled,
|
|
412
463
|
user,
|
|
413
|
-
vendorCredentials,
|
|
414
464
|
walletUiUtils,
|
|
415
465
|
wallets,
|
|
416
466
|
walletsFilter,
|
|
@@ -435,14 +485,15 @@ const DynamicContextProvider = ({ settings: { accessDeniedMessagePrimary, access
|
|
|
435
485
|
// DYN-1140 - Opens Widget when multiWalletWidgetState changes
|
|
436
486
|
useEffect(() => {
|
|
437
487
|
// If statement to secure SingleWallet widget
|
|
438
|
-
if (!multiWallet)
|
|
488
|
+
if (!multiWallet && multiWalletWidgetState !== 'awaiting_account_switch') {
|
|
439
489
|
return;
|
|
490
|
+
}
|
|
440
491
|
// We need to make sure that the user is logged in so that we do not try to display the widget before authorization
|
|
441
492
|
if (user && multiWalletWidgetState !== 'idle' && !showDynamicUserProfile) {
|
|
442
493
|
setShowDynamicUserProfile(true);
|
|
443
494
|
}
|
|
444
495
|
}, [multiWallet, multiWalletWidgetState, showDynamicUserProfile, user]);
|
|
445
|
-
return (jsx(DynamicContext.Provider, Object.assign({ value: value }, { children: jsx(ThemeContextProvider, Object.assign({ customerTheme: parseTheme(theme, ((
|
|
496
|
+
return (jsx(DynamicContext.Provider, Object.assign({ value: value }, { children: jsx(ThemeContextProvider, Object.assign({ customerTheme: parseTheme(theme, ((_e = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.design) === null || _e === void 0 ? void 0 : _e.modal) || undefined), designSettings: projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.design }, { children: jsx(LoadingContextProvider, { children: jsx(ViewContextProvider, Object.assign({ initialView: loginWithEmail ? 'login-with-email-or-wallet' : 'wallet-list' }, { children: jsx(QrCodeContextProvider, { children: jsx(EmailVerificationContextProvider, { children: jsx(ErrorContextProvider, { children: jsx(DynamicWidgetContextProvider, { children: jsx(CaptchaContextProvider, { children: jsx(FundingContextProvider, { children: jsx(AccessDeniedContextProvider, { children: jsxs(SendBalanceContextProvider, { children: [jsx(DynamicAuthFlow, {}), jsx(Toolkit, {}), jsx(FundingWidget, {}), confirmationModal, children] }) }) }) }) }) }) }) }) })) }) })) })));
|
|
446
497
|
};
|
|
447
498
|
|
|
448
499
|
export { DynamicContext, DynamicContextProvider };
|
|
@@ -5,12 +5,14 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var decodeJwt = require('../../shared/utils/functions/decodeJwt/decodeJwt.cjs');
|
|
6
6
|
require('../../shared/logger.cjs');
|
|
7
7
|
require('@dynamic-labs/iconic');
|
|
8
|
-
require('@dynamic-labs/
|
|
8
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
9
9
|
require('react/jsx-runtime');
|
|
10
10
|
require('../ViewContext/ViewContext.cjs');
|
|
11
11
|
require('react');
|
|
12
|
+
require('@dynamic-labs/utils');
|
|
12
13
|
var localStorage$1 = require('../../utils/constants/localStorage.cjs');
|
|
13
14
|
require('../../utils/constants/colors.cjs');
|
|
15
|
+
require('ethers');
|
|
14
16
|
|
|
15
17
|
let logoutTimer;
|
|
16
18
|
const isAuthTokenExpired = (token) => {
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { decodeJwt } from '../../shared/utils/functions/decodeJwt/decodeJwt.js';
|
|
2
2
|
import '../../shared/logger.js';
|
|
3
3
|
import '@dynamic-labs/iconic';
|
|
4
|
-
import '@dynamic-labs/
|
|
4
|
+
import '@dynamic-labs/wallet-connector-core';
|
|
5
5
|
import 'react/jsx-runtime';
|
|
6
6
|
import '../ViewContext/ViewContext.js';
|
|
7
7
|
import 'react';
|
|
8
|
+
import '@dynamic-labs/utils';
|
|
8
9
|
import { AUTH_TOKEN } from '../../utils/constants/localStorage.js';
|
|
9
10
|
import '../../utils/constants/colors.js';
|
|
11
|
+
import 'ethers';
|
|
10
12
|
|
|
11
13
|
let logoutTimer;
|
|
12
14
|
const isAuthTokenExpired = (token) => {
|
|
@@ -6,12 +6,14 @@ 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('../../../ViewContext/ViewContext.cjs');
|
|
12
12
|
var isDisplayOrderPriorityForWeb3 = require('../../../../shared/utils/functions/isDisplayOrderPriorityForWeb3/isDisplayOrderPriorityForWeb3.cjs');
|
|
13
13
|
var isDisplayOrderPriorityForWeb2 = require('../../../../shared/utils/functions/isDisplayOrderPriorityForWeb2/isDisplayOrderPriorityForWeb2.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
|
|
|
17
19
|
const web2DisplayOrder = ['email', 'wallet'];
|
|
@@ -2,12 +2,14 @@ import { useState, useCallback, 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 '../../../ViewContext/ViewContext.js';
|
|
8
8
|
import { isDisplayOrderPriorityForWeb3 } from '../../../../shared/utils/functions/isDisplayOrderPriorityForWeb3/isDisplayOrderPriorityForWeb3.js';
|
|
9
9
|
import { isDisplayOrderPriorityForWeb2 } from '../../../../shared/utils/functions/isDisplayOrderPriorityForWeb2/isDisplayOrderPriorityForWeb2.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
|
|
|
13
15
|
const web2DisplayOrder = ['email', 'wallet'];
|
|
@@ -5,12 +5,16 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
require('../../../../utils/constants/colors.cjs');
|
|
7
7
|
require('@dynamic-labs/multi-wallet');
|
|
8
|
+
require('@dynamic-labs/utils');
|
|
8
9
|
require('@dynamic-labs/sdk-api');
|
|
9
10
|
require('../../../../shared/logger.cjs');
|
|
10
11
|
require('@dynamic-labs/iconic');
|
|
12
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
11
13
|
require('react/jsx-runtime');
|
|
12
14
|
require('../../../ViewContext/ViewContext.cjs');
|
|
15
|
+
require('ethers');
|
|
13
16
|
var isEmailProviderEnabled = require('../../../../utils/functions/isEmailProviderEnabled/isEmailProviderEnabled.cjs');
|
|
17
|
+
require('../../../../shared/consts/index.cjs');
|
|
14
18
|
|
|
15
19
|
const useEmailLoginState = (providers, user) => {
|
|
16
20
|
const [loginWithEmail, setLoginWithEmail] = React.useState(isEmailProviderEnabled.isEmailProviderEnabled(providers));
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { useState, useEffect } from 'react';
|
|
2
2
|
import '../../../../utils/constants/colors.js';
|
|
3
3
|
import '@dynamic-labs/multi-wallet';
|
|
4
|
+
import '@dynamic-labs/utils';
|
|
4
5
|
import '@dynamic-labs/sdk-api';
|
|
5
6
|
import '../../../../shared/logger.js';
|
|
6
7
|
import '@dynamic-labs/iconic';
|
|
8
|
+
import '@dynamic-labs/wallet-connector-core';
|
|
7
9
|
import 'react/jsx-runtime';
|
|
8
10
|
import '../../../ViewContext/ViewContext.js';
|
|
11
|
+
import 'ethers';
|
|
9
12
|
import { isEmailProviderEnabled } from '../../../../utils/functions/isEmailProviderEnabled/isEmailProviderEnabled.js';
|
|
13
|
+
import '../../../../shared/consts/index.js';
|
|
10
14
|
|
|
11
15
|
const useEmailLoginState = (providers, user) => {
|
|
12
16
|
const [loginWithEmail, setLoginWithEmail] = useState(isEmailProviderEnabled(providers));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useNameService } from './useNameService';
|
|
@@ -0,0 +1,84 @@
|
|
|
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
|
+
var decodeJwt = require('../../../../shared/utils/functions/decodeJwt/decodeJwt.cjs');
|
|
8
|
+
require('../../../../shared/logger.cjs');
|
|
9
|
+
require('@dynamic-labs/iconic');
|
|
10
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
11
|
+
require('react/jsx-runtime');
|
|
12
|
+
require('../../../ViewContext/ViewContext.cjs');
|
|
13
|
+
require('@dynamic-labs/utils');
|
|
14
|
+
var localStorage = require('../../../../utils/constants/localStorage.cjs');
|
|
15
|
+
require('../../../../utils/constants/colors.cjs');
|
|
16
|
+
require('ethers');
|
|
17
|
+
var useLocalStorage = require('../../../../shared/utils/hooks/useLocalStorage/useLocalStorage.cjs');
|
|
18
|
+
require('../../../../shared/consts/index.cjs');
|
|
19
|
+
var getWalletVerifiedCredential = require('../../../../utils/functions/getWalletVerifiedCredential/getWalletVerifiedCredential.cjs');
|
|
20
|
+
|
|
21
|
+
const useNameService = ({ currentWallet, authToken }) => {
|
|
22
|
+
const [connectedNameService, setConnectedNameService, removeConnectedNameService,] = useLocalStorage.useLocalStorage(localStorage.CONNECTED_WALLET_NAME_SERVICE, null);
|
|
23
|
+
const lastFetchedNameServiceAddress = React.useRef();
|
|
24
|
+
const fetchNameServiceFromBlockchain = React.useCallback((wallet) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
25
|
+
const { address, connector } = wallet;
|
|
26
|
+
if (address === lastFetchedNameServiceAddress.current) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
setConnectedNameService(null);
|
|
30
|
+
// store last address used to fetch name service so we can check for it when promise resolves
|
|
31
|
+
// to avoid race conditions
|
|
32
|
+
lastFetchedNameServiceAddress.current = address;
|
|
33
|
+
let ns;
|
|
34
|
+
try {
|
|
35
|
+
ns = yield connector.getNameService();
|
|
36
|
+
}
|
|
37
|
+
catch (e) {
|
|
38
|
+
// do nothing
|
|
39
|
+
}
|
|
40
|
+
// only sets name service if the address used to fetch it is the last one used for fetching
|
|
41
|
+
// this avoid issues with promises not resolving in the correct order
|
|
42
|
+
if (lastFetchedNameServiceAddress.current === address) {
|
|
43
|
+
setConnectedNameService({
|
|
44
|
+
address,
|
|
45
|
+
avatar: ns === null || ns === void 0 ? void 0 : ns.avatar,
|
|
46
|
+
name: ns === null || ns === void 0 ? void 0 : ns.name,
|
|
47
|
+
});
|
|
48
|
+
return ns;
|
|
49
|
+
}
|
|
50
|
+
return undefined;
|
|
51
|
+
}), [setConnectedNameService]);
|
|
52
|
+
const getNameService = (address) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
53
|
+
var _a, _b;
|
|
54
|
+
if (!currentWallet) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
const verifiedCredentials = (_a = decodeJwt.decodeJwt(authToken)) === null || _a === void 0 ? void 0 : _a.verifiedCredentials;
|
|
58
|
+
//if there are verified credentials, check if there is a name service for the current wallet
|
|
59
|
+
if (verifiedCredentials) {
|
|
60
|
+
const verifiedCredential = getWalletVerifiedCredential.getWalletVerifiedCredential(currentWallet === null || currentWallet === void 0 ? void 0 : currentWallet.address, verifiedCredentials);
|
|
61
|
+
if (verifiedCredential && ((_b = verifiedCredential.nameService) === null || _b === void 0 ? void 0 : _b.name)) {
|
|
62
|
+
return verifiedCredential.nameService;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
// don't look for name service in blockchain if provided address doesn't match current wallet
|
|
66
|
+
if (address && (currentWallet === null || currentWallet === void 0 ? void 0 : currentWallet.address) !== address) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
// if finds name service info in local storage and its related address matches the connected wallet address,
|
|
70
|
+
// return it
|
|
71
|
+
if (connectedNameService &&
|
|
72
|
+
connectedNameService.address === (currentWallet === null || currentWallet === void 0 ? void 0 : currentWallet.address)) {
|
|
73
|
+
return {
|
|
74
|
+
avatar: connectedNameService.avatar,
|
|
75
|
+
name: connectedNameService.name,
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
// if doesn't find correct name service in verified credentials or local storage, fetch it from blockchain
|
|
79
|
+
return fetchNameServiceFromBlockchain(currentWallet);
|
|
80
|
+
});
|
|
81
|
+
return { getNameService, removeConnectedNameService };
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
exports.useNameService = useNameService;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { NameServiceData } from '@dynamic-labs/sdk-api';
|
|
2
|
+
import { Wallet } from '../../../../shared';
|
|
3
|
+
type Props = {
|
|
4
|
+
authToken: string | undefined;
|
|
5
|
+
currentWallet: Wallet | null;
|
|
6
|
+
};
|
|
7
|
+
export declare const useNameService: ({ currentWallet, authToken }: Props) => {
|
|
8
|
+
getNameService: (address?: string) => Promise<NameServiceData | undefined>;
|
|
9
|
+
removeConnectedNameService: () => void;
|
|
10
|
+
};
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { __awaiter } from '../../../../../../_virtual/_tslib.js';
|
|
2
|
+
import { useRef, useCallback } from 'react';
|
|
3
|
+
import { decodeJwt } from '../../../../shared/utils/functions/decodeJwt/decodeJwt.js';
|
|
4
|
+
import '../../../../shared/logger.js';
|
|
5
|
+
import '@dynamic-labs/iconic';
|
|
6
|
+
import '@dynamic-labs/wallet-connector-core';
|
|
7
|
+
import 'react/jsx-runtime';
|
|
8
|
+
import '../../../ViewContext/ViewContext.js';
|
|
9
|
+
import '@dynamic-labs/utils';
|
|
10
|
+
import { CONNECTED_WALLET_NAME_SERVICE } from '../../../../utils/constants/localStorage.js';
|
|
11
|
+
import '../../../../utils/constants/colors.js';
|
|
12
|
+
import 'ethers';
|
|
13
|
+
import { useLocalStorage } from '../../../../shared/utils/hooks/useLocalStorage/useLocalStorage.js';
|
|
14
|
+
import '../../../../shared/consts/index.js';
|
|
15
|
+
import { getWalletVerifiedCredential } from '../../../../utils/functions/getWalletVerifiedCredential/getWalletVerifiedCredential.js';
|
|
16
|
+
|
|
17
|
+
const useNameService = ({ currentWallet, authToken }) => {
|
|
18
|
+
const [connectedNameService, setConnectedNameService, removeConnectedNameService,] = useLocalStorage(CONNECTED_WALLET_NAME_SERVICE, null);
|
|
19
|
+
const lastFetchedNameServiceAddress = useRef();
|
|
20
|
+
const fetchNameServiceFromBlockchain = useCallback((wallet) => __awaiter(void 0, void 0, void 0, function* () {
|
|
21
|
+
const { address, connector } = wallet;
|
|
22
|
+
if (address === lastFetchedNameServiceAddress.current) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
setConnectedNameService(null);
|
|
26
|
+
// store last address used to fetch name service so we can check for it when promise resolves
|
|
27
|
+
// to avoid race conditions
|
|
28
|
+
lastFetchedNameServiceAddress.current = address;
|
|
29
|
+
let ns;
|
|
30
|
+
try {
|
|
31
|
+
ns = yield connector.getNameService();
|
|
32
|
+
}
|
|
33
|
+
catch (e) {
|
|
34
|
+
// do nothing
|
|
35
|
+
}
|
|
36
|
+
// only sets name service if the address used to fetch it is the last one used for fetching
|
|
37
|
+
// this avoid issues with promises not resolving in the correct order
|
|
38
|
+
if (lastFetchedNameServiceAddress.current === address) {
|
|
39
|
+
setConnectedNameService({
|
|
40
|
+
address,
|
|
41
|
+
avatar: ns === null || ns === void 0 ? void 0 : ns.avatar,
|
|
42
|
+
name: ns === null || ns === void 0 ? void 0 : ns.name,
|
|
43
|
+
});
|
|
44
|
+
return ns;
|
|
45
|
+
}
|
|
46
|
+
return undefined;
|
|
47
|
+
}), [setConnectedNameService]);
|
|
48
|
+
const getNameService = (address) => __awaiter(void 0, void 0, void 0, function* () {
|
|
49
|
+
var _a, _b;
|
|
50
|
+
if (!currentWallet) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
const verifiedCredentials = (_a = decodeJwt(authToken)) === null || _a === void 0 ? void 0 : _a.verifiedCredentials;
|
|
54
|
+
//if there are verified credentials, check if there is a name service for the current wallet
|
|
55
|
+
if (verifiedCredentials) {
|
|
56
|
+
const verifiedCredential = getWalletVerifiedCredential(currentWallet === null || currentWallet === void 0 ? void 0 : currentWallet.address, verifiedCredentials);
|
|
57
|
+
if (verifiedCredential && ((_b = verifiedCredential.nameService) === null || _b === void 0 ? void 0 : _b.name)) {
|
|
58
|
+
return verifiedCredential.nameService;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
// don't look for name service in blockchain if provided address doesn't match current wallet
|
|
62
|
+
if (address && (currentWallet === null || currentWallet === void 0 ? void 0 : currentWallet.address) !== address) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
// if finds name service info in local storage and its related address matches the connected wallet address,
|
|
66
|
+
// return it
|
|
67
|
+
if (connectedNameService &&
|
|
68
|
+
connectedNameService.address === (currentWallet === null || currentWallet === void 0 ? void 0 : currentWallet.address)) {
|
|
69
|
+
return {
|
|
70
|
+
avatar: connectedNameService.avatar,
|
|
71
|
+
name: connectedNameService.name,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
// if doesn't find correct name service in verified credentials or local storage, fetch it from blockchain
|
|
75
|
+
return fetchNameServiceFromBlockchain(currentWallet);
|
|
76
|
+
});
|
|
77
|
+
return { getNameService, removeConnectedNameService };
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export { useNameService };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useSetShowAuthFlowWithInit';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* this hook wraps `setShowAuthFlow`. WalletConnect requires initialization
|
|
9
|
+
* before we can connect a wallet. The goal here is that when a user clicks
|
|
10
|
+
* on the "Connect your wallet" button, the SDK starts initializing WalletConnect
|
|
11
|
+
* and will prime it for connection. This way, when the user clicks on the
|
|
12
|
+
* "Connect" button in the WalletConnect modal, there is a uri ready to go
|
|
13
|
+
* to immediately trigger the deep link on mobile
|
|
14
|
+
*/
|
|
15
|
+
const useSetShowAuthFlowWithInit = ({ setShowAuthFlow, wallets, }) => {
|
|
16
|
+
const setShowAuthFlowWithInit = React.useCallback((value) => {
|
|
17
|
+
var _a;
|
|
18
|
+
if (value) {
|
|
19
|
+
(_a = wallets
|
|
20
|
+
.find((wallet) => wallet.walletConnector.key === 'walletconnect')) === null || _a === void 0 ? void 0 : _a.walletConnector.init();
|
|
21
|
+
}
|
|
22
|
+
setShowAuthFlow(value);
|
|
23
|
+
}, [setShowAuthFlow, wallets]);
|
|
24
|
+
return setShowAuthFlowWithInit;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
exports.useSetShowAuthFlowWithInit = useSetShowAuthFlowWithInit;
|