@dynamic-labs/sdk-react-core 0.17.0-RC.17 → 0.17.0-RC.19
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 +28 -0
- package/package.cjs +10 -10
- package/package.js +10 -10
- package/package.json +17 -17
- package/src/index.cjs +8 -0
- package/src/index.js +5 -0
- package/src/lib/Main.cjs +2 -0
- package/src/lib/Main.js +2 -0
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.cjs +2 -0
- package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.js +2 -0
- package/src/lib/components/AnimatePresence/AnimatePresence.cjs +2 -0
- package/src/lib/components/AnimatePresence/AnimatePresence.js +2 -0
- package/src/lib/components/AppOriginTile/AppOriginTile.types.d.ts +1 -1
- package/src/lib/components/Divider/Divider.cjs +2 -0
- package/src/lib/components/Divider/Divider.js +2 -0
- package/src/lib/components/ErrorContainer/ErrorContainer.cjs +2 -2
- package/src/lib/components/ErrorContainer/ErrorContainer.d.ts +3 -1
- package/src/lib/components/ErrorContainer/ErrorContainer.js +2 -2
- package/src/lib/components/IconWithSpinner/IconWithSpinner.cjs +1 -0
- package/src/lib/components/IconWithSpinner/IconWithSpinner.js +1 -0
- package/src/lib/components/IconWithSpinner/Spinner/Spinner.cjs +1 -0
- package/src/lib/components/IconWithSpinner/Spinner/Spinner.js +1 -0
- package/src/lib/components/IconWithStatus/IconWithStatus.cjs +1 -0
- package/src/lib/components/IconWithStatus/IconWithStatus.js +1 -0
- package/src/lib/components/Input/Input.cjs +13 -6
- package/src/lib/components/Input/Input.js +14 -7
- package/src/lib/components/Input/Input.types.d.ts +4 -0
- package/src/lib/components/NetworkPicker/components/ActionList/ActionList.cjs +2 -0
- package/src/lib/components/NetworkPicker/components/ActionList/ActionList.js +2 -0
- package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.cjs +2 -0
- package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.js +2 -0
- package/src/lib/components/NetworkPicker/components/Network/Network.cjs +2 -0
- package/src/lib/components/NetworkPicker/components/Network/Network.js +2 -0
- package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.cjs +2 -0
- package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.js +2 -0
- package/src/lib/components/OTPVerificationView/OTPVerificationView.cjs +2 -0
- package/src/lib/components/OTPVerificationView/OTPVerificationView.js +2 -0
- package/src/lib/components/OverlayCard/OverlayCard.cjs +2 -0
- package/src/lib/components/OverlayCard/OverlayCard.js +2 -0
- package/src/lib/components/Portal/Portal.cjs +2 -0
- package/src/lib/components/Portal/Portal.js +2 -0
- package/src/lib/components/SendBalanceForm/SendBalanceForm.cjs +24 -0
- package/src/lib/components/SendBalanceForm/SendBalanceForm.d.ts +10 -0
- package/src/lib/components/SendBalanceForm/SendBalanceForm.js +22 -0
- package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.d.ts +16 -0
- package/src/lib/components/SendBalancePageLayout/components/TokenBalanceCard/TokenBalanceCard.d.ts +8 -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/Tooltip/Tooltip.cjs +2 -0
- package/src/lib/components/Tooltip/Tooltip.js +2 -0
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.d.ts +1 -1
- package/src/lib/components/TransactionOriginDestination/TransactionOriginDestination.d.ts +11 -0
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.d.ts +11 -0
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.cjs +2 -0
- package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.js +2 -0
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.cjs +2 -0
- package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.js +2 -0
- package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.cjs +2 -0
- package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.js +2 -0
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs +2 -0
- package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js +2 -0
- package/src/lib/components/index.d.ts +1 -0
- package/src/lib/context/DynamicContext/DynamicContext.cjs +3 -2
- package/src/lib/context/DynamicContext/DynamicContext.js +3 -2
- package/src/lib/context/DynamicContext/hooks/useEmailLoginState/useEmailLoginState.cjs +1 -0
- package/src/lib/context/DynamicContext/hooks/useEmailLoginState/useEmailLoginState.js +1 -0
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerAuthFlowCallbacks.cjs +2 -0
- package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerAuthFlowCallbacks.js +2 -0
- package/src/lib/context/QrCodeContext/QrCodeContext.cjs +2 -0
- package/src/lib/context/QrCodeContext/QrCodeContext.js +2 -0
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.cjs +59 -20
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.d.ts +3 -1
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +60 -21
- package/src/lib/context/ViewContext/ViewContext.d.ts +1 -1
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.cjs +2 -0
- package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.js +2 -0
- package/src/lib/layout/DynamicAuthLayout/Footer/Footer.cjs +2 -0
- package/src/lib/layout/DynamicAuthLayout/Footer/Footer.js +2 -0
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/Item/Item.cjs +2 -0
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/Item/Item.js +2 -0
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.cjs +2 -0
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.js +2 -0
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/WalletListFooterContent.cjs +1 -0
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/WalletListFooterContent.js +1 -0
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletMoreInfoContent/WalletMoreInfoContent.cjs +2 -0
- package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletMoreInfoContent/WalletMoreInfoContent.js +2 -0
- package/src/lib/layout/DynamicAuthLayout/Header/header.cjs +13 -3
- package/src/lib/layout/DynamicAuthLayout/Header/header.js +13 -3
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.cjs +2 -0
- package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js +2 -0
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.cjs +22 -70
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.js +24 -72
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.types.d.ts +0 -3
- package/src/lib/shared/utils/functions/formatBigNumber/formatBigNumber.cjs +2 -1
- package/src/lib/shared/utils/functions/formatBigNumber/formatBigNumber.js +2 -1
- package/src/lib/shared/utils/functions/index.d.ts +1 -0
- package/src/lib/shared/utils/functions/trimEnd/index.d.ts +1 -0
- package/src/lib/shared/utils/functions/trimEnd/trimEnd.cjs +13 -0
- package/src/lib/shared/utils/functions/trimEnd/trimEnd.d.ts +1 -0
- package/src/lib/shared/utils/functions/trimEnd/trimEnd.js +9 -0
- package/src/lib/shared/utils/hooks/index.d.ts +2 -0
- package/src/lib/shared/utils/hooks/useIsMounted/index.d.ts +1 -0
- package/src/lib/shared/utils/hooks/useIsMounted/useIsMounted.cjs +18 -0
- package/src/lib/shared/utils/hooks/useIsMounted/useIsMounted.d.ts +1 -0
- package/src/lib/shared/utils/hooks/useIsMounted/useIsMounted.js +14 -0
- 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/getReferencedAccount/getReferencedAccount.cjs +29 -0
- package/src/lib/utils/functions/getReferencedAccount/getReferencedAccount.d.ts +7 -0
- package/src/lib/utils/functions/getReferencedAccount/getReferencedAccount.js +25 -0
- package/src/lib/utils/functions/getReferencedAccount/index.d.ts +1 -0
- package/src/lib/utils/functions/index.d.ts +2 -0
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.cjs +1 -1
- package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.js +1 -1
- package/src/lib/utils/hooks/authenticationHooks/useEmailVerificationRequest/useEmailVerificationRequest.cjs +1 -0
- package/src/lib/utils/hooks/authenticationHooks/useEmailVerificationRequest/useEmailVerificationRequest.js +1 -0
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.cjs +12 -3
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.js +12 -3
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.cjs +1 -1
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +1 -1
- package/src/lib/utils/hooks/useWalletConnectors/reconnectSocialWallet.cjs +37 -0
- package/src/lib/utils/hooks/useWalletConnectors/reconnectSocialWallet.d.ts +8 -0
- package/src/lib/utils/hooks/useWalletConnectors/reconnectSocialWallet.js +33 -0
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.cjs +7 -0
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.js +8 -1
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.cjs +4 -3
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.js +4 -3
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.cjs +1 -1
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.js +1 -1
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.cjs +19 -17
- package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.js +19 -17
- package/src/lib/utils/hooks/useWallets/useWallets.cjs +26 -36
- package/src/lib/utils/hooks/useWallets/useWallets.d.ts +1 -2
- package/src/lib/utils/hooks/useWallets/useWallets.js +27 -37
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.cjs +2 -0
- package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.js +2 -0
- package/src/lib/views/CollectUserDataView/CollectUserDataView.cjs +1 -0
- package/src/lib/views/CollectUserDataView/CollectUserDataView.js +1 -0
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.cjs +2 -0
- package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/OnboardingUserDataForm.js +2 -0
- package/src/lib/views/CollectUserDataView/UserDataFields/index.cjs +2 -0
- package/src/lib/views/CollectUserDataView/UserDataFields/index.js +2 -0
- package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.cjs +2 -0
- package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.js +2 -0
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.cjs +2 -0
- package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.js +2 -0
- package/src/lib/views/EmailUpdate/EmailUpdate.cjs +2 -0
- package/src/lib/views/EmailUpdate/EmailUpdate.js +2 -0
- package/src/lib/views/EmailVerification/EmailVerification.cjs +2 -0
- package/src/lib/views/EmailVerification/EmailVerification.js +2 -0
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +2 -0
- package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +2 -0
- package/src/lib/views/LoginWithEmailView/components/ListItemButton/ListItemButton.cjs +2 -0
- package/src/lib/views/LoginWithEmailView/components/ListItemButton/ListItemButton.js +2 -0
- package/src/lib/views/LoginWithEmailView/components/LoginWithEmailForm/LoginWithEmailForm.cjs +2 -0
- package/src/lib/views/LoginWithEmailView/components/LoginWithEmailForm/LoginWithEmailForm.js +2 -0
- package/src/lib/views/LoginWithEmailView/components/SocialSignIn/SocialSignIn.cjs +2 -0
- package/src/lib/views/LoginWithEmailView/components/SocialSignIn/SocialSignIn.js +2 -0
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.cjs +2 -1
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +2 -1
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.cjs +1 -0
- package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.js +1 -0
- package/src/lib/views/NoAccess/NoAccess.cjs +1 -0
- package/src/lib/views/NoAccess/NoAccess.js +1 -0
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.cjs +1 -0
- package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.js +1 -0
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.cjs +2 -0
- package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.js +2 -0
- package/src/lib/views/PendingConnectView/PendingConnectView.cjs +1 -0
- package/src/lib/views/PendingConnectView/PendingConnectView.js +1 -0
- package/src/lib/views/PendingSignatureView/PendingSignatureView.cjs +1 -0
- package/src/lib/views/PendingSignatureView/PendingSignatureView.js +1 -0
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.cjs +2 -0
- package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.js +2 -0
- package/src/lib/views/QrCodeView/QrCodeView.cjs +1 -0
- package/src/lib/views/QrCodeView/QrCodeView.js +1 -0
- package/src/lib/views/SocialRedirectView/SocialRedirectView.cjs +5 -8
- package/src/lib/views/SocialRedirectView/SocialRedirectView.js +5 -8
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.cjs +58 -0
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.d.ts +2 -0
- package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.js +54 -0
- package/src/lib/views/SocialWrongAccountView/index.d.ts +1 -0
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.cjs +92 -0
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.d.ts +13 -0
- package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.js +88 -0
- package/src/lib/{modals/TransactionConfirmationModal → views/TransactionConfirmationView}/helpers/transactionErrorMessage.cjs +6 -1
- package/src/lib/{modals/TransactionConfirmationModal → views/TransactionConfirmationView}/helpers/transactionErrorMessage.d.ts +1 -0
- package/src/lib/{modals/TransactionConfirmationModal → views/TransactionConfirmationView}/helpers/transactionErrorMessage.js +6 -1
- package/src/lib/{modals/TransactionConfirmationModal → views/TransactionConfirmationView}/hooks/useTransactionData/useTransactionData.cjs +2 -0
- package/src/lib/{modals/TransactionConfirmationModal → views/TransactionConfirmationView}/hooks/useTransactionData/useTransactionData.js +2 -0
- package/src/lib/views/TransactionConfirmationView/index.d.ts +2 -0
- package/src/lib/views/WalletList/SearchInstead/SearchInstead.cjs +2 -0
- package/src/lib/views/WalletList/SearchInstead/SearchInstead.js +2 -0
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.cjs +1 -0
- package/src/lib/views/WalletList/WalletListItem/WalletListItem.js +1 -0
- package/src/lib/views/WalletList/data.cjs +4 -5
- package/src/lib/views/WalletList/data.d.ts +2 -2
- package/src/lib/views/WalletList/data.js +4 -5
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.cjs +1 -0
- package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.js +1 -0
- package/src/lib/views/WalletUsedView/WalletUsedView.cjs +1 -0
- package/src/lib/views/WalletUsedView/WalletUsedView.js +1 -0
- package/src/lib/views/viewToComponentMap.cjs +2 -0
- package/src/lib/views/viewToComponentMap.js +2 -0
- package/src/lib/widgets/DynamicWidget/DynamicWidget.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/DynamicWidget.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/Balance/Balance.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetSwitcher/DynamicWidgetSwitcher.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetSwitcher/DynamicWidgetSwitcher.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.js +2 -0
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.cjs +11 -5
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.js +11 -5
- package/src/lib/widgets/DynamicWidget/components/WalletIconWithStatus/WalletIconWithStatus.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/components/WalletIconWithStatus/WalletIconWithStatus.js +1 -0
- package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.js +2 -0
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.js +2 -0
- package/src/lib/widgets/DynamicWidget/hooks/useFetchBalance/useFetchBalance.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/hooks/useFetchBalance/useFetchBalance.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.js +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.js +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.js +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.cjs +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.js +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.js +2 -0
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.js +2 -0
- package/src/lib/widgets/DynamicWidget/views/IndexView/IndexView.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/views/IndexView/IndexView.js +2 -0
- package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.cjs +2 -0
- package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.js +2 -0
- package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.cjs +2 -0
- package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.js +2 -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
|
@@ -31,6 +31,8 @@ require('../IconButton/IconButton.cjs');
|
|
|
31
31
|
require('../Alert/Alert.cjs');
|
|
32
32
|
require('../Popper/Popper/Popper.cjs');
|
|
33
33
|
require('../Popper/PopperContext/PopperContext.cjs');
|
|
34
|
+
require('@dynamic-labs/wallet-book');
|
|
35
|
+
require('../SendBalanceForm/SendBalanceForm.cjs');
|
|
34
36
|
require('../../context/MockContext/MockContext.cjs');
|
|
35
37
|
require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
36
38
|
require('../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
@@ -27,6 +27,8 @@ import '../IconButton/IconButton.js';
|
|
|
27
27
|
import '../Alert/Alert.js';
|
|
28
28
|
import '../Popper/Popper/Popper.js';
|
|
29
29
|
import '../Popper/PopperContext/PopperContext.js';
|
|
30
|
+
import '@dynamic-labs/wallet-book';
|
|
31
|
+
import '../SendBalanceForm/SendBalanceForm.js';
|
|
30
32
|
import '../../context/MockContext/MockContext.js';
|
|
31
33
|
import '../../context/CaptchaContext/CaptchaContext.js';
|
|
32
34
|
import '../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
require('react/jsx-runtime');
|
|
4
|
+
require('formik');
|
|
5
|
+
var yup = require('yup');
|
|
6
|
+
require('react');
|
|
7
|
+
require('@dynamic-labs/sdk-api');
|
|
8
|
+
require('../../shared/logger.cjs');
|
|
9
|
+
require('@dynamic-labs/iconic');
|
|
10
|
+
require('@dynamic-labs/wallet-connector-core');
|
|
11
|
+
require('../../context/ViewContext/ViewContext.cjs');
|
|
12
|
+
require('@dynamic-labs/utils');
|
|
13
|
+
require('../../utils/constants/colors.cjs');
|
|
14
|
+
require('ethers');
|
|
15
|
+
require('../../shared/consts/index.cjs');
|
|
16
|
+
|
|
17
|
+
yup.object().shape({
|
|
18
|
+
amount: yup.string()
|
|
19
|
+
.required('required')
|
|
20
|
+
.matches(/^\d+(\.\d{1,8})?$/, 'invalidFormat'),
|
|
21
|
+
recipient: yup.string()
|
|
22
|
+
.required('required')
|
|
23
|
+
.matches(/^0x[0-9a-fA-F]{40}$/, 'invalidFormat'),
|
|
24
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
export type SendBalanceFormValues = {
|
|
3
|
+
amount: string;
|
|
4
|
+
recipient: string;
|
|
5
|
+
};
|
|
6
|
+
export type Props = {
|
|
7
|
+
initialValues?: SendBalanceFormValues;
|
|
8
|
+
onSubmit: (formValues: SendBalanceFormValues) => void;
|
|
9
|
+
};
|
|
10
|
+
export declare const SendBalanceForm: FC<Props>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import 'react/jsx-runtime';
|
|
2
|
+
import 'formik';
|
|
3
|
+
import { object, string } from 'yup';
|
|
4
|
+
import 'react';
|
|
5
|
+
import '@dynamic-labs/sdk-api';
|
|
6
|
+
import '../../shared/logger.js';
|
|
7
|
+
import '@dynamic-labs/iconic';
|
|
8
|
+
import '@dynamic-labs/wallet-connector-core';
|
|
9
|
+
import '../../context/ViewContext/ViewContext.js';
|
|
10
|
+
import '@dynamic-labs/utils';
|
|
11
|
+
import '../../utils/constants/colors.js';
|
|
12
|
+
import 'ethers';
|
|
13
|
+
import '../../shared/consts/index.js';
|
|
14
|
+
|
|
15
|
+
object().shape({
|
|
16
|
+
amount: string()
|
|
17
|
+
.required('required')
|
|
18
|
+
.matches(/^\d+(\.\d{1,8})?$/, 'invalidFormat'),
|
|
19
|
+
recipient: string()
|
|
20
|
+
.required('required')
|
|
21
|
+
.matches(/^0x[0-9a-fA-F]{40}$/, 'invalidFormat'),
|
|
22
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FC, MouseEventHandler } from 'react';
|
|
2
|
+
import { SendBalanceFormValues } from '../SendBalanceForm/SendBalanceForm';
|
|
3
|
+
export type SendBalancePageLayoutProps = {
|
|
4
|
+
balance: string | undefined;
|
|
5
|
+
chain: string;
|
|
6
|
+
currencySymbol: string;
|
|
7
|
+
displayPoweredByDynamicFooter?: boolean;
|
|
8
|
+
error?: string;
|
|
9
|
+
isLoading: boolean;
|
|
10
|
+
onClickBack?: MouseEventHandler<HTMLButtonElement>;
|
|
11
|
+
onClickClose?: MouseEventHandler<HTMLButtonElement>;
|
|
12
|
+
onSubmit: (formValues: SendBalanceFormValues) => void;
|
|
13
|
+
walletAddress: string;
|
|
14
|
+
walletName: string;
|
|
15
|
+
};
|
|
16
|
+
export declare const SendBalancePageLayout: FC<SendBalancePageLayoutProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TokenBalanceCard } from './TokenBalanceCard';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TokenBalanceCard';
|
|
@@ -35,6 +35,8 @@ require('../IconButton/IconButton.cjs');
|
|
|
35
35
|
require('../Alert/Alert.cjs');
|
|
36
36
|
require('../Popper/Popper/Popper.cjs');
|
|
37
37
|
require('../Popper/PopperContext/PopperContext.cjs');
|
|
38
|
+
require('@dynamic-labs/wallet-book');
|
|
39
|
+
require('../SendBalanceForm/SendBalanceForm.cjs');
|
|
38
40
|
require('../../context/MockContext/MockContext.cjs');
|
|
39
41
|
require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
40
42
|
require('../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
@@ -31,6 +31,8 @@ import '../IconButton/IconButton.js';
|
|
|
31
31
|
import '../Alert/Alert.js';
|
|
32
32
|
import '../Popper/Popper/Popper.js';
|
|
33
33
|
import '../Popper/PopperContext/PopperContext.js';
|
|
34
|
+
import '@dynamic-labs/wallet-book';
|
|
35
|
+
import '../SendBalanceForm/SendBalanceForm.js';
|
|
34
36
|
import '../../context/MockContext/MockContext.js';
|
|
35
37
|
import '../../context/CaptchaContext/CaptchaContext.js';
|
|
36
38
|
import '../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { FC, MouseEventHandler, PropsWithChildren, ReactNode } from 'react';
|
|
|
2
2
|
type TransactionConfirmationPageLayoutProps = {
|
|
3
3
|
appLogoUrl?: string;
|
|
4
4
|
appName?: string;
|
|
5
|
-
appOrigin
|
|
5
|
+
appOrigin?: string;
|
|
6
6
|
disableSendButton?: boolean;
|
|
7
7
|
displayPoweredByDynamicFooter?: boolean;
|
|
8
8
|
error?: string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
export type Props = {
|
|
3
|
+
arrowIconClassName?: string;
|
|
4
|
+
className?: string;
|
|
5
|
+
destinationAddress: string;
|
|
6
|
+
originAddress: string;
|
|
7
|
+
textClassName?: string;
|
|
8
|
+
walletIconClassName?: string;
|
|
9
|
+
walletName?: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const TransactionOriginDestination: FC<Props>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
export type Props = {
|
|
3
|
+
NetworkIcon?: ReactNode;
|
|
4
|
+
amount: string;
|
|
5
|
+
destinationAddress: string;
|
|
6
|
+
displayPoweredByDynamicFooter?: boolean;
|
|
7
|
+
networkCurrency: string;
|
|
8
|
+
networkName: string;
|
|
9
|
+
onDone: () => void;
|
|
10
|
+
};
|
|
11
|
+
export declare const TransactionStatusLayout: FC<Props>;
|
|
@@ -33,6 +33,8 @@ require('../../IconButton/IconButton.cjs');
|
|
|
33
33
|
require('../../Alert/Alert.cjs');
|
|
34
34
|
require('../../Popper/Popper/Popper.cjs');
|
|
35
35
|
require('../../Popper/PopperContext/PopperContext.cjs');
|
|
36
|
+
require('@dynamic-labs/wallet-book');
|
|
37
|
+
require('../../SendBalanceForm/SendBalanceForm.cjs');
|
|
36
38
|
require('../../../context/MockContext/MockContext.cjs');
|
|
37
39
|
require('../../../context/CaptchaContext/CaptchaContext.cjs');
|
|
38
40
|
require('../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
@@ -29,6 +29,8 @@ import '../../IconButton/IconButton.js';
|
|
|
29
29
|
import '../../Alert/Alert.js';
|
|
30
30
|
import '../../Popper/Popper/Popper.js';
|
|
31
31
|
import '../../Popper/PopperContext/PopperContext.js';
|
|
32
|
+
import '@dynamic-labs/wallet-book';
|
|
33
|
+
import '../../SendBalanceForm/SendBalanceForm.js';
|
|
32
34
|
import '../../../context/MockContext/MockContext.js';
|
|
33
35
|
import '../../../context/CaptchaContext/CaptchaContext.js';
|
|
34
36
|
import '../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
@@ -33,6 +33,8 @@ require('../../../IconButton/IconButton.cjs');
|
|
|
33
33
|
require('../../../Alert/Alert.cjs');
|
|
34
34
|
require('../../../Popper/Popper/Popper.cjs');
|
|
35
35
|
require('../../../Popper/PopperContext/PopperContext.cjs');
|
|
36
|
+
require('@dynamic-labs/wallet-book');
|
|
37
|
+
require('../../../SendBalanceForm/SendBalanceForm.cjs');
|
|
36
38
|
var VerifiedEmailIcon = require('./components/VerifiedEmailIcon/VerifiedEmailIcon.cjs');
|
|
37
39
|
|
|
38
40
|
const UserProfileField = ({ name, label, value, }) => {
|
|
@@ -29,6 +29,8 @@ import '../../../IconButton/IconButton.js';
|
|
|
29
29
|
import '../../../Alert/Alert.js';
|
|
30
30
|
import '../../../Popper/Popper/Popper.js';
|
|
31
31
|
import '../../../Popper/PopperContext/PopperContext.js';
|
|
32
|
+
import '@dynamic-labs/wallet-book';
|
|
33
|
+
import '../../../SendBalanceForm/SendBalanceForm.js';
|
|
32
34
|
import { VerifiedEmailIcon } from './components/VerifiedEmailIcon/VerifiedEmailIcon.js';
|
|
33
35
|
|
|
34
36
|
const UserProfileField = ({ name, label, value, }) => {
|
|
@@ -33,6 +33,8 @@ require('../../../IconButton/IconButton.cjs');
|
|
|
33
33
|
require('../../../Alert/Alert.cjs');
|
|
34
34
|
require('../../../Popper/Popper/Popper.cjs');
|
|
35
35
|
require('../../../Popper/PopperContext/PopperContext.cjs');
|
|
36
|
+
require('@dynamic-labs/wallet-book');
|
|
37
|
+
require('../../../SendBalanceForm/SendBalanceForm.cjs');
|
|
36
38
|
|
|
37
39
|
const UserProfileSection = ({ title, children, }) => (jsxRuntime.jsxs("div", Object.assign({ className: 'user-profile-section' }, { children: [title && (jsxRuntime.jsx(Typography.Typography, Object.assign({ as: 'h6', color: 'secondary', weight: 'regular', variant: 'body_small', className: 'user-profile-section__title' }, { children: title }))), children] })));
|
|
38
40
|
|
|
@@ -29,6 +29,8 @@ import '../../../IconButton/IconButton.js';
|
|
|
29
29
|
import '../../../Alert/Alert.js';
|
|
30
30
|
import '../../../Popper/Popper/Popper.js';
|
|
31
31
|
import '../../../Popper/PopperContext/PopperContext.js';
|
|
32
|
+
import '@dynamic-labs/wallet-book';
|
|
33
|
+
import '../../../SendBalanceForm/SendBalanceForm.js';
|
|
32
34
|
|
|
33
35
|
const UserProfileSection = ({ title, children, }) => (jsxs("div", Object.assign({ className: 'user-profile-section' }, { children: [title && (jsx(Typography, Object.assign({ as: 'h6', color: 'secondary', weight: 'regular', variant: 'body_small', className: 'user-profile-section__title' }, { children: title }))), children] })));
|
|
34
36
|
|
package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs
CHANGED
|
@@ -38,6 +38,8 @@ require('../../../IconButton/IconButton.cjs');
|
|
|
38
38
|
require('../../../Alert/Alert.cjs');
|
|
39
39
|
require('../../../Popper/Popper/Popper.cjs');
|
|
40
40
|
require('../../../Popper/PopperContext/PopperContext.cjs');
|
|
41
|
+
require('@dynamic-labs/wallet-book');
|
|
42
|
+
require('../../../SendBalanceForm/SendBalanceForm.cjs');
|
|
41
43
|
var helpers = require('../../../../widgets/DynamicWidget/helpers/helpers.cjs');
|
|
42
44
|
var useUpdateUserProfileByJWTCallback = require('../../../../utils/hooks/useUpdateUserProfileByJWTCallback/useUpdateUserProfileByJWTCallback.cjs');
|
|
43
45
|
var ConnectedAccountAvatar = require('./components/ConnectedAccountAvatar/ConnectedAccountAvatar.cjs');
|
package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js
CHANGED
|
@@ -34,6 +34,8 @@ import '../../../IconButton/IconButton.js';
|
|
|
34
34
|
import '../../../Alert/Alert.js';
|
|
35
35
|
import '../../../Popper/Popper/Popper.js';
|
|
36
36
|
import '../../../Popper/PopperContext/PopperContext.js';
|
|
37
|
+
import '@dynamic-labs/wallet-book';
|
|
38
|
+
import '../../../SendBalanceForm/SendBalanceForm.js';
|
|
37
39
|
import { capitalize } from '../../../../widgets/DynamicWidget/helpers/helpers.js';
|
|
38
40
|
import { useUpdateUserProfileByJWTCallback } from '../../../../utils/hooks/useUpdateUserProfileByJWTCallback/useUpdateUserProfileByJWTCallback.js';
|
|
39
41
|
import { ConnectedAccountAvatar } from './components/ConnectedAccountAvatar/ConnectedAccountAvatar.js';
|
|
@@ -16,6 +16,7 @@ var ViewContext = require('../ViewContext/ViewContext.cjs');
|
|
|
16
16
|
require('@dynamic-labs/utils');
|
|
17
17
|
require('ethers');
|
|
18
18
|
var useLocalStorage = require('../../shared/utils/hooks/useLocalStorage/useLocalStorage.cjs');
|
|
19
|
+
var useGlobalLoading = require('../../shared/utils/hooks/useGlobalLoading/useGlobalLoading.cjs');
|
|
19
20
|
require('../../shared/consts/index.cjs');
|
|
20
21
|
var useFetchProjectSettings = require('../../utils/hooks/useFetchProjectSettings/useFetchProjectSettings.cjs');
|
|
21
22
|
var useFetchNonce = require('../../utils/hooks/useFetchNonce/useFetchNonce.cjs');
|
|
@@ -59,9 +60,9 @@ require('../../components/IconButton/IconButton.cjs');
|
|
|
59
60
|
require('../../components/Alert/Alert.cjs');
|
|
60
61
|
require('../../components/Popper/Popper/Popper.cjs');
|
|
61
62
|
require('../../components/Popper/PopperContext/PopperContext.cjs');
|
|
62
|
-
var useGlobalLoading = require('../../shared/utils/hooks/useGlobalLoading/useGlobalLoading.cjs');
|
|
63
|
-
var FundingContext = require('../FundingContext/FundingContext.cjs');
|
|
64
63
|
require('@dynamic-labs/wallet-book');
|
|
64
|
+
require('../../components/SendBalanceForm/SendBalanceForm.cjs');
|
|
65
|
+
var FundingContext = require('../FundingContext/FundingContext.cjs');
|
|
65
66
|
require('../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs');
|
|
66
67
|
require('qrcode');
|
|
67
68
|
require('../../views/CollectUserDataView/fieldsConfig.cjs');
|
|
@@ -12,6 +12,7 @@ import { ViewContextProvider } from '../ViewContext/ViewContext.js';
|
|
|
12
12
|
import '@dynamic-labs/utils';
|
|
13
13
|
import 'ethers';
|
|
14
14
|
import { useLocalStorage } from '../../shared/utils/hooks/useLocalStorage/useLocalStorage.js';
|
|
15
|
+
import { useGlobalLoading } from '../../shared/utils/hooks/useGlobalLoading/useGlobalLoading.js';
|
|
15
16
|
import '../../shared/consts/index.js';
|
|
16
17
|
import { useFetchProjectSettings } from '../../utils/hooks/useFetchProjectSettings/useFetchProjectSettings.js';
|
|
17
18
|
import { useFetchNonce } from '../../utils/hooks/useFetchNonce/useFetchNonce.js';
|
|
@@ -55,9 +56,9 @@ import '../../components/IconButton/IconButton.js';
|
|
|
55
56
|
import '../../components/Alert/Alert.js';
|
|
56
57
|
import '../../components/Popper/Popper/Popper.js';
|
|
57
58
|
import '../../components/Popper/PopperContext/PopperContext.js';
|
|
58
|
-
import { useGlobalLoading } from '../../shared/utils/hooks/useGlobalLoading/useGlobalLoading.js';
|
|
59
|
-
import { FundingContextProvider } from '../FundingContext/FundingContext.js';
|
|
60
59
|
import '@dynamic-labs/wallet-book';
|
|
60
|
+
import '../../components/SendBalanceForm/SendBalanceForm.js';
|
|
61
|
+
import { FundingContextProvider } from '../FundingContext/FundingContext.js';
|
|
61
62
|
import '../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js';
|
|
62
63
|
import 'qrcode';
|
|
63
64
|
import '../../views/CollectUserDataView/fieldsConfig.js';
|
|
@@ -14,6 +14,7 @@ require('react/jsx-runtime');
|
|
|
14
14
|
require('../../../ViewContext/ViewContext.cjs');
|
|
15
15
|
require('ethers');
|
|
16
16
|
var isEmailProviderEnabled = require('../../../../utils/functions/isEmailProviderEnabled/isEmailProviderEnabled.cjs');
|
|
17
|
+
require('../../../../shared/consts/index.cjs');
|
|
17
18
|
|
|
18
19
|
const useEmailLoginState = (providers, user) => {
|
|
19
20
|
const [loginWithEmail, setLoginWithEmail] = React.useState(isEmailProviderEnabled.isEmailProviderEnabled(providers));
|
|
@@ -10,6 +10,7 @@ import 'react/jsx-runtime';
|
|
|
10
10
|
import '../../../ViewContext/ViewContext.js';
|
|
11
11
|
import 'ethers';
|
|
12
12
|
import { isEmailProviderEnabled } from '../../../../utils/functions/isEmailProviderEnabled/isEmailProviderEnabled.js';
|
|
13
|
+
import '../../../../shared/consts/index.js';
|
|
13
14
|
|
|
14
15
|
const useEmailLoginState = (providers, user) => {
|
|
15
16
|
const [loginWithEmail, setLoginWithEmail] = useState(isEmailProviderEnabled(providers));
|
package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerAuthFlowCallbacks.cjs
CHANGED
|
@@ -30,6 +30,8 @@ require('../../../components/IconButton/IconButton.cjs');
|
|
|
30
30
|
require('../../../components/Alert/Alert.cjs');
|
|
31
31
|
require('../../../components/Popper/Popper/Popper.cjs');
|
|
32
32
|
require('../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
33
|
+
require('@dynamic-labs/wallet-book');
|
|
34
|
+
require('../../../components/SendBalanceForm/SendBalanceForm.cjs');
|
|
33
35
|
require('../../MockContext/MockContext.cjs');
|
|
34
36
|
require('../../CaptchaContext/CaptchaContext.cjs');
|
|
35
37
|
require('../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
@@ -26,6 +26,8 @@ import '../../../components/IconButton/IconButton.js';
|
|
|
26
26
|
import '../../../components/Alert/Alert.js';
|
|
27
27
|
import '../../../components/Popper/Popper/Popper.js';
|
|
28
28
|
import '../../../components/Popper/PopperContext/PopperContext.js';
|
|
29
|
+
import '@dynamic-labs/wallet-book';
|
|
30
|
+
import '../../../components/SendBalanceForm/SendBalanceForm.js';
|
|
29
31
|
import '../../MockContext/MockContext.js';
|
|
30
32
|
import '../../CaptchaContext/CaptchaContext.js';
|
|
31
33
|
import '../../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
@@ -29,6 +29,8 @@ require('../../components/IconButton/IconButton.cjs');
|
|
|
29
29
|
require('../../components/Alert/Alert.cjs');
|
|
30
30
|
require('../../components/Popper/Popper/Popper.cjs');
|
|
31
31
|
require('../../components/Popper/PopperContext/PopperContext.cjs');
|
|
32
|
+
require('@dynamic-labs/wallet-book');
|
|
33
|
+
require('../../components/SendBalanceForm/SendBalanceForm.cjs');
|
|
32
34
|
var useDefaultQrCode = require('../../utils/hooks/useDefaultQrCode/useDefaultQrCode.cjs');
|
|
33
35
|
require('../MockContext/MockContext.cjs');
|
|
34
36
|
require('../CaptchaContext/CaptchaContext.cjs');
|
|
@@ -25,6 +25,8 @@ import '../../components/IconButton/IconButton.js';
|
|
|
25
25
|
import '../../components/Alert/Alert.js';
|
|
26
26
|
import '../../components/Popper/Popper/Popper.js';
|
|
27
27
|
import '../../components/Popper/PopperContext/PopperContext.js';
|
|
28
|
+
import '@dynamic-labs/wallet-book';
|
|
29
|
+
import '../../components/SendBalanceForm/SendBalanceForm.js';
|
|
28
30
|
import { useDefaultQrCode } from '../../utils/hooks/useDefaultQrCode/useDefaultQrCode.js';
|
|
29
31
|
import '../MockContext/MockContext.js';
|
|
30
32
|
import '../CaptchaContext/CaptchaContext.js';
|
|
@@ -17,6 +17,7 @@ require('../../utils/constants/colors.cjs');
|
|
|
17
17
|
require('ethers');
|
|
18
18
|
require('../../shared/consts/index.cjs');
|
|
19
19
|
require('@dynamic-labs/multi-wallet');
|
|
20
|
+
var getReferencedAccount = require('../../utils/functions/getReferencedAccount/getReferencedAccount.cjs');
|
|
20
21
|
require('@dynamic-labs/rpc-providers');
|
|
21
22
|
var useVerifyWallet = require('../../utils/hooks/useVerifyWallet/useVerifyWallet.cjs');
|
|
22
23
|
require('react-dom');
|
|
@@ -30,6 +31,8 @@ require('../../components/IconButton/IconButton.cjs');
|
|
|
30
31
|
require('../../components/Alert/Alert.cjs');
|
|
31
32
|
require('../../components/Popper/Popper/Popper.cjs');
|
|
32
33
|
require('../../components/Popper/PopperContext/PopperContext.cjs');
|
|
34
|
+
require('@dynamic-labs/wallet-book');
|
|
35
|
+
require('../../components/SendBalanceForm/SendBalanceForm.cjs');
|
|
33
36
|
require('../MockContext/MockContext.cjs');
|
|
34
37
|
require('../ErrorContext/ErrorContext.cjs');
|
|
35
38
|
require('../CaptchaContext/CaptchaContext.cjs');
|
|
@@ -38,7 +41,7 @@ require('../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
|
38
41
|
const SocialRedirectContext = React.createContext(undefined);
|
|
39
42
|
const SocialRedirectContextProvider = ({ children, }) => {
|
|
40
43
|
var _a, _b;
|
|
41
|
-
const { setShowAuthFlow, wallets, setSelectedWalletConnector, walletUiUtils, consumeNonce, displayTermsOfService, environmentId, projectSettings, setIsSingleWalletAccount, } = useInternalDynamicContext.useInternalDynamicContext();
|
|
44
|
+
const { setShowAuthFlow, wallets, setSelectedWalletConnector, walletUiUtils, consumeNonce, displayTermsOfService, environmentId, projectSettings, setIsSingleWalletAccount, setShowDynamicUserProfile, isAuthenticated, setPrimaryWalletId, secondaryWallets, sdkHasLoaded, authToken, } = useInternalDynamicContext.useInternalDynamicContext();
|
|
42
45
|
const { setView } = ViewContext.useViewContext();
|
|
43
46
|
const verifyWallet = useVerifyWallet.useVerifyWallet({
|
|
44
47
|
consumeNonce,
|
|
@@ -56,12 +59,11 @@ const SocialRedirectContextProvider = ({ children, }) => {
|
|
|
56
59
|
.find(walletConnectorCore.isSocialWalletConnector);
|
|
57
60
|
const [redirectStatus, setRedirectStatus] = React.useState('idle');
|
|
58
61
|
const [socialProvider, setSocialProvider] = React.useState();
|
|
62
|
+
const wallet = secondaryWallets.find((wallet) => wallet.connector.key === (socialWalletConnector === null || socialWalletConnector === void 0 ? void 0 : socialWalletConnector.key));
|
|
63
|
+
const socialAccount = React.useMemo(() => (wallet ? getReferencedAccount.getReferencedAccount(authToken, wallet.id) : undefined), [authToken, wallet]);
|
|
59
64
|
React.useEffect(() => {
|
|
60
65
|
var _a;
|
|
61
|
-
if (!projectSettings) {
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
if (!socialWalletConnector) {
|
|
66
|
+
if (!projectSettings || !socialWalletConnector || !sdkHasLoaded) {
|
|
65
67
|
return;
|
|
66
68
|
}
|
|
67
69
|
const params = new URLSearchParams(window.location.search);
|
|
@@ -71,42 +73,79 @@ const SocialRedirectContextProvider = ({ children, }) => {
|
|
|
71
73
|
setRedirectStatus('loading');
|
|
72
74
|
setView('social-redirect-view');
|
|
73
75
|
setShowAuthFlow(true);
|
|
74
|
-
|
|
76
|
+
if (!isAuthenticated) {
|
|
77
|
+
setSelectedWalletConnector(socialWalletConnector);
|
|
78
|
+
}
|
|
75
79
|
(_a = socialWalletConnector
|
|
76
80
|
.getSession) === null || _a === void 0 ? void 0 : _a.call(socialWalletConnector).then((session) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
81
|
+
/**
|
|
82
|
+
* If the user is already authenticated, that means that they are in the process
|
|
83
|
+
* of setting their social wallet as their primary wallet. At this point, they
|
|
84
|
+
* have successfully re-authenticated with the social provider. We can now finish
|
|
85
|
+
* the setPrimaryWallet flow
|
|
86
|
+
*/
|
|
87
|
+
if (isAuthenticated) {
|
|
88
|
+
if (!socialAccount) {
|
|
89
|
+
throw new Error('Social account not found');
|
|
90
|
+
}
|
|
91
|
+
if (socialAccount.oauthAccountId === session.oauthId) {
|
|
92
|
+
// justification: socialAccount is defined if and only if wallet is also defined
|
|
93
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
94
|
+
setPrimaryWalletId(wallet.id);
|
|
95
|
+
setShowAuthFlow(false);
|
|
96
|
+
setShowDynamicUserProfile(true);
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
yield socialWalletConnector.endSession();
|
|
100
|
+
setView('social-wrong-account');
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
const address = yield socialWalletConnector.fetchPublicAddress();
|
|
105
|
+
walletUiUtils.disabledConfirmationOnce();
|
|
106
|
+
yield verifyWallet({
|
|
107
|
+
oauth: {
|
|
108
|
+
accessToken: session.accessToken,
|
|
109
|
+
didToken: session.didToken,
|
|
110
|
+
provider: providerFromParams,
|
|
111
|
+
},
|
|
112
|
+
/**
|
|
113
|
+
* justification: if the user just successfully authenticated their social,
|
|
114
|
+
* then the social connector must return an address
|
|
115
|
+
*/
|
|
116
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
117
|
+
publicWalletAddress: address,
|
|
118
|
+
walletConnector: socialWalletConnector,
|
|
119
|
+
});
|
|
80
120
|
}
|
|
81
|
-
walletUiUtils.enableInternalSign();
|
|
82
|
-
yield verifyWallet({
|
|
83
|
-
oauth: {
|
|
84
|
-
accessToken: session.accessToken,
|
|
85
|
-
didToken: session.didToken,
|
|
86
|
-
provider: providerFromParams,
|
|
87
|
-
},
|
|
88
|
-
publicWalletAddress: address,
|
|
89
|
-
walletConnector: socialWalletConnector,
|
|
90
|
-
});
|
|
91
121
|
setSocialProvider(undefined);
|
|
92
122
|
setRedirectStatus('success');
|
|
93
|
-
})).catch(() => {
|
|
123
|
+
})).catch((error) => {
|
|
94
124
|
setRedirectStatus('error');
|
|
95
125
|
});
|
|
96
126
|
}
|
|
97
127
|
}, [
|
|
128
|
+
socialAccount,
|
|
129
|
+
authToken,
|
|
130
|
+
isAuthenticated,
|
|
98
131
|
projectSettings,
|
|
132
|
+
sdkHasLoaded,
|
|
133
|
+
secondaryWallets,
|
|
134
|
+
setPrimaryWalletId,
|
|
99
135
|
setSelectedWalletConnector,
|
|
100
136
|
setShowAuthFlow,
|
|
137
|
+
setShowDynamicUserProfile,
|
|
101
138
|
setView,
|
|
102
139
|
socialWalletConnector,
|
|
103
140
|
verifyWallet,
|
|
104
141
|
walletUiUtils,
|
|
142
|
+
wallet,
|
|
105
143
|
]);
|
|
106
144
|
return (jsxRuntime.jsx(SocialRedirectContext.Provider, Object.assign({ value: {
|
|
107
145
|
enabledSocialProviders,
|
|
108
146
|
redirectStatus,
|
|
109
147
|
setSocialProvider,
|
|
148
|
+
socialAccount,
|
|
110
149
|
socialProvider,
|
|
111
150
|
socialWalletConnector,
|
|
112
151
|
} }, { children: children })));
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { SocialOAuthProvider } from '@dynamic-labs/types';
|
|
3
|
+
import { JwtVerifiedCredential } from '@dynamic-labs/sdk-api';
|
|
3
4
|
import { WalletConnector } from '../../..';
|
|
4
5
|
type SocialRedirectStatus = 'idle' | 'loading' | 'success' | 'error';
|
|
5
|
-
type SocialContextReturnType = {
|
|
6
|
+
export type SocialContextReturnType = {
|
|
6
7
|
enabledSocialProviders: SocialOAuthProvider[];
|
|
7
8
|
redirectStatus: SocialRedirectStatus;
|
|
8
9
|
setSocialProvider: (val: SocialOAuthProvider) => void;
|
|
10
|
+
socialAccount: JwtVerifiedCredential | undefined;
|
|
9
11
|
socialProvider: SocialOAuthProvider | undefined;
|
|
10
12
|
socialWalletConnector: WalletConnector | undefined;
|
|
11
13
|
};
|