@dynamic-labs/sdk-react-core 0.17.0-RC.9 → 0.17.0
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 +323 -0
- package/package.cjs +9 -10
- package/package.js +9 -10
- package/package.json +17 -17
- package/src/index.cjs +31 -4
- package/src/index.d.ts +3 -0
- package/src/index.js +19 -4
- package/src/lib/Main.cjs +21 -10
- package/src/lib/Main.js +19 -8
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.cjs +7 -0
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.js +7 -0
- package/src/lib/components/Alert/Alert.cjs +1 -0
- package/src/lib/components/Alert/Alert.js +1 -0
- package/src/lib/components/AnimatePresence/AnimatePresence.cjs +7 -0
- package/src/lib/components/AnimatePresence/AnimatePresence.js +7 -0
- package/src/lib/components/AppOriginTile/AppOriginTile.types.d.ts +1 -1
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.cjs +89 -0
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.d.ts +10 -0
- package/src/lib/components/AuthProviderIcon/AuthProviderIcon.js +85 -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 +1 -0
- package/src/lib/components/Checkbox/Checkbox.js +1 -0
- 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 +13 -3
- package/src/lib/components/Divider/Divider.d.ts +7 -3
- package/src/lib/components/Divider/Divider.js +14 -4
- package/src/lib/components/ErrorContainer/ErrorContainer.cjs +3 -2
- package/src/lib/components/ErrorContainer/ErrorContainer.d.ts +3 -1
- package/src/lib/components/ErrorContainer/ErrorContainer.js +3 -2
- 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 -3
- package/src/lib/components/IconWithSpinner/IconWithSpinner.js +5 -3
- package/src/lib/components/IconWithSpinner/Indicator/Indicator.cjs +1 -0
- package/src/lib/components/IconWithSpinner/Indicator/Indicator.js +1 -0
- package/src/lib/components/IconWithSpinner/Spinner/Spinner.cjs +5 -3
- package/src/lib/components/IconWithSpinner/Spinner/Spinner.js +5 -3
- package/src/lib/components/IconWithStatus/IconWithStatus.cjs +12 -8
- package/src/lib/components/IconWithStatus/IconWithStatus.d.ts +2 -1
- package/src/lib/components/IconWithStatus/IconWithStatus.js +12 -8
- 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 +1 -0
- package/src/lib/components/LogoutButton/LogoutButton.js +1 -0
- package/src/lib/components/Modal/Modal.cjs +10 -0
- package/src/lib/components/Modal/Modal.d.ts +6 -0
- package/src/lib/components/Modal/Modal.js +6 -0
- package/src/lib/components/Modal/index.d.ts +1 -0
- package/src/lib/components/ModalCard/ModalCard.cjs +9 -0
- package/src/lib/components/ModalCard/ModalCard.d.ts +2 -0
- package/src/lib/components/ModalCard/ModalCard.js +5 -0
- package/src/lib/components/ModalCard/index.d.ts +1 -0
- package/src/lib/components/NetworkPicker/NetworkPicker.cjs +5 -1
- package/src/lib/components/NetworkPicker/NetworkPicker.js +5 -1
- package/src/lib/components/NetworkPicker/components/ActionList/ActionList.cjs +7 -0
- package/src/lib/components/NetworkPicker/components/ActionList/ActionList.js +7 -0
- package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.cjs +14 -7
- package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.js +14 -7
- package/src/lib/components/NetworkPicker/components/Network/Network.cjs +10 -3
- package/src/lib/components/NetworkPicker/components/Network/Network.js +10 -3
- package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.cjs +10 -3
- package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.js +10 -3
- package/src/lib/components/NetworkPicker/components/UnsupportedNetwork/UnsupportedNetwork.cjs +1 -0
- package/src/lib/components/NetworkPicker/components/UnsupportedNetwork/UnsupportedNetwork.js +1 -0
- package/src/lib/components/OTPVerificationView/OTPVerificationView.cjs +15 -7
- package/src/lib/components/OTPVerificationView/OTPVerificationView.js +15 -7
- package/src/lib/components/OverlayCard/OverlayCard.cjs +7 -0
- package/src/lib/components/OverlayCard/OverlayCard.js +7 -0
- package/src/lib/components/Popper/Popper/Popper.cjs +54 -0
- package/src/lib/components/Popper/Popper/Popper.d.ts +12 -0
- package/src/lib/components/Popper/Popper/Popper.js +50 -0
- package/src/lib/components/Popper/Popper/index.d.ts +1 -0
- package/src/lib/components/Popper/Popper.types.d.ts +6 -0
- package/src/lib/components/Popper/PopperContent/PopperContent.cjs +18 -0
- package/src/lib/components/Popper/PopperContent/PopperContent.d.ts +9 -0
- package/src/lib/components/Popper/PopperContent/PopperContent.js +14 -0
- package/src/lib/components/Popper/PopperContent/index.d.ts +1 -0
- package/src/lib/components/Popper/PopperContext/PopperContext.cjs +26 -0
- package/src/lib/components/Popper/PopperContext/PopperContext.d.ts +8 -0
- package/src/lib/components/Popper/PopperContext/PopperContext.js +20 -0
- package/src/lib/components/Popper/PopperContext/index.d.ts +1 -0
- package/src/lib/components/Popper/index.d.ts +2 -0
- package/src/lib/components/Popper/utils/getChildPosition/getChildPosition.cjs +14 -0
- package/src/lib/components/Popper/utils/getChildPosition/getChildPosition.d.ts +2 -0
- package/src/lib/components/Popper/utils/getChildPosition/getChildPosition.js +10 -0
- package/src/lib/components/Popper/utils/getChildPosition/index.d.ts +1 -0
- package/src/lib/components/Popper/utils/index.d.ts +3 -0
- package/src/lib/components/Popper/utils/isScrollable/index.d.ts +1 -0
- package/src/lib/components/Popper/utils/isScrollable/isScrollable.cjs +16 -0
- package/src/lib/components/Popper/utils/isScrollable/isScrollable.d.ts +1 -0
- package/src/lib/components/Popper/utils/isScrollable/isScrollable.js +12 -0
- package/src/lib/components/Popper/utils/watchToScrollInHierarchy/index.d.ts +1 -0
- package/src/lib/components/Popper/utils/watchToScrollInHierarchy/watchToScrollInHierarchy.cjs +24 -0
- package/src/lib/components/Popper/utils/watchToScrollInHierarchy/watchToScrollInHierarchy.d.ts +1 -0
- package/src/lib/components/Popper/utils/watchToScrollInHierarchy/watchToScrollInHierarchy.js +20 -0
- package/src/lib/components/Portal/Portal.cjs +7 -0
- package/src/lib/components/Portal/Portal.js +7 -0
- package/src/lib/components/Select/Select.cjs +1 -0
- package/src/lib/components/Select/Select.js +1 -0
- 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 +51 -0
- package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.d.ts +19 -0
- package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.js +47 -0
- package/src/lib/components/SendBalancePageLayout/components/TokenBalanceCard/TokenBalanceCard.cjs +26 -0
- package/src/lib/components/SendBalancePageLayout/components/TokenBalanceCard/TokenBalanceCard.d.ts +8 -0
- package/src/lib/components/SendBalancePageLayout/components/TokenBalanceCard/TokenBalanceCard.js +22 -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 +1 -0
- package/src/lib/components/ShadowDOM/utils.js +1 -0
- package/src/lib/components/Spinner/spinner.cjs +1 -0
- package/src/lib/components/Spinner/spinner.js +1 -0
- package/src/lib/components/Step/Step.d.ts +7 -0
- package/src/lib/components/Step/index.d.ts +1 -0
- package/src/lib/components/Stepper/Stepper.d.ts +2 -0
- package/src/lib/components/Stepper/index.d.ts +1 -0
- package/src/lib/components/Toolkit/Toolkit.cjs +1 -0
- package/src/lib/components/Toolkit/Toolkit.js +1 -0
- package/src/lib/components/Toolkit/components/LoginWithEmailViewDisplayPriorityOrderSwitch.cjs +1 -0
- package/src/lib/components/Toolkit/components/LoginWithEmailViewDisplayPriorityOrderSwitch.js +1 -0
- package/src/lib/components/Tooltip/Tooltip.cjs +7 -0
- package/src/lib/components/Tooltip/Tooltip.js +7 -0
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.cjs +41 -0
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.d.ts +17 -0
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.js +37 -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 +57 -0
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.d.ts +12 -0
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.js +53 -0
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.cjs +7 -0
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.js +7 -0
- package/src/lib/components/UserAddress/UserAddress.cjs +1 -0
- package/src/lib/components/UserAddress/UserAddress.js +1 -0
- package/src/lib/components/UserProfile/UserProfile.cjs +3 -2
- package/src/lib/components/UserProfile/UserProfile.js +2 -1
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.cjs +10 -3
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.js +10 -3
- package/src/lib/components/UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.cjs +3 -2
- 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 +3 -2
- package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.cjs +10 -3
- package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.js +10 -3
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs +31 -13
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js +31 -13
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/components/ConnectedAccountAvatar/ConnectedAccountAvatar.cjs +1 -1
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/components/ConnectedAccountAvatar/ConnectedAccountAvatar.d.ts +2 -0
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/components/ConnectedAccountAvatar/ConnectedAccountAvatar.js +1 -1
- package/src/lib/components/index.d.ts +9 -0
- package/src/lib/config/LSSuffix.cjs +24 -0
- package/src/lib/config/LSSuffix.d.ts +7 -0
- package/src/lib/config/LSSuffix.js +22 -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 +76 -30
- package/src/lib/context/DynamicContext/DynamicContext.d.ts +26 -3
- package/src/lib/context/DynamicContext/DynamicContext.js +73 -27
- package/src/lib/context/DynamicContext/helpers.cjs +5 -3
- package/src/lib/context/DynamicContext/helpers.js +4 -2
- package/src/lib/context/DynamicContext/hooks/useDisplayOrderState/useDisplayOrderState.cjs +1 -0
- package/src/lib/context/DynamicContext/hooks/useDisplayOrderState/useDisplayOrderState.js +1 -0
- package/src/lib/context/DynamicContext/hooks/useEmailLoginState/useEmailLoginState.cjs +5 -3
- package/src/lib/context/DynamicContext/hooks/useEmailLoginState/useEmailLoginState.js +5 -3
- package/src/lib/context/DynamicContext/hooks/useNameService/useNameService.cjs +1 -0
- package/src/lib/context/DynamicContext/hooks/useNameService/useNameService.js +1 -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 +7 -0
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerAuthFlowCallbacks.js +7 -0
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerCallbacks.cjs +1 -0
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerCallbacks.js +1 -0
- package/src/lib/context/DynamicContext/validators.cjs +1 -0
- package/src/lib/context/DynamicContext/validators.js +1 -0
- package/src/lib/context/MockContext/MockContext.cjs +2 -0
- package/src/lib/context/MockContext/MockContext.js +2 -0
- package/src/lib/context/QrCodeContext/QrCodeContext.cjs +7 -0
- package/src/lib/context/QrCodeContext/QrCodeContext.js +7 -0
- package/src/lib/context/SendBalanceContext/SendBalanceContext.cjs +74 -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 +69 -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 +103 -19
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.d.ts +3 -1
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +104 -20
- package/src/lib/context/ThemeContext/themesData.cjs +19 -18
- package/src/lib/context/ThemeContext/themesData.d.ts +3 -3
- package/src/lib/context/ThemeContext/themesData.js +19 -18
- 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 +6 -2
- package/src/lib/data/api.d.ts +2 -2
- package/src/lib/data/api.js +6 -2
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.cjs +10 -3
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.js +10 -3
- package/src/lib/layout/DynamicAuthLayout/Footer/Footer.cjs +9 -2
- package/src/lib/layout/DynamicAuthLayout/Footer/Footer.js +9 -2
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/Item/Item.cjs +9 -2
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/Item/Item.js +9 -2
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.cjs +9 -2
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.js +9 -2
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/WalletListFooterContent.cjs +8 -2
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/WalletListFooterContent.js +8 -2
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletMoreInfoContent/WalletMoreInfoContent.cjs +14 -7
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletMoreInfoContent/WalletMoreInfoContent.js +14 -7
- package/src/lib/layout/DynamicAuthLayout/Header/header.cjs +19 -9
- package/src/lib/layout/DynamicAuthLayout/Header/header.js +19 -9
- package/src/lib/layouts/BridgeWelcomeLayout/BridgeWelcomeLayout.d.ts +15 -0
- package/src/lib/layouts/BridgeWelcomeLayout/index.d.ts +1 -0
- package/src/lib/modals/SendBalanceModal/SendBalanceModal.cjs +69 -0
- package/src/lib/modals/SendBalanceModal/SendBalanceModal.d.ts +10 -0
- package/src/lib/modals/SendBalanceModal/SendBalanceModal.js +65 -0
- package/src/lib/modals/SendBalanceModal/index.d.ts +1 -0
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.cjs +19 -10
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js +19 -10
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.cjs +35 -83
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.js +37 -85
- 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 -2
- 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/formatBigNumber/formatBigNumber.cjs +9 -10
- package/src/lib/shared/utils/functions/formatBigNumber/formatBigNumber.d.ts +1 -1
- package/src/lib/shared/utils/functions/formatBigNumber/formatBigNumber.js +9 -10
- package/src/lib/shared/utils/functions/getWalletListItemLabel/getWalletListItemLabel.cjs +1 -0
- package/src/lib/shared/utils/functions/getWalletListItemLabel/getWalletListItemLabel.js +1 -0
- package/src/lib/shared/utils/functions/index.d.ts +2 -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/storage/getDynamicLSKey.cjs +9 -0
- package/src/lib/shared/utils/functions/storage/getDynamicLSKey.d.ts +1 -0
- package/src/lib/shared/utils/functions/storage/getDynamicLSKey.js +5 -0
- package/src/lib/shared/utils/functions/storage/getFromLS.cjs +2 -1
- package/src/lib/shared/utils/functions/storage/getFromLS.js +2 -1
- package/src/lib/shared/utils/functions/storage/index.d.ts +2 -0
- package/src/lib/shared/utils/functions/storage/removeFromLS.cjs +15 -0
- package/src/lib/shared/utils/functions/storage/removeFromLS.d.ts +1 -0
- package/src/lib/shared/utils/functions/storage/removeFromLS.js +11 -0
- package/src/lib/shared/utils/functions/storage/setToLS.cjs +5 -2
- package/src/lib/shared/utils/functions/storage/setToLS.js +5 -2
- 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 +5 -3
- package/src/lib/shared/utils/hooks/useLocalStorage/useLocalStorage.js +5 -3
- package/src/lib/styles/index.shadow.cjs +1 -1
- package/src/lib/styles/index.shadow.js +1 -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/getAuthToken/getAuthToken.cjs +14 -2
- package/src/lib/utils/functions/getAuthToken/getAuthToken.d.ts +1 -1
- package/src/lib/utils/functions/getAuthToken/getAuthToken.js +13 -1
- package/src/lib/utils/functions/getDynamicLayoutData/getDynamicLayoutData.cjs +1 -0
- package/src/lib/utils/functions/getDynamicLayoutData/getDynamicLayoutData.js +1 -0
- package/src/lib/utils/functions/getReferencedAccount/getReferencedAccount.cjs +30 -0
- package/src/lib/utils/functions/getReferencedAccount/getReferencedAccount.d.ts +7 -0
- package/src/lib/utils/functions/getReferencedAccount/getReferencedAccount.js +26 -0
- package/src/lib/utils/functions/getReferencedAccount/index.d.ts +1 -0
- package/src/lib/utils/functions/{getEnabledUserProfileFields/getEnabledUserProfileFields.cjs → getUserProfileFields/getUserProfileFields.cjs} +4 -0
- package/src/lib/utils/functions/{getEnabledUserProfileFields/getEnabledUserProfileFields.js → getUserProfileFields/getUserProfileFields.js} +4 -0
- package/src/lib/utils/functions/getVerifyArgs/getVerifyArgs.cjs +2 -0
- package/src/lib/utils/functions/getVerifyArgs/getVerifyArgs.d.ts +1 -0
- package/src/lib/utils/functions/getVerifyArgs/getVerifyArgs.js +2 -0
- package/src/lib/utils/functions/handleUnlinkHelper/handleUnlinkHelper.cjs +1 -0
- package/src/lib/utils/functions/handleUnlinkHelper/handleUnlinkHelper.js +1 -0
- 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/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 +1 -0
- package/src/lib/utils/functions/parseWalletLinks/parseWalletLinks.js +1 -0
- package/src/lib/utils/functions/storeAuthToken/index.cjs +14 -2
- package/src/lib/utils/functions/storeAuthToken/index.js +13 -1
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.cjs +2 -1
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.js +2 -1
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.cjs +1 -0
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.js +1 -0
- package/src/lib/utils/hooks/authenticationHooks/useEmailVerificationRequest/useEmailVerificationRequest.cjs +2 -0
- package/src/lib/utils/hooks/authenticationHooks/useEmailVerificationRequest/useEmailVerificationRequest.js +2 -0
- package/src/lib/utils/hooks/index.d.ts +4 -0
- package/src/lib/utils/hooks/multiWallet/index.d.ts +1 -0
- package/src/lib/utils/hooks/multiWallet/useMultiWalletWidgetState/useMultiWalletWidgetState.cjs +0 -2
- package/src/lib/utils/hooks/multiWallet/useMultiWalletWidgetState/useMultiWalletWidgetState.js +0 -2
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.cjs +66 -7
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.d.ts +10 -3
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.js +67 -8
- package/src/lib/utils/hooks/multiWallet/useVerifyOnAwaitingSignature/useVerifyOnAwaitingSignature.cjs +2 -0
- package/src/lib/utils/hooks/multiWallet/useVerifyOnAwaitingSignature/useVerifyOnAwaitingSignature.js +2 -0
- package/src/lib/utils/hooks/useAuthenticateConnectedUser/useAuthenticateConnectedUser.cjs +2 -0
- package/src/lib/utils/hooks/useAuthenticateConnectedUser/useAuthenticateConnectedUser.js +2 -0
- 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 +1 -0
- package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.js +1 -0
- package/src/lib/utils/hooks/useConnectWithEmail/useConnectWithEmail.cjs +1 -0
- package/src/lib/utils/hooks/useConnectWithEmail/useConnectWithEmail.js +1 -0
- 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 +1 -0
- package/src/lib/utils/hooks/useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.js +1 -0
- package/src/lib/utils/hooks/useFetchNetworkConfigurations/useFetchNetworkConfigurations.cjs +4 -1
- package/src/lib/utils/hooks/useFetchNetworkConfigurations/useFetchNetworkConfigurations.js +5 -2
- package/src/lib/utils/hooks/useFetchNonce/useFetchNonce.cjs +1 -0
- package/src/lib/utils/hooks/useFetchNonce/useFetchNonce.js +1 -0
- package/src/lib/utils/hooks/useFetchProjectSettings/useFetchProjectSettings.cjs +1 -0
- package/src/lib/utils/hooks/useFetchProjectSettings/useFetchProjectSettings.js +1 -0
- package/src/lib/utils/hooks/useFetchWalletsForChainsMap/useFetchWalletsForChainsMap.cjs +1 -0
- package/src/lib/utils/hooks/useFetchWalletsForChainsMap/useFetchWalletsForChainsMap.js +1 -0
- package/src/lib/utils/hooks/useGetSocialIcon/index.d.ts +1 -0
- package/src/lib/utils/hooks/useGetSocialIcon/useGetSocialIcon.cjs +14 -0
- package/src/lib/utils/hooks/useGetSocialIcon/useGetSocialIcon.d.ts +2 -0
- package/src/lib/utils/hooks/useGetSocialIcon/useGetSocialIcon.js +10 -0
- package/src/lib/utils/hooks/useHandleUnlinkWallet/useHandleUnlinkWallet.cjs +26 -2
- package/src/lib/utils/hooks/useHandleUnlinkWallet/useHandleUnlinkWallet.js +26 -2
- package/src/lib/utils/hooks/useIconThemeVariant/index.d.ts +1 -0
- package/src/lib/utils/hooks/useIconThemeVariant/useIconThemeVariant.cjs +15 -0
- package/src/lib/utils/hooks/useIconThemeVariant/useIconThemeVariant.d.ts +2 -0
- package/src/lib/utils/hooks/useIconThemeVariant/useIconThemeVariant.js +11 -0
- package/src/lib/utils/hooks/useKYCFlag/useKYCFlag.cjs +4 -4
- package/src/lib/utils/hooks/useKYCFlag/useKYCFlag.js +3 -3
- package/src/lib/utils/hooks/useMultiWalletFlag/useMultiWalletFlag.cjs +1 -0
- package/src/lib/utils/hooks/useMultiWalletFlag/useMultiWalletFlag.js +1 -0
- 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 +1 -0
- package/src/lib/utils/hooks/useRpcProviders/useRpcProviders.js +1 -0
- package/src/lib/utils/hooks/useUserDataForm/useUserDataForm.cjs +1 -0
- package/src/lib/utils/hooks/useUserDataForm/useUserDataForm.js +1 -0
- 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 +20 -11
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.d.ts +1 -1
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +20 -11
- package/src/lib/utils/hooks/useWalletConnectors/reconnectSocialWallet.cjs +39 -0
- package/src/lib/utils/hooks/useWalletConnectors/reconnectSocialWallet.d.ts +8 -0
- package/src/lib/utils/hooks/useWalletConnectors/reconnectSocialWallet.js +35 -0
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.cjs +50 -73
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.d.ts +2 -1
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.js +52 -75
- package/src/lib/utils/hooks/useWalletConnectors/utils/createLinkedWalletsFromWalletOptions/createLinkedWalletsFromWalletOptions.cjs +56 -0
- package/src/lib/utils/hooks/useWalletConnectors/utils/createLinkedWalletsFromWalletOptions/createLinkedWalletsFromWalletOptions.d.ts +8 -0
- package/src/lib/utils/hooks/useWalletConnectors/utils/createLinkedWalletsFromWalletOptions/createLinkedWalletsFromWalletOptions.js +52 -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 +88 -52
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.d.ts +4 -2
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.js +89 -53
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.cjs +14 -14
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.js +14 -14
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.cjs +51 -16
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.js +51 -16
- package/src/lib/utils/hooks/useWallets/useWallets.cjs +33 -27
- package/src/lib/utils/hooks/useWallets/useWallets.d.ts +5 -3
- package/src/lib/utils/hooks/useWallets/useWallets.js +34 -28
- package/src/lib/utils/hooks/useWalletsConnectionState/index.d.ts +1 -0
- package/src/lib/utils/hooks/useWalletsConnectionState/useWalletsConnectionState.cjs +47 -0
- package/src/lib/utils/hooks/useWalletsConnectionState/useWalletsConnectionState.d.ts +14 -0
- package/src/lib/utils/hooks/useWalletsConnectionState/useWalletsConnectionState.js +43 -0
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.cjs +9 -3
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.js +9 -3
- package/src/lib/views/CollectUserDataView/CollectUserDataView.cjs +13 -7
- package/src/lib/views/CollectUserDataView/CollectUserDataView.js +13 -7
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.cjs +9 -3
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.js +9 -3
- package/src/lib/views/CollectUserDataView/UserDataFields/index.cjs +8 -2
- package/src/lib/views/CollectUserDataView/UserDataFields/index.js +8 -2
- package/src/lib/views/CollectUserDataView/fieldsConfig.cjs +3 -2
- package/src/lib/views/CollectUserDataView/fieldsConfig.js +3 -2
- package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.cjs +9 -2
- package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.js +9 -2
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.cjs +11 -4
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.js +11 -4
- package/src/lib/views/EmailUpdate/EmailUpdate.cjs +10 -3
- package/src/lib/views/EmailUpdate/EmailUpdate.js +10 -3
- package/src/lib/views/EmailVerification/EmailVerification.cjs +17 -9
- package/src/lib/views/EmailVerification/EmailVerification.js +17 -9
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +7 -0
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +7 -0
- package/src/lib/views/LoginWithEmailView/LoginWithEmailView.cjs +11 -5
- package/src/lib/views/LoginWithEmailView/LoginWithEmailView.js +11 -5
- package/src/lib/views/LoginWithEmailView/components/ListItemButton/ListItemButton.cjs +9 -2
- package/src/lib/views/LoginWithEmailView/components/ListItemButton/ListItemButton.js +9 -2
- package/src/lib/views/LoginWithEmailView/components/LoginWithEmailForm/LoginWithEmailForm.cjs +8 -4
- package/src/lib/views/LoginWithEmailView/components/LoginWithEmailForm/LoginWithEmailForm.js +9 -5
- package/src/lib/views/LoginWithEmailView/components/LoginWithEmailWalletList/LoginWithEmailWalletList.cjs +12 -2
- package/src/lib/views/LoginWithEmailView/components/LoginWithEmailWalletList/LoginWithEmailWalletList.js +11 -1
- package/src/lib/views/LoginWithEmailView/components/SocialSignIn/SocialSignIn.cjs +18 -8
- package/src/lib/views/LoginWithEmailView/components/SocialSignIn/SocialSignIn.js +18 -8
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.cjs +27 -7
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +27 -7
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.cjs +9 -3
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.js +9 -3
- package/src/lib/views/NoAccess/NoAccess.cjs +25 -29
- package/src/lib/views/NoAccess/NoAccess.js +26 -30
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.cjs +8 -2
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.js +8 -2
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.cjs +9 -2
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.js +9 -2
- package/src/lib/views/PendingConnectView/PendingConnectView.cjs +10 -4
- package/src/lib/views/PendingConnectView/PendingConnectView.js +10 -4
- package/src/lib/views/PendingSignatureView/PendingSignatureView.cjs +14 -8
- package/src/lib/views/PendingSignatureView/PendingSignatureView.js +14 -8
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.cjs +9 -2
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.js +9 -2
- package/src/lib/views/QrCodeView/QrCodeView.cjs +9 -3
- package/src/lib/views/QrCodeView/QrCodeView.js +9 -3
- package/src/lib/views/SendBalanceView/SendBalanceView.cjs +117 -0
- package/src/lib/views/SendBalanceView/SendBalanceView.d.ts +13 -0
- package/src/lib/views/SendBalanceView/SendBalanceView.js +113 -0
- package/src/lib/views/SendBalanceView/index.d.ts +1 -0
- package/src/lib/views/SocialRedirectView/SocialRedirectView.cjs +15 -12
- package/src/lib/views/SocialRedirectView/SocialRedirectView.js +15 -12
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.cjs +62 -0
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.d.ts +2 -0
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.js +58 -0
- package/src/lib/views/SocialWrongAccountView/index.d.ts +1 -0
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.cjs +95 -0
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.d.ts +14 -0
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.js +91 -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/{modals/TransactionConfirmationModal → views/TransactionConfirmationView}/hooks/useTransactionData/useTransactionData.cjs +7 -0
- package/src/lib/{modals/TransactionConfirmationModal → views/TransactionConfirmationView}/hooks/useTransactionData/useTransactionData.js +7 -0
- package/src/lib/views/TransactionConfirmationView/index.d.ts +2 -0
- package/src/lib/views/WalletList/SearchInstead/SearchInstead.cjs +9 -2
- package/src/lib/views/WalletList/SearchInstead/SearchInstead.js +9 -2
- package/src/lib/views/WalletList/WalletList.cjs +10 -8
- package/src/lib/views/WalletList/WalletList.js +5 -3
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.cjs +8 -2
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.js +8 -2
- package/src/lib/views/WalletList/data.cjs +5 -5
- package/src/lib/views/WalletList/data.d.ts +2 -2
- package/src/lib/views/WalletList/data.js +5 -5
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.cjs +10 -4
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.js +10 -4
- package/src/lib/views/WalletUsedView/WalletUsedView.cjs +9 -3
- package/src/lib/views/WalletUsedView/WalletUsedView.js +9 -3
- package/src/lib/views/viewToComponentMap.cjs +2 -0
- package/src/lib/views/viewToComponentMap.js +2 -0
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.cjs +46 -0
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.d.ts +6 -0
- package/src/lib/widgets/DynamicBridgeWidget/DynamicBridgeWidget.js +42 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.cjs +22 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.d.ts +5 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeUserProfile/DynamicBridgeUserProfile.js +18 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNav/DynamicBridgeWidgetNav.cjs +9 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNav/DynamicBridgeWidgetNav.d.ts +2 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetNav/DynamicBridgeWidgetNav.js +5 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetViews/DynamicBridgeWidgetViews.cjs +27 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetViews/DynamicBridgeWidgetViews.d.ts +2 -0
- package/src/lib/widgets/DynamicBridgeWidget/components/DynamicBridgeWidgetViews/DynamicBridgeWidgetViews.js +19 -0
- package/src/lib/widgets/DynamicBridgeWidget/context/DynamicBridgeWidgetContext/DynamicBridgeWidgetContext.cjs +45 -0
- package/src/lib/widgets/DynamicBridgeWidget/context/DynamicBridgeWidgetContext/DynamicBridgeWidgetContext.d.ts +16 -0
- package/src/lib/widgets/DynamicBridgeWidget/context/DynamicBridgeWidgetContext/DynamicBridgeWidgetContext.js +35 -0
- package/src/lib/widgets/DynamicBridgeWidget/index.d.ts +1 -0
- package/src/lib/widgets/DynamicBridgeWidget/views/EditProfileView/EditProfileView.cjs +10 -0
- package/src/lib/widgets/DynamicBridgeWidget/views/EditProfileView/EditProfileView.d.ts +3 -0
- package/src/lib/widgets/DynamicBridgeWidget/views/EditProfileView/EditProfileView.js +5 -0
- package/src/lib/widgets/DynamicBridgeWidget/views/ProfileView/ProfileView.cjs +10 -0
- package/src/lib/widgets/DynamicBridgeWidget/views/ProfileView/ProfileView.d.ts +3 -0
- package/src/lib/widgets/DynamicBridgeWidget/views/ProfileView/ProfileView.js +5 -0
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.cjs +10 -0
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.d.ts +3 -0
- package/src/lib/widgets/DynamicBridgeWidget/views/WalletsView/WalletsView.js +5 -0
- package/src/lib/widgets/DynamicWidget/DynamicWidget.cjs +9 -2
- package/src/lib/widgets/DynamicWidget/DynamicWidget.js +9 -2
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.cjs +14 -6
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.js +14 -6
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs +80 -0
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.d.ts +2 -0
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js +76 -0
- package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.cjs +10 -3
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.js +10 -3
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.cjs +15 -30
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.d.ts +6 -2
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.js +16 -31
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.cjs +13 -5
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.js +13 -5
- 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 +13 -3
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.js +13 -3
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetCard/DynamicWidgetCard.cjs +3 -5
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetCard/DynamicWidgetCard.d.ts +4 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetCard/DynamicWidgetCard.js +3 -5
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs +9 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.d.ts +5 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js +9 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.cjs +42 -26
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.d.ts +5 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.js +44 -28
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetPrompts/DynamicWidgetPrompts.cjs +17 -8
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetPrompts/DynamicWidgetPrompts.js +17 -8
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetSwitcher/DynamicWidgetSwitcher.cjs +9 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetSwitcher/DynamicWidgetSwitcher.js +9 -2
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/DynamicWidgetVariants.cjs +2 -4
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/DynamicWidgetVariants.d.ts +4 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/DynamicWidgetVariants.js +2 -4
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.cjs +8 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.js +8 -1
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.cjs +13 -6
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.js +13 -6
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/types.d.ts +2 -0
- 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 +12 -7
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js +12 -7
- package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.cjs +10 -3
- package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.js +10 -3
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.cjs +21 -3
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.js +21 -3
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.cjs +9 -2
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.js +9 -2
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.cjs +10 -3
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.js +10 -3
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.cjs +34 -21
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.d.ts +2 -3
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.js +34 -21
- package/src/lib/widgets/DynamicWidget/components/WalletIconWithStatus/WalletIconWithStatus.cjs +6 -4
- package/src/lib/widgets/DynamicWidget/components/WalletIconWithStatus/WalletIconWithStatus.js +6 -4
- package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.cjs +43 -6
- package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.d.ts +2 -1
- package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.js +44 -7
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.cjs +9 -10
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.d.ts +1 -5
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.js +10 -11
- package/src/lib/widgets/DynamicWidget/hooks/useFetchBalance/useFetchBalance.cjs +5 -3
- package/src/lib/widgets/DynamicWidget/hooks/useFetchBalance/useFetchBalance.js +5 -3
- package/src/lib/widgets/DynamicWidget/hooks/useFetchChain/useFetchChain.cjs +1 -1
- package/src/lib/widgets/DynamicWidget/hooks/useFetchChain/useFetchChain.js +1 -1
- package/src/lib/widgets/DynamicWidget/{components/DefaultPendingSignModalContent/DefaultPendingSignModalContent.cjs → prompts/DefaultPromptModal/DefaultPromptModal.cjs} +15 -15
- package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.d.ts +13 -0
- package/src/lib/widgets/DynamicWidget/{components/DefaultPendingSignModalContent/DefaultPendingSignModalContent.js → prompts/DefaultPromptModal/DefaultPromptModal.js} +15 -15
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.cjs +10 -3
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.js +10 -3
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.cjs +9 -3
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.js +9 -3
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/PendingAccountSwitchModal.cjs +17 -40
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/PendingAccountSwitchModal.js +18 -41
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.cjs +45 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.d.ts +7 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.js +41 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.cjs +71 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.d.ts +8 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.js +67 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.cjs +61 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.d.ts +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.js +57 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.cjs +64 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.d.ts +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.js +60 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.cjs +68 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.d.ts +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.js +64 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/PendingSignModal.cjs +2 -33
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/PendingSignModal.js +2 -33
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.cjs +12 -8
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.js +13 -9
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.cjs +9 -3
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.js +9 -3
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.cjs +13 -8
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.js +13 -8
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.cjs +13 -7
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.js +13 -7
- package/src/lib/widgets/DynamicWidget/views/IndexView/IndexView.cjs +10 -3
- package/src/lib/widgets/DynamicWidget/views/IndexView/IndexView.js +10 -3
- package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.cjs +13 -5
- package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.js +12 -4
- 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/views/FundWalletView/FundWalletView.cjs +9 -2
- package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.js +9 -2
- 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/widgets/DynamicWidget/components/DefaultPendingSignModalContent/DefaultPendingSignModalContent.d.ts +0 -2
- package/src/lib/widgets/DynamicWidget/components/DefaultPendingSignModalContent/DefaultPendingSignModalContent.types.d.ts +0 -7
- package/src/lib/widgets/DynamicWidget/components/DotsMenuWrapper/DotsMenuWrapper.cjs +0 -68
- package/src/lib/widgets/DynamicWidget/components/DotsMenuWrapper/DotsMenuWrapper.js +0 -64
- package/src/lib/widgets/DynamicWidget/prompts/DetectedKnownSecondaryWalletModal/DetectedKnownSecondaryWalletModal.cjs +0 -59
- package/src/lib/widgets/DynamicWidget/prompts/DetectedKnownSecondaryWalletModal/DetectedKnownSecondaryWalletModal.d.ts +0 -6
- package/src/lib/widgets/DynamicWidget/prompts/DetectedKnownSecondaryWalletModal/DetectedKnownSecondaryWalletModal.js +0 -55
- package/src/lib/widgets/DynamicWidget/prompts/DetectedKnownSecondaryWalletModal/index.d.ts +0 -1
- /package/src/lib/utils/functions/{getEnabledUserProfileFields/getEnabledUserProfileFields.d.ts → getUserProfileFields/getUserProfileFields.d.ts} +0 -0
- /package/src/lib/{modals/TransactionConfirmationModal → views/TransactionConfirmationView}/hooks/index.d.ts +0 -0
- /package/src/lib/{modals/TransactionConfirmationModal → views/TransactionConfirmationView}/hooks/useTransactionData/index.d.ts +0 -0
- /package/src/lib/{modals/TransactionConfirmationModal → views/TransactionConfirmationView}/hooks/useTransactionData/useTransactionData.d.ts +0 -0
- /package/src/lib/widgets/DynamicWidget/{components → prompts/PendingSignModal}/DefaultPendingSignModalContent/index.d.ts +0 -0
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import { __awaiter } from '../../../../_virtual/_tslib.js';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
|
-
import { createContext, useContext, useState, useEffect } from 'react';
|
|
3
|
+
import { createContext, useContext, useState, useMemo, useCallback, useEffect } from 'react';
|
|
4
4
|
import { isSocialWalletConnector } from '@dynamic-labs/wallet-connector-core';
|
|
5
5
|
import { useInternalDynamicContext } from '../DynamicContext/useInternalDynamicContext.js';
|
|
6
6
|
import { useViewContext } from '../ViewContext/ViewContext.js';
|
|
7
7
|
import '@dynamic-labs/utils';
|
|
8
8
|
import '@dynamic-labs/sdk-api';
|
|
9
9
|
import '../../config/ApiEndpoint.js';
|
|
10
|
-
import '../../shared/logger.js';
|
|
10
|
+
import { logger } from '../../shared/logger.js';
|
|
11
|
+
import '../../config/LSSuffix.js';
|
|
11
12
|
import '@dynamic-labs/iconic';
|
|
12
13
|
import '../../utils/constants/colors.js';
|
|
13
14
|
import 'ethers';
|
|
14
15
|
import '../../shared/consts/index.js';
|
|
15
16
|
import '@dynamic-labs/multi-wallet';
|
|
17
|
+
import { getReferencedAccount } from '../../utils/functions/getReferencedAccount/getReferencedAccount.js';
|
|
16
18
|
import '@dynamic-labs/rpc-providers';
|
|
17
19
|
import { useVerifyWallet } from '../../utils/hooks/useVerifyWallet/useVerifyWallet.js';
|
|
18
20
|
import 'react-dom';
|
|
@@ -24,15 +26,21 @@ import '../../components/Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
|
24
26
|
import '../../components/Transition/OpacityTransition/OpacityTransition.js';
|
|
25
27
|
import '../../components/IconButton/IconButton.js';
|
|
26
28
|
import '../../components/Alert/Alert.js';
|
|
29
|
+
import '@dynamic-labs/wallet-book';
|
|
30
|
+
import '../../components/Popper/Popper/Popper.js';
|
|
31
|
+
import '../../components/Popper/PopperContext/PopperContext.js';
|
|
32
|
+
import 'formik';
|
|
33
|
+
import 'yup';
|
|
27
34
|
import '../MockContext/MockContext.js';
|
|
28
|
-
import '../ErrorContext/ErrorContext.js';
|
|
35
|
+
import { useErrorContext } from '../ErrorContext/ErrorContext.js';
|
|
29
36
|
import '../CaptchaContext/CaptchaContext.js';
|
|
30
37
|
import '../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
31
38
|
|
|
32
39
|
const SocialRedirectContext = createContext(undefined);
|
|
33
40
|
const SocialRedirectContextProvider = ({ children, }) => {
|
|
34
41
|
var _a, _b;
|
|
35
|
-
const { setShowAuthFlow, wallets, setSelectedWalletConnector, walletUiUtils, consumeNonce, displayTermsOfService, environmentId, projectSettings, setIsSingleWalletAccount, } = useInternalDynamicContext();
|
|
42
|
+
const { setShowAuthFlow, wallets, setSelectedWalletConnector, walletUiUtils, consumeNonce, displayTermsOfService, environmentId, projectSettings, setIsSingleWalletAccount, setShowDynamicUserProfile, isAuthenticated, setPrimaryWalletId, secondaryWallets, sdkHasLoaded, authToken, } = useInternalDynamicContext();
|
|
43
|
+
const { setErrorMessage } = useErrorContext();
|
|
36
44
|
const { setView } = useViewContext();
|
|
37
45
|
const verifyWallet = useVerifyWallet({
|
|
38
46
|
consumeNonce,
|
|
@@ -50,52 +58,128 @@ const SocialRedirectContextProvider = ({ children, }) => {
|
|
|
50
58
|
.find(isSocialWalletConnector);
|
|
51
59
|
const [redirectStatus, setRedirectStatus] = useState('idle');
|
|
52
60
|
const [socialProvider, setSocialProvider] = useState();
|
|
61
|
+
const wallet = secondaryWallets.find((wallet) => wallet.connector.key === (socialWalletConnector === null || socialWalletConnector === void 0 ? void 0 : socialWalletConnector.key));
|
|
62
|
+
const socialAccount = useMemo(() => (wallet ? getReferencedAccount(authToken, wallet.id) : undefined), [authToken, wallet]);
|
|
63
|
+
const handleError = useCallback((message) => {
|
|
64
|
+
logger.error(message);
|
|
65
|
+
if (isAuthenticated) {
|
|
66
|
+
setShowAuthFlow(false);
|
|
67
|
+
setShowDynamicUserProfile(true);
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
setShowAuthFlow(true);
|
|
71
|
+
setView('wallet-list');
|
|
72
|
+
setErrorMessage('-1');
|
|
73
|
+
}
|
|
74
|
+
}, [
|
|
75
|
+
isAuthenticated,
|
|
76
|
+
setErrorMessage,
|
|
77
|
+
setShowAuthFlow,
|
|
78
|
+
setShowDynamicUserProfile,
|
|
79
|
+
setView,
|
|
80
|
+
]);
|
|
53
81
|
useEffect(() => {
|
|
54
|
-
var _a;
|
|
55
|
-
if (!projectSettings) {
|
|
82
|
+
var _a, _b;
|
|
83
|
+
if (!projectSettings || !socialWalletConnector || !sdkHasLoaded) {
|
|
84
|
+
// todo: we are competing with the useEffect in ViewContext.
|
|
85
|
+
// once that is cleaned up, we can remove this code
|
|
86
|
+
const params = new URLSearchParams(window.location.search);
|
|
87
|
+
if (params.has('magic_oauth_request_id')) {
|
|
88
|
+
setView('social-redirect-view');
|
|
89
|
+
setShowAuthFlow(true);
|
|
90
|
+
}
|
|
56
91
|
return;
|
|
57
92
|
}
|
|
58
|
-
|
|
93
|
+
const params = new URLSearchParams(window.location.search);
|
|
94
|
+
if (params.has('error') && params.has('provider')) {
|
|
95
|
+
const errorDescription = params.get('error_description');
|
|
96
|
+
handleError(errorDescription !== null && errorDescription !== void 0 ? errorDescription : 'Unknown error');
|
|
97
|
+
// calling this to clear the relevant query params
|
|
98
|
+
(_a = socialWalletConnector.getSession) === null || _a === void 0 ? void 0 : _a.call(socialWalletConnector);
|
|
59
99
|
return;
|
|
60
100
|
}
|
|
61
|
-
const params = new URLSearchParams(window.location.search);
|
|
62
101
|
if (params.has('magic_oauth_request_id')) {
|
|
63
102
|
const providerFromParams = params.get('provider');
|
|
64
103
|
setSocialProvider(providerFromParams);
|
|
65
104
|
setRedirectStatus('loading');
|
|
66
105
|
setView('social-redirect-view');
|
|
67
106
|
setShowAuthFlow(true);
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
107
|
+
if (!isAuthenticated) {
|
|
108
|
+
setSelectedWalletConnector(socialWalletConnector);
|
|
109
|
+
}
|
|
110
|
+
(_b = socialWalletConnector
|
|
111
|
+
.getSession) === null || _b === void 0 ? void 0 : _b.call(socialWalletConnector).then((session) => __awaiter(void 0, void 0, void 0, function* () {
|
|
112
|
+
/**
|
|
113
|
+
* If the user is already authenticated, that means that they are in the process
|
|
114
|
+
* of setting their social wallet as their primary wallet. At this point, they
|
|
115
|
+
* have successfully re-authenticated with the social provider. We can now finish
|
|
116
|
+
* the setPrimaryWallet flow
|
|
117
|
+
*/
|
|
118
|
+
if (isAuthenticated) {
|
|
119
|
+
if (!socialAccount) {
|
|
120
|
+
throw new Error('Social account not found');
|
|
121
|
+
}
|
|
122
|
+
if (socialAccount.oauthAccountId === session.oauthId) {
|
|
123
|
+
// justification: socialAccount is defined if and only if wallet is also defined
|
|
124
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
125
|
+
setPrimaryWalletId(wallet.id);
|
|
126
|
+
setShowAuthFlow(false);
|
|
127
|
+
setShowDynamicUserProfile(true);
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
yield socialWalletConnector.endSession();
|
|
131
|
+
setView('social-wrong-account');
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
const address = yield socialWalletConnector.fetchPublicAddress();
|
|
136
|
+
walletUiUtils.disabledConfirmationOnce();
|
|
137
|
+
yield verifyWallet({
|
|
138
|
+
oauth: {
|
|
139
|
+
accessToken: session.accessToken,
|
|
140
|
+
didToken: session.didToken,
|
|
141
|
+
provider: providerFromParams,
|
|
142
|
+
},
|
|
143
|
+
/**
|
|
144
|
+
* justification: if the user just successfully authenticated their social,
|
|
145
|
+
* then the social connector must return an address
|
|
146
|
+
*/
|
|
147
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
148
|
+
publicWalletAddress: address,
|
|
149
|
+
walletConnector: socialWalletConnector,
|
|
150
|
+
});
|
|
74
151
|
}
|
|
75
|
-
walletUiUtils.enableInternalSign();
|
|
76
|
-
yield verifyWallet({
|
|
77
|
-
publicWalletAddress: address,
|
|
78
|
-
walletConnector: socialWalletConnector,
|
|
79
|
-
});
|
|
80
152
|
setSocialProvider(undefined);
|
|
81
153
|
setRedirectStatus('success');
|
|
82
|
-
})).catch(() => {
|
|
154
|
+
})).catch((error) => {
|
|
155
|
+
setSocialProvider(undefined);
|
|
83
156
|
setRedirectStatus('error');
|
|
157
|
+
handleError(error);
|
|
84
158
|
});
|
|
85
159
|
}
|
|
86
160
|
}, [
|
|
161
|
+
socialAccount,
|
|
162
|
+
authToken,
|
|
163
|
+
isAuthenticated,
|
|
87
164
|
projectSettings,
|
|
165
|
+
sdkHasLoaded,
|
|
166
|
+
secondaryWallets,
|
|
167
|
+
setPrimaryWalletId,
|
|
88
168
|
setSelectedWalletConnector,
|
|
89
169
|
setShowAuthFlow,
|
|
170
|
+
setShowDynamicUserProfile,
|
|
90
171
|
setView,
|
|
91
172
|
socialWalletConnector,
|
|
92
173
|
verifyWallet,
|
|
93
174
|
walletUiUtils,
|
|
175
|
+
wallet,
|
|
176
|
+
handleError,
|
|
94
177
|
]);
|
|
95
178
|
return (jsx(SocialRedirectContext.Provider, Object.assign({ value: {
|
|
96
179
|
enabledSocialProviders,
|
|
97
180
|
redirectStatus,
|
|
98
181
|
setSocialProvider,
|
|
182
|
+
socialAccount,
|
|
99
183
|
socialProvider,
|
|
100
184
|
socialWalletConnector,
|
|
101
185
|
} }, { children: children })));
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
require('@dynamic-labs/sdk-api');
|
|
6
6
|
require('../../shared/logger.cjs');
|
|
7
|
+
require('../../config/LSSuffix.cjs');
|
|
7
8
|
require('@dynamic-labs/iconic');
|
|
8
9
|
require('@dynamic-labs/wallet-connector-core');
|
|
9
10
|
require('react/jsx-runtime');
|
|
@@ -22,6 +23,24 @@ const themesData = {
|
|
|
22
23
|
customColor: '',
|
|
23
24
|
template: 'default',
|
|
24
25
|
themes: {
|
|
26
|
+
auto: {
|
|
27
|
+
colors: {
|
|
28
|
+
accent_1: '#2C303A',
|
|
29
|
+
accent_2: '#3C414D',
|
|
30
|
+
accent_3: '#4C525F',
|
|
31
|
+
background: '#15181F',
|
|
32
|
+
border: '1px solid #2C303A',
|
|
33
|
+
error_1: 'rgba(255, 106, 106, 0.2)',
|
|
34
|
+
error_2: '#FF6A6A',
|
|
35
|
+
footer: '#2C303A',
|
|
36
|
+
primary: '#15181F',
|
|
37
|
+
secondary: '#2C303A',
|
|
38
|
+
ternary: '#2660FF',
|
|
39
|
+
textPrimary: '#FFF',
|
|
40
|
+
textSecondary: '#ACACB9',
|
|
41
|
+
},
|
|
42
|
+
name: 'auto',
|
|
43
|
+
},
|
|
25
44
|
dark: {
|
|
26
45
|
colors: {
|
|
27
46
|
accent_1: '#2C303A',
|
|
@@ -58,24 +77,6 @@ const themesData = {
|
|
|
58
77
|
},
|
|
59
78
|
name: 'light',
|
|
60
79
|
},
|
|
61
|
-
auto: {
|
|
62
|
-
colors: {
|
|
63
|
-
accent_1: '#2C303A',
|
|
64
|
-
accent_2: '#3C414D',
|
|
65
|
-
accent_3: '#4C525F',
|
|
66
|
-
background: '#15181F',
|
|
67
|
-
border: '1px solid #2C303A',
|
|
68
|
-
error_1: 'rgba(255, 106, 106, 0.2)',
|
|
69
|
-
error_2: '#FF6A6A',
|
|
70
|
-
footer: '#2C303A',
|
|
71
|
-
primary: '#15181F',
|
|
72
|
-
secondary: '#2C303A',
|
|
73
|
-
ternary: '#2660FF',
|
|
74
|
-
textPrimary: '#FFF',
|
|
75
|
-
textSecondary: '#ACACB9',
|
|
76
|
-
},
|
|
77
|
-
name: 'auto',
|
|
78
|
-
},
|
|
79
80
|
},
|
|
80
81
|
view: 'extended',
|
|
81
82
|
walletColor: {
|
|
@@ -7,7 +7,7 @@ export declare const themesData: {
|
|
|
7
7
|
customColor: string;
|
|
8
8
|
template: string;
|
|
9
9
|
themes: {
|
|
10
|
-
|
|
10
|
+
auto: {
|
|
11
11
|
colors: {
|
|
12
12
|
accent_1: string;
|
|
13
13
|
accent_2: string;
|
|
@@ -25,7 +25,7 @@ export declare const themesData: {
|
|
|
25
25
|
};
|
|
26
26
|
name: string;
|
|
27
27
|
};
|
|
28
|
-
|
|
28
|
+
dark: {
|
|
29
29
|
colors: {
|
|
30
30
|
accent_1: string;
|
|
31
31
|
accent_2: string;
|
|
@@ -43,7 +43,7 @@ export declare const themesData: {
|
|
|
43
43
|
};
|
|
44
44
|
name: string;
|
|
45
45
|
};
|
|
46
|
-
|
|
46
|
+
light: {
|
|
47
47
|
colors: {
|
|
48
48
|
accent_1: string;
|
|
49
49
|
accent_2: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import '@dynamic-labs/sdk-api';
|
|
2
2
|
import '../../shared/logger.js';
|
|
3
|
+
import '../../config/LSSuffix.js';
|
|
3
4
|
import '@dynamic-labs/iconic';
|
|
4
5
|
import '@dynamic-labs/wallet-connector-core';
|
|
5
6
|
import 'react/jsx-runtime';
|
|
@@ -18,6 +19,24 @@ const themesData = {
|
|
|
18
19
|
customColor: '',
|
|
19
20
|
template: 'default',
|
|
20
21
|
themes: {
|
|
22
|
+
auto: {
|
|
23
|
+
colors: {
|
|
24
|
+
accent_1: '#2C303A',
|
|
25
|
+
accent_2: '#3C414D',
|
|
26
|
+
accent_3: '#4C525F',
|
|
27
|
+
background: '#15181F',
|
|
28
|
+
border: '1px solid #2C303A',
|
|
29
|
+
error_1: 'rgba(255, 106, 106, 0.2)',
|
|
30
|
+
error_2: '#FF6A6A',
|
|
31
|
+
footer: '#2C303A',
|
|
32
|
+
primary: '#15181F',
|
|
33
|
+
secondary: '#2C303A',
|
|
34
|
+
ternary: '#2660FF',
|
|
35
|
+
textPrimary: '#FFF',
|
|
36
|
+
textSecondary: '#ACACB9',
|
|
37
|
+
},
|
|
38
|
+
name: 'auto',
|
|
39
|
+
},
|
|
21
40
|
dark: {
|
|
22
41
|
colors: {
|
|
23
42
|
accent_1: '#2C303A',
|
|
@@ -54,24 +73,6 @@ const themesData = {
|
|
|
54
73
|
},
|
|
55
74
|
name: 'light',
|
|
56
75
|
},
|
|
57
|
-
auto: {
|
|
58
|
-
colors: {
|
|
59
|
-
accent_1: '#2C303A',
|
|
60
|
-
accent_2: '#3C414D',
|
|
61
|
-
accent_3: '#4C525F',
|
|
62
|
-
background: '#15181F',
|
|
63
|
-
border: '1px solid #2C303A',
|
|
64
|
-
error_1: 'rgba(255, 106, 106, 0.2)',
|
|
65
|
-
error_2: '#FF6A6A',
|
|
66
|
-
footer: '#2C303A',
|
|
67
|
-
primary: '#15181F',
|
|
68
|
-
secondary: '#2C303A',
|
|
69
|
-
ternary: '#2660FF',
|
|
70
|
-
textPrimary: '#FFF',
|
|
71
|
-
textSecondary: '#ACACB9',
|
|
72
|
-
},
|
|
73
|
-
name: 'auto',
|
|
74
|
-
},
|
|
75
76
|
},
|
|
76
77
|
view: 'extended',
|
|
77
78
|
walletColor: {
|
|
@@ -4,25 +4,34 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
var React = require('react');
|
|
7
|
+
var usePrevious = require('../../utils/hooks/usePrevious/usePrevious.cjs');
|
|
7
8
|
|
|
8
9
|
const ViewContext = React.createContext(undefined);
|
|
9
|
-
const ViewContextProvider = ({ children,
|
|
10
|
-
const [view, setView] = React.useState(
|
|
10
|
+
const ViewContextProvider = ({ children, initialView = 'wallet-list' }) => {
|
|
11
|
+
const [view, setView] = React.useState(initialView);
|
|
12
|
+
const previousInitialView = usePrevious.usePrevious(initialView);
|
|
13
|
+
const goToInitialView = React.useCallback(() => {
|
|
14
|
+
setView(initialView);
|
|
15
|
+
}, [initialView]);
|
|
11
16
|
React.useEffect(() => {
|
|
12
|
-
if (
|
|
17
|
+
if (!initialView)
|
|
13
18
|
return;
|
|
14
|
-
|
|
15
|
-
if (
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
const isInInitialView = view === previousInitialView || !previousInitialView;
|
|
20
|
+
if (!isInInitialView)
|
|
21
|
+
return;
|
|
22
|
+
setView((currentView) => {
|
|
23
|
+
const wasViewSetDuringRender = currentView !== previousInitialView;
|
|
24
|
+
if (wasViewSetDuringRender) {
|
|
25
|
+
return currentView;
|
|
26
|
+
}
|
|
27
|
+
return initialView;
|
|
28
|
+
});
|
|
29
|
+
}, [initialView, view]);
|
|
22
30
|
const value = React.useMemo(() => ({
|
|
31
|
+
goToInitialView,
|
|
23
32
|
setView,
|
|
24
33
|
view,
|
|
25
|
-
}), [view]);
|
|
34
|
+
}), [view, goToInitialView]);
|
|
26
35
|
return jsxRuntime.jsx(ViewContext.Provider, Object.assign({ value: value }, { children: children }));
|
|
27
36
|
};
|
|
28
37
|
const useViewContext = () => {
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export type ViewType = 'captcha' | 'chainalysis-blocked-wallet' | 'collect-user-data' | 'collect-user-data-login-with-email' | 'login-with-email-or-wallet-full-wallet-list' | 'login-with-email-or-wallet' | 'login-with-email-verification' | 'network-not-supported' | 'network-not-supported-manual' | 'no-access' | 'no-qr-not-installed' | 'pending-connect' | 'pending-signature-without-back-button' | 'pending-signature' | 'qr-code' | 'update-email' | 'verify-email' | 'wallet-connect-mobile-wallets-list' | 'wallet-list' | 'wallet-sign' | 'wallet-used' | 'wait-for-email-confirmation-view' | 'email-wallet-otp-verification-view' | 'social-redirect-view';
|
|
3
|
-
export
|
|
1
|
+
import { SetStateAction, Dispatch, PropsWithChildren, FC } from 'react';
|
|
2
|
+
export type ViewType = 'captcha' | 'chainalysis-blocked-wallet' | 'collect-user-data' | 'collect-user-data-login-with-email' | 'login-with-email-or-wallet-full-wallet-list' | 'login-with-email-or-wallet' | 'login-with-email-verification' | 'network-not-supported' | 'network-not-supported-manual' | 'no-access' | 'no-qr-not-installed' | 'pending-connect' | 'pending-signature-without-back-button' | 'pending-signature' | 'qr-code' | 'update-email' | 'verify-email' | 'wallet-connect-mobile-wallets-list' | 'wallet-list' | 'wallet-sign' | 'wallet-used' | 'wait-for-email-confirmation-view' | 'email-wallet-otp-verification-view' | 'social-redirect-view' | 'social-wrong-account';
|
|
3
|
+
export type ViewContextProps = {
|
|
4
4
|
setView: Dispatch<SetStateAction<ViewType>>;
|
|
5
5
|
view: ViewType;
|
|
6
|
-
|
|
6
|
+
goToInitialView: () => void;
|
|
7
|
+
};
|
|
8
|
+
type ViewContextProviderProps = {
|
|
9
|
+
initialView?: ViewType;
|
|
10
|
+
};
|
|
7
11
|
export declare const ViewContext: import("react").Context<ViewContextProps | undefined>;
|
|
8
|
-
export declare const ViewContextProvider:
|
|
9
|
-
children: ReactNode;
|
|
10
|
-
loginWithEmail: boolean;
|
|
11
|
-
}) => JSX.Element;
|
|
12
|
+
export declare const ViewContextProvider: FC<PropsWithChildren<ViewContextProviderProps>>;
|
|
12
13
|
export declare const useViewContext: () => ViewContextProps;
|
|
14
|
+
export {};
|
|
@@ -1,24 +1,33 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { createContext, useState, useEffect, useMemo, useContext } from 'react';
|
|
2
|
+
import { createContext, useState, useCallback, useEffect, useMemo, useContext } from 'react';
|
|
3
|
+
import { usePrevious } from '../../utils/hooks/usePrevious/usePrevious.js';
|
|
3
4
|
|
|
4
5
|
const ViewContext = createContext(undefined);
|
|
5
|
-
const ViewContextProvider = ({ children,
|
|
6
|
-
const [view, setView] = useState(
|
|
6
|
+
const ViewContextProvider = ({ children, initialView = 'wallet-list' }) => {
|
|
7
|
+
const [view, setView] = useState(initialView);
|
|
8
|
+
const previousInitialView = usePrevious(initialView);
|
|
9
|
+
const goToInitialView = useCallback(() => {
|
|
10
|
+
setView(initialView);
|
|
11
|
+
}, [initialView]);
|
|
7
12
|
useEffect(() => {
|
|
8
|
-
if (
|
|
13
|
+
if (!initialView)
|
|
9
14
|
return;
|
|
10
|
-
|
|
11
|
-
if (
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
const isInInitialView = view === previousInitialView || !previousInitialView;
|
|
16
|
+
if (!isInInitialView)
|
|
17
|
+
return;
|
|
18
|
+
setView((currentView) => {
|
|
19
|
+
const wasViewSetDuringRender = currentView !== previousInitialView;
|
|
20
|
+
if (wasViewSetDuringRender) {
|
|
21
|
+
return currentView;
|
|
22
|
+
}
|
|
23
|
+
return initialView;
|
|
24
|
+
});
|
|
25
|
+
}, [initialView, view]);
|
|
18
26
|
const value = useMemo(() => ({
|
|
27
|
+
goToInitialView,
|
|
19
28
|
setView,
|
|
20
29
|
view,
|
|
21
|
-
}), [view]);
|
|
30
|
+
}), [view, goToInitialView]);
|
|
22
31
|
return jsx(ViewContext.Provider, Object.assign({ value: value }, { children: children }));
|
|
23
32
|
};
|
|
24
33
|
const useViewContext = () => {
|
package/src/lib/data/api.cjs
CHANGED
|
@@ -8,6 +8,7 @@ var sdkApi$1 = require('@dynamic-labs/sdk-api');
|
|
|
8
8
|
var version = require('../../version.cjs');
|
|
9
9
|
var ApiEndpoint = require('../config/ApiEndpoint.cjs');
|
|
10
10
|
var logger = require('../shared/logger.cjs');
|
|
11
|
+
require('../config/LSSuffix.cjs');
|
|
11
12
|
require('@dynamic-labs/iconic');
|
|
12
13
|
require('@dynamic-labs/wallet-connector-core');
|
|
13
14
|
require('react/jsx-runtime');
|
|
@@ -123,10 +124,11 @@ const revokeSession = ({ environmentId, sessionId, }, userJwt) => _tslib.__await
|
|
|
123
124
|
logger.logger.error(Error(body.error.message));
|
|
124
125
|
}
|
|
125
126
|
});
|
|
126
|
-
const linkWallet = (environmentId, { messageToSign, signedMessage, publicWalletAddress, chain, walletName, walletProvider, }, userJwt) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
127
|
+
const linkWallet = (environmentId, { messageToSign, network, signedMessage, publicWalletAddress, chain, walletName, walletProvider, }, userJwt) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
127
128
|
const verifyRequest = sdkApi$1.VerifyRequestFromJSON({
|
|
128
129
|
chain,
|
|
129
130
|
messageToSign,
|
|
131
|
+
network,
|
|
130
132
|
publicWalletAddress,
|
|
131
133
|
signedMessage,
|
|
132
134
|
walletName,
|
|
@@ -226,11 +228,13 @@ const createVisit = ({ authMode, chain, environmentId, walletProvider, publicWal
|
|
|
226
228
|
logger.logger.error(error);
|
|
227
229
|
}
|
|
228
230
|
});
|
|
229
|
-
const verifyWallet = (environmentId, { messageToSign, signedMessage, publicWalletAddress, chain, walletName, walletProvider, captchaToken, }) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
231
|
+
const verifyWallet = (environmentId, { messageToSign, signedMessage, publicWalletAddress, chain, walletName, walletProvider, captchaToken, network, oauth, }) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
230
232
|
const verifyRequest = sdkApi$1.VerifyRequestFromJSON({
|
|
231
233
|
captchaToken,
|
|
232
234
|
chain,
|
|
233
235
|
messageToSign,
|
|
236
|
+
network,
|
|
237
|
+
oauth,
|
|
234
238
|
publicWalletAddress,
|
|
235
239
|
signedMessage,
|
|
236
240
|
walletName,
|
package/src/lib/data/api.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export declare const revokeSession: ({ environmentId, sessionId, }: {
|
|
|
24
24
|
environmentId: string;
|
|
25
25
|
sessionId: string;
|
|
26
26
|
}, userJwt: string) => Promise<void>;
|
|
27
|
-
export declare const linkWallet: (environmentId: string, { messageToSign, signedMessage, publicWalletAddress, chain, walletName, walletProvider, }: VerifyWallet, userJwt: string) => Promise<string | undefined>;
|
|
27
|
+
export declare const linkWallet: (environmentId: string, { messageToSign, network, signedMessage, publicWalletAddress, chain, walletName, walletProvider, }: VerifyWallet, userJwt: string) => Promise<string | undefined>;
|
|
28
28
|
export declare const unlinkWallet: ({ environmentId, primaryWalletId, walletId, }: {
|
|
29
29
|
environmentId: string;
|
|
30
30
|
primaryWalletId: string | undefined;
|
|
@@ -42,7 +42,7 @@ export declare const createVisit: ({ authMode, chain, environmentId, walletProvi
|
|
|
42
42
|
walletName: string;
|
|
43
43
|
walletProvider: string;
|
|
44
44
|
}) => Promise<void | undefined>;
|
|
45
|
-
export declare const verifyWallet: (environmentId: string, { messageToSign, signedMessage, publicWalletAddress, chain, walletName, walletProvider, captchaToken, }: VerifyWallet) => Promise<string | undefined>;
|
|
45
|
+
export declare const verifyWallet: (environmentId: string, { messageToSign, signedMessage, publicWalletAddress, chain, walletName, walletProvider, captchaToken, network, oauth, }: VerifyWallet) => Promise<string | undefined>;
|
|
46
46
|
export declare const fetchNetworkSettings: (environmentId: string) => Promise<NetworkConfigurationResponse[] | undefined>;
|
|
47
47
|
export declare const fetchProjectSettings: (environmentId: string) => Promise<ProjectSettings | undefined>;
|
|
48
48
|
export declare const updateUserProfileFields: (jwt: string | undefined, environmentId: string, fields: UserFields) => Promise<UpdateSelfResponse>;
|
package/src/lib/data/api.js
CHANGED
|
@@ -4,6 +4,7 @@ import { SDKApi, Configuration, VerifyRequestFromJSON, ChainEnum, WalletProvider
|
|
|
4
4
|
import { VERSION, API_VERSION } from '../../version.js';
|
|
5
5
|
import ApiEndpoint from '../config/ApiEndpoint.js';
|
|
6
6
|
import { logger } from '../shared/logger.js';
|
|
7
|
+
import '../config/LSSuffix.js';
|
|
7
8
|
import '@dynamic-labs/iconic';
|
|
8
9
|
import '@dynamic-labs/wallet-connector-core';
|
|
9
10
|
import 'react/jsx-runtime';
|
|
@@ -119,10 +120,11 @@ const revokeSession = ({ environmentId, sessionId, }, userJwt) => __awaiter(void
|
|
|
119
120
|
logger.error(Error(body.error.message));
|
|
120
121
|
}
|
|
121
122
|
});
|
|
122
|
-
const linkWallet = (environmentId, { messageToSign, signedMessage, publicWalletAddress, chain, walletName, walletProvider, }, userJwt) => __awaiter(void 0, void 0, void 0, function* () {
|
|
123
|
+
const linkWallet = (environmentId, { messageToSign, network, signedMessage, publicWalletAddress, chain, walletName, walletProvider, }, userJwt) => __awaiter(void 0, void 0, void 0, function* () {
|
|
123
124
|
const verifyRequest = VerifyRequestFromJSON({
|
|
124
125
|
chain,
|
|
125
126
|
messageToSign,
|
|
127
|
+
network,
|
|
126
128
|
publicWalletAddress,
|
|
127
129
|
signedMessage,
|
|
128
130
|
walletName,
|
|
@@ -222,11 +224,13 @@ const createVisit = ({ authMode, chain, environmentId, walletProvider, publicWal
|
|
|
222
224
|
logger.error(error);
|
|
223
225
|
}
|
|
224
226
|
});
|
|
225
|
-
const verifyWallet = (environmentId, { messageToSign, signedMessage, publicWalletAddress, chain, walletName, walletProvider, captchaToken, }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
227
|
+
const verifyWallet = (environmentId, { messageToSign, signedMessage, publicWalletAddress, chain, walletName, walletProvider, captchaToken, network, oauth, }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
226
228
|
const verifyRequest = VerifyRequestFromJSON({
|
|
227
229
|
captchaToken,
|
|
228
230
|
chain,
|
|
229
231
|
messageToSign,
|
|
232
|
+
network,
|
|
233
|
+
oauth,
|
|
230
234
|
publicWalletAddress,
|
|
231
235
|
signedMessage,
|
|
232
236
|
walletName,
|
|
@@ -14,6 +14,7 @@ var VerticalDrawerTransition = require('../../components/Transition/VerticalDraw
|
|
|
14
14
|
var classNames = require('../../utils/functions/classNames/classNames.cjs');
|
|
15
15
|
require('@dynamic-labs/sdk-api');
|
|
16
16
|
require('../../shared/logger.cjs');
|
|
17
|
+
require('../../config/LSSuffix.cjs');
|
|
17
18
|
require('@dynamic-labs/iconic');
|
|
18
19
|
require('@dynamic-labs/wallet-connector-core');
|
|
19
20
|
require('@dynamic-labs/utils');
|
|
@@ -29,14 +30,20 @@ require('react-focus-lock');
|
|
|
29
30
|
require('../../config/ApiEndpoint.cjs');
|
|
30
31
|
require('@dynamic-labs/rpc-providers');
|
|
31
32
|
require('../../context/ErrorContext/ErrorContext.cjs');
|
|
33
|
+
require('../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
34
|
+
require('../../components/IconButton/IconButton.cjs');
|
|
35
|
+
require('@dynamic-labs/wallet-book');
|
|
36
|
+
var AnimatePresence = require('../../components/AnimatePresence/AnimatePresence.cjs');
|
|
37
|
+
require('../../components/Alert/Alert.cjs');
|
|
32
38
|
var MockContext = require('../../context/MockContext/MockContext.cjs');
|
|
33
39
|
require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
34
40
|
require('../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
35
|
-
require('../../components/IconButton/IconButton.cjs');
|
|
36
41
|
var VerticalAccordion = require('../../components/Accordion/components/VerticalAccordion/VerticalAccordion.cjs');
|
|
37
42
|
var AccordionItem = require('../../components/Accordion/components/AccordionItem/AccordionItem.cjs');
|
|
38
|
-
require('../../components/
|
|
39
|
-
|
|
43
|
+
require('../../components/Popper/Popper/Popper.cjs');
|
|
44
|
+
require('../../components/Popper/PopperContext/PopperContext.cjs');
|
|
45
|
+
require('formik');
|
|
46
|
+
require('yup');
|
|
40
47
|
var isUserLinkingWallet = require('../../shared/utils/functions/isUserLinkingWallet/isUserLinkingWallet.cjs');
|
|
41
48
|
require('../../components/OverlayCard/OverlayCard.context.cjs');
|
|
42
49
|
var OverlayCardTarget = require('../../components/OverlayCard/OverlayCardTarget.cjs');
|
|
@@ -10,6 +10,7 @@ import { VerticalDrawerTransition } from '../../components/Transition/VerticalDr
|
|
|
10
10
|
import { classNames } from '../../utils/functions/classNames/classNames.js';
|
|
11
11
|
import '@dynamic-labs/sdk-api';
|
|
12
12
|
import '../../shared/logger.js';
|
|
13
|
+
import '../../config/LSSuffix.js';
|
|
13
14
|
import '@dynamic-labs/iconic';
|
|
14
15
|
import '@dynamic-labs/wallet-connector-core';
|
|
15
16
|
import '@dynamic-labs/utils';
|
|
@@ -25,14 +26,20 @@ import 'react-focus-lock';
|
|
|
25
26
|
import '../../config/ApiEndpoint.js';
|
|
26
27
|
import '@dynamic-labs/rpc-providers';
|
|
27
28
|
import '../../context/ErrorContext/ErrorContext.js';
|
|
29
|
+
import '../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
30
|
+
import '../../components/IconButton/IconButton.js';
|
|
31
|
+
import '@dynamic-labs/wallet-book';
|
|
32
|
+
import { AnimatePresence } from '../../components/AnimatePresence/AnimatePresence.js';
|
|
33
|
+
import '../../components/Alert/Alert.js';
|
|
28
34
|
import { useMockContext } from '../../context/MockContext/MockContext.js';
|
|
29
35
|
import '../../context/CaptchaContext/CaptchaContext.js';
|
|
30
36
|
import '../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
31
|
-
import '../../components/IconButton/IconButton.js';
|
|
32
37
|
import { VerticalAccordion } from '../../components/Accordion/components/VerticalAccordion/VerticalAccordion.js';
|
|
33
38
|
import { AccordionItem } from '../../components/Accordion/components/AccordionItem/AccordionItem.js';
|
|
34
|
-
import '../../components/
|
|
35
|
-
import
|
|
39
|
+
import '../../components/Popper/Popper/Popper.js';
|
|
40
|
+
import '../../components/Popper/PopperContext/PopperContext.js';
|
|
41
|
+
import 'formik';
|
|
42
|
+
import 'yup';
|
|
36
43
|
import { isUserLinkingWallet } from '../../shared/utils/functions/isUserLinkingWallet/isUserLinkingWallet.js';
|
|
37
44
|
import '../../components/OverlayCard/OverlayCard.context.js';
|
|
38
45
|
import { OverlayCardTarget } from '../../components/OverlayCard/OverlayCardTarget.js';
|
|
@@ -8,6 +8,7 @@ var index = require('../../../context/FooterAnimationContext/index.cjs');
|
|
|
8
8
|
var ThemeContext = require('../../../context/ThemeContext/ThemeContext.cjs');
|
|
9
9
|
require('@dynamic-labs/sdk-api');
|
|
10
10
|
require('../../../shared/logger.cjs');
|
|
11
|
+
require('../../../config/LSSuffix.cjs');
|
|
11
12
|
require('@dynamic-labs/iconic');
|
|
12
13
|
require('@dynamic-labs/wallet-connector-core');
|
|
13
14
|
require('../../../context/ViewContext/ViewContext.cjs');
|
|
@@ -30,11 +31,17 @@ require('../../../components/Transition/OpacityTransition/OpacityTransition.cjs'
|
|
|
30
31
|
require('../../../config/ApiEndpoint.cjs');
|
|
31
32
|
require('@dynamic-labs/rpc-providers');
|
|
32
33
|
require('../../../context/ErrorContext/ErrorContext.cjs');
|
|
34
|
+
require('../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
35
|
+
require('../../../components/IconButton/IconButton.cjs');
|
|
36
|
+
require('@dynamic-labs/wallet-book');
|
|
37
|
+
require('../../../components/Alert/Alert.cjs');
|
|
33
38
|
require('../../../context/MockContext/MockContext.cjs');
|
|
34
39
|
require('../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
35
40
|
require('../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
36
|
-
require('../../../components/
|
|
37
|
-
require('../../../components/
|
|
41
|
+
require('../../../components/Popper/Popper/Popper.cjs');
|
|
42
|
+
require('../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
43
|
+
require('formik');
|
|
44
|
+
require('yup');
|
|
38
45
|
|
|
39
46
|
const Footer = ({ heading, icon, projectSettings }) => {
|
|
40
47
|
const { theme } = ThemeContext.useThemeContext();
|