@dynamic-labs/sdk-react-core 0.17.0-RC.16 → 0.17.0-RC.18
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 +37 -0
- package/package.cjs +2 -2
- package/package.js +2 -2
- package/package.json +8 -8
- 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 +6 -1
- package/src/lib/components/Divider/Divider.d.ts +6 -2
- package/src/lib/components/Divider/Divider.js +6 -1
- 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 +10 -6
- package/src/lib/components/Input/Input.js +10 -6
- 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.cjs +40 -0
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.d.ts +17 -0
- package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.js +36 -0
- package/src/lib/components/TransactionConfirmationPageLayout/components/TransactionRow/TransactionRow.cjs +11 -0
- package/src/lib/components/TransactionConfirmationPageLayout/components/TransactionRow/TransactionRow.d.ts +12 -0
- package/src/lib/components/TransactionConfirmationPageLayout/components/TransactionRow/TransactionRow.js +7 -0
- package/src/lib/components/TransactionConfirmationPageLayout/components/TransactionRow/index.d.ts +1 -0
- package/src/lib/components/TransactionConfirmationPageLayout/components/index.d.ts +1 -0
- package/src/lib/components/TransactionConfirmationPageLayout/index.d.ts +2 -0
- package/src/lib/components/TransactionOriginDestination/TransactionOriginDestination.d.ts +11 -0
- package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.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 +2 -0
- package/src/lib/context/DynamicContext/DynamicContext.cjs +22 -9
- package/src/lib/context/DynamicContext/DynamicContext.d.ts +2 -0
- package/src/lib/context/DynamicContext/DynamicContext.js +22 -9
- 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 +5 -2
- package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +5 -2
- 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 +2 -0
- package/src/lib/layout/DynamicAuthLayout/Header/header.js +2 -0
- 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 +25 -80
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.js +27 -82
- package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.types.d.ts +0 -4
- package/src/lib/shared/types/index.d.ts +1 -1
- 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.d.ts +7 -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/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/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/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 +63 -7
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.d.ts +8 -1
- package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.js +64 -8
- 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/useVerifyWallet/useVerifyWallet.cjs +1 -1
- package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +1 -1
- package/src/lib/utils/hooks/useWalletConnectors/reconnectSocialWallet.d.ts +8 -0
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.cjs +18 -6
- package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.js +18 -6
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.cjs +8 -8
- package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.js +8 -8
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.cjs +3 -2
- package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.js +3 -2
- 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 +1 -0
- package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +1 -0
- 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 +2 -0
- package/src/lib/views/SocialRedirectView/SocialRedirectView.js +2 -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/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/DynamicWidgetPrompts/DynamicWidgetPrompts.cjs +15 -5
- package/src/lib/widgets/DynamicWidget/components/DynamicWidgetPrompts/DynamicWidgetPrompts.js +15 -5
- 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 +4 -1
- package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.js +4 -1
- 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 +40 -6
- package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.d.ts +2 -1
- package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.js +41 -7
- 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/{components/DefaultPendingSignModalContent/DefaultPendingSignModalContent.cjs → prompts/DefaultPromptModal/DefaultPromptModal.cjs} +8 -13
- 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} +8 -13
- 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 +2 -1
- package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.js +2 -1
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/PendingAccountSwitchModal.cjs +17 -42
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/PendingAccountSwitchModal.js +18 -43
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.cjs +42 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.d.ts +7 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.js +38 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.cjs +68 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.d.ts +8 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.js +64 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.cjs +58 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.d.ts +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.js +54 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.cjs +45 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.d.ts +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.js +41 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/index.d.ts +1 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.cjs +65 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.d.ts +2 -0
- package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.js +61 -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 +5 -6
- package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.js +6 -7
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.cjs +2 -1
- package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.js +2 -1
- 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/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/prompts/DetectedKnownSecondaryWalletModal/DetectedKnownSecondaryWalletModal.cjs +0 -61
- package/src/lib/widgets/DynamicWidget/prompts/DetectedKnownSecondaryWalletModal/DetectedKnownSecondaryWalletModal.d.ts +0 -7
- package/src/lib/widgets/DynamicWidget/prompts/DetectedKnownSecondaryWalletModal/DetectedKnownSecondaryWalletModal.js +0 -57
- package/src/lib/widgets/DynamicWidget/prompts/DetectedKnownSecondaryWalletModal/index.d.ts +0 -1
- /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
|
@@ -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';
|
|
@@ -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('../ErrorContext/ErrorContext.cjs');
|
|
35
37
|
require('../CaptchaContext/CaptchaContext.cjs');
|
|
@@ -78,10 +80,11 @@ const SocialRedirectContextProvider = ({ children, }) => {
|
|
|
78
80
|
if (!address) {
|
|
79
81
|
return;
|
|
80
82
|
}
|
|
81
|
-
walletUiUtils.
|
|
83
|
+
walletUiUtils.disabledConfirmationOnce();
|
|
82
84
|
yield verifyWallet({
|
|
83
85
|
oauth: {
|
|
84
86
|
accessToken: session.accessToken,
|
|
87
|
+
didToken: session.didToken,
|
|
85
88
|
provider: providerFromParams,
|
|
86
89
|
},
|
|
87
90
|
publicWalletAddress: address,
|
|
@@ -89,7 +92,7 @@ const SocialRedirectContextProvider = ({ children, }) => {
|
|
|
89
92
|
});
|
|
90
93
|
setSocialProvider(undefined);
|
|
91
94
|
setRedirectStatus('success');
|
|
92
|
-
})).catch(() => {
|
|
95
|
+
})).catch((error) => {
|
|
93
96
|
setRedirectStatus('error');
|
|
94
97
|
});
|
|
95
98
|
}
|
|
@@ -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 '../ErrorContext/ErrorContext.js';
|
|
31
33
|
import '../CaptchaContext/CaptchaContext.js';
|
|
@@ -74,10 +76,11 @@ const SocialRedirectContextProvider = ({ children, }) => {
|
|
|
74
76
|
if (!address) {
|
|
75
77
|
return;
|
|
76
78
|
}
|
|
77
|
-
walletUiUtils.
|
|
79
|
+
walletUiUtils.disabledConfirmationOnce();
|
|
78
80
|
yield verifyWallet({
|
|
79
81
|
oauth: {
|
|
80
82
|
accessToken: session.accessToken,
|
|
83
|
+
didToken: session.didToken,
|
|
81
84
|
provider: providerFromParams,
|
|
82
85
|
},
|
|
83
86
|
publicWalletAddress: address,
|
|
@@ -85,7 +88,7 @@ const SocialRedirectContextProvider = ({ children, }) => {
|
|
|
85
88
|
});
|
|
86
89
|
setSocialProvider(undefined);
|
|
87
90
|
setRedirectStatus('success');
|
|
88
|
-
})).catch(() => {
|
|
91
|
+
})).catch((error) => {
|
|
89
92
|
setRedirectStatus('error');
|
|
90
93
|
});
|
|
91
94
|
}
|
|
@@ -39,6 +39,8 @@ require('../../components/Alert/Alert.cjs');
|
|
|
39
39
|
var AnimatePresence = require('../../components/AnimatePresence/AnimatePresence.cjs');
|
|
40
40
|
require('../../components/Popper/Popper/Popper.cjs');
|
|
41
41
|
require('../../components/Popper/PopperContext/PopperContext.cjs');
|
|
42
|
+
require('@dynamic-labs/wallet-book');
|
|
43
|
+
require('../../components/SendBalanceForm/SendBalanceForm.cjs');
|
|
42
44
|
var isUserLinkingWallet = require('../../shared/utils/functions/isUserLinkingWallet/isUserLinkingWallet.cjs');
|
|
43
45
|
require('../../components/OverlayCard/OverlayCard.context.cjs');
|
|
44
46
|
var OverlayCardTarget = require('../../components/OverlayCard/OverlayCardTarget.cjs');
|
|
@@ -35,6 +35,8 @@ import '../../components/Alert/Alert.js';
|
|
|
35
35
|
import { AnimatePresence } from '../../components/AnimatePresence/AnimatePresence.js';
|
|
36
36
|
import '../../components/Popper/Popper/Popper.js';
|
|
37
37
|
import '../../components/Popper/PopperContext/PopperContext.js';
|
|
38
|
+
import '@dynamic-labs/wallet-book';
|
|
39
|
+
import '../../components/SendBalanceForm/SendBalanceForm.js';
|
|
38
40
|
import { isUserLinkingWallet } from '../../shared/utils/functions/isUserLinkingWallet/isUserLinkingWallet.js';
|
|
39
41
|
import '../../components/OverlayCard/OverlayCard.context.js';
|
|
40
42
|
import { OverlayCardTarget } from '../../components/OverlayCard/OverlayCardTarget.js';
|
|
@@ -37,6 +37,8 @@ require('../../../components/IconButton/IconButton.cjs');
|
|
|
37
37
|
require('../../../components/Alert/Alert.cjs');
|
|
38
38
|
require('../../../components/Popper/Popper/Popper.cjs');
|
|
39
39
|
require('../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
40
|
+
require('@dynamic-labs/wallet-book');
|
|
41
|
+
require('../../../components/SendBalanceForm/SendBalanceForm.cjs');
|
|
40
42
|
|
|
41
43
|
const Footer = ({ heading, icon, projectSettings }) => {
|
|
42
44
|
const { theme } = ThemeContext.useThemeContext();
|
|
@@ -33,6 +33,8 @@ import '../../../components/IconButton/IconButton.js';
|
|
|
33
33
|
import '../../../components/Alert/Alert.js';
|
|
34
34
|
import '../../../components/Popper/Popper/Popper.js';
|
|
35
35
|
import '../../../components/Popper/PopperContext/PopperContext.js';
|
|
36
|
+
import '@dynamic-labs/wallet-book';
|
|
37
|
+
import '../../../components/SendBalanceForm/SendBalanceForm.js';
|
|
36
38
|
|
|
37
39
|
const Footer = ({ heading, icon, projectSettings }) => {
|
|
38
40
|
const { theme } = useThemeContext();
|
package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/Item/Item.cjs
CHANGED
|
@@ -33,6 +33,8 @@ require('../../../../../components/IconButton/IconButton.cjs');
|
|
|
33
33
|
require('../../../../../components/Alert/Alert.cjs');
|
|
34
34
|
require('../../../../../components/Popper/Popper/Popper.cjs');
|
|
35
35
|
require('../../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
36
|
+
require('@dynamic-labs/wallet-book');
|
|
37
|
+
require('../../../../../components/SendBalanceForm/SendBalanceForm.cjs');
|
|
36
38
|
|
|
37
39
|
const Item = ({ heading, StartIcon, EndIcon, message, url, }) => (jsxRuntime.jsxs("a", Object.assign({ className: 'footer-buttons-item', href: url, rel: 'noopener noreferrer', target: '_blank' }, { children: [jsxRuntime.jsx("div", Object.assign({ className: 'footer-buttons-item__icon--left' }, { children: jsxRuntime.jsx(StartIcon, {}) })), jsxRuntime.jsxs("div", Object.assign({ className: 'footer-buttons-item__typography' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ as: 'h2', weight: 'regular', color: 'primary', variant: 'body_normal' }, { children: heading })), message && (jsxRuntime.jsx(Typography.Typography, Object.assign({ as: 'p', weight: 'regular', color: 'secondary' }, { children: message })))] })), EndIcon && jsxRuntime.jsx(EndIcon, { style: { height: '1.5rem', width: '1.5rem' } })] })));
|
|
38
40
|
|
|
@@ -29,6 +29,8 @@ import '../../../../../components/IconButton/IconButton.js';
|
|
|
29
29
|
import '../../../../../components/Alert/Alert.js';
|
|
30
30
|
import '../../../../../components/Popper/Popper/Popper.js';
|
|
31
31
|
import '../../../../../components/Popper/PopperContext/PopperContext.js';
|
|
32
|
+
import '@dynamic-labs/wallet-book';
|
|
33
|
+
import '../../../../../components/SendBalanceForm/SendBalanceForm.js';
|
|
32
34
|
|
|
33
35
|
const Item = ({ heading, StartIcon, EndIcon, message, url, }) => (jsxs("a", Object.assign({ className: 'footer-buttons-item', href: url, rel: 'noopener noreferrer', target: '_blank' }, { children: [jsx("div", Object.assign({ className: 'footer-buttons-item__icon--left' }, { children: jsx(StartIcon, {}) })), jsxs("div", Object.assign({ className: 'footer-buttons-item__typography' }, { children: [jsx(Typography, Object.assign({ as: 'h2', weight: 'regular', color: 'primary', variant: 'body_normal' }, { children: heading })), message && (jsx(Typography, Object.assign({ as: 'p', weight: 'regular', color: 'secondary' }, { children: message })))] })), EndIcon && jsx(EndIcon, { style: { height: '1.5rem', width: '1.5rem' } })] })));
|
|
34
36
|
|
|
@@ -35,6 +35,8 @@ require('../../../../../components/IconButton/IconButton.cjs');
|
|
|
35
35
|
require('../../../../../components/Alert/Alert.cjs');
|
|
36
36
|
require('../../../../../components/Popper/Popper/Popper.cjs');
|
|
37
37
|
require('../../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
38
|
+
require('@dynamic-labs/wallet-book');
|
|
39
|
+
require('../../../../../components/SendBalanceForm/SendBalanceForm.cjs');
|
|
38
40
|
var NewToWeb3WalletItem = require('../NewToWeb3WalletItem/NewToWeb3WalletItem.cjs');
|
|
39
41
|
|
|
40
42
|
const WalletExtensionOrAppContinueButton = ({ wallet, selectedUrl, }) => {
|
|
@@ -31,6 +31,8 @@ import '../../../../../components/IconButton/IconButton.js';
|
|
|
31
31
|
import '../../../../../components/Alert/Alert.js';
|
|
32
32
|
import '../../../../../components/Popper/Popper/Popper.js';
|
|
33
33
|
import '../../../../../components/Popper/PopperContext/PopperContext.js';
|
|
34
|
+
import '@dynamic-labs/wallet-book';
|
|
35
|
+
import '../../../../../components/SendBalanceForm/SendBalanceForm.js';
|
|
34
36
|
import { NewToWeb3WalletItem } from '../NewToWeb3WalletItem/NewToWeb3WalletItem.js';
|
|
35
37
|
|
|
36
38
|
const WalletExtensionOrAppContinueButton = ({ wallet, selectedUrl, }) => {
|
|
@@ -39,6 +39,7 @@ var EnterTileAnimation = require('../../../../components/EnterTileAnimation/Ente
|
|
|
39
39
|
require('../../../../components/Alert/Alert.cjs');
|
|
40
40
|
require('../../../../components/Popper/Popper/Popper.cjs');
|
|
41
41
|
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
42
|
+
require('../../../../components/SendBalanceForm/SendBalanceForm.cjs');
|
|
42
43
|
var NewToWeb3WalletItem = require('./NewToWeb3WalletItem/NewToWeb3WalletItem.cjs');
|
|
43
44
|
var Item = require('./Item/Item.cjs');
|
|
44
45
|
var WalletExtensionOrAppContinueButton = require('./WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.cjs');
|
|
@@ -35,6 +35,7 @@ import { EnterTileAnimation } from '../../../../components/EnterTileAnimation/En
|
|
|
35
35
|
import '../../../../components/Alert/Alert.js';
|
|
36
36
|
import '../../../../components/Popper/Popper/Popper.js';
|
|
37
37
|
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
38
|
+
import '../../../../components/SendBalanceForm/SendBalanceForm.js';
|
|
38
39
|
import { NewToWeb3WalletItem } from './NewToWeb3WalletItem/NewToWeb3WalletItem.js';
|
|
39
40
|
import { Item } from './Item/Item.js';
|
|
40
41
|
import { WalletExtensionOrAppContinueButton } from './WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.js';
|
|
@@ -39,6 +39,8 @@ require('../../../../components/Alert/Alert.cjs');
|
|
|
39
39
|
var PoweredByDynamic = require('../../../../components/PoweredByDynamic/PoweredByDynamic.cjs');
|
|
40
40
|
require('../../../../components/Popper/Popper/Popper.cjs');
|
|
41
41
|
require('../../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
42
|
+
require('@dynamic-labs/wallet-book');
|
|
43
|
+
require('../../../../components/SendBalanceForm/SendBalanceForm.cjs');
|
|
42
44
|
|
|
43
45
|
const WalletMoreInfoContent = ({ appName, variant, walletName, }) => {
|
|
44
46
|
const defaultSignContent = {
|
|
@@ -35,6 +35,8 @@ import '../../../../components/Alert/Alert.js';
|
|
|
35
35
|
import { PoweredByDynamic } from '../../../../components/PoweredByDynamic/PoweredByDynamic.js';
|
|
36
36
|
import '../../../../components/Popper/Popper/Popper.js';
|
|
37
37
|
import '../../../../components/Popper/PopperContext/PopperContext.js';
|
|
38
|
+
import '@dynamic-labs/wallet-book';
|
|
39
|
+
import '../../../../components/SendBalanceForm/SendBalanceForm.js';
|
|
38
40
|
|
|
39
41
|
const WalletMoreInfoContent = ({ appName, variant, walletName, }) => {
|
|
40
42
|
const defaultSignContent = {
|
|
@@ -37,6 +37,8 @@ require('../../../components/Alert/Alert.cjs');
|
|
|
37
37
|
require('../../../components/Popper/Popper/Popper.cjs');
|
|
38
38
|
require('../../../components/Popper/PopperContext/PopperContext.cjs');
|
|
39
39
|
var Skeleton = require('../../../components/Skeleton/Skeleton.cjs');
|
|
40
|
+
require('@dynamic-labs/wallet-book');
|
|
41
|
+
require('../../../components/SendBalanceForm/SendBalanceForm.cjs');
|
|
40
42
|
var QrCodeContext = require('../../../context/QrCodeContext/QrCodeContext.cjs');
|
|
41
43
|
|
|
42
44
|
const Header = ({ onClose: handleClose, heading, projectSettings, }) => {
|
|
@@ -33,6 +33,8 @@ import '../../../components/Alert/Alert.js';
|
|
|
33
33
|
import '../../../components/Popper/Popper/Popper.js';
|
|
34
34
|
import '../../../components/Popper/PopperContext/PopperContext.js';
|
|
35
35
|
import { Skeleton } from '../../../components/Skeleton/Skeleton.js';
|
|
36
|
+
import '@dynamic-labs/wallet-book';
|
|
37
|
+
import '../../../components/SendBalanceForm/SendBalanceForm.js';
|
|
36
38
|
import { useQrCodeContext } from '../../../context/QrCodeContext/QrCodeContext.js';
|
|
37
39
|
|
|
38
40
|
const Header = ({ onClose: handleClose, heading, projectSettings, }) => {
|
|
@@ -46,6 +46,8 @@ require('../../components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
|
46
46
|
var VerticalDrawerTransition = require('../../components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.cjs');
|
|
47
47
|
require('../../components/Popper/Popper/Popper.cjs');
|
|
48
48
|
require('../../components/Popper/PopperContext/PopperContext.cjs');
|
|
49
|
+
require('@dynamic-labs/wallet-book');
|
|
50
|
+
require('../../components/SendBalanceForm/SendBalanceForm.cjs');
|
|
49
51
|
|
|
50
52
|
const SignMessageConfirmationModal = ({ appLogoUrl, appName, appOrigin, message, handler, onReject, onSignMessage, }) => {
|
|
51
53
|
usePreventPageScroll.usePreventPageScroll(true);
|
|
@@ -42,6 +42,8 @@ import '../../components/Transition/OpacityTransition/OpacityTransition.js';
|
|
|
42
42
|
import { VerticalDrawerTransition } from '../../components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.js';
|
|
43
43
|
import '../../components/Popper/Popper/Popper.js';
|
|
44
44
|
import '../../components/Popper/PopperContext/PopperContext.js';
|
|
45
|
+
import '@dynamic-labs/wallet-book';
|
|
46
|
+
import '../../components/SendBalanceForm/SendBalanceForm.js';
|
|
45
47
|
|
|
46
48
|
const SignMessageConfirmationModal = ({ appLogoUrl, appName, appOrigin, message, handler, onReject, onSignMessage, }) => {
|
|
47
49
|
usePreventPageScroll(true);
|
|
@@ -4,115 +4,60 @@ 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('@dynamic-labs/iconic');
|
|
13
10
|
require('@dynamic-labs/wallet-connector-core');
|
|
14
|
-
|
|
11
|
+
require('../../context/ViewContext/ViewContext.cjs');
|
|
12
|
+
require('@dynamic-labs/utils');
|
|
15
13
|
require('../../utils/constants/colors.cjs');
|
|
16
|
-
|
|
14
|
+
require('ethers');
|
|
17
15
|
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
16
|
var index = require('../../shared/consts/index.cjs');
|
|
23
|
-
|
|
17
|
+
require('../../context/DynamicContext/DynamicContext.cjs');
|
|
24
18
|
require('@dynamic-labs/multi-wallet');
|
|
25
19
|
require('../../components/ShadowDOM/ShadowDOM.cjs');
|
|
26
20
|
require('../../context/ThemeContext/ThemeContext.cjs');
|
|
27
|
-
var Icon = require('../../components/Icon/Icon.cjs');
|
|
28
21
|
var Portal = require('../../components/Portal/Portal.cjs');
|
|
29
22
|
require('react-dom');
|
|
30
23
|
require('../../config/ApiEndpoint.cjs');
|
|
31
24
|
require('@dynamic-labs/rpc-providers');
|
|
32
25
|
require('../../context/ErrorContext/ErrorContext.cjs');
|
|
33
|
-
var
|
|
34
|
-
var transactionErrorMessage = require('./helpers/transactionErrorMessage.cjs');
|
|
35
|
-
var useTransactionData = require('./hooks/useTransactionData/useTransactionData.cjs');
|
|
26
|
+
var TransactionConfirmationView = require('../../views/TransactionConfirmationView/TransactionConfirmationView.cjs');
|
|
36
27
|
require('../../context/MockContext/MockContext.cjs');
|
|
37
28
|
require('../../context/CaptchaContext/CaptchaContext.cjs');
|
|
38
|
-
var usePromise = require('../../utils/hooks/usePromise/usePromise.cjs');
|
|
39
|
-
var useMutation = require('../../utils/hooks/useMutation/useMutation.cjs');
|
|
40
29
|
require('../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
|
|
41
|
-
|
|
42
|
-
|
|
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');
|
|
30
|
+
require('../../components/IconButton/IconButton.cjs');
|
|
31
|
+
require('../../components/Alert/Alert.cjs');
|
|
49
32
|
require('../../components/Transition/ZoomTransition/ZoomTransition.cjs');
|
|
50
33
|
require('../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
|
|
51
34
|
require('../../components/Transition/OpacityTransition/OpacityTransition.cjs');
|
|
52
|
-
var VerticalDrawerTransition = require('../../components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.cjs');
|
|
53
35
|
require('../../components/Popper/Popper/Popper.cjs');
|
|
54
36
|
require('../../components/Popper/PopperContext/PopperContext.cjs');
|
|
37
|
+
require('@dynamic-labs/wallet-book');
|
|
38
|
+
require('../../components/SendBalanceForm/SendBalanceForm.cjs');
|
|
55
39
|
|
|
56
|
-
const TransactionConfirmationModal = ({ title,
|
|
40
|
+
const TransactionConfirmationModal = ({ title, handler, onReject, onTransactionResponseSuccess, transaction, provider, }) => {
|
|
57
41
|
usePreventPageScroll.usePreventPageScroll(true);
|
|
58
|
-
const { primaryWallet } = useInternalDynamicContext.useInternalDynamicContext();
|
|
59
|
-
const didConfirmRef = React.useRef(false);
|
|
60
42
|
const [show, setShow] = React.useState(true);
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
const { data: balance } = usePromise.usePromise(() => primaryWallet.connector
|
|
65
|
-
.getBalance()
|
|
66
|
-
.then((balanceText) => balanceText ? ethers.ethers.utils.parseEther(balanceText) : undefined));
|
|
67
|
-
const [currencySymbol] = useFetchCurrency.useFetchCurrency(primaryWallet.connector);
|
|
68
|
-
const { isLoading, mutate: sendTransaction, data: transactionResponse, error: transactionError, } = useMutation.useMutation(() => handler(transaction), {
|
|
69
|
-
onSuccess: () => {
|
|
70
|
-
didConfirmRef.current = true;
|
|
71
|
-
setShow(false);
|
|
72
|
-
},
|
|
73
|
-
});
|
|
74
|
-
const { isLoading: isLoadingTransaction, isTransactionFromAddressLoading, isTransactionToAddressLoading, transactionFromAddress, transactionToAddress, isEffectiveValueLoading, transactionValue, gasEstimate, isGasPriceLoading, total, } = useTransactionData.useTransactionData({
|
|
75
|
-
provider,
|
|
76
|
-
transaction,
|
|
77
|
-
});
|
|
78
|
-
const hasInsufficientFunds = React.useMemo(() => {
|
|
79
|
-
if (balance === undefined || total === undefined)
|
|
80
|
-
return false;
|
|
81
|
-
return total.gt(balance);
|
|
82
|
-
}, [balance, total]);
|
|
83
|
-
const missingFunds = React.useMemo(() => {
|
|
84
|
-
if (balance === undefined || total === undefined)
|
|
85
|
-
return undefined;
|
|
86
|
-
return total.sub(balance);
|
|
87
|
-
}, [balance, total]);
|
|
88
|
-
const handleOnReject = React.useCallback(() => {
|
|
89
|
-
didConfirmRef.current = false;
|
|
43
|
+
const errorRef = React.useRef(null);
|
|
44
|
+
const transactionResponseRef = React.useRef(null);
|
|
45
|
+
const closeModal = React.useCallback(() => {
|
|
90
46
|
setShow(false);
|
|
91
47
|
}, [setShow]);
|
|
92
48
|
const handleOnModalUnmount = React.useCallback(() => {
|
|
93
|
-
if (
|
|
94
|
-
return onTransactionResponseSuccess(
|
|
49
|
+
if (transactionResponseRef.current) {
|
|
50
|
+
return onTransactionResponseSuccess(transactionResponseRef.current);
|
|
95
51
|
}
|
|
96
|
-
onReject(
|
|
97
|
-
}, [
|
|
98
|
-
|
|
99
|
-
transactionError,
|
|
100
|
-
onTransactionResponseSuccess,
|
|
101
|
-
onReject,
|
|
102
|
-
]);
|
|
103
|
-
const ChainIcon = getChainIcon.getChainIcon('evm');
|
|
104
|
-
const closeButton = (jsxRuntime.jsx(IconButton.IconButton, Object.assign({ type: 'button', onClick: handleOnReject, "data-testid": 'close', disabled: isLoading }, { children: jsxRuntime.jsx(close.ReactComponent, {}) })));
|
|
105
|
-
return (jsxRuntime.jsx(Portal.Portal, Object.assign({ handleClose: handleOnReject, isShown: show, zIndex: index.authModalZIndex, withBackdrop: true, elementId: 'dynamic-send-transaction', transitionEvents: {
|
|
52
|
+
onReject(errorRef.current || new Error('user rejected transaction'));
|
|
53
|
+
}, [onTransactionResponseSuccess, onReject]);
|
|
54
|
+
return (jsxRuntime.jsx(Portal.Portal, Object.assign({ handleClose: closeModal, isShown: show, zIndex: index.authModalZIndex, withBackdrop: true, elementId: 'dynamic-send-transaction', transitionEvents: {
|
|
106
55
|
onUnmount: handleOnModalUnmount,
|
|
107
|
-
} }, { children: jsxRuntime.
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
display: 'flex',
|
|
114
|
-
gap: '0.25rem',
|
|
115
|
-
minWidth: 0,
|
|
116
|
-
} }, { 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 }))] })));
|
|
56
|
+
} }, { children: jsxRuntime.jsx("div", Object.assign({ className: 'transaction-confirmation' }, { children: jsxRuntime.jsx(TransactionConfirmationView.TransactionConfirmationView, { provider: provider, transaction: transaction, title: title, mutation: () => handler(transaction), onClickClose: closeModal, onError: (error) => (errorRef.current = error), onSuccess: (transactionResponse) => {
|
|
57
|
+
errorRef.current = null;
|
|
58
|
+
transactionResponseRef.current = transactionResponse;
|
|
59
|
+
closeModal();
|
|
60
|
+
} }) })) })));
|
|
61
|
+
};
|
|
117
62
|
|
|
118
63
|
exports.TransactionConfirmationModal = TransactionConfirmationModal;
|
|
@@ -1,114 +1,59 @@
|
|
|
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 '@dynamic-labs/iconic';
|
|
9
6
|
import '@dynamic-labs/wallet-connector-core';
|
|
10
|
-
import
|
|
7
|
+
import '../../context/ViewContext/ViewContext.js';
|
|
8
|
+
import '@dynamic-labs/utils';
|
|
11
9
|
import '../../utils/constants/colors.js';
|
|
12
|
-
import
|
|
10
|
+
import 'ethers';
|
|
13
11
|
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
12
|
import { authModalZIndex } from '../../shared/consts/index.js';
|
|
19
|
-
import
|
|
13
|
+
import '../../context/DynamicContext/DynamicContext.js';
|
|
20
14
|
import '@dynamic-labs/multi-wallet';
|
|
21
15
|
import '../../components/ShadowDOM/ShadowDOM.js';
|
|
22
16
|
import '../../context/ThemeContext/ThemeContext.js';
|
|
23
|
-
import { Icon } from '../../components/Icon/Icon.js';
|
|
24
17
|
import { Portal } from '../../components/Portal/Portal.js';
|
|
25
18
|
import 'react-dom';
|
|
26
19
|
import '../../config/ApiEndpoint.js';
|
|
27
20
|
import '@dynamic-labs/rpc-providers';
|
|
28
21
|
import '../../context/ErrorContext/ErrorContext.js';
|
|
29
|
-
import {
|
|
30
|
-
import { transactionErrorMessage } from './helpers/transactionErrorMessage.js';
|
|
31
|
-
import { useTransactionData } from './hooks/useTransactionData/useTransactionData.js';
|
|
22
|
+
import { TransactionConfirmationView } from '../../views/TransactionConfirmationView/TransactionConfirmationView.js';
|
|
32
23
|
import '../../context/MockContext/MockContext.js';
|
|
33
24
|
import '../../context/CaptchaContext/CaptchaContext.js';
|
|
34
|
-
import { usePromise } from '../../utils/hooks/usePromise/usePromise.js';
|
|
35
|
-
import { useMutation } from '../../utils/hooks/useMutation/useMutation.js';
|
|
36
25
|
import '../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
|
|
37
|
-
import
|
|
38
|
-
import
|
|
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';
|
|
26
|
+
import '../../components/IconButton/IconButton.js';
|
|
27
|
+
import '../../components/Alert/Alert.js';
|
|
45
28
|
import '../../components/Transition/ZoomTransition/ZoomTransition.js';
|
|
46
29
|
import '../../components/Transition/SlideInUpTransition/SlideInUpTransition.js';
|
|
47
30
|
import '../../components/Transition/OpacityTransition/OpacityTransition.js';
|
|
48
|
-
import { VerticalDrawerTransition } from '../../components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.js';
|
|
49
31
|
import '../../components/Popper/Popper/Popper.js';
|
|
50
32
|
import '../../components/Popper/PopperContext/PopperContext.js';
|
|
33
|
+
import '@dynamic-labs/wallet-book';
|
|
34
|
+
import '../../components/SendBalanceForm/SendBalanceForm.js';
|
|
51
35
|
|
|
52
|
-
const TransactionConfirmationModal = ({ title,
|
|
36
|
+
const TransactionConfirmationModal = ({ title, handler, onReject, onTransactionResponseSuccess, transaction, provider, }) => {
|
|
53
37
|
usePreventPageScroll(true);
|
|
54
|
-
const { primaryWallet } = useInternalDynamicContext();
|
|
55
|
-
const didConfirmRef = useRef(false);
|
|
56
38
|
const [show, setShow] = useState(true);
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
const { data: balance } = usePromise(() => primaryWallet.connector
|
|
61
|
-
.getBalance()
|
|
62
|
-
.then((balanceText) => balanceText ? ethers.utils.parseEther(balanceText) : undefined));
|
|
63
|
-
const [currencySymbol] = useFetchCurrency(primaryWallet.connector);
|
|
64
|
-
const { isLoading, mutate: sendTransaction, data: transactionResponse, error: transactionError, } = useMutation(() => handler(transaction), {
|
|
65
|
-
onSuccess: () => {
|
|
66
|
-
didConfirmRef.current = true;
|
|
67
|
-
setShow(false);
|
|
68
|
-
},
|
|
69
|
-
});
|
|
70
|
-
const { isLoading: isLoadingTransaction, isTransactionFromAddressLoading, isTransactionToAddressLoading, transactionFromAddress, transactionToAddress, isEffectiveValueLoading, transactionValue, gasEstimate, isGasPriceLoading, total, } = useTransactionData({
|
|
71
|
-
provider,
|
|
72
|
-
transaction,
|
|
73
|
-
});
|
|
74
|
-
const hasInsufficientFunds = useMemo(() => {
|
|
75
|
-
if (balance === undefined || total === undefined)
|
|
76
|
-
return false;
|
|
77
|
-
return total.gt(balance);
|
|
78
|
-
}, [balance, total]);
|
|
79
|
-
const missingFunds = useMemo(() => {
|
|
80
|
-
if (balance === undefined || total === undefined)
|
|
81
|
-
return undefined;
|
|
82
|
-
return total.sub(balance);
|
|
83
|
-
}, [balance, total]);
|
|
84
|
-
const handleOnReject = useCallback(() => {
|
|
85
|
-
didConfirmRef.current = false;
|
|
39
|
+
const errorRef = useRef(null);
|
|
40
|
+
const transactionResponseRef = useRef(null);
|
|
41
|
+
const closeModal = useCallback(() => {
|
|
86
42
|
setShow(false);
|
|
87
43
|
}, [setShow]);
|
|
88
44
|
const handleOnModalUnmount = useCallback(() => {
|
|
89
|
-
if (
|
|
90
|
-
return onTransactionResponseSuccess(
|
|
45
|
+
if (transactionResponseRef.current) {
|
|
46
|
+
return onTransactionResponseSuccess(transactionResponseRef.current);
|
|
91
47
|
}
|
|
92
|
-
onReject(
|
|
93
|
-
}, [
|
|
94
|
-
|
|
95
|
-
transactionError,
|
|
96
|
-
onTransactionResponseSuccess,
|
|
97
|
-
onReject,
|
|
98
|
-
]);
|
|
99
|
-
const ChainIcon = getChainIcon('evm');
|
|
100
|
-
const closeButton = (jsx(IconButton, Object.assign({ type: 'button', onClick: handleOnReject, "data-testid": 'close', disabled: isLoading }, { children: jsx(SvgClose, {}) })));
|
|
101
|
-
return (jsx(Portal, Object.assign({ handleClose: handleOnReject, isShown: show, zIndex: authModalZIndex, withBackdrop: true, elementId: 'dynamic-send-transaction', transitionEvents: {
|
|
48
|
+
onReject(errorRef.current || new Error('user rejected transaction'));
|
|
49
|
+
}, [onTransactionResponseSuccess, onReject]);
|
|
50
|
+
return (jsx(Portal, Object.assign({ handleClose: closeModal, isShown: show, zIndex: authModalZIndex, withBackdrop: true, elementId: 'dynamic-send-transaction', transitionEvents: {
|
|
102
51
|
onUnmount: handleOnModalUnmount,
|
|
103
|
-
} }, { children:
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
display: 'flex',
|
|
110
|
-
gap: '0.25rem',
|
|
111
|
-
minWidth: 0,
|
|
112
|
-
} }, { 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 }))] })));
|
|
52
|
+
} }, { children: jsx("div", Object.assign({ className: 'transaction-confirmation' }, { children: jsx(TransactionConfirmationView, { provider: provider, transaction: transaction, title: title, mutation: () => handler(transaction), onClickClose: closeModal, onError: (error) => (errorRef.current = error), onSuccess: (transactionResponse) => {
|
|
53
|
+
errorRef.current = null;
|
|
54
|
+
transactionResponseRef.current = transactionResponse;
|
|
55
|
+
closeModal();
|
|
56
|
+
} }) })) })));
|
|
57
|
+
};
|
|
113
58
|
|
|
114
59
|
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;
|
|
@@ -96,7 +96,7 @@ export type OnConnectSuccess = (params: {
|
|
|
96
96
|
walletConnector: WalletConnector | undefined;
|
|
97
97
|
}) => void;
|
|
98
98
|
export type OnUserProfileUpdate = (user: UserProfile) => void;
|
|
99
|
-
export type MultiWalletWidgetState = 'idle' | 'awaiting_account_switch' | 'awaiting_connection' | 'awaiting_signature' | '
|
|
99
|
+
export type MultiWalletWidgetState = 'idle' | 'awaiting_account_switch' | 'awaiting_connection' | 'awaiting_signature' | 'detected_new_wallet';
|
|
100
100
|
export type AccountSwitchState = 'idle' | 'linking_new_wallet' | 'switching_primary' | 'primary_not_connected';
|
|
101
101
|
export type AwaitingSignatureState = 'idle' | 'linking_new_wallet' | 'transferring_wallet';
|
|
102
102
|
export type LocalStorageNonce = {
|