@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
|
@@ -7,6 +7,7 @@ var React = require('react');
|
|
|
7
7
|
var Typography = require('../../components/Typography/Typography.cjs');
|
|
8
8
|
require('@dynamic-labs/sdk-api');
|
|
9
9
|
require('../../shared/logger.cjs');
|
|
10
|
+
require('../../config/LSSuffix.cjs');
|
|
10
11
|
require('@dynamic-labs/iconic');
|
|
11
12
|
require('@dynamic-labs/wallet-connector-core');
|
|
12
13
|
require('../../context/ViewContext/ViewContext.cjs');
|
|
@@ -27,23 +28,31 @@ require('react-dom');
|
|
|
27
28
|
require('../../config/ApiEndpoint.cjs');
|
|
28
29
|
require('@dynamic-labs/rpc-providers');
|
|
29
30
|
require('../../context/ErrorContext/ErrorContext.cjs');
|
|
30
|
-
require('../../context/
|
|
31
|
-
require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
32
|
-
var useMutation = require('../../utils/hooks/useMutation/useMutation.cjs');
|
|
33
|
-
require('../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
34
|
-
var Button = require('../../components/Button/Button.cjs');
|
|
35
|
-
var IconButton = require('../../components/IconButton/IconButton.cjs');
|
|
31
|
+
require('../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
36
32
|
var ModalHeader = require('../../components/ModalHeader/ModalHeader.cjs');
|
|
37
|
-
require('../../components/
|
|
33
|
+
var IconButton = require('../../components/IconButton/IconButton.cjs');
|
|
34
|
+
require('@dynamic-labs/wallet-book');
|
|
38
35
|
var PoweredByDynamic = require('../../components/PoweredByDynamic/PoweredByDynamic.cjs');
|
|
36
|
+
var Button = require('../../components/Button/Button.cjs');
|
|
39
37
|
var IconWithSpinner = require('../../components/IconWithSpinner/IconWithSpinner.cjs');
|
|
40
|
-
var AppOriginTile = require('../../components/AppOriginTile/AppOriginTile.cjs');
|
|
41
38
|
var AnimatePresence = require('../../components/AnimatePresence/AnimatePresence.cjs');
|
|
42
|
-
var ErrorContainer = require('../../components/ErrorContainer/ErrorContainer.cjs');
|
|
43
39
|
require('../../components/Transition/ZoomTransition/ZoomTransition.cjs');
|
|
44
40
|
require('../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
45
41
|
require('../../components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
46
42
|
var VerticalDrawerTransition = require('../../components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.cjs');
|
|
43
|
+
require('../../components/Alert/Alert.cjs');
|
|
44
|
+
var AppOriginTile = require('../../components/AppOriginTile/AppOriginTile.cjs');
|
|
45
|
+
require('../../context/MockContext/MockContext.cjs');
|
|
46
|
+
require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
47
|
+
var useMutation = require('../../utils/hooks/useMutation/useMutation.cjs');
|
|
48
|
+
require('../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
49
|
+
var ErrorContainer = require('../../components/ErrorContainer/ErrorContainer.cjs');
|
|
50
|
+
require('../../components/Popper/Popper/Popper.cjs');
|
|
51
|
+
require('../../components/Popper/PopperContext/PopperContext.cjs');
|
|
52
|
+
require('formik');
|
|
53
|
+
require('yup');
|
|
54
|
+
var Modal = require('../../components/Modal/Modal.cjs');
|
|
55
|
+
var ModalCard = require('../../components/ModalCard/ModalCard.cjs');
|
|
47
56
|
|
|
48
57
|
const SignMessageConfirmationModal = ({ appLogoUrl, appName, appOrigin, message, handler, onReject, onSignMessage, }) => {
|
|
49
58
|
usePreventPageScroll.usePreventPageScroll(true);
|
|
@@ -68,7 +77,7 @@ const SignMessageConfirmationModal = ({ appLogoUrl, appName, appOrigin, message,
|
|
|
68
77
|
const closeButton = (jsxRuntime.jsx(IconButton.IconButton, Object.assign({ type: 'button', onClick: handleOnReject, "data-testid": 'close', disabled: isLoading }, { children: jsxRuntime.jsx(close.ReactComponent, {}) })));
|
|
69
78
|
return (jsxRuntime.jsx(Portal.Portal, Object.assign({ handleClose: handleOnReject, isShown: show, zIndex: index.authModalZIndex, withBackdrop: true, elementId: 'dynamic-sign-message', transitionEvents: {
|
|
70
79
|
onUnmount: handleOnModalUnmount,
|
|
71
|
-
} }, { children: jsxRuntime.
|
|
80
|
+
} }, { children: jsxRuntime.jsx(Modal.Modal, { children: jsxRuntime.jsxs(ModalCard.ModalCard, { children: [jsxRuntime.jsx(ModalHeader.ModalHeader, Object.assign({ trailing: closeButton, alignContent: 'bottom' }, { children: jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: (props) => (jsxRuntime.jsx(Icon.Icon, Object.assign({ color: 'brand-primary' }, { children: jsxRuntime.jsx(signCircle.ReactComponent, Object.assign({}, props)) }))), iconSize: 64, isSpinning: true }) })), jsxRuntime.jsxs("div", Object.assign({ className: 'sign-message-confirmation__body' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'title', color: 'primary', className: 'sign-message-confirmation__title' }, { children: "Requesting Signature" })), jsxRuntime.jsx(AnimatePresence.AnimatePresence, Object.assign({ animationComponent: jsxRuntime.jsx(VerticalDrawerTransition.VerticalDrawerTransition, {}) }, { children: signMessageError && (jsxRuntime.jsx("div", Object.assign({ className: 'sign-message-confirmation__error' }, { children: jsxRuntime.jsx(ErrorContainer.ErrorContainer, { children: signMessageError.reason || 'Something went wrong' }) }))) })), jsxRuntime.jsxs("div", Object.assign({ className: 'sign-message-confirmation__message-container' }, { children: [jsxRuntime.jsx(AppOriginTile.AppOriginTile, { appLogoUrl: appLogoUrl, appName: appName, appOrigin: appOrigin }), jsxRuntime.jsx("div", Object.assign({ className: 'sign-message-confirmation__message' }, { children: jsxRuntime.jsx(Typography.Typography, Object.assign({ color: 'primary', variant: 'body_normal' }, { children: message })) }))] })), jsxRuntime.jsxs("div", Object.assign({ className: 'sign-message-confirmation__actions' }, { children: [jsxRuntime.jsx(Button.Button, Object.assign({ buttonVariant: 'secondary', onClick: handleOnReject, expanded: true, buttonPadding: 'large', disabled: isLoading, buttonRounded: 'default' }, { children: "Cancel" })), jsxRuntime.jsx(Button.Button, Object.assign({ buttonVariant: 'primary', buttonPadding: 'large', onClick: () => confirm(), expanded: true, buttonRounded: 'default', loading: isLoading }, { children: "Sign" }))] })), jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, {})] }))] }) }) })));
|
|
72
81
|
};
|
|
73
82
|
|
|
74
83
|
exports.SignMessageConfirmationModal = SignMessageConfirmationModal;
|
|
@@ -3,6 +3,7 @@ import { useRef, useState, useCallback } from 'react';
|
|
|
3
3
|
import { Typography } from '../../components/Typography/Typography.js';
|
|
4
4
|
import '@dynamic-labs/sdk-api';
|
|
5
5
|
import '../../shared/logger.js';
|
|
6
|
+
import '../../config/LSSuffix.js';
|
|
6
7
|
import '@dynamic-labs/iconic';
|
|
7
8
|
import '@dynamic-labs/wallet-connector-core';
|
|
8
9
|
import '../../context/ViewContext/ViewContext.js';
|
|
@@ -23,23 +24,31 @@ import 'react-dom';
|
|
|
23
24
|
import '../../config/ApiEndpoint.js';
|
|
24
25
|
import '@dynamic-labs/rpc-providers';
|
|
25
26
|
import '../../context/ErrorContext/ErrorContext.js';
|
|
26
|
-
import '../../context/
|
|
27
|
-
import '../../context/CaptchaContext/CaptchaContext.js';
|
|
28
|
-
import { useMutation } from '../../utils/hooks/useMutation/useMutation.js';
|
|
29
|
-
import '../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
30
|
-
import { Button } from '../../components/Button/Button.js';
|
|
31
|
-
import { IconButton } from '../../components/IconButton/IconButton.js';
|
|
27
|
+
import '../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
32
28
|
import { ModalHeader } from '../../components/ModalHeader/ModalHeader.js';
|
|
33
|
-
import '../../components/
|
|
29
|
+
import { IconButton } from '../../components/IconButton/IconButton.js';
|
|
30
|
+
import '@dynamic-labs/wallet-book';
|
|
34
31
|
import { PoweredByDynamic } from '../../components/PoweredByDynamic/PoweredByDynamic.js';
|
|
32
|
+
import { Button } from '../../components/Button/Button.js';
|
|
35
33
|
import { IconWithSpinner } from '../../components/IconWithSpinner/IconWithSpinner.js';
|
|
36
|
-
import { AppOriginTile } from '../../components/AppOriginTile/AppOriginTile.js';
|
|
37
34
|
import { AnimatePresence } from '../../components/AnimatePresence/AnimatePresence.js';
|
|
38
|
-
import { ErrorContainer } from '../../components/ErrorContainer/ErrorContainer.js';
|
|
39
35
|
import '../../components/Transition/ZoomTransition/ZoomTransition.js';
|
|
40
36
|
import '../../components/Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
41
37
|
import '../../components/Transition/OpacityTransition/OpacityTransition.js';
|
|
42
38
|
import { VerticalDrawerTransition } from '../../components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.js';
|
|
39
|
+
import '../../components/Alert/Alert.js';
|
|
40
|
+
import { AppOriginTile } from '../../components/AppOriginTile/AppOriginTile.js';
|
|
41
|
+
import '../../context/MockContext/MockContext.js';
|
|
42
|
+
import '../../context/CaptchaContext/CaptchaContext.js';
|
|
43
|
+
import { useMutation } from '../../utils/hooks/useMutation/useMutation.js';
|
|
44
|
+
import '../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
45
|
+
import { ErrorContainer } from '../../components/ErrorContainer/ErrorContainer.js';
|
|
46
|
+
import '../../components/Popper/Popper/Popper.js';
|
|
47
|
+
import '../../components/Popper/PopperContext/PopperContext.js';
|
|
48
|
+
import 'formik';
|
|
49
|
+
import 'yup';
|
|
50
|
+
import { Modal } from '../../components/Modal/Modal.js';
|
|
51
|
+
import { ModalCard } from '../../components/ModalCard/ModalCard.js';
|
|
43
52
|
|
|
44
53
|
const SignMessageConfirmationModal = ({ appLogoUrl, appName, appOrigin, message, handler, onReject, onSignMessage, }) => {
|
|
45
54
|
usePreventPageScroll(true);
|
|
@@ -64,7 +73,7 @@ const SignMessageConfirmationModal = ({ appLogoUrl, appName, appOrigin, message,
|
|
|
64
73
|
const closeButton = (jsx(IconButton, Object.assign({ type: 'button', onClick: handleOnReject, "data-testid": 'close', disabled: isLoading }, { children: jsx(SvgClose, {}) })));
|
|
65
74
|
return (jsx(Portal, Object.assign({ handleClose: handleOnReject, isShown: show, zIndex: authModalZIndex, withBackdrop: true, elementId: 'dynamic-sign-message', transitionEvents: {
|
|
66
75
|
onUnmount: handleOnModalUnmount,
|
|
67
|
-
} }, { children:
|
|
76
|
+
} }, { children: jsx(Modal, { children: jsxs(ModalCard, { children: [jsx(ModalHeader, Object.assign({ trailing: closeButton, alignContent: 'bottom' }, { children: jsx(IconWithSpinner, { Icon: (props) => (jsx(Icon, Object.assign({ color: 'brand-primary' }, { children: jsx(SvgSignCircle, Object.assign({}, props)) }))), iconSize: 64, isSpinning: true }) })), jsxs("div", Object.assign({ className: 'sign-message-confirmation__body' }, { children: [jsx(Typography, Object.assign({ variant: 'title', color: 'primary', className: 'sign-message-confirmation__title' }, { children: "Requesting Signature" })), jsx(AnimatePresence, Object.assign({ animationComponent: jsx(VerticalDrawerTransition, {}) }, { children: signMessageError && (jsx("div", Object.assign({ className: 'sign-message-confirmation__error' }, { children: jsx(ErrorContainer, { children: signMessageError.reason || 'Something went wrong' }) }))) })), jsxs("div", Object.assign({ className: 'sign-message-confirmation__message-container' }, { children: [jsx(AppOriginTile, { appLogoUrl: appLogoUrl, appName: appName, appOrigin: appOrigin }), jsx("div", Object.assign({ className: 'sign-message-confirmation__message' }, { children: jsx(Typography, Object.assign({ color: 'primary', variant: 'body_normal' }, { children: message })) }))] })), jsxs("div", Object.assign({ className: 'sign-message-confirmation__actions' }, { children: [jsx(Button, Object.assign({ buttonVariant: 'secondary', onClick: handleOnReject, expanded: true, buttonPadding: 'large', disabled: isLoading, buttonRounded: 'default' }, { children: "Cancel" })), jsx(Button, Object.assign({ buttonVariant: 'primary', buttonPadding: 'large', onClick: () => confirm(), expanded: true, buttonRounded: 'default', loading: isLoading }, { children: "Sign" }))] })), jsx(PoweredByDynamic, {})] }))] }) }) })));
|
|
68
77
|
};
|
|
69
78
|
|
|
70
79
|
export { SignMessageConfirmationModal };
|
|
@@ -4,113 +4,65 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
var React = require('react');
|
|
7
|
-
var ethers = require('ethers');
|
|
8
|
-
var utils = require('@dynamic-labs/utils');
|
|
9
|
-
var Typography = require('../../components/Typography/Typography.cjs');
|
|
10
7
|
require('@dynamic-labs/sdk-api');
|
|
11
8
|
require('../../shared/logger.cjs');
|
|
12
|
-
|
|
9
|
+
require('../../config/LSSuffix.cjs');
|
|
10
|
+
require('@dynamic-labs/iconic');
|
|
13
11
|
require('@dynamic-labs/wallet-connector-core');
|
|
14
|
-
|
|
12
|
+
require('../../context/ViewContext/ViewContext.cjs');
|
|
13
|
+
require('@dynamic-labs/utils');
|
|
15
14
|
require('../../utils/constants/colors.cjs');
|
|
16
|
-
|
|
15
|
+
require('ethers');
|
|
17
16
|
var usePreventPageScroll = require('../../shared/utils/hooks/usePreventPageScroll/usePreventPageScroll.cjs');
|
|
18
|
-
require('@dynamic-labs/iconic');
|
|
19
|
-
require('../../context/ViewContext/ViewContext.cjs');
|
|
20
|
-
var close = require('../../shared/assets/close.cjs');
|
|
21
|
-
var signCircle = require('../../shared/assets/sign-circle.cjs');
|
|
22
17
|
var index = require('../../shared/consts/index.cjs');
|
|
23
|
-
|
|
18
|
+
require('../../context/DynamicContext/DynamicContext.cjs');
|
|
24
19
|
require('@dynamic-labs/multi-wallet');
|
|
25
20
|
require('../../components/ShadowDOM/ShadowDOM.cjs');
|
|
26
21
|
require('../../context/ThemeContext/ThemeContext.cjs');
|
|
27
|
-
var Icon = require('../../components/Icon/Icon.cjs');
|
|
28
22
|
var Portal = require('../../components/Portal/Portal.cjs');
|
|
29
23
|
require('react-dom');
|
|
30
24
|
require('../../config/ApiEndpoint.cjs');
|
|
31
25
|
require('@dynamic-labs/rpc-providers');
|
|
32
26
|
require('../../context/ErrorContext/ErrorContext.cjs');
|
|
33
|
-
|
|
34
|
-
var
|
|
35
|
-
|
|
36
|
-
require('
|
|
37
|
-
require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
38
|
-
var usePromise = require('../../utils/hooks/usePromise/usePromise.cjs');
|
|
39
|
-
var useMutation = require('../../utils/hooks/useMutation/useMutation.cjs');
|
|
40
|
-
require('../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
41
|
-
var Button = require('../../components/Button/Button.cjs');
|
|
42
|
-
var IconButton = require('../../components/IconButton/IconButton.cjs');
|
|
43
|
-
var ModalHeader = require('../../components/ModalHeader/ModalHeader.cjs');
|
|
44
|
-
var Alert = require('../../components/Alert/Alert.cjs');
|
|
45
|
-
var PoweredByDynamic = require('../../components/PoweredByDynamic/PoweredByDynamic.cjs');
|
|
46
|
-
var IconWithSpinner = require('../../components/IconWithSpinner/IconWithSpinner.cjs');
|
|
47
|
-
var AppOriginTile = require('../../components/AppOriginTile/AppOriginTile.cjs');
|
|
48
|
-
var AnimatePresence = require('../../components/AnimatePresence/AnimatePresence.cjs');
|
|
27
|
+
require('../../context/AccessDeniedContext/AccessDeniedContext.cjs');
|
|
28
|
+
var TransactionConfirmationView = require('../../views/TransactionConfirmationView/TransactionConfirmationView.cjs');
|
|
29
|
+
require('../../components/IconButton/IconButton.cjs');
|
|
30
|
+
require('@dynamic-labs/wallet-book');
|
|
49
31
|
require('../../components/Transition/ZoomTransition/ZoomTransition.cjs');
|
|
50
32
|
require('../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
51
33
|
require('../../components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
52
|
-
|
|
34
|
+
require('../../components/Alert/Alert.cjs');
|
|
35
|
+
require('../../context/MockContext/MockContext.cjs');
|
|
36
|
+
require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
37
|
+
require('../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
38
|
+
require('../../components/Popper/Popper/Popper.cjs');
|
|
39
|
+
require('../../components/Popper/PopperContext/PopperContext.cjs');
|
|
40
|
+
require('formik');
|
|
41
|
+
require('yup');
|
|
42
|
+
var Modal = require('../../components/Modal/Modal.cjs');
|
|
43
|
+
var ModalCard = require('../../components/ModalCard/ModalCard.cjs');
|
|
53
44
|
|
|
54
|
-
const TransactionConfirmationModal = ({ title,
|
|
45
|
+
const TransactionConfirmationModal = ({ title, handler, onReject, onTransactionResponseSuccess, transaction, provider, }) => {
|
|
55
46
|
usePreventPageScroll.usePreventPageScroll(true);
|
|
56
|
-
const { primaryWallet } = useInternalDynamicContext.useInternalDynamicContext();
|
|
57
|
-
const didConfirmRef = React.useRef(false);
|
|
58
47
|
const [show, setShow] = React.useState(true);
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
const { data: balance } = usePromise.usePromise(() => primaryWallet.connector
|
|
63
|
-
.getBalance()
|
|
64
|
-
.then((balanceText) => balanceText ? ethers.ethers.utils.parseEther(balanceText) : undefined));
|
|
65
|
-
const [currencySymbol] = useFetchCurrency.useFetchCurrency(primaryWallet.connector);
|
|
66
|
-
const { isLoading, mutate: sendTransaction, data: transactionResponse, error: transactionError, } = useMutation.useMutation(() => handler(transaction), {
|
|
67
|
-
onSuccess: () => {
|
|
68
|
-
didConfirmRef.current = true;
|
|
69
|
-
setShow(false);
|
|
70
|
-
},
|
|
71
|
-
});
|
|
72
|
-
const { isLoading: isLoadingTransaction, isTransactionFromAddressLoading, isTransactionToAddressLoading, transactionFromAddress, transactionToAddress, isEffectiveValueLoading, transactionValue, gasEstimate, isGasPriceLoading, total, } = useTransactionData.useTransactionData({
|
|
73
|
-
provider,
|
|
74
|
-
transaction,
|
|
75
|
-
});
|
|
76
|
-
const hasInsufficientFunds = React.useMemo(() => {
|
|
77
|
-
if (balance === undefined || total === undefined)
|
|
78
|
-
return false;
|
|
79
|
-
return total.gt(balance);
|
|
80
|
-
}, [balance, total]);
|
|
81
|
-
const missingFunds = React.useMemo(() => {
|
|
82
|
-
if (balance === undefined || total === undefined)
|
|
83
|
-
return undefined;
|
|
84
|
-
return total.sub(balance);
|
|
85
|
-
}, [balance, total]);
|
|
86
|
-
const handleOnReject = React.useCallback(() => {
|
|
87
|
-
didConfirmRef.current = false;
|
|
48
|
+
const errorRef = React.useRef(null);
|
|
49
|
+
const transactionResponseRef = React.useRef(null);
|
|
50
|
+
const closeModal = React.useCallback(() => {
|
|
88
51
|
setShow(false);
|
|
89
52
|
}, [setShow]);
|
|
90
53
|
const handleOnModalUnmount = React.useCallback(() => {
|
|
91
|
-
if (
|
|
92
|
-
return onTransactionResponseSuccess(
|
|
54
|
+
if (transactionResponseRef.current) {
|
|
55
|
+
return onTransactionResponseSuccess(transactionResponseRef.current);
|
|
93
56
|
}
|
|
94
|
-
onReject(
|
|
95
|
-
}, [
|
|
96
|
-
|
|
97
|
-
transactionError,
|
|
98
|
-
onTransactionResponseSuccess,
|
|
99
|
-
onReject,
|
|
100
|
-
]);
|
|
101
|
-
const ChainIcon = getChainIcon.getChainIcon('evm');
|
|
102
|
-
const closeButton = (jsxRuntime.jsx(IconButton.IconButton, Object.assign({ type: 'button', onClick: handleOnReject, "data-testid": 'close', disabled: isLoading }, { children: jsxRuntime.jsx(close.ReactComponent, {}) })));
|
|
103
|
-
return (jsxRuntime.jsx(Portal.Portal, Object.assign({ handleClose: handleOnReject, isShown: show, zIndex: index.authModalZIndex, withBackdrop: true, elementId: 'dynamic-send-transaction', transitionEvents: {
|
|
57
|
+
onReject(errorRef.current || new Error('user rejected transaction'));
|
|
58
|
+
}, [onTransactionResponseSuccess, onReject]);
|
|
59
|
+
return (jsxRuntime.jsx(Portal.Portal, Object.assign({ handleClose: closeModal, isShown: show, zIndex: index.authModalZIndex, withBackdrop: true, elementId: 'dynamic-send-transaction', transitionEvents: {
|
|
104
60
|
onUnmount: handleOnModalUnmount,
|
|
105
|
-
} }, { children: jsxRuntime.
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
display: 'flex',
|
|
112
|
-
gap: '0.25rem',
|
|
113
|
-
minWidth: 0,
|
|
114
|
-
} }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ title: title, color: color, variant: 'body_normal', weight: weight, truncate: true }, { children: children })), symbol && (jsxRuntime.jsx(Typography.Typography, Object.assign({ as: 'span', color: 'secondary', weight: 'regular' }, { children: symbol }))), icon && jsxRuntime.jsx(Icon.Icon, Object.assign({ size: 'small' }, { children: icon }))] })));
|
|
61
|
+
} }, { children: jsxRuntime.jsx(Modal.Modal, { children: jsxRuntime.jsx(ModalCard.ModalCard, { children: jsxRuntime.jsx(TransactionConfirmationView.TransactionConfirmationView, { provider: provider, transaction: transaction, title: title, mutation: () => handler(transaction), onClickClose: closeModal, onError: (error) => (errorRef.current = error), displayPoweredByDynamicFooter: true, onSuccess: (transactionResponse) => {
|
|
62
|
+
errorRef.current = null;
|
|
63
|
+
transactionResponseRef.current = transactionResponse;
|
|
64
|
+
closeModal();
|
|
65
|
+
} }) }) }) })));
|
|
66
|
+
};
|
|
115
67
|
|
|
116
68
|
exports.TransactionConfirmationModal = TransactionConfirmationModal;
|
|
@@ -1,112 +1,64 @@
|
|
|
1
|
-
import { jsx
|
|
2
|
-
import {
|
|
3
|
-
import { ethers } from 'ethers';
|
|
4
|
-
import { DynamicError } from '@dynamic-labs/utils';
|
|
5
|
-
import { Typography } from '../../components/Typography/Typography.js';
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useState, useRef, useCallback } from 'react';
|
|
6
3
|
import '@dynamic-labs/sdk-api';
|
|
7
4
|
import '../../shared/logger.js';
|
|
8
|
-
import
|
|
5
|
+
import '../../config/LSSuffix.js';
|
|
6
|
+
import '@dynamic-labs/iconic';
|
|
9
7
|
import '@dynamic-labs/wallet-connector-core';
|
|
10
|
-
import
|
|
8
|
+
import '../../context/ViewContext/ViewContext.js';
|
|
9
|
+
import '@dynamic-labs/utils';
|
|
11
10
|
import '../../utils/constants/colors.js';
|
|
12
|
-
import
|
|
11
|
+
import 'ethers';
|
|
13
12
|
import { usePreventPageScroll } from '../../shared/utils/hooks/usePreventPageScroll/usePreventPageScroll.js';
|
|
14
|
-
import '@dynamic-labs/iconic';
|
|
15
|
-
import '../../context/ViewContext/ViewContext.js';
|
|
16
|
-
import { ReactComponent as SvgClose } from '../../shared/assets/close.js';
|
|
17
|
-
import { ReactComponent as SvgSignCircle } from '../../shared/assets/sign-circle.js';
|
|
18
13
|
import { authModalZIndex } from '../../shared/consts/index.js';
|
|
19
|
-
import
|
|
14
|
+
import '../../context/DynamicContext/DynamicContext.js';
|
|
20
15
|
import '@dynamic-labs/multi-wallet';
|
|
21
16
|
import '../../components/ShadowDOM/ShadowDOM.js';
|
|
22
17
|
import '../../context/ThemeContext/ThemeContext.js';
|
|
23
|
-
import { Icon } from '../../components/Icon/Icon.js';
|
|
24
18
|
import { Portal } from '../../components/Portal/Portal.js';
|
|
25
19
|
import 'react-dom';
|
|
26
20
|
import '../../config/ApiEndpoint.js';
|
|
27
21
|
import '@dynamic-labs/rpc-providers';
|
|
28
22
|
import '../../context/ErrorContext/ErrorContext.js';
|
|
29
|
-
import
|
|
30
|
-
import {
|
|
31
|
-
import
|
|
32
|
-
import '
|
|
33
|
-
import '../../context/CaptchaContext/CaptchaContext.js';
|
|
34
|
-
import { usePromise } from '../../utils/hooks/usePromise/usePromise.js';
|
|
35
|
-
import { useMutation } from '../../utils/hooks/useMutation/useMutation.js';
|
|
36
|
-
import '../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
37
|
-
import { Button } from '../../components/Button/Button.js';
|
|
38
|
-
import { IconButton } from '../../components/IconButton/IconButton.js';
|
|
39
|
-
import { ModalHeader } from '../../components/ModalHeader/ModalHeader.js';
|
|
40
|
-
import { Alert } from '../../components/Alert/Alert.js';
|
|
41
|
-
import { PoweredByDynamic } from '../../components/PoweredByDynamic/PoweredByDynamic.js';
|
|
42
|
-
import { IconWithSpinner } from '../../components/IconWithSpinner/IconWithSpinner.js';
|
|
43
|
-
import { AppOriginTile } from '../../components/AppOriginTile/AppOriginTile.js';
|
|
44
|
-
import { AnimatePresence } from '../../components/AnimatePresence/AnimatePresence.js';
|
|
23
|
+
import '../../context/AccessDeniedContext/AccessDeniedContext.js';
|
|
24
|
+
import { TransactionConfirmationView } from '../../views/TransactionConfirmationView/TransactionConfirmationView.js';
|
|
25
|
+
import '../../components/IconButton/IconButton.js';
|
|
26
|
+
import '@dynamic-labs/wallet-book';
|
|
45
27
|
import '../../components/Transition/ZoomTransition/ZoomTransition.js';
|
|
46
28
|
import '../../components/Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
47
29
|
import '../../components/Transition/OpacityTransition/OpacityTransition.js';
|
|
48
|
-
import
|
|
30
|
+
import '../../components/Alert/Alert.js';
|
|
31
|
+
import '../../context/MockContext/MockContext.js';
|
|
32
|
+
import '../../context/CaptchaContext/CaptchaContext.js';
|
|
33
|
+
import '../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
34
|
+
import '../../components/Popper/Popper/Popper.js';
|
|
35
|
+
import '../../components/Popper/PopperContext/PopperContext.js';
|
|
36
|
+
import 'formik';
|
|
37
|
+
import 'yup';
|
|
38
|
+
import { Modal } from '../../components/Modal/Modal.js';
|
|
39
|
+
import { ModalCard } from '../../components/ModalCard/ModalCard.js';
|
|
49
40
|
|
|
50
|
-
const TransactionConfirmationModal = ({ title,
|
|
41
|
+
const TransactionConfirmationModal = ({ title, handler, onReject, onTransactionResponseSuccess, transaction, provider, }) => {
|
|
51
42
|
usePreventPageScroll(true);
|
|
52
|
-
const { primaryWallet } = useInternalDynamicContext();
|
|
53
|
-
const didConfirmRef = useRef(false);
|
|
54
43
|
const [show, setShow] = useState(true);
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
const { data: balance } = usePromise(() => primaryWallet.connector
|
|
59
|
-
.getBalance()
|
|
60
|
-
.then((balanceText) => balanceText ? ethers.utils.parseEther(balanceText) : undefined));
|
|
61
|
-
const [currencySymbol] = useFetchCurrency(primaryWallet.connector);
|
|
62
|
-
const { isLoading, mutate: sendTransaction, data: transactionResponse, error: transactionError, } = useMutation(() => handler(transaction), {
|
|
63
|
-
onSuccess: () => {
|
|
64
|
-
didConfirmRef.current = true;
|
|
65
|
-
setShow(false);
|
|
66
|
-
},
|
|
67
|
-
});
|
|
68
|
-
const { isLoading: isLoadingTransaction, isTransactionFromAddressLoading, isTransactionToAddressLoading, transactionFromAddress, transactionToAddress, isEffectiveValueLoading, transactionValue, gasEstimate, isGasPriceLoading, total, } = useTransactionData({
|
|
69
|
-
provider,
|
|
70
|
-
transaction,
|
|
71
|
-
});
|
|
72
|
-
const hasInsufficientFunds = useMemo(() => {
|
|
73
|
-
if (balance === undefined || total === undefined)
|
|
74
|
-
return false;
|
|
75
|
-
return total.gt(balance);
|
|
76
|
-
}, [balance, total]);
|
|
77
|
-
const missingFunds = useMemo(() => {
|
|
78
|
-
if (balance === undefined || total === undefined)
|
|
79
|
-
return undefined;
|
|
80
|
-
return total.sub(balance);
|
|
81
|
-
}, [balance, total]);
|
|
82
|
-
const handleOnReject = useCallback(() => {
|
|
83
|
-
didConfirmRef.current = false;
|
|
44
|
+
const errorRef = useRef(null);
|
|
45
|
+
const transactionResponseRef = useRef(null);
|
|
46
|
+
const closeModal = useCallback(() => {
|
|
84
47
|
setShow(false);
|
|
85
48
|
}, [setShow]);
|
|
86
49
|
const handleOnModalUnmount = useCallback(() => {
|
|
87
|
-
if (
|
|
88
|
-
return onTransactionResponseSuccess(
|
|
50
|
+
if (transactionResponseRef.current) {
|
|
51
|
+
return onTransactionResponseSuccess(transactionResponseRef.current);
|
|
89
52
|
}
|
|
90
|
-
onReject(
|
|
91
|
-
}, [
|
|
92
|
-
|
|
93
|
-
transactionError,
|
|
94
|
-
onTransactionResponseSuccess,
|
|
95
|
-
onReject,
|
|
96
|
-
]);
|
|
97
|
-
const ChainIcon = getChainIcon('evm');
|
|
98
|
-
const closeButton = (jsx(IconButton, Object.assign({ type: 'button', onClick: handleOnReject, "data-testid": 'close', disabled: isLoading }, { children: jsx(SvgClose, {}) })));
|
|
99
|
-
return (jsx(Portal, Object.assign({ handleClose: handleOnReject, isShown: show, zIndex: authModalZIndex, withBackdrop: true, elementId: 'dynamic-send-transaction', transitionEvents: {
|
|
53
|
+
onReject(errorRef.current || new Error('user rejected transaction'));
|
|
54
|
+
}, [onTransactionResponseSuccess, onReject]);
|
|
55
|
+
return (jsx(Portal, Object.assign({ handleClose: closeModal, isShown: show, zIndex: authModalZIndex, withBackdrop: true, elementId: 'dynamic-send-transaction', transitionEvents: {
|
|
100
56
|
onUnmount: handleOnModalUnmount,
|
|
101
|
-
} }, { children:
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
display: 'flex',
|
|
108
|
-
gap: '0.25rem',
|
|
109
|
-
minWidth: 0,
|
|
110
|
-
} }, { children: [jsx(Typography, Object.assign({ title: title, color: color, variant: 'body_normal', weight: weight, truncate: true }, { children: children })), symbol && (jsx(Typography, Object.assign({ as: 'span', color: 'secondary', weight: 'regular' }, { children: symbol }))), icon && jsx(Icon, Object.assign({ size: 'small' }, { children: icon }))] })));
|
|
57
|
+
} }, { children: jsx(Modal, { children: jsx(ModalCard, { children: jsx(TransactionConfirmationView, { provider: provider, transaction: transaction, title: title, mutation: () => handler(transaction), onClickClose: closeModal, onError: (error) => (errorRef.current = error), displayPoweredByDynamicFooter: true, onSuccess: (transactionResponse) => {
|
|
58
|
+
errorRef.current = null;
|
|
59
|
+
transactionResponseRef.current = transactionResponse;
|
|
60
|
+
closeModal();
|
|
61
|
+
} }) }) }) })));
|
|
62
|
+
};
|
|
111
63
|
|
|
112
64
|
export { TransactionConfirmationModal };
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { FC, ReactNode } from 'react';
|
|
2
2
|
import { ethers } from 'ethers';
|
|
3
3
|
export type TransactionConfirmationModalProps = {
|
|
4
|
-
appLogoUrl?: string;
|
|
5
|
-
appName?: string;
|
|
6
|
-
appOrigin: string;
|
|
7
|
-
buttonText?: ReactNode;
|
|
8
4
|
handler: (transaction: ethers.utils.Deferrable<ethers.providers.TransactionRequest>) => Promise<ethers.providers.TransactionResponse>;
|
|
9
5
|
onReject: (error: unknown) => void;
|
|
10
6
|
onTransactionResponseSuccess: (transactionResponse: ethers.providers.TransactionResponse) => void;
|
|
@@ -34,21 +34,20 @@ var SvgAdd = function SvgAdd(_ref) {
|
|
|
34
34
|
titleId = _ref.titleId,
|
|
35
35
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
36
36
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
37
|
-
width:
|
|
38
|
-
height:
|
|
39
|
-
viewBox: "0 0
|
|
37
|
+
width: 16,
|
|
38
|
+
height: 16,
|
|
39
|
+
viewBox: "0 0 16 16",
|
|
40
40
|
fill: "none",
|
|
41
41
|
xmlns: "http://www.w3.org/2000/svg",
|
|
42
42
|
"aria-labelledby": titleId
|
|
43
43
|
}, props), title ? /*#__PURE__*/React__namespace.createElement("title", {
|
|
44
44
|
id: titleId
|
|
45
45
|
}, title) : null, _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
strokeLinejoin: "round"
|
|
46
|
+
fillRule: "evenodd",
|
|
47
|
+
clipRule: "evenodd",
|
|
48
|
+
d: "M8 2c.368 0 .667.298.667.667v4.666h4.666a.667.667 0 1 1 0 1.334H8.667v4.666a.667.667 0 1 1-1.334 0V8.667H2.667a.667.667 0 0 1 0-1.334h4.666V2.667C7.333 2.298 7.632 2 8 2Z",
|
|
49
|
+
fill: "currentColor",
|
|
50
|
+
fillOpacity: 0.4
|
|
52
51
|
})));
|
|
53
52
|
};
|
|
54
53
|
|
|
@@ -10,21 +10,20 @@ var SvgAdd = function SvgAdd(_ref) {
|
|
|
10
10
|
titleId = _ref.titleId,
|
|
11
11
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
12
12
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
13
|
-
width:
|
|
14
|
-
height:
|
|
15
|
-
viewBox: "0 0
|
|
13
|
+
width: 16,
|
|
14
|
+
height: 16,
|
|
15
|
+
viewBox: "0 0 16 16",
|
|
16
16
|
fill: "none",
|
|
17
17
|
xmlns: "http://www.w3.org/2000/svg",
|
|
18
18
|
"aria-labelledby": titleId
|
|
19
19
|
}, props), title ? /*#__PURE__*/React.createElement("title", {
|
|
20
20
|
id: titleId
|
|
21
21
|
}, title) : null, _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
strokeLinejoin: "round"
|
|
22
|
+
fillRule: "evenodd",
|
|
23
|
+
clipRule: "evenodd",
|
|
24
|
+
d: "M8 2c.368 0 .667.298.667.667v4.666h4.666a.667.667 0 1 1 0 1.334H8.667v4.666a.667.667 0 1 1-1.334 0V8.667H2.667a.667.667 0 0 1 0-1.334h4.666V2.667C7.333 2.298 7.632 2 8 2Z",
|
|
25
|
+
fill: "currentColor",
|
|
26
|
+
fillOpacity: 0.4
|
|
28
27
|
})));
|
|
29
28
|
};
|
|
30
29
|
|
|
@@ -31,3 +31,4 @@ export { ReactComponent as PencilIcon } from './pencil.svg';
|
|
|
31
31
|
export { ReactComponent as TooltipArrow } from './tooltip-arrow.svg';
|
|
32
32
|
export { ReactComponent as SwitchHorizontalIcon } from './switch-horizontal.svg';
|
|
33
33
|
export { ReactComponent as DotsHorizontalIcon } from './dots-horizontal.svg';
|
|
34
|
+
export { ReactComponent as SendIcon } from './send.svg';
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
|
|
7
|
+
function _interopNamespace(e) {
|
|
8
|
+
if (e && e.__esModule) return e;
|
|
9
|
+
var n = Object.create(null);
|
|
10
|
+
if (e) {
|
|
11
|
+
Object.keys(e).forEach(function (k) {
|
|
12
|
+
if (k !== 'default') {
|
|
13
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () { return e[k]; }
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
n["default"] = e;
|
|
22
|
+
return Object.freeze(n);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
26
|
+
|
|
27
|
+
var _g;
|
|
28
|
+
var _excluded = ["title", "titleId"];
|
|
29
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
30
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
31
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
32
|
+
var SvgSend = function SvgSend(_ref) {
|
|
33
|
+
var title = _ref.title,
|
|
34
|
+
titleId = _ref.titleId,
|
|
35
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
36
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
37
|
+
width: 24,
|
|
38
|
+
height: 24,
|
|
39
|
+
viewBox: "0 0 24 24",
|
|
40
|
+
fill: "none",
|
|
41
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
42
|
+
"aria-labelledby": titleId
|
|
43
|
+
}, props), title ? /*#__PURE__*/React__namespace.createElement("title", {
|
|
44
|
+
id: titleId
|
|
45
|
+
}, title) : null, _g || (_g = /*#__PURE__*/React__namespace.createElement("g", {
|
|
46
|
+
clipPath: "url(#send_svg__clip0_6894_96)"
|
|
47
|
+
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
48
|
+
fillRule: "evenodd",
|
|
49
|
+
clipRule: "evenodd",
|
|
50
|
+
d: "m3.846 9.3.03-.01 14.64-5.728c.199-.078.399-.156.567-.205.156-.046.465-.126.794-.02.374.123.664.413.786.787.107.33.027.638-.019.794-.049.168-.127.368-.205.567L14.702 20.15c-.08.204-.16.408-.239.568-.073.147-.226.436-.537.614a1.277 1.277 0 0 1-1.136.072c-.323-.137-.496-.405-.58-.542-.09-.149-.184-.342-.278-.535l-2.693-5.52-5.546-2.724-.027-.014c-.193-.094-.385-.189-.533-.28-.137-.082-.403-.256-.54-.578a1.277 1.277 0 0 1 .074-1.136c.178-.31.466-.463.612-.536.16-.079.363-.158.567-.238Zm.972 1.425 4.88 2.396 2.912-2.913a.848.848 0 0 1 1.2-.017.848.848 0 0 1-.017 1.2l-2.898 2.898 2.384 4.888 5.433-13.888-13.894 5.436Z",
|
|
51
|
+
fill: "currentColor",
|
|
52
|
+
fillOpacity: 0.4
|
|
53
|
+
}))));
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
exports.ReactComponent = SvgSend;
|