@privy-io/react-auth 3.11.0 → 3.11.1-beta-20260121203903
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/dist/cjs/{AccountNotFoundScreen-BgbWqFBz.js → AccountNotFoundScreen-RZUQmQIk.js} +1 -1
- package/dist/cjs/{Address-DiSm2l-W.js → Address-DvOcxlUo.js} +1 -1
- package/dist/cjs/{AffirmativeConsentScreen-frUX4n9j.js → AffirmativeConsentScreen-DLWcVEb0.js} +1 -1
- package/dist/cjs/{AllowlistRejectionScreen-CZ4wDXU2.js → AllowlistRejectionScreen-D4SmR-eM.js} +1 -1
- package/dist/cjs/{AuthenticateWithWalletScreen-CoV6Cepf.js → AuthenticateWithWalletScreen-BWzZT5MI.js} +1 -1
- package/dist/cjs/{AwaitingEvmToSolBridgingScreen-5qv5Urz2.js → AwaitingEvmToSolBridgingScreen-k97fI9em.js} +1 -1
- package/dist/cjs/AwaitingExternalEthereumTransferScreen-m4IWTGam.js +2 -0
- package/dist/cjs/{AwaitingPasswordlessCodeScreen-DrgaEVkD.js → AwaitingPasswordlessCodeScreen-BpPFuyVa.js} +1 -1
- package/dist/cjs/{AwaitingSolToEvmBridgingScreen-CQAxGoKP.js → AwaitingSolToEvmBridgingScreen-DPrRf-se.js} +1 -1
- package/dist/cjs/{BridgeNetworkSelectionView-Bd-ehyqP.js → BridgeNetworkSelectionView-pqZH6aEP.js} +1 -1
- package/dist/cjs/{CaptchaScreen-Csab6OjG.js → CaptchaScreen-nno_DeVo.js} +1 -1
- package/dist/cjs/{CoinbaseOnrampStatusScreen-Dsc8OMxP.js → CoinbaseOnrampStatusScreen-Fit_-mUl.js} +1 -1
- package/dist/cjs/{ConnectEmailForm-BaLVG2V3.js → ConnectEmailForm-CvpXHbvm.js} +1 -1
- package/dist/cjs/{ConnectLedgerScreen-cPU7ad2m.js → ConnectLedgerScreen-nBnIQH_E.js} +1 -1
- package/dist/cjs/{ConnectOnlyLandingScreen-Br3hNEVI.js → ConnectOnlyLandingScreen-DYyltRDK.js} +1 -1
- package/dist/cjs/{ConnectOnlyStatusScreen-CwYbJV03.js → ConnectOnlyStatusScreen-CNydKxL3.js} +1 -1
- package/dist/cjs/{ConnectOrCreateScreen-C5n4aoBd.js → ConnectOrCreateScreen-CEYOMLS0.js} +1 -1
- package/dist/cjs/{ConnectPhoneForm-grT6QJKW.js → ConnectPhoneForm-n0Ir63YF.js} +1 -1
- package/dist/cjs/{ConnectWalletView-acXo09ry.js → ConnectWalletView-C5RUSkYw.js} +1 -1
- package/dist/cjs/{ConnectionStatusScreen-DvxCQtND.js → ConnectionStatusScreen-D66HjJ9d.js} +1 -1
- package/dist/cjs/{CrossAppAuthScreen-BZrqdowY.js → CrossAppAuthScreen-BlAAnv4P.js} +1 -1
- package/dist/cjs/{CustomLandingScreenView-DQhD7H-Y.js → CustomLandingScreenView-Bb3HFp04.js} +1 -1
- package/dist/cjs/{DelegatedActionsConsentScreen-aa3stKge.js → DelegatedActionsConsentScreen-BwFIgwlL.js} +1 -1
- package/dist/cjs/{DelegatedActionsRevokeScreen-C4dyQxew.js → DelegatedActionsRevokeScreen-hYJVAMSG.js} +1 -1
- package/dist/cjs/{EmbeddedWalletConnectingScreen-B2sIDKrU.js → EmbeddedWalletConnectingScreen-AHB8rY4q.js} +1 -1
- package/dist/cjs/{EmbeddedWalletCreatedScreen-Dq73pt9b.js → EmbeddedWalletCreatedScreen-DHAatfd0.js} +1 -1
- package/dist/cjs/{EmbeddedWalletKeyExportScreen-BTB0EbJJ.js → EmbeddedWalletKeyExportScreen-CV925NJl.js} +1 -1
- package/dist/cjs/EmbeddedWalletOnAccountCreateScreen-7a79-vYL.js +1 -0
- package/dist/cjs/{EmbeddedWalletPasswordUpdateScreen-BBoSpChs.js → EmbeddedWalletPasswordUpdateScreen-DjKQJpbm.js} +1 -1
- package/dist/cjs/{EmbeddedWalletPasswordUpdateSplashScreen-CLaYjxpz.js → EmbeddedWalletPasswordUpdateSplashScreen-Cv5jWZxV.js} +1 -1
- package/dist/cjs/{EnrollTotp-D6ocCn4v.js → EnrollTotp-Dj3Dsvm_.js} +1 -1
- package/dist/cjs/{ErrorScreen-C2xSdkYC.js → ErrorScreen-CZPWuczS.js} +1 -1
- package/dist/cjs/{FarcasterConnectStatusScreen-DvVyh8zU.js → FarcasterConnectStatusScreen-DUYhOO7b.js} +1 -1
- package/dist/cjs/{FarcasterSignerStatusScreen-kIG2AKFp.js → FarcasterSignerStatusScreen-jWhFgNOH.js} +1 -1
- package/dist/cjs/{FundSolWalletWithExternalSolanaWallet-B2U_lFvw.js → FundSolWalletWithExternalSolanaWallet-BSgvqB70.js} +1 -1
- package/dist/cjs/{FundWalletMethodHeader-CfHXgc0M.js → FundWalletMethodHeader-DQK9y0aY.js} +1 -1
- package/dist/cjs/FundingEditAmountScreen-DvNnAP2W.js +1 -0
- package/dist/cjs/{FundingMethodSelectionScreen-CBjGLXbZ.js → FundingMethodSelectionScreen-CalOUo0B.js} +1 -1
- package/dist/cjs/{InAppBrowserLoginNotPossible-CIG8bv6d.js → InAppBrowserLoginNotPossible-BDiHa7jI.js} +1 -1
- package/dist/cjs/{InstallWalletScreen-B2vD26WT.js → InstallWalletScreen-BJnzGz4d.js} +1 -1
- package/dist/cjs/{LandingScreen-BEYwefB2.js → LandingScreen-C1x4_p_d.js} +1 -1
- package/dist/cjs/{LinkConflictScreen-CgR1CRSp.js → LinkConflictScreen-C6x_ncim.js} +1 -1
- package/dist/cjs/{LinkEmailScreen-aoilMVGp.js → LinkEmailScreen-AjVtqBaA.js} +1 -1
- package/dist/cjs/{LinkPasskeyScreen-CMBY4_3D.js → LinkPasskeyScreen-DMRGlud1.js} +1 -1
- package/dist/cjs/{LinkPhoneScreen-BuspORFm.js → LinkPhoneScreen-DD21Qmod.js} +1 -1
- package/dist/cjs/{LoginFailedScreen-rbFVmsvC.js → LoginFailedScreen-CIpe87NH.js} +1 -1
- package/dist/cjs/{ManualTransferScreen-COoRzSz6.js → ManualTransferScreen-CyJYfUlU.js} +1 -1
- package/dist/cjs/{MfaAuthEnrollmentFlowScreen-_ncbAR0l.js → MfaAuthEnrollmentFlowScreen-DzngmyLo.js} +1 -1
- package/dist/cjs/{MfaAuthVerifyFlowScreen--2tpPZkF.js → MfaAuthVerifyFlowScreen-CBOzaSAc.js} +1 -1
- package/dist/cjs/{MfaEnrollmentFlowScreen-Bn7kOj-x.js → MfaEnrollmentFlowScreen-55tEmBJh.js} +1 -1
- package/dist/cjs/{MfaVerifyFlowScreen-CjXrt1xv.js → MfaVerifyFlowScreen-DaIPQR72.js} +1 -1
- package/dist/cjs/{ModalHeader-HFJct04e.js → ModalHeader-LSXkaXcl.js} +1 -1
- package/dist/cjs/{MoonpayStatusScreen-BYVEV6Hl.js → MoonpayStatusScreen-D_q2vNSj.js} +1 -1
- package/dist/cjs/{OAuthStatusScreen-Yyaxj4Os.js → OAuthStatusScreen-Q32YT7Xd.js} +1 -1
- package/dist/cjs/{PasskeySelectSignupOrLogin-DnuQecC6.js → PasskeySelectSignupOrLogin-QWZDah9B.js} +1 -1
- package/dist/cjs/{PasskeyStatusScreen-i0ui7oVt.js → PasskeyStatusScreen-Btu1z-Db.js} +1 -1
- package/dist/cjs/{PasswordRecoveryScreen-eges-du_.js → PasswordRecoveryScreen-DBi0pol-.js} +1 -1
- package/dist/cjs/{QrCode-B0wOoW1E.js → QrCode-B5AlIfrN.js} +1 -1
- package/dist/cjs/RecoveryOAuthStatusScreen-COSwnkwr.js +1 -0
- package/dist/cjs/RecoveryPasswordCreateScreen-DBXYtHzz.js +1 -0
- package/dist/cjs/{RecoverySelectionScreen-CwLucuiD.js → RecoverySelectionScreen-CMaje15b.js} +1 -1
- package/dist/cjs/{Screen-M6XQZTd0.js → Screen-C4gtVIB2.js} +1 -1
- package/dist/cjs/{ScreenLayout-DND5buhY.js → ScreenLayout-COH0TK8Y.js} +1 -1
- package/dist/cjs/{SetAutomaticRecoveryScreen-DuRPXhP0.js → SetAutomaticRecoveryScreen-D5Hw8eNe.js} +1 -1
- package/dist/cjs/{SetWalletPasswordForm-D0eEjP-u.js → SetWalletPasswordForm-BIaXMtEl.js} +1 -1
- package/dist/cjs/{SignRequestScreen-LGzYoSpD.js → SignRequestScreen-BZ4eapC7.js} +1 -1
- package/dist/cjs/{StandardSignAndSendTransactionScreen-dtePWf7A.js → StandardSignAndSendTransactionScreen-r2GXb1G6.js} +1 -1
- package/dist/cjs/{TelegramAuthScreen-BOQRRBD-.js → TelegramAuthScreen-9wKUQlkU.js} +1 -1
- package/dist/cjs/{TransactionDetails-CoviBGbu.js → TransactionDetails-COpAbn2x.js} +1 -1
- package/dist/cjs/{TransactionErrorView-CZIADuCd.js → TransactionErrorView-0GIGeFK2.js} +1 -1
- package/dist/cjs/{TransferFromWalletScreen-CAvZpFHU.js → TransferFromWalletScreen-DWZP1uGW.js} +1 -1
- package/dist/cjs/{TransferOrBridgeLoadingScreen-rCuYNou5.js → TransferOrBridgeLoadingScreen-CkIL1XXz.js} +2 -2
- package/dist/cjs/{UpdateEmailScreen-BRl0rLXi.js → UpdateEmailScreen-DvH9-lSu.js} +1 -1
- package/dist/cjs/{UpdatePhoneScreen-mByXtOCY.js → UpdatePhoneScreen-DRed5FbH.js} +1 -1
- package/dist/cjs/{UserLimitReachedScreen-CjNxv9xy.js → UserLimitReachedScreen-BqYIFksV.js} +1 -1
- package/dist/cjs/{WalletInfoCard-wDKvmmsx.js → WalletInfoCard-CiGIQ_Ui.js} +1 -1
- package/dist/cjs/{WalletInterstitialScreen-BW-Ju9PU.js → WalletInterstitialScreen-Lj5ftT4Q.js} +1 -1
- package/dist/cjs/{WalletLink-Dglkazqd.js → WalletLink-Dj3bs71e.js} +1 -1
- package/dist/cjs/{WalletOverflowButton-BAZ96Q1e.js → WalletOverflowButton-CqqjQnq9.js} +1 -1
- package/dist/cjs/abstract-smart-wallets.js +1 -1
- package/dist/cjs/context-wZdgWZUB.js +1 -0
- package/dist/cjs/{ethers-O1Nyjl84.js → ethers-CKQdyx7W.js} +1 -1
- package/dist/cjs/extended-chains.js +1 -1
- package/dist/cjs/farcaster.js +1 -1
- package/dist/cjs/{frame-B14fp9oC.js → frame-Oz7volks.js} +1 -1
- package/dist/cjs/{get-is-unified-wallet--p0rdEtP.js → get-is-unified-wallet-ibtz66iD.js} +1 -1
- package/dist/cjs/{getErc20Balance-DknCauCO.js → getErc20Balance-CN3JMVjF.js} +1 -1
- package/dist/cjs/{getErc20TokenInfo-CBduyYx4.js → getErc20TokenInfo-DxDd_HN6.js} +1 -1
- package/dist/cjs/{getPublicClient-CGlodIp_.js → getPublicClient-BsmZyCGX.js} +1 -1
- package/dist/cjs/{index-BmQlwyOF.js → index-BQkbc-uV.js} +1 -1
- package/dist/cjs/{index-B-V647xG.js → index-mNjkTRbF.js} +4 -4
- package/dist/cjs/{index-Dnijyzka.js → index-wMbil80w.js} +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/{internal-context-NWsAL807.js → internal-context-BJv4f_bO.js} +1 -1
- package/dist/cjs/internal.js +1 -1
- package/dist/cjs/{prepareFundingModalData-BADfvap9.js → prepareFundingModalData-DUhgT6Y0.js} +1 -1
- package/dist/cjs/{reservoir-CQGyEBb7.js → reservoir-Bx0HQwbb.js} +1 -1
- package/dist/cjs/{shared-CJn0wmyB.js → shared-C7aAS5SO.js} +1 -1
- package/dist/cjs/{shouldProceedtoEmbeddedWalletCreationFlow-DwKYEqJV.js → shouldProceedtoEmbeddedWalletCreationFlow-CwtJGqzM.js} +1 -1
- package/dist/cjs/{smart-wallets-BxSjnmxi.js → smart-wallets-B-fEYiIl.js} +1 -1
- package/dist/cjs/smart-wallets.js +1 -1
- package/dist/cjs/solana.js +1 -1
- package/dist/cjs/{styles-Dg1qQgOa.js → styles-DH0Tsq0O.js} +1 -1
- package/dist/cjs/{to-ui-error-CnjmH8us.js → to-ui-error-ByzUez1b.js} +1 -1
- package/dist/cjs/transfer-B1Y_9LWi.js +1 -0
- package/dist/cjs/ui.js +1 -1
- package/dist/cjs/{use-export-wallet-no3ZWIW-.js → use-export-wallet-Be7AipzS.js} +1 -1
- package/dist/cjs/{use-sign-with-user-signer-BcAsQTGF.js → use-sign-with-user-signer-Cu_6Bx7m.js} +1 -1
- package/dist/cjs/{useActiveWallet-Wp8zv7qb.js → useActiveWallet-D9GOotll.js} +1 -1
- package/dist/cjs/{useGetSolPrice-C986iVoO.js → useGetSolPrice-Ca32VAbF.js} +1 -1
- package/dist/cjs/{useGetTokenPrice-BkD8eOWh.js → useGetTokenPrice-CoEf4JSB.js} +1 -1
- package/dist/cjs/{useI18n-J8z0zLWw.js → useI18n-Dqwophu1.js} +1 -1
- package/dist/cjs/{usePrivy-BM1sYNel.js → usePrivy-BhaLJaKF.js} +1 -1
- package/dist/cjs/{useSolanaRpcClient-CLYG-Dxk.js → useSolanaRpcClient-DxLm7cuH.js} +1 -1
- package/dist/cjs/{useWalletBalance-BVb8F3RO.js → useWalletBalance-DI8AY31i.js} +1 -1
- package/dist/cjs/{useWallets-20ZeTYCD.js → useWallets-DCGyh9dN.js} +1 -1
- package/dist/cjs/{useWallets-DEyFRWD0.js → useWallets-DoT0AQ3s.js} +1 -1
- package/dist/esm/{AccountNotFoundScreen-Q-gvf1Fn.mjs → AccountNotFoundScreen-CI0D4ySi.mjs} +1 -1
- package/dist/esm/{Address-BGlhcEcA.mjs → Address-C4fukiNP.mjs} +1 -1
- package/dist/esm/{AffirmativeConsentScreen-CLQuUvfP.mjs → AffirmativeConsentScreen-efWx6UzN.mjs} +1 -1
- package/dist/esm/{AllowlistRejectionScreen-CA0r2B2G.mjs → AllowlistRejectionScreen-BXMajVbe.mjs} +1 -1
- package/dist/esm/{AuthenticateWithWalletScreen-CJ0PGjN8.mjs → AuthenticateWithWalletScreen-B7IBRpcP.mjs} +1 -1
- package/dist/esm/{AwaitingEvmToSolBridgingScreen-BCl9wYAA.mjs → AwaitingEvmToSolBridgingScreen-cxBOftrF.mjs} +1 -1
- package/dist/esm/AwaitingExternalEthereumTransferScreen-CgZPJxNW.mjs +2 -0
- package/dist/esm/{AwaitingPasswordlessCodeScreen-BV79QlfB.mjs → AwaitingPasswordlessCodeScreen-pIPldPkU.mjs} +1 -1
- package/dist/esm/{AwaitingSolToEvmBridgingScreen-BAWOxcgh.mjs → AwaitingSolToEvmBridgingScreen-BJc0jK3s.mjs} +1 -1
- package/dist/esm/{BridgeNetworkSelectionView-T2-4Tr4k.mjs → BridgeNetworkSelectionView-DjURqgXj.mjs} +1 -1
- package/dist/esm/{CaptchaScreen-BpGtWd73.mjs → CaptchaScreen-DZhOLCO9.mjs} +1 -1
- package/dist/esm/{CoinbaseOnrampStatusScreen-0Uex7DsA.mjs → CoinbaseOnrampStatusScreen-CY3MKXAS.mjs} +1 -1
- package/dist/esm/{ConnectEmailForm-DjET3G-q.mjs → ConnectEmailForm-NcyqdOJE.mjs} +1 -1
- package/dist/esm/{ConnectLedgerScreen-CQFzXuWK.mjs → ConnectLedgerScreen-BCbXSUmJ.mjs} +1 -1
- package/dist/esm/{ConnectOnlyLandingScreen-BHXmw89v.mjs → ConnectOnlyLandingScreen-DDKT7Q7k.mjs} +1 -1
- package/dist/esm/{ConnectOnlyStatusScreen-CrK4PC6t.mjs → ConnectOnlyStatusScreen-CYq-frYL.mjs} +1 -1
- package/dist/esm/ConnectOrCreateScreen-cJAfQx-J.mjs +1 -0
- package/dist/esm/{ConnectPhoneForm-CYfqSIAI.mjs → ConnectPhoneForm-DjqZxuB-.mjs} +1 -1
- package/dist/esm/{ConnectWalletView-CduRtfEz.mjs → ConnectWalletView-CGp7rFXq.mjs} +1 -1
- package/dist/esm/{ConnectionStatusScreen-KrobwyOT.mjs → ConnectionStatusScreen-CWFkg5OC.mjs} +1 -1
- package/dist/esm/{CrossAppAuthScreen-BOKIMDhq.mjs → CrossAppAuthScreen-DqRTKCRF.mjs} +1 -1
- package/dist/esm/{CustomLandingScreenView-BcDpTdY_.mjs → CustomLandingScreenView-BxPTSEZL.mjs} +1 -1
- package/dist/esm/{DelegatedActionsConsentScreen-B7RhRjIf.mjs → DelegatedActionsConsentScreen-Dgg2-1Sn.mjs} +1 -1
- package/dist/esm/{DelegatedActionsRevokeScreen-C5V6mhCq.mjs → DelegatedActionsRevokeScreen-CztqU_Oo.mjs} +1 -1
- package/dist/esm/{EmbeddedWalletConnectingScreen-C9Fw9Ret.mjs → EmbeddedWalletConnectingScreen-B4sUIif5.mjs} +1 -1
- package/dist/esm/EmbeddedWalletCreatedScreen-Djv6kWAI.mjs +1 -0
- package/dist/esm/{EmbeddedWalletKeyExportScreen-DxbOABYY.mjs → EmbeddedWalletKeyExportScreen-BqozBh7H.mjs} +1 -1
- package/dist/esm/EmbeddedWalletOnAccountCreateScreen-DWvW9eRs.mjs +1 -0
- package/dist/esm/{EmbeddedWalletPasswordUpdateScreen-B25GzXZc.mjs → EmbeddedWalletPasswordUpdateScreen-BoQ-HdCR.mjs} +1 -1
- package/dist/esm/{EmbeddedWalletPasswordUpdateSplashScreen-Cu_NA9L6.mjs → EmbeddedWalletPasswordUpdateSplashScreen-B6k6GRZN.mjs} +1 -1
- package/dist/esm/{EnrollTotp-CXZmaa4A.mjs → EnrollTotp-CukCif6j.mjs} +1 -1
- package/dist/esm/{ErrorScreen-DLsfgpC9.mjs → ErrorScreen-BACrlbnT.mjs} +1 -1
- package/dist/esm/{FarcasterConnectStatusScreen-ng3F34Zy.mjs → FarcasterConnectStatusScreen-BmATusyA.mjs} +1 -1
- package/dist/esm/{FarcasterSignerStatusScreen-C19Go4EG.mjs → FarcasterSignerStatusScreen-CWjyzBwk.mjs} +1 -1
- package/dist/esm/{FundSolWalletWithExternalSolanaWallet-DpBJNLZJ.mjs → FundSolWalletWithExternalSolanaWallet-BvQrkL0k.mjs} +1 -1
- package/dist/esm/{FundWalletMethodHeader-CI5afzwL.mjs → FundWalletMethodHeader-AiS18uZn.mjs} +1 -1
- package/dist/esm/{FundingEditAmountScreen-DVwlwSMh.mjs → FundingEditAmountScreen-kKwJ8dz8.mjs} +1 -1
- package/dist/esm/{FundingMethodSelectionScreen-BEXU_dRV.mjs → FundingMethodSelectionScreen-Cywf8FMW.mjs} +1 -1
- package/dist/esm/{InAppBrowserLoginNotPossible-fdO06E7f.mjs → InAppBrowserLoginNotPossible-DfscY-nj.mjs} +1 -1
- package/dist/esm/{InstallWalletScreen-BTCkqOY-.mjs → InstallWalletScreen-CCT-Qs7e.mjs} +1 -1
- package/dist/esm/LandingScreen-BKw0C3-6.mjs +1 -0
- package/dist/esm/{LinkConflictScreen-CEU67LFR.mjs → LinkConflictScreen-ppQfc4uC.mjs} +1 -1
- package/dist/esm/{LinkEmailScreen-frIcyTMB.mjs → LinkEmailScreen-3fD1dFMW.mjs} +1 -1
- package/dist/esm/{LinkPasskeyScreen-DJveInKu.mjs → LinkPasskeyScreen-CUdvQeqw.mjs} +1 -1
- package/dist/esm/{LinkPhoneScreen-DoNf-oO4.mjs → LinkPhoneScreen-avo8CmrK.mjs} +1 -1
- package/dist/esm/{LoginFailedScreen-g2jT2Kyc.mjs → LoginFailedScreen-CqOzzZaq.mjs} +1 -1
- package/dist/esm/{ManualTransferScreen-Cc1Y8Jih.mjs → ManualTransferScreen-BE_WaxS9.mjs} +1 -1
- package/dist/esm/{MfaAuthEnrollmentFlowScreen-O3_CYjp9.mjs → MfaAuthEnrollmentFlowScreen-D8kccFQA.mjs} +1 -1
- package/dist/esm/{MfaAuthVerifyFlowScreen-T7Rg8uvy.mjs → MfaAuthVerifyFlowScreen-Cb9DZ4gN.mjs} +1 -1
- package/dist/esm/{MfaEnrollmentFlowScreen-Bz72-m4D.mjs → MfaEnrollmentFlowScreen-99fSY8g-.mjs} +1 -1
- package/dist/esm/{MfaVerifyFlowScreen-C_vKdC1M.mjs → MfaVerifyFlowScreen-o_Yfo0QH.mjs} +1 -1
- package/dist/esm/{ModalHeader-D5psNgrf.mjs → ModalHeader-BAGwTwiB.mjs} +1 -1
- package/dist/esm/{MoonpayStatusScreen-B8KZWDvr.mjs → MoonpayStatusScreen-Cg4mZfRC.mjs} +2 -2
- package/dist/esm/{OAuthStatusScreen-BqifArEf.mjs → OAuthStatusScreen-UdobH4WP.mjs} +1 -1
- package/dist/esm/{PasskeySelectSignupOrLogin-BnluBsvm.mjs → PasskeySelectSignupOrLogin-xct1rtzo.mjs} +1 -1
- package/dist/esm/{PasskeyStatusScreen-DNO05Efn.mjs → PasskeyStatusScreen-DYsvVX3i.mjs} +1 -1
- package/dist/esm/{PasswordRecoveryScreen-B7NJ3m5d.mjs → PasswordRecoveryScreen-B9EHvANs.mjs} +1 -1
- package/dist/esm/{QrCode-Bp7vKyXB.mjs → QrCode-CT_CXG3e.mjs} +1 -1
- package/dist/esm/RecoveryOAuthStatusScreen-DNfp6fRv.mjs +1 -0
- package/dist/esm/RecoveryPasswordCreateScreen-CtisV6Qu.mjs +1 -0
- package/dist/esm/{RecoverySelectionScreen-ePxeHUj1.mjs → RecoverySelectionScreen-BzhQF-en.mjs} +2 -2
- package/dist/esm/{Screen-q8npRQhQ.mjs → Screen-Dv092amM.mjs} +1 -1
- package/dist/esm/{ScreenLayout-DIdy7nhJ.mjs → ScreenLayout-DG_XRElR.mjs} +1 -1
- package/dist/esm/{SetAutomaticRecoveryScreen-CVl0jRLW.mjs → SetAutomaticRecoveryScreen-Cc5MVRbR.mjs} +1 -1
- package/dist/esm/{SetWalletPasswordForm-B55ZeX-5.mjs → SetWalletPasswordForm-D3-A_JVl.mjs} +1 -1
- package/dist/esm/{SignRequestScreen-DsHKzR1x.mjs → SignRequestScreen-DXUaMZ6j.mjs} +1 -1
- package/dist/esm/{StandardSignAndSendTransactionScreen-BuT88OVq.mjs → StandardSignAndSendTransactionScreen-DuuDN9Sp.mjs} +1 -1
- package/dist/esm/{TelegramAuthScreen-DQ63cPv-.mjs → TelegramAuthScreen-ByE57dqV.mjs} +1 -1
- package/dist/esm/{TransactionDetails-DB8AH1mq.mjs → TransactionDetails-BnKb_enO.mjs} +1 -1
- package/dist/esm/{TransactionErrorView-CkMh0sTl.mjs → TransactionErrorView-BEWZNGyq.mjs} +1 -1
- package/dist/esm/{TransferFromWalletScreen-rtFkHQRz.mjs → TransferFromWalletScreen-CHxSLdSM.mjs} +2 -2
- package/dist/esm/{TransferOrBridgeLoadingScreen-BZTN__SI.mjs → TransferOrBridgeLoadingScreen-mLHBuB78.mjs} +1 -1
- package/dist/esm/{UpdateEmailScreen-sALtnLLN.mjs → UpdateEmailScreen-Ckp4zEBP.mjs} +1 -1
- package/dist/esm/{UpdatePhoneScreen-DKfVISn1.mjs → UpdatePhoneScreen-CBJdvtlX.mjs} +1 -1
- package/dist/esm/{UserLimitReachedScreen-BoinP76r.mjs → UserLimitReachedScreen-Csq5lFOZ.mjs} +1 -1
- package/dist/esm/{WalletInfoCard-BtliVaf0.mjs → WalletInfoCard-DKxQTgDG.mjs} +1 -1
- package/dist/esm/{WalletInterstitialScreen-jn7VehvZ.mjs → WalletInterstitialScreen-TrxS1y6N.mjs} +1 -1
- package/dist/esm/{WalletLink-foFywOfy.mjs → WalletLink-Dqy4DrLT.mjs} +1 -1
- package/dist/esm/{WalletOverflowButton-DWdepzzi.mjs → WalletOverflowButton-CF8zOlXL.mjs} +1 -1
- package/dist/esm/abstract-smart-wallets.mjs +1 -1
- package/dist/esm/context-C7FGpzoq.mjs +1 -0
- package/dist/esm/{ethers-TpFbevgv.mjs → ethers-jrpF9vqa.mjs} +1 -1
- package/dist/esm/extended-chains.mjs +1 -1
- package/dist/esm/farcaster.mjs +1 -1
- package/dist/esm/{frame-CwE9r3cT.mjs → frame-uzTmvtww.mjs} +1 -1
- package/dist/esm/{get-is-unified-wallet-CvIzjbW7.mjs → get-is-unified-wallet-DKm2LBUt.mjs} +1 -1
- package/dist/esm/{getErc20Balance-CaKjNAs9.mjs → getErc20Balance-DA4dGV9O.mjs} +1 -1
- package/dist/esm/{getErc20TokenInfo-BFoeg5F6.mjs → getErc20TokenInfo-CxatSwzi.mjs} +1 -1
- package/dist/esm/{getPublicClient-A9RSftUZ.mjs → getPublicClient-B4uPLKn-.mjs} +1 -1
- package/dist/esm/{index-DEy_pO5S.mjs → index-BLPxiHb2.mjs} +1 -1
- package/dist/esm/index-DNLZMnCG.mjs +174 -0
- package/dist/esm/{index-DieEhruj.mjs → index-RTEGzREl.mjs} +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/{internal-context-e-Eni5bG.mjs → internal-context-Z-fyxadS.mjs} +1 -1
- package/dist/esm/internal.mjs +1 -1
- package/dist/esm/{prepareFundingModalData-CRrWM52E.mjs → prepareFundingModalData-BHVs3Cx-.mjs} +1 -1
- package/dist/esm/{reservoir-kvLjIrEo.mjs → reservoir-0wfhnc0j.mjs} +1 -1
- package/dist/esm/{shared-JeLSzCHD.mjs → shared-BjYW7t-U.mjs} +1 -1
- package/dist/esm/{shouldProceedtoEmbeddedWalletCreationFlow-D0uaMzCB.mjs → shouldProceedtoEmbeddedWalletCreationFlow-Ir-axYfm.mjs} +1 -1
- package/dist/esm/{smart-wallets-XRilJC8w.mjs → smart-wallets-BcApWuwL.mjs} +1 -1
- package/dist/esm/smart-wallets.mjs +1 -1
- package/dist/esm/solana.mjs +1 -1
- package/dist/esm/{styles-CaJCyFB5.mjs → styles-C12iVD4I.mjs} +1 -1
- package/dist/esm/{to-ui-error-l1Vm31qE.mjs → to-ui-error-GnZ5qhQ4.mjs} +1 -1
- package/dist/esm/{transfer-CMPmjPsM.mjs → transfer-6YztDh-t.mjs} +1 -1
- package/dist/esm/ui.mjs +1 -1
- package/dist/esm/{use-export-wallet-D-0qOhlZ.mjs → use-export-wallet-D2afU6Pi.mjs} +1 -1
- package/dist/esm/{use-sign-with-user-signer-eEm9Olt_.mjs → use-sign-with-user-signer-Do5Oi_rb.mjs} +1 -1
- package/dist/esm/{useActiveWallet-RUYo4pXO.mjs → useActiveWallet-CT7uncGy.mjs} +2 -2
- package/dist/esm/{useGetSolPrice-Cfm8o9C5.mjs → useGetSolPrice-DwwjjGbd.mjs} +1 -1
- package/dist/esm/{useGetTokenPrice-C1-pGMgN.mjs → useGetTokenPrice-CInz9y-l.mjs} +1 -1
- package/dist/esm/{useI18n-CD7HCIxK.mjs → useI18n-_trTURSX.mjs} +1 -1
- package/dist/esm/usePrivy-DXv-y-86.mjs +1 -0
- package/dist/esm/{useSolanaRpcClient-C55AFEgY.mjs → useSolanaRpcClient-BPnbGqxB.mjs} +1 -1
- package/dist/esm/{useWalletBalance-CkNw6kj0.mjs → useWalletBalance-CRXiZUj2.mjs} +1 -1
- package/dist/esm/{useWallets-BkIu5vyx.mjs → useWallets-Cs7YKcaR.mjs} +1 -1
- package/dist/esm/{useWallets-O-mGV40Z.mjs → useWallets-DnyWQdit.mjs} +1 -1
- package/package.json +7 -7
- package/dist/cjs/AwaitingExternalEthereumTransferScreen-DVUwVgck.js +0 -2
- package/dist/cjs/EmbeddedWalletOnAccountCreateScreen-1TcX3o8K.js +0 -1
- package/dist/cjs/FundingEditAmountScreen-CzTSH2dC.js +0 -1
- package/dist/cjs/RecoveryOAuthStatusScreen-lyldMRwo.js +0 -1
- package/dist/cjs/RecoveryPasswordCreateScreen-Cb83wfAF.js +0 -1
- package/dist/cjs/context-B8VkgLLk.js +0 -1
- package/dist/cjs/transfer-Cit146vy.js +0 -1
- package/dist/cjs/use-create-wallet-without-fallback-B3AnOM0l.js +0 -1
- package/dist/esm/AwaitingExternalEthereumTransferScreen-PysgS8Qt.mjs +0 -2
- package/dist/esm/ConnectOrCreateScreen-BrRb6sNR.mjs +0 -1
- package/dist/esm/EmbeddedWalletCreatedScreen-keGjjfu4.mjs +0 -1
- package/dist/esm/EmbeddedWalletOnAccountCreateScreen-B7blEQwB.mjs +0 -1
- package/dist/esm/LandingScreen-BYYtxc3M.mjs +0 -1
- package/dist/esm/RecoveryOAuthStatusScreen-C0tnlfv2.mjs +0 -1
- package/dist/esm/RecoveryPasswordCreateScreen-BgT7udfA.mjs +0 -1
- package/dist/esm/context-Bu4xmqpC.mjs +0 -1
- package/dist/esm/index-ygZBlWlm.mjs +0 -174
- package/dist/esm/use-create-wallet-without-fallback-BLN3_KXw.mjs +0 -1
- package/dist/esm/usePrivy-Bn7q4pcu.mjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as n,Fragment as t}from"react/jsx-runtime";import a from"@heroicons/react/24/outline/CreditCardIcon";import i from"@heroicons/react/24/outline/QrCodeIcon";import o from"@heroicons/react/24/solid/ArrowsRightLeftIcon";import{useState as r,useEffect as c,useMemo as d}from"react";import{getAddress as s}from"viem/utils";import{B as l}from"./ModalHeader-D5psNgrf.mjs";import{t as h}from"./FundWalletMethodHeader-CI5afzwL.mjs";import{E as p}from"./ErrorBanner-CQERa7bL.mjs";import{I as m}from"./InfoBanner-Dk1KghcK.mjs";import{u}from"./context-Bu4xmqpC.mjs";import{v as f,Q as g,U as y}from"./useActiveWallet-RUYo4pXO.mjs";import{a as C,u as v}from"./internal-context-e-Eni5bG.mjs";import{a as w}from"./get-is-unified-wallet-CvIzjbW7.mjs";import{u as F}from"./useWallets-BkIu5vyx.mjs";import{W as M}from"./WalletCards-DH1rqayz.mjs";import{g as b}from"./getErc20TokenInfo-BFoeg5F6.mjs";import{avalanche as S,arbitrum as W,polygon as x,optimism as I,base as j,mainnet as D,toCoinbaseAssetId as T,getCoinbaseOnRampUrl as k,chainToMoonpayCurrency as A,isSupportedChainIdForMoonpay as z,isSupportedChainIdForCoinbaseOnramp as L}from"@privy-io/js-sdk-core";import{trigger as E}from"@privy-io/popup";import{a as U}from"./index-DEy_pO5S.mjs";import{e as O,I as _,f as H,g as P}from"./styles-CaJCyFB5.mjs";import"styled-components";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"@heroicons/react/24/outline/ExclamationCircleIcon";import"@heroicons/react/24/outline/InformationCircleIcon";import"tinycolor2";import"zustand";import"react-device-detect";import"./prepareFundingModalData-CRrWM52E.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-A9RSftUZ.mjs";import"ofetch";import"./analytics-mkkvFRju.mjs";import"./LinkPasskeyScreen-DJveInKu.mjs";import"lucide-react";import"./TodoList-CgrU7uwu.mjs";import"./ScreenLayout-DIdy7nhJ.mjs";import"./Screen-q8npRQhQ.mjs";import"./index-Dq_xe9dz.mjs";const B=n=>/*#__PURE__*/e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 210.2",xmlSpace:"preserve",...n,children:/*#__PURE__*/e("path",{d:"M93.6,27.1C87.6,34.2,78,39.8,68.4,39c-1.2-9.6,3.5-19.8,9-26.1c6-7.3,16.5-12.5,25-12.9 C103.4,10,99.5,19.8,93.6,27.1 M102.3,40.9c-13.9-0.8-25.8,7.9-32.4,7.9c-6.7,0-16.8-7.5-27.8-7.3c-14.3,0.2-27.6,8.3-34.9,21.2 c-15,25.8-3.9,64,10.6,85c7.1,10.4,15.6,21.8,26.8,21.4c10.6-0.4,14.8-6.9,27.6-6.9c12.9,0,16.6,6.9,27.8,6.7 c11.6-0.2,18.9-10.4,26-20.8c8.1-11.8,11.4-23.3,11.6-23.9c-0.2-0.2-22.4-8.7-22.6-34.3c-0.2-21.4,17.5-31.6,18.3-32.2 C123.3,42.9,107.7,41.3,102.3,40.9 M182.6,11.9v155.9h24.2v-53.3h33.5c30.6,0,52.1-21,52.1-51.4c0-30.4-21.1-51.2-51.3-51.2H182.6z M206.8,32.3h27.9c21,0,33,11.2,33,30.9c0,19.7-12,31-33.1,31h-27.8V32.3z M336.6,169c15.2,0,29.3-7.7,35.7-19.9h0.5v18.7h22.4V90.2 c0-22.5-18-37-45.7-37c-25.7,0-44.7,14.7-45.4,34.9h21.8c1.8-9.6,10.7-15.9,22.9-15.9c14.8,0,23.1,6.9,23.1,19.6v8.6l-30.2,1.8 c-28.1,1.7-43.3,13.2-43.3,33.2C298.4,155.6,314.1,169,336.6,169z M343.1,150.5c-12.9,0-21.1-6.2-21.1-15.7c0-9.8,7.9-15.5,23-16.4 l26.9-1.7v8.8C371.9,140.1,359.5,150.5,343.1,150.5z M425.1,210.2c23.6,0,34.7-9,44.4-36.3L512,54.7h-24.6l-28.5,92.1h-0.5 l-28.5-92.1h-25.3l41,113.5l-2.2,6.9c-3.7,11.7-9.7,16.2-20.4,16.2c-1.9,0-5.6-0.2-7.1-0.4v18.7C417.3,210,423.3,210.2,425.1,210.2z"})}),R=t=>/*#__PURE__*/n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 80 38.1",xmlSpace:"preserve",...t,children:[/*#__PURE__*/e("path",{style:{fill:"#5F6368"},d:"M37.8,19.7V29h-3V6h7.8c1.9,0,3.7,0.7,5.1,2c1.4,1.2,2.1,3,2.1,4.9c0,1.9-0.7,3.6-2.1,4.9c-1.4,1.3-3.1,2-5.1,2 L37.8,19.7L37.8,19.7z M37.8,8.8v8h5c1.1,0,2.2-0.4,2.9-1.2c1.6-1.5,1.6-4,0.1-5.5c0,0-0.1-0.1-0.1-0.1c-0.8-0.8-1.8-1.3-2.9-1.2 L37.8,8.8L37.8,8.8z"}),/*#__PURE__*/e("path",{style:{fill:"#5F6368"},d:"M56.7,12.8c2.2,0,3.9,0.6,5.2,1.8s1.9,2.8,1.9,4.8V29H61v-2.2h-0.1c-1.2,1.8-2.9,2.7-4.9,2.7 c-1.7,0-3.2-0.5-4.4-1.5c-1.1-1-1.8-2.4-1.8-3.9c0-1.6,0.6-2.9,1.8-3.9c1.2-1,2.9-1.4,4.9-1.4c1.8,0,3.2,0.3,4.3,1v-0.7 c0-1-0.4-2-1.2-2.6c-0.8-0.7-1.8-1.1-2.9-1.1c-1.7,0-3,0.7-3.9,2.1l-2.6-1.6C51.8,13.8,53.9,12.8,56.7,12.8z M52.9,24.2 c0,0.8,0.4,1.5,1,1.9c0.7,0.5,1.5,0.8,2.3,0.8c1.2,0,2.4-0.5,3.3-1.4c1-0.9,1.5-2,1.5-3.2c-0.9-0.7-2.2-1.1-3.9-1.1 c-1.2,0-2.2,0.3-3,0.9C53.3,22.6,52.9,23.3,52.9,24.2z"}),/*#__PURE__*/e("path",{style:{fill:"#5F6368"},d:"M80,13.3l-9.9,22.7h-3l3.7-7.9l-6.5-14.7h3.2l4.7,11.3h0.1l4.6-11.3H80z"}),/*#__PURE__*/e("path",{style:{fill:"#4285F4"},d:"M25.9,17.7c0-0.9-0.1-1.8-0.2-2.7H13.2v5.1h7.1c-0.3,1.6-1.2,3.1-2.6,4v3.3H22C24.5,25.1,25.9,21.7,25.9,17.7z"}),/*#__PURE__*/e("path",{style:{fill:"#34A853"},d:"M13.2,30.6c3.6,0,6.6-1.2,8.8-3.2l-4.3-3.3c-1.2,0.8-2.7,1.3-4.5,1.3c-3.4,0-6.4-2.3-7.4-5.5H1.4v3.4 C3.7,27.8,8.2,30.6,13.2,30.6z"}),/*#__PURE__*/e("path",{style:{fill:"#FBBC04"},d:"M5.8,19.9c-0.6-1.6-0.6-3.4,0-5.1v-3.4H1.4c-1.9,3.7-1.9,8.1,0,11.9L5.8,19.9z"}),/*#__PURE__*/e("path",{style:{fill:"#EA4335"},d:"M13.2,9.4c1.9,0,3.7,0.7,5.1,2l0,0l3.8-3.8c-2.4-2.2-5.6-3.5-8.8-3.4c-5,0-9.6,2.8-11.8,7.3l4.4,3.4 C6.8,11.7,9.8,9.4,13.2,9.4z"})]}),V=e=>{let[n,t]=r();return c((()=>{e().then((e=>{t(e)})).catch((()=>{}))}),[]),n};function q(e){let n=N[e];if(!n)throw new C(`Unsupported chainId: ${e} for Coinbase Onramp`);return n}let N={[D.id]:"ethereum",[j.id]:"base",[I.id]:"optimism",[x.id]:"polygon",[W.id]:"arbitrum",[S.id]:"avacchain"};const Q=(e,n,t,a,i,o)=>new Promise((async(r,c)=>{let d=E();if(!d)return void c(Error("Unable to initialize flow"));let s="ethereum"===n.chainType?q(n.chain.id):"solana",l=n.isUSDC?"USDC":"ethereum"===n.chainType?T(n.chain.id,"native-currency"):"SOL",h=await e.initCoinbaseOnRamp({addresses:[{address:n.address,blockchains:[s]}],assets:[l]}),{url:p}=k({appId:e.getAppId(),input:h,amount:n.amount,blockchain:s,asset:l,experience:o});d.location=p.toString();let m={...i?.funding,showAlternateFundingMethod:!0};n.usingDefaultFundingMethod&&(m.usingDefaultFundingMethod=!1),t({funding:m,solanaFundingData:i?.solanaFundingData,coinbaseOnrampStatus:{popup:d}}),a("CoinbaseOnrampStatusScreen"),e.createAnalyticsEvent({eventName:"sdk_fiat_on_ramp_started",payload:{provider:"coinbase-onramp",value:n.amount,chainType:n.chainType,chainId:"ethereum"===n.chainType?n.chain.id:n.chain}}),setTimeout((()=>{t({funding:m,solanaFundingData:i?.solanaFundingData,coinbaseOnrampStatus:{partnerUserId:h.partner_user_id,popup:d}})}),5e3),r()})),$=async(e,n,t,a,i,o,r,c)=>{let d=E();if(!d)throw Error("Unable to initialize flow");let s="ethereum"===n.chainType?A(n.chain.id,a):n.isUSDC?"USDC_SOL":"SOL",{signedUrl:l,externalTransactionId:h}=await e.signMoonpayOnRampUrl({address:n.address,useSandbox:t.fundingMethodConfig.moonpay.useSandbox??!1,config:{uiConfig:{accentColor:t.appearance.palette.accent,theme:t.appearance.palette.colorScheme},paymentMethod:c,currencyCode:s,quoteCurrencyAmount:U(n.amount)}});e.createAnalyticsEvent({eventName:"sdk_fiat_on_ramp_started",payload:{provider:"moonpay",value:n.amount,chainType:n.chainType,chainId:"ethereum"===n.chainType?n.chain.id:n.chain}}),d.location=l;let p={...r?.funding,showAlternateFundingMethod:!0};n.usingDefaultFundingMethod&&(p.usingDefaultFundingMethod=!1),i({moonpayStatus:{},funding:p,solanaFundingData:r?.solanaFundingData}),o("MoonpayStatusScreen"),setTimeout((()=>{i({moonpayStatus:{externalTransactionId:h},funding:p,solanaFundingData:r?.solanaFundingData})}),8e3)};let J=async e=>"undefined"!=typeof window&&"PaymentRequest"in window&&await new window.PaymentRequest([{supportedMethods:e}],{id:"0",total:{label:"Item",amount:{currency:"USD",value:"1.00"}}}).canMakePayment();const X=()=>J("https://apple.com/apple-pay"),G=()=>J("https://google.com/pay"),K={component:()=>{let{wallets:r}=F(),{connectors:C}=v(),S=C.filter(f).flatMap((e=>e.wallets)),{navigate:W,data:x,setModalData:I}=w(),{client:j}=v(),D=u(),T=x?.funding,k=V(X),A=V(G),E="solana"===T.chainType,U=E?void 0:T,q=d((()=>((e,n,t,a,i,o)=>{let r,c,d="solana"===t.chainType,s=d?void 0:t,l=t.isUSDC?"USDC":s?.erc20Address?void 0:"native-currency",h=!!d||l&&z(Number(t.chain.id),l),p=!!d||l&&L(Number(t.chain.id),l),m=[];for(let r of(t.preferredCardProvider&&t.supportedOptions.sort((e=>e.provider===t.preferredCardProvider?-1:1)),t.supportedOptions))"card"===r.method&&"coinbase"===r.provider&&p&&m.push((()=>Q(n,t,a,i,o,"buy"))),"card"===r.method&&"moonpay"===r.provider&&h&&l&&m.push((()=>$(n,t,e,l,a,i,o,"credit_debit_card")));for(let e of t.supportedOptions)"exchange"===e.method&&"coinbase"===e.provider&&p&&(r=()=>Q(n,t,a,i,o,"buy"));for(let e of o?.funding?.supportedOptions??[])"wallets"===e.method&&(c=()=>i("TransferFromWalletScreen"));return{onFundWithCard:m,onFundWithExchange:r,onFundWithWallet:c}})(D,j,T,I,W,x)),[D,j,T,x,I,W]),N=E?S.find((({address:e})=>e===T.address)):r.find((({address:e})=>s(e)===s(T.address))),J=g(N?.walletClientType||"unknown"),K=J?.name||"wallet",Y=N&&"privy"!==N.walletClientType?K:D.name,Z=d((()=>T.uiConfig?.landing?.title?T.uiConfig?.landing?.title:`Add funds to your ${Y?.toLowerCase().endsWith("wallet")?Y:Y+" wallet"}`),[T.uiConfig?.landing?.title,Y]);c((()=>{if(T?.defaultFundingMethod&&T.usingDefaultFundingMethod)switch(I({funding:{...T,usingDefaultFundingMethod:!1},solanaFundingData:x?.solanaFundingData}),T?.defaultFundingMethod){case"card":q.onFundWithCard[0]&&q.onFundWithCard[0]();break;case"exchange":q.onFundWithExchange&&q.onFundWithExchange();break;case"wallet":q.onFundWithWallet&&q.onFundWithWallet();break;case"manual":W("ManualTransferScreen")}}),[]),c((()=>{U?.erc20Address&&!U.erc20ContractInfo&&b({address:U.erc20Address,chain:U.chain,rpcConfig:D.rpcConfig,privyAppId:D.id}).then((e=>{I({...x,funding:{...U,erc20ContractInfo:e?{symbol:e.symbol,decimals:e.decimals}:void 0}})})).catch(console.error)}),[U?.erc20Address,U?.chain]);let ee=!(!U?.erc20Address||U?.erc20ContractInfo);/*#__PURE__*/return n(t,{children:[/*#__PURE__*/e(h,{}),/*#__PURE__*/e("h3",{children:Z}),/*#__PURE__*/n(O,{children:[T.errorMessage&&/*#__PURE__*/e(p,{theme:D.appearance.palette.colorScheme,children:T.errorMessage}),q.onFundWithCard?.[0]&&/*#__PURE__*/n(y,{disabled:ee,onClick:q.onFundWithCard[0],children:[/*#__PURE__*/e(_,{children:/*#__PURE__*/e(a,{style:{width:24}})}),"Pay with card",k?/*#__PURE__*/e(B,{style:{marginLeft:"auto",maxWidth:"100%",width:"auto",height:"0.875rem"}}):A?/*#__PURE__*/e(R,{style:{marginLeft:"auto",maxWidth:"100%",width:"auto",height:"0.875rem"}}):null]}),q.onFundWithExchange&&/*#__PURE__*/n(y,{disabled:ee,onClick:q.onFundWithExchange,children:[/*#__PURE__*/e(_,{children:/*#__PURE__*/e(o,{style:{width:24}})}),"Transfer from an exchange"]}),q.onFundWithWallet&&/*#__PURE__*/n(y,{disabled:ee,onClick:q.onFundWithWallet,children:[/*#__PURE__*/e(_,{children:/*#__PURE__*/e(M,{style:{width:24}})}),"Transfer from wallet"]}),/*#__PURE__*/n(y,{disabled:ee,onClick:()=>W("ManualTransferScreen"),children:[/*#__PURE__*/e(_,{children:/*#__PURE__*/e(i,{style:{width:24}})}),"Receive funds"]}),T?.showAlternateFundingMethod&&q.onFundWithCard?.[1]&&/*#__PURE__*/e(m,{theme:D.appearance.palette.colorScheme,children:/*#__PURE__*/n(H,{children:["Having trouble or facing location restrictions?"," ",/*#__PURE__*/e(P,{onClick:q.onFundWithCard[1],children:"Try a different provider."})]})})]}),/*#__PURE__*/e(l,{})]})}};export{K as FundingMethodSelectionScreen,K as default};
|
|
1
|
+
import{jsx as e,jsxs as n,Fragment as t}from"react/jsx-runtime";import a from"@heroicons/react/24/outline/CreditCardIcon";import i from"@heroicons/react/24/outline/QrCodeIcon";import o from"@heroicons/react/24/solid/ArrowsRightLeftIcon";import{useState as r,useEffect as c,useMemo as d}from"react";import{getAddress as s}from"viem/utils";import{B as l}from"./ModalHeader-BAGwTwiB.mjs";import{t as h}from"./FundWalletMethodHeader-AiS18uZn.mjs";import{E as p}from"./ErrorBanner-CQERa7bL.mjs";import{I as m}from"./InfoBanner-Dk1KghcK.mjs";import{u}from"./context-C7FGpzoq.mjs";import{v as f,Q as g,U as y}from"./useActiveWallet-CT7uncGy.mjs";import{a as C,u as v}from"./internal-context-Z-fyxadS.mjs";import{a as w}from"./get-is-unified-wallet-DKm2LBUt.mjs";import{u as F}from"./useWallets-Cs7YKcaR.mjs";import{W as M}from"./WalletCards-DH1rqayz.mjs";import{g as b}from"./getErc20TokenInfo-CxatSwzi.mjs";import{avalanche as S,arbitrum as W,polygon as x,optimism as I,base as j,mainnet as D,toCoinbaseAssetId as T,getCoinbaseOnRampUrl as k,chainToMoonpayCurrency as A,isSupportedChainIdForMoonpay as z,isSupportedChainIdForCoinbaseOnramp as L}from"@privy-io/js-sdk-core";import{trigger as E}from"@privy-io/popup";import{a as U}from"./index-BLPxiHb2.mjs";import{e as O,I as _,f as H,g as P}from"./styles-C12iVD4I.mjs";import"styled-components";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"@heroicons/react/24/outline/ExclamationCircleIcon";import"@heroicons/react/24/outline/InformationCircleIcon";import"tinycolor2";import"zustand";import"react-device-detect";import"./prepareFundingModalData-BHVs3Cx-.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"ofetch";import"./analytics-mkkvFRju.mjs";import"./LinkPasskeyScreen-CUdvQeqw.mjs";import"lucide-react";import"./TodoList-CgrU7uwu.mjs";import"./ScreenLayout-DG_XRElR.mjs";import"./Screen-Dv092amM.mjs";import"./index-Dq_xe9dz.mjs";const B=n=>/*#__PURE__*/e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 210.2",xmlSpace:"preserve",...n,children:/*#__PURE__*/e("path",{d:"M93.6,27.1C87.6,34.2,78,39.8,68.4,39c-1.2-9.6,3.5-19.8,9-26.1c6-7.3,16.5-12.5,25-12.9 C103.4,10,99.5,19.8,93.6,27.1 M102.3,40.9c-13.9-0.8-25.8,7.9-32.4,7.9c-6.7,0-16.8-7.5-27.8-7.3c-14.3,0.2-27.6,8.3-34.9,21.2 c-15,25.8-3.9,64,10.6,85c7.1,10.4,15.6,21.8,26.8,21.4c10.6-0.4,14.8-6.9,27.6-6.9c12.9,0,16.6,6.9,27.8,6.7 c11.6-0.2,18.9-10.4,26-20.8c8.1-11.8,11.4-23.3,11.6-23.9c-0.2-0.2-22.4-8.7-22.6-34.3c-0.2-21.4,17.5-31.6,18.3-32.2 C123.3,42.9,107.7,41.3,102.3,40.9 M182.6,11.9v155.9h24.2v-53.3h33.5c30.6,0,52.1-21,52.1-51.4c0-30.4-21.1-51.2-51.3-51.2H182.6z M206.8,32.3h27.9c21,0,33,11.2,33,30.9c0,19.7-12,31-33.1,31h-27.8V32.3z M336.6,169c15.2,0,29.3-7.7,35.7-19.9h0.5v18.7h22.4V90.2 c0-22.5-18-37-45.7-37c-25.7,0-44.7,14.7-45.4,34.9h21.8c1.8-9.6,10.7-15.9,22.9-15.9c14.8,0,23.1,6.9,23.1,19.6v8.6l-30.2,1.8 c-28.1,1.7-43.3,13.2-43.3,33.2C298.4,155.6,314.1,169,336.6,169z M343.1,150.5c-12.9,0-21.1-6.2-21.1-15.7c0-9.8,7.9-15.5,23-16.4 l26.9-1.7v8.8C371.9,140.1,359.5,150.5,343.1,150.5z M425.1,210.2c23.6,0,34.7-9,44.4-36.3L512,54.7h-24.6l-28.5,92.1h-0.5 l-28.5-92.1h-25.3l41,113.5l-2.2,6.9c-3.7,11.7-9.7,16.2-20.4,16.2c-1.9,0-5.6-0.2-7.1-0.4v18.7C417.3,210,423.3,210.2,425.1,210.2z"})}),R=t=>/*#__PURE__*/n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 80 38.1",xmlSpace:"preserve",...t,children:[/*#__PURE__*/e("path",{style:{fill:"#5F6368"},d:"M37.8,19.7V29h-3V6h7.8c1.9,0,3.7,0.7,5.1,2c1.4,1.2,2.1,3,2.1,4.9c0,1.9-0.7,3.6-2.1,4.9c-1.4,1.3-3.1,2-5.1,2 L37.8,19.7L37.8,19.7z M37.8,8.8v8h5c1.1,0,2.2-0.4,2.9-1.2c1.6-1.5,1.6-4,0.1-5.5c0,0-0.1-0.1-0.1-0.1c-0.8-0.8-1.8-1.3-2.9-1.2 L37.8,8.8L37.8,8.8z"}),/*#__PURE__*/e("path",{style:{fill:"#5F6368"},d:"M56.7,12.8c2.2,0,3.9,0.6,5.2,1.8s1.9,2.8,1.9,4.8V29H61v-2.2h-0.1c-1.2,1.8-2.9,2.7-4.9,2.7 c-1.7,0-3.2-0.5-4.4-1.5c-1.1-1-1.8-2.4-1.8-3.9c0-1.6,0.6-2.9,1.8-3.9c1.2-1,2.9-1.4,4.9-1.4c1.8,0,3.2,0.3,4.3,1v-0.7 c0-1-0.4-2-1.2-2.6c-0.8-0.7-1.8-1.1-2.9-1.1c-1.7,0-3,0.7-3.9,2.1l-2.6-1.6C51.8,13.8,53.9,12.8,56.7,12.8z M52.9,24.2 c0,0.8,0.4,1.5,1,1.9c0.7,0.5,1.5,0.8,2.3,0.8c1.2,0,2.4-0.5,3.3-1.4c1-0.9,1.5-2,1.5-3.2c-0.9-0.7-2.2-1.1-3.9-1.1 c-1.2,0-2.2,0.3-3,0.9C53.3,22.6,52.9,23.3,52.9,24.2z"}),/*#__PURE__*/e("path",{style:{fill:"#5F6368"},d:"M80,13.3l-9.9,22.7h-3l3.7-7.9l-6.5-14.7h3.2l4.7,11.3h0.1l4.6-11.3H80z"}),/*#__PURE__*/e("path",{style:{fill:"#4285F4"},d:"M25.9,17.7c0-0.9-0.1-1.8-0.2-2.7H13.2v5.1h7.1c-0.3,1.6-1.2,3.1-2.6,4v3.3H22C24.5,25.1,25.9,21.7,25.9,17.7z"}),/*#__PURE__*/e("path",{style:{fill:"#34A853"},d:"M13.2,30.6c3.6,0,6.6-1.2,8.8-3.2l-4.3-3.3c-1.2,0.8-2.7,1.3-4.5,1.3c-3.4,0-6.4-2.3-7.4-5.5H1.4v3.4 C3.7,27.8,8.2,30.6,13.2,30.6z"}),/*#__PURE__*/e("path",{style:{fill:"#FBBC04"},d:"M5.8,19.9c-0.6-1.6-0.6-3.4,0-5.1v-3.4H1.4c-1.9,3.7-1.9,8.1,0,11.9L5.8,19.9z"}),/*#__PURE__*/e("path",{style:{fill:"#EA4335"},d:"M13.2,9.4c1.9,0,3.7,0.7,5.1,2l0,0l3.8-3.8c-2.4-2.2-5.6-3.5-8.8-3.4c-5,0-9.6,2.8-11.8,7.3l4.4,3.4 C6.8,11.7,9.8,9.4,13.2,9.4z"})]}),V=e=>{let[n,t]=r();return c((()=>{e().then((e=>{t(e)})).catch((()=>{}))}),[]),n};function q(e){let n=N[e];if(!n)throw new C(`Unsupported chainId: ${e} for Coinbase Onramp`);return n}let N={[D.id]:"ethereum",[j.id]:"base",[I.id]:"optimism",[x.id]:"polygon",[W.id]:"arbitrum",[S.id]:"avacchain"};const Q=(e,n,t,a,i,o)=>new Promise((async(r,c)=>{let d=E();if(!d)return void c(Error("Unable to initialize flow"));let s="ethereum"===n.chainType?q(n.chain.id):"solana",l=n.isUSDC?"USDC":"ethereum"===n.chainType?T(n.chain.id,"native-currency"):"SOL",h=await e.initCoinbaseOnRamp({addresses:[{address:n.address,blockchains:[s]}],assets:[l]}),{url:p}=k({appId:e.getAppId(),input:h,amount:n.amount,blockchain:s,asset:l,experience:o});d.location=p.toString();let m={...i?.funding,showAlternateFundingMethod:!0};n.usingDefaultFundingMethod&&(m.usingDefaultFundingMethod=!1),t({funding:m,solanaFundingData:i?.solanaFundingData,coinbaseOnrampStatus:{popup:d}}),a("CoinbaseOnrampStatusScreen"),e.createAnalyticsEvent({eventName:"sdk_fiat_on_ramp_started",payload:{provider:"coinbase-onramp",value:n.amount,chainType:n.chainType,chainId:"ethereum"===n.chainType?n.chain.id:n.chain}}),setTimeout((()=>{t({funding:m,solanaFundingData:i?.solanaFundingData,coinbaseOnrampStatus:{partnerUserId:h.partner_user_id,popup:d}})}),5e3),r()})),$=async(e,n,t,a,i,o,r,c)=>{let d=E();if(!d)throw Error("Unable to initialize flow");let s="ethereum"===n.chainType?A(n.chain.id,a):n.isUSDC?"USDC_SOL":"SOL",{signedUrl:l,externalTransactionId:h}=await e.signMoonpayOnRampUrl({address:n.address,useSandbox:t.fundingMethodConfig.moonpay.useSandbox??!1,config:{uiConfig:{accentColor:t.appearance.palette.accent,theme:t.appearance.palette.colorScheme},paymentMethod:c,currencyCode:s,quoteCurrencyAmount:U(n.amount)}});e.createAnalyticsEvent({eventName:"sdk_fiat_on_ramp_started",payload:{provider:"moonpay",value:n.amount,chainType:n.chainType,chainId:"ethereum"===n.chainType?n.chain.id:n.chain}}),d.location=l;let p={...r?.funding,showAlternateFundingMethod:!0};n.usingDefaultFundingMethod&&(p.usingDefaultFundingMethod=!1),i({moonpayStatus:{},funding:p,solanaFundingData:r?.solanaFundingData}),o("MoonpayStatusScreen"),setTimeout((()=>{i({moonpayStatus:{externalTransactionId:h},funding:p,solanaFundingData:r?.solanaFundingData})}),8e3)};let J=async e=>"undefined"!=typeof window&&"PaymentRequest"in window&&await new window.PaymentRequest([{supportedMethods:e}],{id:"0",total:{label:"Item",amount:{currency:"USD",value:"1.00"}}}).canMakePayment();const X=()=>J("https://apple.com/apple-pay"),G=()=>J("https://google.com/pay"),K={component:()=>{let{wallets:r}=F(),{connectors:C}=v(),S=C.filter(f).flatMap((e=>e.wallets)),{navigate:W,data:x,setModalData:I}=w(),{client:j}=v(),D=u(),T=x?.funding,k=V(X),A=V(G),E="solana"===T.chainType,U=E?void 0:T,q=d((()=>((e,n,t,a,i,o)=>{let r,c,d="solana"===t.chainType,s=d?void 0:t,l=t.isUSDC?"USDC":s?.erc20Address?void 0:"native-currency",h=!!d||l&&z(Number(t.chain.id),l),p=!!d||l&&L(Number(t.chain.id),l),m=[];for(let r of(t.preferredCardProvider&&t.supportedOptions.sort((e=>e.provider===t.preferredCardProvider?-1:1)),t.supportedOptions))"card"===r.method&&"coinbase"===r.provider&&p&&m.push((()=>Q(n,t,a,i,o,"buy"))),"card"===r.method&&"moonpay"===r.provider&&h&&l&&m.push((()=>$(n,t,e,l,a,i,o,"credit_debit_card")));for(let e of t.supportedOptions)"exchange"===e.method&&"coinbase"===e.provider&&p&&(r=()=>Q(n,t,a,i,o,"buy"));for(let e of o?.funding?.supportedOptions??[])"wallets"===e.method&&(c=()=>i("TransferFromWalletScreen"));return{onFundWithCard:m,onFundWithExchange:r,onFundWithWallet:c}})(D,j,T,I,W,x)),[D,j,T,x,I,W]),N=E?S.find((({address:e})=>e===T.address)):r.find((({address:e})=>s(e)===s(T.address))),J=g(N?.walletClientType||"unknown"),K=J?.name||"wallet",Y=N&&"privy"!==N.walletClientType?K:D.name,Z=d((()=>T.uiConfig?.landing?.title?T.uiConfig?.landing?.title:`Add funds to your ${Y?.toLowerCase().endsWith("wallet")?Y:Y+" wallet"}`),[T.uiConfig?.landing?.title,Y]);c((()=>{if(T?.defaultFundingMethod&&T.usingDefaultFundingMethod)switch(I({funding:{...T,usingDefaultFundingMethod:!1},solanaFundingData:x?.solanaFundingData}),T?.defaultFundingMethod){case"card":q.onFundWithCard[0]&&q.onFundWithCard[0]();break;case"exchange":q.onFundWithExchange&&q.onFundWithExchange();break;case"wallet":q.onFundWithWallet&&q.onFundWithWallet();break;case"manual":W("ManualTransferScreen")}}),[]),c((()=>{U?.erc20Address&&!U.erc20ContractInfo&&b({address:U.erc20Address,chain:U.chain,rpcConfig:D.rpcConfig,privyAppId:D.id}).then((e=>{I({...x,funding:{...U,erc20ContractInfo:e?{symbol:e.symbol,decimals:e.decimals}:void 0}})})).catch(console.error)}),[U?.erc20Address,U?.chain]);let ee=!(!U?.erc20Address||U?.erc20ContractInfo);/*#__PURE__*/return n(t,{children:[/*#__PURE__*/e(h,{}),/*#__PURE__*/e("h3",{children:Z}),/*#__PURE__*/n(O,{children:[T.errorMessage&&/*#__PURE__*/e(p,{theme:D.appearance.palette.colorScheme,children:T.errorMessage}),q.onFundWithCard?.[0]&&/*#__PURE__*/n(y,{disabled:ee,onClick:q.onFundWithCard[0],children:[/*#__PURE__*/e(_,{children:/*#__PURE__*/e(a,{style:{width:24}})}),"Pay with card",k?/*#__PURE__*/e(B,{style:{marginLeft:"auto",maxWidth:"100%",width:"auto",height:"0.875rem"}}):A?/*#__PURE__*/e(R,{style:{marginLeft:"auto",maxWidth:"100%",width:"auto",height:"0.875rem"}}):null]}),q.onFundWithExchange&&/*#__PURE__*/n(y,{disabled:ee,onClick:q.onFundWithExchange,children:[/*#__PURE__*/e(_,{children:/*#__PURE__*/e(o,{style:{width:24}})}),"Transfer from an exchange"]}),q.onFundWithWallet&&/*#__PURE__*/n(y,{disabled:ee,onClick:q.onFundWithWallet,children:[/*#__PURE__*/e(_,{children:/*#__PURE__*/e(M,{style:{width:24}})}),"Transfer from wallet"]}),/*#__PURE__*/n(y,{disabled:ee,onClick:()=>W("ManualTransferScreen"),children:[/*#__PURE__*/e(_,{children:/*#__PURE__*/e(i,{style:{width:24}})}),"Receive funds"]}),T?.showAlternateFundingMethod&&q.onFundWithCard?.[1]&&/*#__PURE__*/e(m,{theme:D.appearance.palette.colorScheme,children:/*#__PURE__*/n(H,{children:["Having trouble or facing location restrictions?"," ",/*#__PURE__*/e(P,{onClick:q.onFundWithCard[1],children:"Try a different provider."})]})})]}),/*#__PURE__*/e(l,{})]})}};export{K as FundingMethodSelectionScreen,K as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{ExternalLink as o}from"lucide-react";import{u as e}from"./internal-context-
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{ExternalLink as o}from"lucide-react";import{u as e}from"./internal-context-Z-fyxadS.mjs";import{S as r}from"./ScreenLayout-DG_XRElR.mjs";import"ofetch";import"react";import"./ModalHeader-BAGwTwiB.mjs";import"styled-components";import"./context-C7FGpzoq.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./useActiveWallet-CT7uncGy.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-BHVs3Cx-.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./get-is-unified-wallet-DKm2LBUt.mjs";import"./useWallets-Cs7YKcaR.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-Dv092amM.mjs";import"./index-Dq_xe9dz.mjs";const i=({onClose:e})=>/*#__PURE__*/t(r,{title:"Could not log in with provider",subtitle:"It looks like you're using an in-app browser. To log in, please try again using an external browser.",icon:o,primaryCta:{label:"Close",onClick:e},watermark:!0}),m={component:()=>{let{closePrivyModal:o}=e();/*#__PURE__*/return t(i,{onClose:()=>o()})}};export{m as InAppBrowserLoginNotPossible,i as InAppBrowserLoginNotPossibleView,m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t,jsxs as e,Fragment as r}from"react/jsx-runtime";import{L as o}from"./Link-DJ5gq9Di.mjs";import{T as i,a}from"./TodoList-CgrU7uwu.mjs";import{a as l}from"./get-is-unified-wallet-
|
|
1
|
+
import{jsx as t,jsxs as e,Fragment as r}from"react/jsx-runtime";import{L as o}from"./Link-DJ5gq9Di.mjs";import{T as i,a}from"./TodoList-CgrU7uwu.mjs";import{a as l}from"./get-is-unified-wallet-DKm2LBUt.mjs";import{S as n}from"./ScreenLayout-DG_XRElR.mjs";import"styled-components";import"lucide-react";import"react";import"viem";import"./context-C7FGpzoq.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./internal-context-Z-fyxadS.mjs";import"ofetch";import"./ModalHeader-BAGwTwiB.mjs";import"./useActiveWallet-CT7uncGy.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-BHVs3Cx-.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./useWallets-Cs7YKcaR.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-Dv092amM.mjs";import"./index-Dq_xe9dz.mjs";const s=({walletName:l,installLink:s,title:m,subtitle:c="Follow the instructions below to get started.",onReload:p,onBack:d})=>{let h=m||`Create a ${l} wallet`.replace(/wallet wallet/gi,"wallet");/*#__PURE__*/return t(n,{title:h,subtitle:c,onBack:d,showBack:!0,primaryCta:{label:"Reload the page to use your wallet",onClick:p},helpText:/*#__PURE__*/e(r,{children:[/*#__PURE__*/t("span",{children:"Still not sure? "}),/*#__PURE__*/t(o,{size:"sm",target:"_blank",href:"https://solana.com/docs/intro/wallets",children:"Learn more"})]}),watermark:!0,children:/*#__PURE__*/e(i,{children:[/*#__PURE__*/t(a,{children:/*#__PURE__*/e("div",{children:[/*#__PURE__*/t("span",{children:"Install the "})," ",/*#__PURE__*/e(o,{href:s,target:"_blank",children:[l," browser extension"]})]})}),/*#__PURE__*/t(a,{children:"Set up your first wallet"}),/*#__PURE__*/t(a,{children:"Store your recovery phrase in a safe place!"})]})})},m={component:()=>{let{navigateBack:e,data:r}=l();if(!r?.installWalletModalData)throw Error("Wallet data is missing");let{walletConfig:o}=r.installWalletModalData;/*#__PURE__*/return t(s,{walletName:o.name,installLink:o.installLink,onReload:()=>{window.location.reload()},onBack:e})}};export{m as InstallWalletScreen,s as InstallWalletScreenView,m as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{u as o}from"./context-C7FGpzoq.mjs";import{C as r,L as i}from"./CustomLandingScreenView-BxPTSEZL.mjs";import"react";import"@privy-io/js-sdk-core";import"tinycolor2";import"@heroicons/react/24/outline/UserCircleIcon";import"styled-components";import"./ModalHeader-BAGwTwiB.mjs";import"./useActiveWallet-CT7uncGy.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-BHVs3Cx-.mjs";import"./internal-context-Z-fyxadS.mjs";import"ofetch";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./get-is-unified-wallet-DKm2LBUt.mjs";import"./useWallets-Cs7YKcaR.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./index-DNLZMnCG.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-DXv-y-86.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./ConnectWalletView-CGp7rFXq.mjs";import"@heroicons/react/24/outline";import"@tanstack/react-virtual";import"@heroicons/react/24/outline/CheckIcon";import"./copy-Bx2Jwc5_.mjs";import"./Link-DJ5gq9Di.mjs";import"./QrCode-CT_CXG3e.mjs";import"qrcode";import"./EmailInputForm-Dgoii4vf.mjs";import"./ErrorMessage-D8VaAP5m.mjs";import"./useI18n-_trTURSX.mjs";import"./WalletCards-DH1rqayz.mjs";import"./Screen-Dv092amM.mjs";import"./index-Dq_xe9dz.mjs";import"lucide-react";import"./ConnectEmailForm-NcyqdOJE.mjs";import"./Chip-D2-wZOHJ.mjs";import"./LoadingSkeleton-U6-3yFwI.mjs";import"./farcaster-DPlSjvF5.mjs";import"@heroicons/react/24/outline/FingerPrintIcon";import"./ConnectPhoneForm-DjqZxuB-.mjs";import"./twitter-BoAxhlj6.mjs";import"./twitch-5IOe4sIQ.mjs";import"./telegram-B-JqnkqZ.mjs";import"./WalletOverflowButton-CF8zOlXL.mjs";import"./ScreenLayout-DG_XRElR.mjs";const e={component:()=>{let e=o();return e.loginMethodsAndOrder&&e.loginMethodsAndOrder.primary.length>0?/*#__PURE__*/t(r,{connectOnly:!1}):/*#__PURE__*/t(i,{connectOnly:!1})},isCaptchaRequired:!0,isUnauthenticatedScreem:!0};export{e as LandingScreen,e as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as e,jsx as r,Fragment as o}from"react/jsx-runtime";import t from"@heroicons/react/24/outline/ExclamationTriangleIcon";import n from"@heroicons/react/24/outline/WalletIcon";import{useState as a}from"react";import{P as i,M as s,B as c,S as l}from"./ModalHeader-
|
|
1
|
+
import{jsxs as e,jsx as r,Fragment as o}from"react/jsx-runtime";import t from"@heroicons/react/24/outline/ExclamationTriangleIcon";import n from"@heroicons/react/24/outline/WalletIcon";import{useState as a}from"react";import{P as i,M as s,B as c,S as l}from"./ModalHeader-BAGwTwiB.mjs";import{styled as d}from"styled-components";import{e as u}from"./StackedContainer-B2vaEl56.mjs";import{A as p}from"./Address-C4fukiNP.mjs";import{u as h}from"./internal-context-Z-fyxadS.mjs";import{a as m}from"./get-is-unified-wallet-DKm2LBUt.mjs";import{e as f}from"./capitalizeFirstLetter-DmLYqXsO.mjs";import{u as g}from"./context-C7FGpzoq.mjs";import x from"@heroicons/react/24/outline/ExclamationCircleIcon";import y from"@heroicons/react/24/outline/Square2StackIcon";import"./useActiveWallet-CT7uncGy.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-BHVs3Cx-.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./useWallets-Cs7YKcaR.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"lucide-react";import"ofetch";import"tinycolor2";const v=d.span`
|
|
2
2
|
&& {
|
|
3
3
|
width: 82px;
|
|
4
4
|
height: 82px;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import o from"@heroicons/react/24/outline/EnvelopeIcon";import{C as r}from"./ConnectEmailForm-
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import o from"@heroicons/react/24/outline/EnvelopeIcon";import{C as r}from"./ConnectEmailForm-NcyqdOJE.mjs";import{B as i}from"./Layouts-BlFm53ED.mjs";import{u as e}from"./context-C7FGpzoq.mjs";import{S as m}from"./ScreenLayout-DG_XRElR.mjs";import"lucide-react";import"react";import"styled-components";import"./internal-context-Z-fyxadS.mjs";import"ofetch";import"./index-DNLZMnCG.mjs";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"./get-is-unified-wallet-DKm2LBUt.mjs";import"viem";import"eventemitter3";import"./useActiveWallet-CT7uncGy.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-BHVs3Cx-.mjs";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./useWallets-Cs7YKcaR.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-DXv-y-86.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./ModalHeader-BAGwTwiB.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Chip-D2-wZOHJ.mjs";import"./LoadingSkeleton-U6-3yFwI.mjs";import"./EmailInputForm-Dgoii4vf.mjs";import"./ErrorMessage-D8VaAP5m.mjs";import"tinycolor2";import"./Screen-Dv092amM.mjs";import"./index-Dq_xe9dz.mjs";const p=({title:e="Connect your email",subtitle:p="Add your email to your account"})=>/*#__PURE__*/t(m,{title:e,subtitle:p,icon:o,watermark:!0,children:/*#__PURE__*/t(i,{children:/*#__PURE__*/t(r,{stacked:!0})})}),s={component:()=>{let o=e();/*#__PURE__*/return t(p,{subtitle:`Add your email to your ${o?.name} account`})}};export{s as LinkEmailScreen,p as LinkEmailScreenView,s as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as e,jsxs as r}from"react/jsx-runtime";import{CheckCircle as t,FingerprintIcon as o,Trash2 as i}from"lucide-react";import{useState as n,useEffect as a}from"react";import{styled as s,css as c}from"styled-components";import{G as l}from"./useActiveWallet-
|
|
1
|
+
import{jsx as e,jsxs as r}from"react/jsx-runtime";import{CheckCircle as t,FingerprintIcon as o,Trash2 as i}from"lucide-react";import{useState as n,useEffect as a}from"react";import{styled as s,css as c}from"styled-components";import{G as l}from"./useActiveWallet-CT7uncGy.mjs";import{T as d,a as p}from"./TodoList-CgrU7uwu.mjs";import{u as m,c as h,b as u}from"./internal-context-Z-fyxadS.mjs";import{u as y}from"./get-is-unified-wallet-DKm2LBUt.mjs";import{S as f}from"./ScreenLayout-DG_XRElR.mjs";import"zustand";import"./context-C7FGpzoq.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"react-device-detect";import"./prepareFundingModalData-BHVs3Cx-.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./useWallets-Cs7YKcaR.mjs";import"ofetch";import"./ModalHeader-BAGwTwiB.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-Dv092amM.mjs";import"./index-Dq_xe9dz.mjs";const k=({passkeys:r,isLoading:i,errorReason:n,success:a,expanded:s,onLinkPasskey:c,onUnlinkPasskey:l,onExpand:d,onBack:p,onClose:m})=>/*#__PURE__*/e(f,a?{title:"Passkeys updated",icon:t,iconVariant:"success",primaryCta:{label:"Done",onClick:m},onClose:m,watermark:!0}:s?{icon:o,title:"Your passkeys",onBack:p,onClose:m,watermark:!0,children:/*#__PURE__*/e(v,{passkeys:r,expanded:s,onUnlink:l,onExpand:d})}:{icon:o,title:"Set up passkey verification",subtitle:"Verify with passkey",primaryCta:{label:"Add new passkey",onClick:c,loading:i},onClose:m,watermark:!0,helpText:n||void 0,children:0===r.length?/*#__PURE__*/e(x,{}):/*#__PURE__*/e(g,{children:/*#__PURE__*/e(v,{passkeys:r,expanded:s,onUnlink:l,onExpand:d})})});let g=s.div`
|
|
2
2
|
margin-bottom: 12px;
|
|
3
3
|
`,v=({passkeys:t,expanded:o,onUnlink:a,onExpand:s})=>{let[c,d]=n([]),p=o?t.length:2;/*#__PURE__*/return r("div",{children:[/*#__PURE__*/e(A,{children:"Your passkeys"}),/*#__PURE__*/r(I,{children:[t.slice(0,p).map((t=>{/*#__PURE__*/return r(P,{children:[/*#__PURE__*/r("div",{children:[/*#__PURE__*/e(E,{children:(o=t,o.authenticatorName?o.createdWithBrowser?`${o.authenticatorName} on ${o.createdWithBrowser}`:o.authenticatorName:o.createdWithBrowser?o.createdWithOs?`${o.createdWithBrowser} on ${o.createdWithOs}`:`${o.createdWithBrowser}`:"Unknown device")}),/*#__PURE__*/r(L,{children:["Last used:"," ",(t.latestVerifiedAt??t.firstVerifiedAt)?.toLocaleString()??"N/A"]})]}),/*#__PURE__*/e(W,{disabled:c.includes(t.credentialId),onClick:()=>(async e=>{d((r=>r.concat([e]))),await a(e),d((r=>r.filter((r=>r!==e))))})(t.credentialId),children:c.includes(t.credentialId)?/*#__PURE__*/e(l,{}):/*#__PURE__*/e(i,{size:16})})]},t.credentialId);var o})),t.length>2&&!o&&/*#__PURE__*/e(C,{onClick:s,children:"View all"})]})]})},x=()=>/*#__PURE__*/r(d,{style:{color:"var(--privy-color-foreground)"},children:[/*#__PURE__*/e(p,{children:"Verify with Touch ID, Face ID, PIN, or hardware key"}),/*#__PURE__*/e(p,{children:"Takes seconds to set up and use"}),/*#__PURE__*/e(p,{children:"Use your passkey to verify transactions and login to your account"})]});const w={component:()=>{let{user:r,unlinkPasskey:t}=y(),{linkWithPasskey:o,closePrivyModal:i}=m(),s=r?.linkedAccounts.filter((e=>"passkey"===e.type)),[c,l]=n(!1),[d,p]=n(""),[f,g]=n(!1),[v,x]=n(!1);return a((()=>{0===s.length&&x(!1)}),[s.length]),/*#__PURE__*/e(k,{passkeys:s,isLoading:c,errorReason:d,success:f,expanded:v,onLinkPasskey:()=>{l(!0),o().then((()=>g(!0))).catch((e=>{if(e instanceof h){if(e.privyErrorCode===u.CANNOT_LINK_MORE_OF_TYPE)return void p("Cannot link more passkeys to account.");if(e.privyErrorCode===u.PASSKEY_NOT_ALLOWED)return void p("Passkey request timed out or rejected by user.")}p("Unknown error occurred.")})).finally((()=>{l(!1)}))},onUnlinkPasskey:async e=>(l(!0),await t(e).then((()=>g(!0))).catch((e=>{e instanceof h&&e.privyErrorCode===u.MISSING_MFA_CREDENTIALS?p("Cannot unlink a passkey enrolled in MFA"):p("Unknown error occurred.")})).finally((()=>{l(!1)}))),onExpand:()=>x(!0),onBack:()=>x(!1),onClose:()=>i()})}},b=s.div`
|
|
4
4
|
display: flex;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import e from"@heroicons/react/24/outline/PhoneIcon";import{useState as o}from"react";import{C as r}from"./ConnectPhoneForm-
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import e from"@heroicons/react/24/outline/PhoneIcon";import{useState as o}from"react";import{C as r}from"./ConnectPhoneForm-DjqZxuB-.mjs";import{u as i}from"./context-C7FGpzoq.mjs";import{u as n}from"./internal-context-Z-fyxadS.mjs";import{a as m}from"./get-is-unified-wallet-DKm2LBUt.mjs";import{S as a}from"./ScreenLayout-DG_XRElR.mjs";import"styled-components";import"@privy-io/js-sdk-core";import"./useActiveWallet-CT7uncGy.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-BHVs3Cx-.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./useWallets-Cs7YKcaR.mjs";import"./ModalHeader-BAGwTwiB.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Chip-D2-wZOHJ.mjs";import"./LoadingSkeleton-U6-3yFwI.mjs";import"tinycolor2";import"ofetch";import"./Screen-Dv092amM.mjs";import"./index-Dq_xe9dz.mjs";const s=({title:i="Connect your phone",subtitle:n="Add your number to your account",onSubmit:m,isSubmitting:s=!1})=>{let[c,u]=o(null),l=async()=>{c?.qualifiedPhoneNumber&&await m(c)};/*#__PURE__*/return t(a,{title:i,subtitle:n,icon:e,primaryCta:{label:s?"Submitting":"Submit",onClick:l,disabled:!c?.isValid||s},watermark:!0,children:/*#__PURE__*/t(r,{onChange:t=>{u(t)},onSubmit:l,noIncludeSubmitButton:!0,hideRecent:!0})})},c={component:()=>{let{currentScreen:e,data:r,navigate:a,setModalData:c}=m(),u=i(),{initLoginWithSms:l}=n(),[p,d]=o(!1);/*#__PURE__*/return t(s,{subtitle:`Add your number to your ${u?.name} account`,onSubmit:async t=>{d(!0);try{await l({phoneNumber:t.qualifiedPhoneNumber,withPrivyUi:!0}),a("AwaitingPasswordlessCodeScreen")}catch(t){c({errorModalData:{error:t,previousScreen:r?.errorModalData?.previousScreen||e||"LinkPhoneScreen"}}),a("ErrorScreen")}finally{d(!1)}},isSubmitting:p})}};export{c as LinkPhoneScreen,s as LinkPhoneScreenView,c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{XCircle as e}from"lucide-react";import{u as o}from"./internal-context-
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{XCircle as e}from"lucide-react";import{u as o}from"./internal-context-Z-fyxadS.mjs";import{a as r}from"./get-is-unified-wallet-DKm2LBUt.mjs";import{S as i}from"./ScreenLayout-DG_XRElR.mjs";import"ofetch";import"react";import"viem";import"./context-C7FGpzoq.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./ModalHeader-BAGwTwiB.mjs";import"styled-components";import"./useActiveWallet-CT7uncGy.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-BHVs3Cx-.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./useWallets-Cs7YKcaR.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-Dv092amM.mjs";import"./index-Dq_xe9dz.mjs";const a=({title:o="Could not connect with wallet",subtitle:r="Please check that Phantom multichain is enabled and try again.",primaryCtaText:a="Try again",secondaryCtaText:n="Cancel",onTryAgain:m,onCancel:c})=>/*#__PURE__*/t(i,{title:o,subtitle:r,icon:e,iconVariant:"error",primaryCta:{label:a,onClick:m},secondaryCta:{label:n,onClick:c},watermark:!0}),n={component:()=>{let{closePrivyModal:e}=o(),{navigate:i}=r();/*#__PURE__*/return t(a,{onTryAgain:()=>{i("LandingScreen")},onCancel:async()=>{await e()}})}};export{n as LoginFailedScreen,a as LoginFailedScreenView,n as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,Fragment as r,jsxs as t}from"react/jsx-runtime";import{useState as o,useEffect as i,useMemo as a}from"react";import{formatUnits as s}from"viem";import{formatTokenAmount as n,formatWeiAmount as m}from"@privy-io/js-sdk-core";import{P as c,B as d}from"./ModalHeader-
|
|
1
|
+
import{jsx as e,Fragment as r,jsxs as t}from"react/jsx-runtime";import{useState as o,useEffect as i,useMemo as a}from"react";import{formatUnits as s}from"viem";import{formatTokenAmount as n,formatWeiAmount as m}from"@privy-io/js-sdk-core";import{P as c,B as d}from"./ModalHeader-BAGwTwiB.mjs";import{F as l}from"./Layouts-BlFm53ED.mjs";import{Q as p}from"./QrCode-CT_CXG3e.mjs";import{t as u}from"./FundWalletMethodHeader-AiS18uZn.mjs";import{I as f}from"./InfoBanner-Dk1KghcK.mjs";import{S as h}from"./Subtitle-CV-2yKE4.mjs";import{T as g}from"./Title-BnzYV3Is.mjs";import{W as v}from"./WalletInfoCard-DKxQTgDG.mjs";import{u as j}from"./context-C7FGpzoq.mjs";import{v as y,D as C}from"./useActiveWallet-CT7uncGy.mjs";import{u as S}from"./internal-context-Z-fyxadS.mjs";import{a as I}from"./get-is-unified-wallet-DKm2LBUt.mjs";import{u as b}from"./useWalletBalance-CRXiZUj2.mjs";import{u as T}from"./useWallets-Cs7YKcaR.mjs";import{O as w}from"./analytics-mkkvFRju.mjs";import{x as A,z as k}from"./index-DNLZMnCG.mjs";import{g as D}from"./getChainName-DjpPdUSc.mjs";import{g as F}from"./getUsdcMintAddress-DFI1hv05.mjs";import{g as M}from"./transaction-CnfuREWo.mjs";import{g as U}from"./getErc20Balance-DA4dGV9O.mjs";import"styled-components";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"qrcode";import"@heroicons/react/24/outline/InformationCircleIcon";import"lucide-react";import"./ErrorMessage-D8VaAP5m.mjs";import"./LabelXs-oqZNqbm_.mjs";import"./Address-C4fukiNP.mjs";import"./shared-FM0rljBt.mjs";import"tinycolor2";import"zustand";import"react-device-detect";import"./prepareFundingModalData-BHVs3Cx-.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"ofetch";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-DXv-y-86.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./getFormattedUsdFromLamports-B6EqSEho.mjs";const B={component:()=>{let{wallets:k}=T(),{connectors:B}=S(),E=B.filter(y).flatMap((e=>e.wallets)),{data:$,setModalData:L,navigate:W,lastScreen:O}=I(),{rpcConfig:P,appId:z,createAnalyticsEvent:Q,closePrivyModal:R}=S(),q=j(),[H,N]=o(void 0),[X,Y]=o(!1),G=$?.funding,{reloadBalance:J}=b({rpcConfig:P,appId:z,address:"ethereum"===G.chainType?G.address:void 0,chain:"ethereum"===G.chainType?G.chain:void 0}),K="solana"===G.chainType,V=K?G.isUSDC?"USDC":"SOL":G.erc20Address?G.erc20ContractInfo?.symbol:G.chain.nativeCurrency.symbol,Z=K?E.find((({address:e})=>e===G.address)):k.find((({address:e})=>C(e)===C(G.address)));if(!G)return L({errorModalData:{error:Error("Couldn't find funding config"),previousScreen:O||"FundingMethodSelectionScreen"},funding:$?.funding,solanaFundingData:$?.solanaFundingData,sendTransaction:$?.sendTransaction}),W("ErrorScreen"),/*#__PURE__*/e(r,{});i((()=>{let e=K?async function(){if("solana"!==G.chainType)return;let e=q.solanaRpcs[G.chain];e?(G.isUSDC?async function({rpc:e,address:r,mintAddress:t}){let o=await e.getTokenAccountsByOwner(r,{mint:t},{encoding:"jsonParsed",commitment:"confirmed"}).send(),i=o.value[0]?.account;return i?BigInt(i.data.parsed.info.tokenAmount.amount):0n}({rpc:e.rpc,address:G.address,mintAddress:F(G.chain)}):A({rpc:e.rpc,address:G.address})).then((e=>{let r=BigInt(e);H&&r>H&&(Y(!0),Q({eventName:w,payload:{provider:"manual",status:"success",chainType:"solana",address:Z?.address,value:G.isUSDC?s(r-H,6):s(r-H,9),token:G.isUSDC?"USDC":"SOL"}})),N(r)})):console.warn("Unable to load solana rpc, skipping balance")}:async function(){"ethereum"===G.chainType&&(async()=>{if(!G.erc20Address)return await J()??BigInt(0);{let{balance:e}=await U({chain:G.chain,address:G.address,erc20Address:G.erc20Address,rpcConfig:P,appId:z});return e}})().then((e=>{H&&e>H&&(Y(!0),Q({eventName:w,payload:{provider:"manual",status:"success",chainType:"ethereum",address:Z?.address,chainId:G.chain.id,value:s(e-H,G.erc20ContractInfo?.decimals??18),token:G.erc20ContractInfo?.symbol??G.erc20Address??"ETH"}})),N(e)})).catch((()=>N(void 0)))},r=setInterval(e,2e3);return e(),()=>clearInterval(r)}),[H]);let _=a((()=>null==H?"":G.isUSDC?n({amount:H,decimals:6}):K?M(H,3,!0,!0):null!=G.erc20ContractInfo?.decimals?n({amount:H,decimals:G.erc20ContractInfo.decimals}):m({wei:H})),[H,K,G]),ee="ethereum"===G.chainType?G.chain.name:D(G.chain),re=a((()=>""===G.uiConfig?.receiveFundsTitle?null:/*#__PURE__*/e(g,{children:G.uiConfig?.receiveFundsTitle??`Receive ${G.amount} ${V??""}`.trim()})),[G.uiConfig?.receiveFundsTitle,G.amount,V]),te=a((()=>""===G.uiConfig?.receiveFundsSubtitle?null:/*#__PURE__*/e(h,{children:G.uiConfig?.receiveFundsSubtitle??`Scan this code or copy your wallet address to receive funds on ${ee}.`})),[G.uiConfig?.receiveFundsSubtitle,ee]),oe="solana"===G.chainType&&G.isUSDC&&F(G.chain)?`?spl-token=${F(G.chain)}`:"";/*#__PURE__*/return t(r,{children:[/*#__PURE__*/e(u,{}),re,te,/*#__PURE__*/t(l,{style:{gap:"1rem",margin:re||te?"1rem 0":"0"},children:[/*#__PURE__*/e(p,{url:`${G.chainType}:${G.address}${oe}`,size:200,squareLogoElement:x}),/*#__PURE__*/t(f,{theme:q.appearance.palette.colorScheme,children:["Make sure to send funds on ",ee,"."]}),/*#__PURE__*/e(v,{title:"Your wallet",errMsg:void 0,showCopyButton:!0,balance:`${_} ${V}`,address:G.address}),X&&/*#__PURE__*/e(c,{onClick:()=>R({shouldCallAuthOnSuccess:!1,isSuccess:!0}),children:"Continue"})]}),/*#__PURE__*/e(d,{})]})}};let x=({...r})=>/*#__PURE__*/e(k,{color:"black",...r});export{B as ManualTransferScreen,B as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,Fragment as o,jsx as t}from"react/jsx-runtime";import r from"@heroicons/react/24/outline/QuestionMarkCircleIcon";import i from"@heroicons/react/24/outline/ShieldCheckIcon";import{useState as n}from"react";import{M as a,b as s,P as m}from"./ModalHeader-
|
|
1
|
+
import{jsxs as e,Fragment as o,jsx as t}from"react/jsx-runtime";import r from"@heroicons/react/24/outline/QuestionMarkCircleIcon";import i from"@heroicons/react/24/outline/ShieldCheckIcon";import{useState as n}from"react";import{M as a,b as s,P as m}from"./ModalHeader-BAGwTwiB.mjs";import{L as l}from"./useActiveWallet-CT7uncGy.mjs";import{u as c}from"./context-C7FGpzoq.mjs";import{u as p,a as u}from"./get-is-unified-wallet-DKm2LBUt.mjs";import{M as d,E as h,a as y,b as f}from"./EnrollTotp-CukCif6j.mjs";import{A as v,C as j,I as k,T as g,S as C,B as M}from"./PinInput-3SLvbnQa.mjs";import"styled-components";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./internal-context-Z-fyxadS.mjs";import"ofetch";import"zustand";import"react-device-detect";import"./prepareFundingModalData-BHVs3Cx-.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./useWallets-Cs7YKcaR.mjs";import"tinycolor2";import"@heroicons/react/24/outline/ChevronRightIcon";import"@heroicons/react/24/outline/DevicePhoneMobileIcon";import"@heroicons/react/24/outline/FingerPrintIcon";import"@heroicons/react/24/outline/MinusCircleIcon";import"@heroicons/react/24/outline/PhoneIcon";import"./Chip-D2-wZOHJ.mjs";import"./LoadingSkeleton-U6-3yFwI.mjs";import"@heroicons/react/24/outline/ArrowRightEndOnRectangleIcon";import"@heroicons/react/24/outline/ClockIcon";import"./ErrorScreen-BACrlbnT.mjs";import"lucide-react";import"./index-DNLZMnCG.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-DXv-y-86.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./reservoir-0wfhnc0j.mjs";import"./ScreenLayout-DG_XRElR.mjs";import"./Screen-Dv092amM.mjs";import"./index-Dq_xe9dz.mjs";import"./LinkPasskeyScreen-CUdvQeqw.mjs";import"./TodoList-CgrU7uwu.mjs";import"./CopyToClipboard-BGTSFnT3.mjs";import"./copy-Bx2Jwc5_.mjs";import"./Layouts-BlFm53ED.mjs";import"./Column-C2X2MHYX.mjs";import"./LabelXs-oqZNqbm_.mjs";import"./Subtitle-CV-2yKE4.mjs";import"./Title-BnzYV3Is.mjs";import"./shared-FM0rljBt.mjs";import"@heroicons/react/24/solid/ShieldCheckIcon";import"./QrCode-CT_CXG3e.mjs";import"qrcode";const w={component:()=>{let{user:w,ready:b}=p(),{data:I,onUserCloseViaDialogOrKeybindRef:S}=u(),A=c(),[E,R]=n(null),[P,F]=n(null),[T,x]=n(null),[L,B]=n(!1),[U,W]=n(!1),[D,O]=n(),X=async()=>{D?$(D):w?await H({user:w}):$(Error("Must be logged in to manage MFA")),setTimeout((()=>{R(null),F(null)}),500)};if(S.current=X,!I?.mfaEnroll)throw Error("Missing modal data for MFA enrollment screen.");let{onFailure:$,onSuccess:H,onBack:K,mfaMethods:Q,verify:q,generateTotpSecret:z,enrollTotp:J,unenrollTotp:N,enrollPasskey:V}=I.mfaEnroll,_=w?.mfaMethods.includes("sms"),G=w?.mfaMethods.includes("totp"),Y=w?.mfaMethods.includes("passkey"),Z=!!w?.phone,ee=w?.linkedAccounts.filter((e=>"passkey"===e.type)).map((e=>e.credentialId))??[];function oe(){R(null),F(null),O(void 0)}async function te(e=ee){try{O(void 0),W(!0);let o=await V(e);return await H({user:o})}catch(e){O(e)}finally{W(!1),B(!1)}}if(!b||!w||!A)/*#__PURE__*/return e(o,{children:[/*#__PURE__*/t(a,{onClose:X,backFn:K},"header"),/*#__PURE__*/t(v,{children:/*#__PURE__*/t(d,{})}),/*#__PURE__*/t(j,{children:/*#__PURE__*/t(l,{})}),/*#__PURE__*/t(s,{})]});if("sms"===E)return null;if("totp"===E)/*#__PURE__*/return e(o,{children:[/*#__PURE__*/t(a,{backFn:oe,onClose:X},"header"),/*#__PURE__*/t(k,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/t(r,{})}),/*#__PURE__*/t(g,{children:"Remove authenticator app verification?"}),/*#__PURE__*/e(C,{children:["MFA adds an extra layer of security to your ",A?.name," account. Make sure you have other methods to secure your account."]}),/*#__PURE__*/t(M,{children:/*#__PURE__*/t(m,{$warn:!0,onClick:async function(){try{O(void 0),W(!0);let e=await N();return await H({user:e})}catch(e){O(e)}finally{W(!1),R(null)}},loading:U,children:"Remove"})}),/*#__PURE__*/t(s,{})]});if("passkey"===E){let i=I.mfaEnroll.shouldUnlinkOnUnenrollMfa??!0;/*#__PURE__*/return e(o,{children:[/*#__PURE__*/t(a,{backFn:oe,onClose:X},"header"),/*#__PURE__*/t(k,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/t(r,{})}),/*#__PURE__*/t(g,{children:"Are you sure you want to remove this passkey?"}),/*#__PURE__*/t(C,{children:i?"Removing your passkey will remove as both a verification method and a login method.":"Removing your passkey will remove as a verification method."}),/*#__PURE__*/t(M,{children:/*#__PURE__*/t(m,{$warn:!0,onClick:async function(){try{O(void 0),W(!0);let e=await V([]);return await H({user:e})}catch(e){O(e)}finally{W(!1),R(null)}},loading:U,children:"Remove"})}),/*#__PURE__*/t(s,{})]})}return 0!==Q.length||_||G||Y?"sms"===P?null:"totp"===P&&T?/*#__PURE__*/t(h,{onClose:X,onReset:oe,submitEnrollmentWithTotp:e=>async function(e){try{O(void 0),W(!0);let o=await J(e);return await H({user:o})}catch(e){O(e)}finally{W(!1),R(null)}}(e.mfaCode),error:D,totpInfo:{...T,appName:A?.name||"Privy"}}):"passkey"===P?/*#__PURE__*/t(y,{onReset:oe,onClose:X,submitEnrollmentWithPasskey:te}):/*#__PURE__*/t(f,{showIntro:!0,userMfaMethods:w.mfaMethods,appMfaMethods:A.mfa.methods,userHasAuthSms:Z,backFn:K,handleSelectMethod:async function(e){O(void 0);try{await q()}catch(e){return void O(e)}return"totp"===e?(F(e),x(null),void z().then((({totpSecret:e,totpAuthUrl:o})=>{x({authUrl:o,secret:e})})).catch((()=>{x(null),oe()}))):"passkey"===e&&1===ee.length?await te():void F(e)},isTotpLoading:"totp"===P&&!T,isPasskeyLoading:L,error:D,onClose:X,setRemovingMfaMethod:async function(e){O(void 0);try{await q()}catch(e){return void O(e)}R(e)}}):/*#__PURE__*/e(o,{children:[/*#__PURE__*/t(a,{onClose:X,backFn:K},"header"),/*#__PURE__*/t(k,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/t(i,{})}),/*#__PURE__*/t(g,{children:"Add more security"}),/*#__PURE__*/e(C,{children:[A?.name," does not have any verification methods enabled."]}),/*#__PURE__*/t(M,{children:/*#__PURE__*/t(m,{onClick:X,children:"Close"})}),/*#__PURE__*/t(s,{})]})}};export{w as MfaAuthEnrollmentFlowScreen,w as default};
|
package/dist/esm/{MfaAuthVerifyFlowScreen-T7Rg8uvy.mjs → MfaAuthVerifyFlowScreen-Cb9DZ4gN.mjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as o}from"react/jsx-runtime";import{useState as e,useEffect as t,useRef as r}from"react";import{u as i,a as s}from"./get-is-unified-wallet-
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{useState as e,useEffect as t,useRef as r}from"react";import{u as i,a as s}from"./get-is-unified-wallet-DKm2LBUt.mjs";import{V as m,a as n,b as a,t as c}from"./to-ui-error-GnZ5qhQ4.mjs";import"viem";import"./context-C7FGpzoq.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./internal-context-Z-fyxadS.mjs";import"ofetch";import"@heroicons/react/24/outline/DevicePhoneMobileIcon";import"@heroicons/react/24/outline/FingerPrintIcon";import"@heroicons/react/24/outline/PhoneIcon";import"@heroicons/react/24/outline/ShieldCheckIcon";import"./ModalHeader-BAGwTwiB.mjs";import"styled-components";import"./useActiveWallet-CT7uncGy.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-BHVs3Cx-.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./useWallets-Cs7YKcaR.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./ScreenLayout-DG_XRElR.mjs";import"./Screen-Dv092amM.mjs";import"./index-Dq_xe9dz.mjs";import"./PinInput-3SLvbnQa.mjs";import"@heroicons/react/24/outline/CalendarIcon";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"./StackedContainer-B2vaEl56.mjs";import"./useGetTokenPrice-CInz9y-l.mjs";import"./useGetSolPrice-DwwjjGbd.mjs";import"./index-DNLZMnCG.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-DXv-y-86.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./TransactionDetails-BnKb_enO.mjs";import"./WalletLink-Dqy4DrLT.mjs";import"./ethers-jrpF9vqa.mjs";import"./getFormattedUsdFromLamports-B6EqSEho.mjs";import"./transaction-CnfuREWo.mjs";import"./Layouts-BlFm53ED.mjs";import"@heroicons/react/24/outline/ChevronDownIcon";const p={component:()=>{let{user:p}=i(),{data:l}=s(),[u,d]=e(p?.mfaMethods[0]),[h,f]=e(!1),[j,v]=e(),[y,k]=e();if(t((()=>{d(p?.mfaMethods[0])}),[p?.mfaMethods]),!l?.mfaVerify)throw Error("Missing modal data for MFA verification screen.");let{onFailure:g,onSuccess:w,generateOptions:C,verifyTotpCode:M,verifyPasskey:I,verifySmsCode:S,sendSmsCode:b}=l.mfaVerify,P=async o=>{if("passkey"!==o)try{d(o),"sms"===o&&(d(o),await b()),"totp"===o&&d(o)}catch(o){console.error(o)}else try{d(o);let e=await C();if(!e)throw Error("something went wrong");v(e),await I(e),f(!0),k(void 0),w()}catch(o){k(c(o))}},x=async o=>{k(void 0);try{if(!o||!u)return;if("passkey"===u){if(!j)throw Error("Missing passkey challenge");await I(j)}else"sms"===u?await S(o):"totp"===u&&await M(o);k(void 0),f(!0),w()}catch(o){throw c(o).error}},A=()=>{y||!h?g(y?.error??Error("Canceled MFA verification.")):w()},E=r(!1);return t((()=>{!E.current&&u&&(E.current=!0,P(u).finally((()=>{E.current=!1})))}),[open]),p?"passkey"===u?/*#__PURE__*/o(m,{account:p.linkedAccounts.filter((o=>"passkey"===o.type&&o.enrolledInMfa)).sort(((o,e)=>e.firstVerifiedAt.valueOf()-o.firstVerifiedAt.valueOf()))[0],submitSuccess:h,hasBlockingError:y?.isBlocking??!1,error:y?.error,onClose:A,onBack:()=>{d(void 0),k(void 0)},handleSubmit:()=>x(j).catch(k)}):"sms"===u||"totp"===u?/*#__PURE__*/o(n,{selectedMethod:u,submitSuccess:h,hasBlockingError:y?.isBlocking??!1,handleSubmitCode:x,onClose:A,onBack:p.mfaMethods.length>1?()=>d(void 0):void 0}):/*#__PURE__*/o(a,{user:p,onSelect:P,handleClose:A}):null}};export{p as MfaAuthVerifyFlowScreen,p as default};
|
package/dist/esm/{MfaEnrollmentFlowScreen-Bz72-m4D.mjs → MfaEnrollmentFlowScreen-99fSY8g-.mjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as o,Fragment as r}from"react/jsx-runtime";import t from"@heroicons/react/24/outline/QuestionMarkCircleIcon";import n from"@heroicons/react/24/outline/ShieldCheckIcon";import i from"@heroicons/react/24/solid/CheckBadgeIcon";import l from"@heroicons/react/24/solid/IdentificationIcon";import{useState as a,useEffect as s}from"react";import{M as c,b as m,P as d,S as h}from"./ModalHeader-D5psNgrf.mjs";import{L as u}from"./useActiveWallet-RUYo4pXO.mjs";import{u as p}from"./context-Bu4xmqpC.mjs";import{u as f}from"./internal-context-e-Eni5bG.mjs";import{a as y,u as v}from"./get-is-unified-wallet-CvIzjbW7.mjs";import{d as C,f as w,g as k,h as g,i as j,u as b}from"./index-ygZBlWlm.mjs";import{M,E as S,a as E,b as I}from"./EnrollTotp-CXZmaa4A.mjs";import F from"@heroicons/react/24/outline/CheckCircleIcon";import P from"@heroicons/react/24/outline/PhoneIcon";import{lastFourDigits as R}from"@privy-io/js-sdk-core";import{C as x}from"./ConnectPhoneForm-CYfqSIAI.mjs";import{I as W,T,S as B,C as L,a as A,B as N,N as U,A as O,L as D,b as $,c as X}from"./PinInput-3SLvbnQa.mjs";import{ErrorScreenView as Y}from"./ErrorScreen-DLsfgpC9.mjs";import"styled-components";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/XMarkIcon";import"zustand";import"react-device-detect";import"./prepareFundingModalData-CRrWM52E.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-BkIu5vyx.mjs";import"tinycolor2";import"ofetch";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-Bn7q4pcu.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-CwE9r3cT.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-eEm9Olt_.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"@heroicons/react/24/outline/ChevronRightIcon";import"@heroicons/react/24/outline/DevicePhoneMobileIcon";import"@heroicons/react/24/outline/FingerPrintIcon";import"@heroicons/react/24/outline/MinusCircleIcon";import"./Chip-D2-wZOHJ.mjs";import"./LoadingSkeleton-U6-3yFwI.mjs";import"@heroicons/react/24/outline/ArrowRightEndOnRectangleIcon";import"@heroicons/react/24/outline/ClockIcon";import"./LinkPasskeyScreen-DJveInKu.mjs";import"lucide-react";import"./TodoList-CgrU7uwu.mjs";import"./ScreenLayout-DIdy7nhJ.mjs";import"./Screen-q8npRQhQ.mjs";import"./index-Dq_xe9dz.mjs";import"./CopyToClipboard-BGTSFnT3.mjs";import"./copy-Bx2Jwc5_.mjs";import"./Layouts-BlFm53ED.mjs";import"./Column-C2X2MHYX.mjs";import"./LabelXs-oqZNqbm_.mjs";import"./Subtitle-CV-2yKE4.mjs";import"./Title-BnzYV3Is.mjs";import"./shared-FM0rljBt.mjs";import"@heroicons/react/24/solid/ShieldCheckIcon";import"./QrCode-Bp7vKyXB.mjs";import"qrcode";import"./reservoir-kvLjIrEo.mjs";const q=({appName:t,onComplete:n,onReset:i,onClose:l})=>{let[s,h]=a(""),[u,f]=a(!1),[v,b]=a(null),[M,S]=a("enroll"),{initEnrollmentWithSms:E,submitEnrollmentWithSms:I}=C(),{data:O}=y(),D=p();function $(){O?.mfaEnrollmentFlow?.onSuccess(),n()}return v?/*#__PURE__*/e(Y,{allowlistConfig:D.allowlistConfig,error:v,onBack:()=>b(null),onRetry:()=>b(null)}):/*#__PURE__*/o(r,"enroll"===M?{children:[/*#__PURE__*/e(c,{backFn:i,onClose:l},"header"),/*#__PURE__*/e(W,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(P,{})}),/*#__PURE__*/e(T,{children:"Set up SMS verification"}),/*#__PURE__*/o(B,{children:["We'll text a verification code to this mobile device whenever you use your ",t," ","wallet."]}),/*#__PURE__*/o(L,{children:[/*#__PURE__*/e(x,{onSubmit:async function({qualifiedPhoneNumber:e}){try{await E({phoneNumber:e}),h(e),S("verify")}catch(e){b(e)}},hideRecent:!0}),/*#__PURE__*/o(A,{children:["By providing your mobile number, you agree to receive text messages from ",D?.name,". Some carrier charges may apply"]})]}),/*#__PURE__*/e(m,{})]}:u?{children:[/*#__PURE__*/e(c,{onClose:$},"header"),/*#__PURE__*/e(W,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(F,{})}),/*#__PURE__*/e(T,{children:"SMS verification added"}),/*#__PURE__*/o(B,{children:["From now on, you'll enter the verification code sent to your mobile device whenever you use your ",t," wallet."]}),/*#__PURE__*/e(N,{children:/*#__PURE__*/e(d,{onClick:$,children:"Done"})}),/*#__PURE__*/e(m,{})]}:{children:[/*#__PURE__*/e(c,{backFn:function(){"verify"===M?S("enroll"):i()},onClose:l},"header"),/*#__PURE__*/e(W,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(P,{})}),/*#__PURE__*/e(T,{children:"Enter enrollment code"}),/*#__PURE__*/o(L,{children:[/*#__PURE__*/e(U,{onChange:async function(e){try{if(!e)return;await I({phoneNumber:s,mfaCode:e}),f(!0)}catch(e){if(w(e))throw Error("You have exceeded the maximum number of attempts. Please close this window and try again in 10 seconds.");if(k(e))throw Error("The code you entered is not valid");if(g(e))throw Error("You have exceeded the time limit for code entry. Please try again in 30 seconds.");throw j(e)?Error("Verification canceled"):Error("Unknown error")}}}),/*#__PURE__*/o(B,{children:["To continue, enter the 6-digit code sent to ",/*#__PURE__*/e("strong",{children:R(s)})]})]}),/*#__PURE__*/e(m,{})]})},H={component:()=>{let{user:w,enrollInMfa:k,ready:g}=v(),[j,F]=a(null),{unenrollWithSms:P,unenrollWithTotp:R,unenrollWithPasskey:x,submitEnrollmentWithTotp:A,initEnrollmentWithPasskey:U,submitEnrollmentWithPasskey:Y,initEnrollmentWithTotp:H}=C(),{data:K,onUserCloseViaDialogOrKeybindRef:Q}=y(),V=p(),{closePrivyModal:z}=f(),{promptMfa:J}=b(),[_,G]=a(!1),[Z,ee]=a(null),[oe,re]=a(null),te=()=>{z({shouldCallAuthOnSuccess:!0}),k(!1),setTimeout((()=>{F(null),ee(null)}),500)},[ne,ie]=a(!1),[le,ae]=a();Q.current=te;let se=w?.mfaMethods.includes("sms"),ce=!!w?.phone,me=w?.mfaMethods.includes("totp"),de=w?.mfaMethods.includes("passkey"),he=se||me||de,ue=w?.linkedAccounts.filter((e=>"passkey"===e.type)).map((e=>e.credentialId))??[];function pe(){F(null),ee(null)}async function fe(e=ue){ie(!0);try{return await U(),await Y({credentialIds:e},{removeForLogin:K?.mfaEnrollmentFlow?.shouldUnlinkOnUnenrollMfa}),K?.mfaEnrollmentFlow?.onSuccess(),te()}catch(e){ae(e)}finally{ie(!1)}}if(s((()=>{he&&G(!0)}),[he]),!g||!w||!V/*#__PURE__*/)return o(r,{children:[/*#__PURE__*/e(c,{onClose:te},"header"),/*#__PURE__*/e(O,{children:/*#__PURE__*/e(M,{})}),/*#__PURE__*/e(L,{children:/*#__PURE__*/e(u,{})}),/*#__PURE__*/e(m,{})]});if("sms"===j)/*#__PURE__*/return o(r,{children:[/*#__PURE__*/e(c,{backFn:pe,onClose:te},"header"),/*#__PURE__*/e(W,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(t,{})}),/*#__PURE__*/e(T,{children:"Remove SMS verification?"}),/*#__PURE__*/o(B,{children:["MFA adds an extra layer of security to your ",V?.name," account. Make sure you have other methods to secure your account."]}),/*#__PURE__*/e(N,{children:/*#__PURE__*/e(d,{$warn:!0,onClick:async function(){F(null);try{await P()}catch(e){F(null)}},children:"Remove"})}),/*#__PURE__*/e(m,{})]});if("totp"===j)/*#__PURE__*/return o(r,{children:[/*#__PURE__*/e(c,{backFn:pe,onClose:te},"header"),/*#__PURE__*/e(W,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(t,{})}),/*#__PURE__*/e(T,{children:"Remove authenticator app verification?"}),/*#__PURE__*/o(B,{children:["MFA adds an extra layer of security to your ",V?.name," account. Make sure you have other methods to secure your account."]}),/*#__PURE__*/e(N,{children:/*#__PURE__*/e(d,{$warn:!0,onClick:async function(){F(null);try{await R()}catch(e){F(null)}},children:"Remove"})}),/*#__PURE__*/e(m,{})]});if("passkey"===j){let n=K?.mfaEnrollmentFlow?.shouldUnlinkOnUnenrollMfa??!0;/*#__PURE__*/return o(r,{children:[/*#__PURE__*/e(c,{backFn:pe,onClose:te},"header"),/*#__PURE__*/e(W,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(t,{})}),/*#__PURE__*/e(T,{children:"Are you sure you want to remove this passkey?"}),/*#__PURE__*/e(B,{children:n?"Removing your passkey will remove as both a verification method and a login method.":"Removing your passkey will remove as a verification method."}),/*#__PURE__*/e(N,{children:/*#__PURE__*/e(d,{$warn:!0,onClick:async function(){F(null);try{await x({removeForLogin:K?.mfaEnrollmentFlow?.shouldUnlinkOnUnenrollMfa})}catch(e){F(null)}},children:"Remove"})}),/*#__PURE__*/e(m,{})]})}if(0===K.mfaEnrollmentFlow.mfaMethods.length&&!he)/*#__PURE__*/return o(r,{children:[/*#__PURE__*/e(c,{onClose:te},"header"),/*#__PURE__*/e(W,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(n,{})}),/*#__PURE__*/e(T,{children:"Add more security"}),/*#__PURE__*/o(B,{children:[V?.name," does not have any verification methods enabled."]}),/*#__PURE__*/e(N,{children:/*#__PURE__*/e(d,{onClick:te,children:"Close"})}),/*#__PURE__*/e(m,{})]});let ye=!he&&!_;return ye?/*#__PURE__*/o(r,{children:[/*#__PURE__*/e(c,{onClose:te},"header"),/*#__PURE__*/e(W,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(n,{})}),/*#__PURE__*/e(T,{children:"Transaction Protection"}),/*#__PURE__*/e(B,{children:"Set up transaction protection to add an extra layer of security to your account"}),/*#__PURE__*/o(D,{children:[/*#__PURE__*/o($,{children:[/*#__PURE__*/e(X,{children:/*#__PURE__*/e(i,{})}),"Enable 2-Step verification for your ",V?.name," wallet."]}),/*#__PURE__*/o($,{children:[/*#__PURE__*/e(X,{children:/*#__PURE__*/e(l,{})}),"You'll be prompted to authenticate to complete transactions."]})]}),/*#__PURE__*/o(N,{children:[/*#__PURE__*/e(d,{onClick:()=>G(!0),children:"Continue"}),/*#__PURE__*/e(h,{onClick:te,children:"Not now"})]}),/*#__PURE__*/e(m,{})]}):"sms"===Z?/*#__PURE__*/e(q,{appName:V?.name||"Privy",onComplete:te,onReset:pe,onClose:te}):"totp"===Z&&oe?/*#__PURE__*/e(S,{onClose:te,onReset:pe,submitEnrollmentWithTotp:({mfaCode:e})=>async function(e){try{return ae(void 0),await A({mfaCode:e}),K?.mfaEnrollmentFlow?.onSuccess(),te()}catch(e){ae(e)}finally{F(null)}}(e),totpInfo:{...oe,appName:V?.name||"Privy"}}):"passkey"===Z?/*#__PURE__*/e(E,{onReset:pe,onClose:te,submitEnrollmentWithPasskey:fe}):/*#__PURE__*/e(I,{showIntro:ye,userMfaMethods:w.mfaMethods,appMfaMethods:V.mfa.methods,userHasAuthSms:ce,backFn:function(){G(!1)},handleSelectMethod:async function(e){try{await J()}catch(e){return void ae(e)}return"totp"===e?(ee(e),re(null),void H().then((e=>{re(e)})).catch((()=>{re(null),pe()}))):"passkey"===e&&1===ue.length?await fe():void ee(e)},isTotpLoading:"totp"===Z&&!oe,isPasskeyLoading:ne,error:le,onClose:te,setRemovingMfaMethod:async e=>{try{await J()}catch(e){return void ae(e)}F(e)}})}};export{H as MfaEnrollmentFlowScreen,H as default};
|
|
1
|
+
import{jsx as e,jsxs as o,Fragment as r}from"react/jsx-runtime";import t from"@heroicons/react/24/outline/QuestionMarkCircleIcon";import n from"@heroicons/react/24/outline/ShieldCheckIcon";import i from"@heroicons/react/24/solid/CheckBadgeIcon";import l from"@heroicons/react/24/solid/IdentificationIcon";import{useState as a,useEffect as s}from"react";import{M as c,b as m,P as d,S as h}from"./ModalHeader-BAGwTwiB.mjs";import{L as u}from"./useActiveWallet-CT7uncGy.mjs";import{u as p}from"./context-C7FGpzoq.mjs";import{u as f}from"./internal-context-Z-fyxadS.mjs";import{a as y,u as v}from"./get-is-unified-wallet-DKm2LBUt.mjs";import{d as C,f as w,g as k,h as g,i as j,u as b}from"./index-DNLZMnCG.mjs";import{M,E as S,a as E,b as I}from"./EnrollTotp-CukCif6j.mjs";import F from"@heroicons/react/24/outline/CheckCircleIcon";import P from"@heroicons/react/24/outline/PhoneIcon";import{lastFourDigits as R}from"@privy-io/js-sdk-core";import{C as x}from"./ConnectPhoneForm-DjqZxuB-.mjs";import{I as W,T,S as B,C as L,a as A,B as N,N as U,A as O,L as D,b as $,c as X}from"./PinInput-3SLvbnQa.mjs";import{ErrorScreenView as Y}from"./ErrorScreen-BACrlbnT.mjs";import"styled-components";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/XMarkIcon";import"zustand";import"react-device-detect";import"./prepareFundingModalData-BHVs3Cx-.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./useWallets-Cs7YKcaR.mjs";import"tinycolor2";import"ofetch";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-DXv-y-86.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"@heroicons/react/24/outline/ChevronRightIcon";import"@heroicons/react/24/outline/DevicePhoneMobileIcon";import"@heroicons/react/24/outline/FingerPrintIcon";import"@heroicons/react/24/outline/MinusCircleIcon";import"./Chip-D2-wZOHJ.mjs";import"./LoadingSkeleton-U6-3yFwI.mjs";import"@heroicons/react/24/outline/ArrowRightEndOnRectangleIcon";import"@heroicons/react/24/outline/ClockIcon";import"./LinkPasskeyScreen-CUdvQeqw.mjs";import"lucide-react";import"./TodoList-CgrU7uwu.mjs";import"./ScreenLayout-DG_XRElR.mjs";import"./Screen-Dv092amM.mjs";import"./index-Dq_xe9dz.mjs";import"./CopyToClipboard-BGTSFnT3.mjs";import"./copy-Bx2Jwc5_.mjs";import"./Layouts-BlFm53ED.mjs";import"./Column-C2X2MHYX.mjs";import"./LabelXs-oqZNqbm_.mjs";import"./Subtitle-CV-2yKE4.mjs";import"./Title-BnzYV3Is.mjs";import"./shared-FM0rljBt.mjs";import"@heroicons/react/24/solid/ShieldCheckIcon";import"./QrCode-CT_CXG3e.mjs";import"qrcode";import"./reservoir-0wfhnc0j.mjs";const q=({appName:t,onComplete:n,onReset:i,onClose:l})=>{let[s,h]=a(""),[u,f]=a(!1),[v,b]=a(null),[M,S]=a("enroll"),{initEnrollmentWithSms:E,submitEnrollmentWithSms:I}=C(),{data:O}=y(),D=p();function $(){O?.mfaEnrollmentFlow?.onSuccess(),n()}return v?/*#__PURE__*/e(Y,{allowlistConfig:D.allowlistConfig,error:v,onBack:()=>b(null),onRetry:()=>b(null)}):/*#__PURE__*/o(r,"enroll"===M?{children:[/*#__PURE__*/e(c,{backFn:i,onClose:l},"header"),/*#__PURE__*/e(W,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(P,{})}),/*#__PURE__*/e(T,{children:"Set up SMS verification"}),/*#__PURE__*/o(B,{children:["We'll text a verification code to this mobile device whenever you use your ",t," ","wallet."]}),/*#__PURE__*/o(L,{children:[/*#__PURE__*/e(x,{onSubmit:async function({qualifiedPhoneNumber:e}){try{await E({phoneNumber:e}),h(e),S("verify")}catch(e){b(e)}},hideRecent:!0}),/*#__PURE__*/o(A,{children:["By providing your mobile number, you agree to receive text messages from ",D?.name,". Some carrier charges may apply"]})]}),/*#__PURE__*/e(m,{})]}:u?{children:[/*#__PURE__*/e(c,{onClose:$},"header"),/*#__PURE__*/e(W,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(F,{})}),/*#__PURE__*/e(T,{children:"SMS verification added"}),/*#__PURE__*/o(B,{children:["From now on, you'll enter the verification code sent to your mobile device whenever you use your ",t," wallet."]}),/*#__PURE__*/e(N,{children:/*#__PURE__*/e(d,{onClick:$,children:"Done"})}),/*#__PURE__*/e(m,{})]}:{children:[/*#__PURE__*/e(c,{backFn:function(){"verify"===M?S("enroll"):i()},onClose:l},"header"),/*#__PURE__*/e(W,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(P,{})}),/*#__PURE__*/e(T,{children:"Enter enrollment code"}),/*#__PURE__*/o(L,{children:[/*#__PURE__*/e(U,{onChange:async function(e){try{if(!e)return;await I({phoneNumber:s,mfaCode:e}),f(!0)}catch(e){if(w(e))throw Error("You have exceeded the maximum number of attempts. Please close this window and try again in 10 seconds.");if(k(e))throw Error("The code you entered is not valid");if(g(e))throw Error("You have exceeded the time limit for code entry. Please try again in 30 seconds.");throw j(e)?Error("Verification canceled"):Error("Unknown error")}}}),/*#__PURE__*/o(B,{children:["To continue, enter the 6-digit code sent to ",/*#__PURE__*/e("strong",{children:R(s)})]})]}),/*#__PURE__*/e(m,{})]})},H={component:()=>{let{user:w,enrollInMfa:k,ready:g}=v(),[j,F]=a(null),{unenrollWithSms:P,unenrollWithTotp:R,unenrollWithPasskey:x,submitEnrollmentWithTotp:A,initEnrollmentWithPasskey:U,submitEnrollmentWithPasskey:Y,initEnrollmentWithTotp:H}=C(),{data:K,onUserCloseViaDialogOrKeybindRef:Q}=y(),V=p(),{closePrivyModal:z}=f(),{promptMfa:J}=b(),[_,G]=a(!1),[Z,ee]=a(null),[oe,re]=a(null),te=()=>{z({shouldCallAuthOnSuccess:!0}),k(!1),setTimeout((()=>{F(null),ee(null)}),500)},[ne,ie]=a(!1),[le,ae]=a();Q.current=te;let se=w?.mfaMethods.includes("sms"),ce=!!w?.phone,me=w?.mfaMethods.includes("totp"),de=w?.mfaMethods.includes("passkey"),he=se||me||de,ue=w?.linkedAccounts.filter((e=>"passkey"===e.type)).map((e=>e.credentialId))??[];function pe(){F(null),ee(null)}async function fe(e=ue){ie(!0);try{return await U(),await Y({credentialIds:e},{removeForLogin:K?.mfaEnrollmentFlow?.shouldUnlinkOnUnenrollMfa}),K?.mfaEnrollmentFlow?.onSuccess(),te()}catch(e){ae(e)}finally{ie(!1)}}if(s((()=>{he&&G(!0)}),[he]),!g||!w||!V/*#__PURE__*/)return o(r,{children:[/*#__PURE__*/e(c,{onClose:te},"header"),/*#__PURE__*/e(O,{children:/*#__PURE__*/e(M,{})}),/*#__PURE__*/e(L,{children:/*#__PURE__*/e(u,{})}),/*#__PURE__*/e(m,{})]});if("sms"===j)/*#__PURE__*/return o(r,{children:[/*#__PURE__*/e(c,{backFn:pe,onClose:te},"header"),/*#__PURE__*/e(W,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(t,{})}),/*#__PURE__*/e(T,{children:"Remove SMS verification?"}),/*#__PURE__*/o(B,{children:["MFA adds an extra layer of security to your ",V?.name," account. Make sure you have other methods to secure your account."]}),/*#__PURE__*/e(N,{children:/*#__PURE__*/e(d,{$warn:!0,onClick:async function(){F(null);try{await P()}catch(e){F(null)}},children:"Remove"})}),/*#__PURE__*/e(m,{})]});if("totp"===j)/*#__PURE__*/return o(r,{children:[/*#__PURE__*/e(c,{backFn:pe,onClose:te},"header"),/*#__PURE__*/e(W,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(t,{})}),/*#__PURE__*/e(T,{children:"Remove authenticator app verification?"}),/*#__PURE__*/o(B,{children:["MFA adds an extra layer of security to your ",V?.name," account. Make sure you have other methods to secure your account."]}),/*#__PURE__*/e(N,{children:/*#__PURE__*/e(d,{$warn:!0,onClick:async function(){F(null);try{await R()}catch(e){F(null)}},children:"Remove"})}),/*#__PURE__*/e(m,{})]});if("passkey"===j){let n=K?.mfaEnrollmentFlow?.shouldUnlinkOnUnenrollMfa??!0;/*#__PURE__*/return o(r,{children:[/*#__PURE__*/e(c,{backFn:pe,onClose:te},"header"),/*#__PURE__*/e(W,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(t,{})}),/*#__PURE__*/e(T,{children:"Are you sure you want to remove this passkey?"}),/*#__PURE__*/e(B,{children:n?"Removing your passkey will remove as both a verification method and a login method.":"Removing your passkey will remove as a verification method."}),/*#__PURE__*/e(N,{children:/*#__PURE__*/e(d,{$warn:!0,onClick:async function(){F(null);try{await x({removeForLogin:K?.mfaEnrollmentFlow?.shouldUnlinkOnUnenrollMfa})}catch(e){F(null)}},children:"Remove"})}),/*#__PURE__*/e(m,{})]})}if(0===K.mfaEnrollmentFlow.mfaMethods.length&&!he)/*#__PURE__*/return o(r,{children:[/*#__PURE__*/e(c,{onClose:te},"header"),/*#__PURE__*/e(W,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(n,{})}),/*#__PURE__*/e(T,{children:"Add more security"}),/*#__PURE__*/o(B,{children:[V?.name," does not have any verification methods enabled."]}),/*#__PURE__*/e(N,{children:/*#__PURE__*/e(d,{onClick:te,children:"Close"})}),/*#__PURE__*/e(m,{})]});let ye=!he&&!_;return ye?/*#__PURE__*/o(r,{children:[/*#__PURE__*/e(c,{onClose:te},"header"),/*#__PURE__*/e(W,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(n,{})}),/*#__PURE__*/e(T,{children:"Transaction Protection"}),/*#__PURE__*/e(B,{children:"Set up transaction protection to add an extra layer of security to your account"}),/*#__PURE__*/o(D,{children:[/*#__PURE__*/o($,{children:[/*#__PURE__*/e(X,{children:/*#__PURE__*/e(i,{})}),"Enable 2-Step verification for your ",V?.name," wallet."]}),/*#__PURE__*/o($,{children:[/*#__PURE__*/e(X,{children:/*#__PURE__*/e(l,{})}),"You'll be prompted to authenticate to complete transactions."]})]}),/*#__PURE__*/o(N,{children:[/*#__PURE__*/e(d,{onClick:()=>G(!0),children:"Continue"}),/*#__PURE__*/e(h,{onClick:te,children:"Not now"})]}),/*#__PURE__*/e(m,{})]}):"sms"===Z?/*#__PURE__*/e(q,{appName:V?.name||"Privy",onComplete:te,onReset:pe,onClose:te}):"totp"===Z&&oe?/*#__PURE__*/e(S,{onClose:te,onReset:pe,submitEnrollmentWithTotp:({mfaCode:e})=>async function(e){try{return ae(void 0),await A({mfaCode:e}),K?.mfaEnrollmentFlow?.onSuccess(),te()}catch(e){ae(e)}finally{F(null)}}(e),totpInfo:{...oe,appName:V?.name||"Privy"}}):"passkey"===Z?/*#__PURE__*/e(E,{onReset:pe,onClose:te,submitEnrollmentWithPasskey:fe}):/*#__PURE__*/e(I,{showIntro:ye,userMfaMethods:w.mfaMethods,appMfaMethods:V.mfa.methods,userHasAuthSms:ce,backFn:function(){G(!1)},handleSelectMethod:async function(e){try{await J()}catch(e){return void ae(e)}return"totp"===e?(ee(e),re(null),void H().then((e=>{re(e)})).catch((()=>{re(null),pe()}))):"passkey"===e&&1===ue.length?await fe():void ee(e)},isTotpLoading:"totp"===Z&&!oe,isPasskeyLoading:ne,error:le,onClose:te,setRemovingMfaMethod:async e=>{try{await J()}catch(e){return void ae(e)}F(e)}})}};export{H as MfaEnrollmentFlowScreen,H as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as o}from"react/jsx-runtime";import{useState as t,useEffect as e,useRef as r}from"react";import{u as i}from"./get-is-unified-wallet-
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{useState as t,useEffect as e,useRef as r}from"react";import{u as i}from"./get-is-unified-wallet-DKm2LBUt.mjs";import{u as n}from"./index-DNLZMnCG.mjs";import{V as m,a as s,b as c,t as a}from"./to-ui-error-GnZ5qhQ4.mjs";import"viem";import"./context-C7FGpzoq.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./internal-context-Z-fyxadS.mjs";import"ofetch";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-CT7uncGy.mjs";import"zustand";import"styled-components";import"react-device-detect";import"./prepareFundingModalData-BHVs3Cx-.mjs";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./useWallets-Cs7YKcaR.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-DXv-y-86.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"@heroicons/react/24/outline/DevicePhoneMobileIcon";import"@heroicons/react/24/outline/FingerPrintIcon";import"@heroicons/react/24/outline/PhoneIcon";import"@heroicons/react/24/outline/ShieldCheckIcon";import"./ModalHeader-BAGwTwiB.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./ScreenLayout-DG_XRElR.mjs";import"./Screen-Dv092amM.mjs";import"./index-Dq_xe9dz.mjs";import"./PinInput-3SLvbnQa.mjs";import"@heroicons/react/24/outline/CalendarIcon";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"./StackedContainer-B2vaEl56.mjs";import"./useGetTokenPrice-CInz9y-l.mjs";import"./useGetSolPrice-DwwjjGbd.mjs";import"./TransactionDetails-BnKb_enO.mjs";import"./WalletLink-Dqy4DrLT.mjs";import"./ethers-jrpF9vqa.mjs";import"./getFormattedUsdFromLamports-B6EqSEho.mjs";import"./transaction-CnfuREWo.mjs";import"./Layouts-BlFm53ED.mjs";import"@heroicons/react/24/outline/ChevronDownIcon";const p=({onClose:p})=>{let{user:l}=i(),[u,d]=t(l?.mfaMethods[0]??null),{init:h,cancel:j,submit:f}=n(),[v,y]=t(!1),[k,g]=t(null),[w,I]=t();e((()=>{d(l?.mfaMethods[0]??null)}),[l?.mfaMethods]);let b=r(!1);async function C(o){I(void 0);try{if(!o||!u)return;await f(u,o),y(!0),I(void 0),p()}catch(o){throw a(o).error}}async function M(o){if("passkey"!==o)try{d(o),await h(o)}catch(o){console.error(o)}else try{d(o);let t=await h(o);if(!t)throw Error("something went wrong");g(t),await f(o,t),y(!0),I(void 0),p()}catch(o){I(a(o))}}e((()=>{!b.current&&u&&(b.current=!0,M(u).finally((()=>{b.current=!1})))}),[]);let S=()=>{d(null),I(void 0),j(),p()};return l?"passkey"===u?/*#__PURE__*/o(m,{account:l.linkedAccounts.filter((o=>"passkey"===o.type&&o.enrolledInMfa)).sort(((o,t)=>t.firstVerifiedAt.valueOf()-o.firstVerifiedAt.valueOf()))[0],submitSuccess:v,hasBlockingError:w?.isBlocking??!1,error:w?.error,onClose:S,onBack:()=>{d(null),I(void 0)},handleSubmit:()=>C(k).catch(I)}):u?/*#__PURE__*/o(s,{submitSuccess:v,hasBlockingError:w?.isBlocking??!1,handleSubmitCode:C,selectedMethod:u,onClose:S,onBack:l.mfaMethods.length>1?()=>d(null):void 0}):/*#__PURE__*/o(c,{user:l,onSelect:M,handleClose:S}):null};export{p as MfaVerifyFlowScreen,p as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as r,jsxs as o,Fragment as e}from"react/jsx-runtime";import{styled as a,css as c}from"styled-components";import{u as l}from"./context-
|
|
1
|
+
import{jsx as r,jsxs as o,Fragment as e}from"react/jsx-runtime";import{styled as a,css as c}from"styled-components";import{u as l}from"./context-C7FGpzoq.mjs";import{G as i}from"./useActiveWallet-CT7uncGy.mjs";import d from"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import n from"@heroicons/react/24/outline/QuestionMarkCircleIcon";import t from"@heroicons/react/24/outline/XMarkIcon";import{u as v}from"./internal-context-Z-fyxadS.mjs";function s(o){/*#__PURE__*/return r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 460 40",...o,children:/*#__PURE__*/r("g",{fill:o.color||"var(--privy-color-foreground)",children:/*#__PURE__*/r("path",{d:"M0 15.4v15.38h4.64V19.96h3.58c2.47 0 3.63-.01 3.77-.02 1-.08 1.49-.15 2.18-.3a9.45 9.45 0 0 0 4.6-2.37c1.66-1.57 2.64-3.87 2.81-6.56.02-.3.02-1.19 0-1.49-.1-1.77-.56-3.35-1.36-4.72A8.84 8.84 0 0 0 15.14.57c-.93-.3-1.75-.43-3.09-.54C11.9.02 10.2 0 5.93 0H0ZM10.85 4c1.85.05 3.1.45 4.16 1.3.22.17.54.49.69.68a5.97 5.97 0 0 1 1.19 3.13c.04.35.04 1.36 0 1.71-.08.68-.23 1.3-.44 1.85a4.8 4.8 0 0 1-1.09 1.68A5.63 5.63 0 0 1 12 15.92c-.6.08-.4.08-4.01.09H4.64V3.98h2.9c1.6 0 3.08 0 3.31.02ZM187.65 5.71v5.72h-.27l-.09-.14a15.9 15.9 0 0 0-1.21-1.73c-.43-.5-1-.95-1.7-1.36-.54-.3-1.05-.5-1.73-.63a8.98 8.98 0 0 0-1.7-.17 8.84 8.84 0 0 0-7.8 4.03 12.95 12.95 0 0 0-2.03 6.39c-.07.98-.06 2.15.02 3.13.2 2.47.87 4.53 2.02 6.25a8.98 8.98 0 0 0 10.22 3.65 6.5 6.5 0 0 0 2.8-1.93c.41-.51.84-1.1 1.1-1.55l.1-.17h.37v3.58h4.38V0h-4.48Zm-5.24 5.54c1.3.14 2.3.6 3.17 1.48.9.9 1.5 2.09 1.85 3.64.36 1.6.39 3.72.06 5.43a8.13 8.13 0 0 1-1.54 3.62 5.1 5.1 0 0 1-3.93 1.96 6.13 6.13 0 0 1-2.32-.31 5.87 5.87 0 0 1-3.33-3.5c-.39-1-.62-2.05-.72-3.32-.03-.32-.04-1.35-.02-1.73.08-1.56.4-2.91.96-4.05a6.2 6.2 0 0 1 1.06-1.58 5.08 5.08 0 0 1 3.6-1.66c.25-.02.9 0 1.16.02ZM210.07 15.39l.01 15.38h4.38l.01-3.57h.37l.09.15c.24.44.84 1.26 1.21 1.7a6.79 6.79 0 0 0 2.57 1.75 9.3 9.3 0 0 0 6.86-.49 9.28 9.28 0 0 0 4.05-4.07A13.05 13.05 0 0 0 231 21.6c.21-1.73.18-3.7-.09-5.32a13.03 13.03 0 0 0-1.5-4.3 9.1 9.1 0 0 0-3.75-3.63 9.15 9.15 0 0 0-4.43-.96 7.46 7.46 0 0 0-2.8.5A7.07 7.07 0 0 0 216 9.7c-.4.52-.82 1.12-1.1 1.59l-.07.14h-.27V0h-4.5Zm11.13-4.14c1.07.1 1.94.44 2.7 1.04a6.1 6.1 0 0 1 1.64 1.98c.43.84.78 2 .94 3.11.15 1.16.16 2.4.02 3.54a9.34 9.34 0 0 1-1.39 4.03 5.33 5.33 0 0 1-2.69 2.15c-.9.3-2.04.38-3.06.2a5.14 5.14 0 0 1-3.45-2.37 6.03 6.03 0 0 1-.45-.8c-.5-1.03-.8-2.2-.92-3.58-.04-.49-.06-.89-.05-1.53.01-.76.05-1.23.13-1.85.38-2.53 1.47-4.38 3.15-5.31a5.46 5.46 0 0 1 2.3-.63 10 10 0 0 1 1.13.02ZM69.05 2.17l-.01 2.77V7.7h-3.36v3.6h3.36v6.8l.01 7.15c.06 1.4.4 2.44 1.1 3.37a5.8 5.8 0 0 0 2.97 2.07c.91.3 1.83.42 2.9.38a8.71 8.71 0 0 0 2.66-.48l-.8-3.7-.38.06a4.96 4.96 0 0 1-2.43-.06c-.33-.1-.56-.25-.8-.49-.4-.41-.6-.88-.7-1.67-.02-.2-.02-.62-.03-6.82v-6.6h4.73V7.7h-4.73V2.16h-4.49ZM133.34 2.17V7.7h-3.39v3.6h3.38v6.9l.01 7.17a5.66 5.66 0 0 0 2.36 4.49c.85.6 2.03 1.03 3.26 1.17.85.1 2.03.05 2.81-.1.3-.06.75-.18 1-.26l.2-.06v-.05l-.81-3.67-.37.06a4.99 4.99 0 0 1-1.8.09c-.85-.13-1.32-.4-1.7-.97a2.63 2.63 0 0 1-.39-1.04c-.06-.4-.06 0-.06-7.1V11.3h4.7V7.7h-4.7l-.01-2.77V2.16h-4.49ZM293.41 2.36a14.56 14.56 0 0 0-13.7 16.07 14.59 14.59 0 0 0 21.86 11.08 14.5 14.5 0 0 0 7.11-14.07 14.61 14.61 0 0 0-6.53-10.73 14.49 14.49 0 0 0-8.74-2.35ZM350.8 2.36a10.17 10.17 0 0 0-7.56 4.2c-.16.2-.45.63-.58.83l-.05.1h-.47l-.01-4.36h-7.36v36.4h7.82V27.27h.49l.05.07a11.3 11.3 0 0 0 7.49 4.15 10.52 10.52 0 0 0 9.38-4.1c1.66-2.1 2.73-4.9 3.07-8.06.1-.87.13-1.4.13-2.37 0-.8 0-1.1-.07-1.76a15.95 15.95 0 0 0-3.23-8.72 12.8 12.8 0 0 0-1.85-1.84 10.49 10.49 0 0 0-7.26-2.28Zm-.94 6.05c1.27.15 2.33.65 3.2 1.5.98.96 1.67 2.31 2.03 4 .34 1.57.38 3.68.12 5.39a9.78 9.78 0 0 1-1.04 3.25c-.14.25-.44.69-.6.89a5.35 5.35 0 0 1-4.31 2.07 5.25 5.25 0 0 1-4.41-1.9 7.35 7.35 0 0 1-1.26-2.32 14.09 14.09 0 0 1-.62-4.83c.05-1.98.38-3.53 1.02-4.85a5.63 5.63 0 0 1 2.5-2.65c.66-.34 1.3-.5 2.14-.58.18-.02 1.04 0 1.23.03ZM363.63 3.1l-.01 3.2v3.16h1.43c1.26.01 1.44.02 1.54.04.42.09.66.28.79.62.08.23.08.08.08 2.96a911.57 911.57 0 0 1 .03 10.18v7.54h7.82v-7.4l.01-7.83c.03-.94.11-1.63.27-2.28.46-1.9 1.54-2.93 3.35-3.23.52-.08.2-.08 5-.08h4.4V3.08h-3.1c-3.48 0-3.91.01-4.67.1-1.83.2-3.04.79-3.96 1.88-.5.6-.9 1.32-1.26 2.26l-.06.17h-.46V3.09h-5.6c-4.46 0-5.6 0-5.6.02ZM390.8 16.95V30.8h3.87l3.86-.01V3.09h-7.73ZM400.6 3.1l-.01.4v.38l4.66 13.4 4.69 13.47.02.05h10.3l.03-.05 4.67-13.45 4.67-13.4V3.1h-7.43l-6.7 19.26h-.5l-3.28-9.5-3.31-9.64-.05-.12h-3.88l-3.88.01ZM430.98 3.1c-.01 0-.02.19-.02.4v.39l5.08 14.59c2.8 8.02 5.08 14.6 5.08 14.61.01.02-.22.02-4.8.02h-4.82v6.42h4.95c5.09 0 5.23 0 5.87-.06 3.15-.28 5.29-1.63 6.63-4.15.28-.55.44-.95.87-2.16L459 6.78l1-2.89v-.8h-7.43l-6.69 19.26h-.5l-3.27-9.46-3.31-9.64-.06-.16h-3.88l-3.88.01ZM36.57 7.36c-1.36.1-2.6.6-3.62 1.45a5.65 5.65 0 0 0-1.67 2.42l-.05.13H31V7.7h-4.35v23.08h4.5v-7.3c0-8 0-7.34.08-7.82a4.89 4.89 0 0 1 2.06-3.18c.83-.58 1.74-.89 2.87-.98a11.87 11.87 0 0 1 2.8.25H39v-4.3l-.21-.02c-.61-.07-1.74-.1-2.22-.07ZM51.08 7.41c-2.33.12-4.3.84-5.95 2.16a9.89 9.89 0 0 0-2.03 2.2 12.5 12.5 0 0 0-2 5.78 18.04 18.04 0 0 0 0 3.65 12.13 12.13 0 0 0 2.26 6.05 9.74 9.74 0 0 0 5 3.52c2.11.64 4.7.64 6.8 0a9.78 9.78 0 0 0 4.88-3.37c1.38-1.78 2.19-4 2.4-6.58.13-1.46.06-3.06-.18-4.42a11.24 11.24 0 0 0-3.58-6.6 10 10 0 0 0-5.75-2.35c-.56-.06-1.31-.07-1.85-.04Zm1.42 3.78c.88.1 1.62.34 2.28.75a6.13 6.13 0 0 1 1.99 2.15 10.31 10.31 0 0 1 1.2 5c.02 1.23-.12 2.44-.42 3.51a7.14 7.14 0 0 1-1.81 3.32c-.61.6-1.2.98-1.95 1.24a6 6 0 0 1-2 .3 5.7 5.7 0 0 1-2.72-.6 5 5 0 0 1-1.28-.94A7.1 7.1 0 0 1 46 22.73c-.57-1.99-.6-4.46-.08-6.5a7.24 7.24 0 0 1 2.03-3.67 5.13 5.13 0 0 1 3.35-1.4 11 11 0 0 1 1.2.03ZM92.05 7.4c-.96.06-1.56.15-2.3.33a9.62 9.62 0 0 0-6.09 4.66 13.5 13.5 0 0 0-1.71 7c0 .83 0 1.04.06 1.6.16 1.77.58 3.32 1.29 4.7A9.72 9.72 0 0 0 90.28 31c1.84.37 4.08.32 5.85-.13a9.07 9.07 0 0 0 5.02-3.1A7.64 7.64 0 0 0 102.5 25l-2.11-.39-2.11-.38-.08.13a4.72 4.72 0 0 1-2.35 2.55 6.3 6.3 0 0 1-2.23.58c-.29.03-1.13.03-1.44 0a6.35 6.35 0 0 1-3.02-1.04 5.93 5.93 0 0 1-2.02-2.43 8.44 8.44 0 0 1-.72-3.18v-.26h16.38v-.81c0-1.83-.06-2.76-.25-3.87-.2-1.22-.53-2.24-1.05-3.28a8.9 8.9 0 0 0-2.66-3.26 10.1 10.1 0 0 0-5.34-1.94 18.3 18.3 0 0 0-1.46-.03Zm1.3 3.75c1.2.13 2.19.55 3.05 1.3a5.8 5.8 0 0 1 1.78 2.96c.13.51.21 1.17.21 1.66v.15H86.43v-.12c.08-.97.3-1.78.72-2.61.5-1 1.2-1.8 2.14-2.42a5.32 5.32 0 0 1 2.9-.95c.2-.01.97 0 1.17.03ZM116.79 7.41c-2 .1-3.73.65-5.22 1.65a10.7 10.7 0 0 0-4.25 6.06 16.1 16.1 0 0 0-.5 5.8c.2 2.17.84 4.13 1.88 5.76.58.9 1.32 1.73 2.15 2.4a9.37 9.37 0 0 0 3.6 1.8 12.06 12.06 0 0 0 3.92.34 10.2 10.2 0 0 0 3.84-.95 8.31 8.31 0 0 0 4.76-6.75l.01-.04h-4.37l-.05.16a4.87 4.87 0 0 1-4.24 3.75c-.59.07-1.32.06-1.93-.05a5.47 5.47 0 0 1-3.5-2.27c-.56-.75-1-1.73-1.26-2.79a13.8 13.8 0 0 1-.16-5.24 7.77 7.77 0 0 1 2.1-4.3 5.48 5.48 0 0 1 2.15-1.3 6.4 6.4 0 0 1 3.89.1c.59.21 1.03.5 1.5.96a5.32 5.32 0 0 1 1.46 2.5l.04.15h4.37v-.06a8.22 8.22 0 0 0-5.31-6.94 10.98 10.98 0 0 0-4.88-.74ZM156.2 7.41a9.87 9.87 0 0 0-6 2.29 11.02 11.02 0 0 0-3.41 5.43c-.52 1.78-.68 3.9-.48 5.97.17 1.8.63 3.38 1.37 4.8a9.68 9.68 0 0 0 5.91 4.86c1.65.48 3.63.61 5.53.36 3.72-.49 6.55-2.62 7.56-5.69.12-.39.13-.42.1-.43-.02 0-4.13-.75-4.19-.75-.03 0-.04 0-.1.16-.18.42-.45.9-.72 1.22-.16.2-.49.53-.7.7-.67.54-1.5.9-2.43 1.08-.48.08-.83.11-1.41.11-.64 0-1.07-.04-1.6-.15a5.76 5.76 0 0 1-3.93-2.83 8 8 0 0 1-.99-3.79v-.16h16.38v-1.11l-.02-1.43c-.1-2.25-.53-4-1.35-5.59a9.24 9.24 0 0 0-6.18-4.75c-1.04-.26-2.2-.36-3.33-.3Zm1.45 3.74a5.35 5.35 0 0 1 3.66 1.94 6.1 6.1 0 0 1 1.38 4.01v.12h-11.97v-.06c0-.02 0-.14.02-.25a6.6 6.6 0 0 1 2.15-4.32 5.73 5.73 0 0 1 3.5-1.46c.25-.02 1 0 1.26.02ZM233.58 7.82l8.37 23.22a49.22 49.22 0 0 1-.67 1.9 5.36 5.36 0 0 1-1.14 1.8c-.41.4-.82.58-1.48.69-.27.04-1.03.03-1.35 0a8.05 8.05 0 0 1-1.1-.23l-1.08 3.67c0 .02.32.14.66.22.83.21 1.57.29 2.56.28.56-.01.8-.03 1.24-.1 2.71-.4 4.66-2.09 5.86-5.08l9.64-26.44c0-.02-4.82-.06-4.83-.05l-2.93 8.96-2.91 8.94h-.24l-.22-.65-2.91-8.95-2.7-8.3H233.53ZM293.05 35.8c-1.18.04-1.93.09-2.8.16-2.52.24-4.53.69-5.43 1.23-.7.41-.76.86-.2 1.28.88.66 3.29 1.19 6.36 1.4a48.55 48.55 0 0 0 5.75.05c3.47-.19 6.24-.78 7.11-1.5.22-.19.3-.34.3-.53 0-.1 0-.12-.04-.22-.35-.69-2.32-1.3-5.25-1.63a41.09 41.09 0 0 0-5.8-.24Zm0 0"})})})}let p=a.span`
|
|
2
2
|
margin-top: 16px;
|
|
3
3
|
font-size: 13px;
|
|
4
4
|
text-align: center;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as t,jsxs as e,Fragment as r}from"react/jsx-runtime";import o from"@heroicons/react/24/solid/ArrowsRightLeftIcon";import i from"@heroicons/react/24/solid/CheckCircleIcon";import{useMemo as n}from"react";import{styled as a}from"styled-components";import{M as l,B as s,P as c}from"./ModalHeader-BAGwTwiB.mjs";import{a as m}from"./Layouts-BlFm53ED.mjs";import{L as d,a7 as u}from"./useActiveWallet-CT7uncGy.mjs";import{u as p}from"./context-C7FGpzoq.mjs";import{u as h}from"./internal-context-Z-fyxadS.mjs";import{a as g}from"./get-is-unified-wallet-DKm2LBUt.mjs";import{u as f}from"./index-BLPxiHb2.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"zustand";import"react-device-detect";import"./prepareFundingModalData-BHVs3Cx-.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./useWallets-Cs7YKcaR.mjs";import"tinycolor2";import"ofetch";import"./analytics-mkkvFRju.mjs";const y=({size:r=61,...o})=>/*#__PURE__*/t("svg",{width:r,height:r,viewBox:"0 0 61 61",fill:"none",xmlns:"http://www.w3.org/2000/svg",...o,children:/*#__PURE__*/e("g",{id:"moonpay_symbol_wht 2",children:[/*#__PURE__*/t("rect",{x:"1.3374",y:"1",width:"59",height:"59",rx:"11.5",fill:"#7715F5"}),/*#__PURE__*/t("path",{id:"Vector",d:"M43.8884 23.3258C45.0203 23.3258 46.1268 22.9901 47.068 22.3613C48.0091 21.7324 48.7427 20.8386 49.1759 19.7928C49.6091 18.747 49.7224 17.5962 49.5016 16.4861C49.2807 15.3759 48.7357 14.3561 47.9353 13.5557C47.1349 12.7553 46.1151 12.2102 45.0049 11.9893C43.8947 11.7685 42.7439 11.8819 41.6982 12.3151C40.6524 12.7482 39.7585 13.4818 39.1297 14.423C38.5008 15.3641 38.1651 16.4707 38.1651 17.6026C38.165 18.3542 38.3131 19.0985 38.6007 19.7929C38.8883 20.4873 39.3098 21.1182 39.8413 21.6496C40.3728 22.1811 41.0037 22.6027 41.6981 22.8903C42.3925 23.1778 43.1367 23.3259 43.8884 23.3258ZM26.3395 49.1017C23.5804 49.1017 20.8832 48.2836 18.5891 46.7507C16.295 45.2178 14.5069 43.039 13.4511 40.49C12.3952 37.9409 12.1189 35.1359 12.6572 32.4298C13.1955 29.7237 14.5241 27.238 16.4751 25.287C18.4262 23.336 20.9118 22.0074 23.6179 21.4691C26.324 20.9308 29.129 21.2071 31.6781 22.2629C34.2272 23.3189 36.406 25.1069 37.9389 27.401C39.4717 29.6952 40.2899 32.3923 40.2899 35.1514C40.2899 36.9835 39.9291 38.7975 39.2281 40.49C38.527 42.1826 37.4994 43.7205 36.204 45.0159C34.9086 46.3113 33.3707 47.3389 31.6781 48.04C29.9856 48.741 28.1715 49.1018 26.3395 49.1017Z",fill:"white"})]})});const v={component:()=>{let{data:o,setModalData:i,navigateBack:n}=g(),a=p(),{closePrivyModal:c}=h(),{externalTransactionId:m}=o?.moonpayStatus,d=f(m||null,a.fundingMethodConfig.moonpay.useSandbox??!1);/*#__PURE__*/return e(r,{children:[/*#__PURE__*/t(l,{title:"Fund account",backFn:()=>{let t={...o?.funding,showAlternateFundingMethod:!0};t.usingDefaultFundingMethod&&(t.usingDefaultFundingMethod=!1),i({funding:t,solanaFundingData:o?.solanaFundingData}),n()}}),/*#__PURE__*/t(C,{status:d,onClickCta:c}),/*#__PURE__*/t(s,{})]})}};let C=({status:o,onClickCta:i})=>{let{title:a,body:l,cta:s}=n((()=>(t=>{switch(t){case"completed":return{title:"You've funded your account!",body:"It may take a few minutes for the assets to appear.",cta:"Continue"};case"waitingAuthorization":return{title:"Processing payment",body:"This may take up to a few hours. You will receive an email when the purchase is complete.",cta:"Continue"};default:return{title:"In Progress",body:"Go back to MoonPay to finish funding your account.",cta:""}}})(o)),[o]);/*#__PURE__*/return e(r,{children:[/*#__PURE__*/e(j,{children:[/*#__PURE__*/t(w,{status:o}),/*#__PURE__*/e(m,{children:[/*#__PURE__*/t("h3",{children:a}),/*#__PURE__*/t(b,{children:l})]})]}),s&&/*#__PURE__*/t(c,{onClick:i,children:s})]})},w=({status:r})=>{if(!r||"pending"===r){let r="var(--privy-color-foreground-4)";/*#__PURE__*/return e("div",{style:{position:"relative"},children:[/*#__PURE__*/t(d,{color:r,style:{position:"absolute"}}),/*#__PURE__*/t(u,{color:r}),/*#__PURE__*/t(y,{size:"3rem",style:{position:"absolute",top:"1rem",left:"1rem"}})]})}let n=(e=>{switch(e){case"completed":return i;case"waitingAuthorization":return()=>/*#__PURE__*/t(o,{width:"3rem",height:"3rem",style:{backgroundColor:"var(--privy-color-foreground-4)",color:"var(--privy-color-background)",borderRadius:"100%",padding:"0.5rem",margin:"0.5rem"}});default:return}})(r),a=(l=r)?{completed:"var(--privy-color-success)",failed:"var(--privy-color-error)",serviceFailure:"var(--privy-color-error)",waitingAuthorization:"var(--privy-color-accent)",pending:"var(--privy-color-foreground-4)"}[l]:"var(--privy-color-foreground-4)";var l;/*#__PURE__*/return t("div",{style:{borderColor:a,display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"100%",borderWidth:2,padding:"0.5rem",marginBottom:"0.5rem"},children:n&&/*#__PURE__*/t(n,{width:"4rem",height:"4rem",color:a})})},b=a.p`
|
|
2
2
|
font-size: 1rem;
|
|
3
3
|
color: var(--privy-color-foreground-3);
|
|
4
4
|
margin-bottom: 1rem;
|
|
5
5
|
display: flex;
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
gap: 1rem;
|
|
8
|
-
`,
|
|
8
|
+
`,j=a.div`
|
|
9
9
|
display: flex;
|
|
10
10
|
flex-direction: column;
|
|
11
11
|
align-items: center;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import t,{useState as r,useEffect as o}from"react";import{i,u as a,a as n}from"./get-is-unified-wallet-
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import t,{useState as r,useEffect as o}from"react";import{i,u as a,a as n}from"./get-is-unified-wallet-DKm2LBUt.mjs";import{A as s,T as m,I as c,S as l,a as d,L as p,b as u,D as h,G as v}from"./twitter-BoAxhlj6.mjs";import y from"@heroicons/react/24/outline/GlobeAltIcon";import{T as g,L as f}from"./twitch-5IOe4sIQ.mjs";import{u as E,q as T}from"./context-C7FGpzoq.mjs";import{b as A,u as S,k as w}from"./internal-context-Z-fyxadS.mjs";import{s as b}from"./shouldProceedtoEmbeddedWalletCreationFlow-Ir-axYfm.mjs";import{S as C}from"./ScreenLayout-DG_XRElR.mjs";import{e as _}from"./capitalizeFirstLetter-DmLYqXsO.mjs";import{l as j}from"./index-DNLZMnCG.mjs";import"viem";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"./ModalHeader-BAGwTwiB.mjs";import"styled-components";import"./useActiveWallet-CT7uncGy.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-BHVs3Cx-.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./useWallets-Cs7YKcaR.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-Dv092amM.mjs";import"./index-Dq_xe9dz.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-DXv-y-86.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";const O=({style:t})=>/*#__PURE__*/e(y,{style:{color:"var(--privy-color-error)",...t}});let R={google:{name:"Google",component:v},discord:{name:"Discord",component:h},github:{name:"Github",component:u},linkedin:{name:"LinkedIn",component:p},twitter:{name:"Twitter",component:d},spotify:{name:"Spotify",component:l},instagram:{name:"Instagram",component:c},tiktok:{name:"Tiktok",component:m},line:{name:"LINE",component:f},twitch:{name:"Twitch",component:g},apple:{name:"Apple",component:s}},N=({iconUrl:e,...r})=>t.createElement("svg",{width:"33",height:"32",viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},t.createElement("foreignObject",{x:"2",y:"2",width:"29",height:"28"},t.createElement("img",{src:e,width:"29",height:"28",style:{display:"block",objectFit:"contain",borderRadius:"4px"},alt:"Provider icon"})));const U=(e,r)=>{if(e in R)return R[e];if(i(e)&&r){let o=r.find((t=>t.provider===e));if(o)return{name:o.provider_display_name,component:e=>t.createElement(N,{...e,iconUrl:o.provider_icon_url})}}return{name:"Unknown",component:O}};function I(e,t,r){let o={detail:"",retryable:!1},i=_(t);if(e?.privyErrorCode===A.LINKED_TO_ANOTHER_USER&&(o.detail="This account has already been linked to another user."),e?.privyErrorCode===A.INVALID_CREDENTIALS&&(o.retryable=!0,o.detail="Something went wrong. Try again."),e.privyErrorCode===A.OAUTH_USER_DENIED&&(o.detail=`Retry and check ${i} to finish connecting your account.`,o.retryable=!0),e?.privyErrorCode===A.TOO_MANY_REQUESTS&&(o.detail="Too many requests. Please wait before trying again."),e?.privyErrorCode===A.TOO_MANY_REQUESTS&&e.message.includes("provider rate limit")){let e=U(t,r).name;o.detail=`Request limit reached for ${e}. Please wait a moment and try again.`}if(e?.privyErrorCode===A.OAUTH_ACCOUNT_SUSPENDED){let e=U(t,r).name;o.detail=`Your ${e} account is suspended. Please try another login method.`}return e?.privyErrorCode===A.CANNOT_LINK_MORE_OF_TYPE&&(o.detail="You cannot authorize more than one account for this user."),e?.privyErrorCode===A.OAUTH_UNEXPECTED&&t.startsWith("privy:")&&(o.detail="Something went wrong. Please try again."),o}const L=({providerName:t,ProviderLogo:r,success:o,errorMessage:i,onRetry:a})=>{let n=o?`Successfully connected with ${t}`:i?i.message:`Verifying connection to ${t}`;/*#__PURE__*/return e(C,{title:n,subtitle:o?"You're good to go!":i?i.detail:"Just a few moments more",icon:r,iconVariant:"loading",iconLoadingStatus:{success:o,fail:!!i},secondaryCta:i?.retryable&&a?{label:"Retry",onClick:a}:void 0,watermark:!0})},k={component:()=>{let{authenticated:t,logout:i,ready:s,user:m}=a(),{setModalData:c,navigate:l,resetNavigation:d}=n(),p=E(),{getAuthMeta:u,initLoginWithOAuth:h,loginWithOAuth:v,updateWallets:y,setReadyToTrue:g,closePrivyModal:f,createAnalyticsEvent:C}=S(),[_,O]=r(!1),[R,N]=r(void 0),k=u()?.provider||"google",{name:D,component:P}=U(k,p.customOAuthProviders);return o((()=>{v(k).then((()=>{O(!0),g(!0)})).catch((e=>{if(g(!1),e?.privyErrorCode===A.ALLOWLIST_REJECTED)return N(void 0),d(),void l("AllowlistRejectionScreen");if(e?.privyErrorCode===A.USER_LIMIT_REACHED)return console.error(new w(e).toString()),N(void 0),d(),void l("UserLimitReachedScreen");if(e?.privyErrorCode===A.USER_DOES_NOT_EXIST)return N(void 0),d(),void l("AccountNotFoundScreen");if(e?.privyErrorCode===A.ACCOUNT_TRANSFER_REQUIRED&&e.data?.data?.nonce)return N(void 0),d(),c({accountTransfer:{nonce:e.data?.data?.nonce,account:e.data?.data?.subject,displayName:e.data?.data?.account?.displayName,linkMethod:u()?.provider,embeddedWalletAddress:e.data?.data?.otherUser?.embeddedWalletAddress,oAuthUserInfo:e.data?.data?.otherUser?.oAuthUserInfo}}),void l("LinkConflictScreen");let{retryable:t,detail:r}=I(e,k,p.customOAuthProviders);N({retryable:t,detail:r,message:"Authentication failed"})})).finally((()=>{j()}))}),[D,k]),o((()=>{if(s&&t&&_&&m){if(p?.legal.requireUsersAcceptTerms&&!m.hasAcceptedTerms){let e=setTimeout((()=>{l("AffirmativeConsentScreen")}),T);return()=>clearTimeout(e)}if(b(m,p.embeddedWallets)){let e=setTimeout((()=>{c({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),C({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,provider:k,screen:"OAuthStatusScreen"}}),i()},callAuthOnSuccessOnClose:!0}}),l("EmbeddedWalletOnAccountCreateScreen")}),T);return()=>clearTimeout(e)}{let e=setTimeout((()=>f({shouldCallAuthOnSuccess:!0,isSuccess:!0})),T);return y(),()=>clearTimeout(e)}}}),[s,t,_,m]),/*#__PURE__*/e(L,{providerName:D,ProviderLogo:P,success:_,errorMessage:R,onRetry:R?.retryable?()=>{j(),h(k),N(void 0)}:void 0})},isShownBeforeReady:!0};export{k as OAuthStatusScreen,L as OAuthStatusScreenView,k as default};
|
package/dist/esm/{PasskeySelectSignupOrLogin-BnluBsvm.mjs → PasskeySelectSignupOrLogin-xct1rtzo.mjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{FingerprintIcon as e}from"lucide-react";import{a as o}from"./index-
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{FingerprintIcon as e}from"lucide-react";import{a as o}from"./index-DNLZMnCG.mjs";import{u as i}from"./internal-context-Z-fyxadS.mjs";import{a}from"./get-is-unified-wallet-DKm2LBUt.mjs";import{S as r}from"./ScreenLayout-DG_XRElR.mjs";import"react";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-CT7uncGy.mjs";import"zustand";import"./context-C7FGpzoq.mjs";import"tinycolor2";import"styled-components";import"react-device-detect";import"./prepareFundingModalData-BHVs3Cx-.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./useWallets-Cs7YKcaR.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-DXv-y-86.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"ofetch";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./ModalHeader-BAGwTwiB.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-Dv092amM.mjs";import"./index-Dq_xe9dz.mjs";const s=({title:o="Log in or create a new account?",subtitle:i="Create a new account with a passkey or use a passkey to log in to an existing account.",onSignup:a,onLogin:s})=>/*#__PURE__*/t(r,{title:o,subtitle:i,icon:e,primaryCta:{label:"Create new account",onClick:a},secondaryCta:{label:"Log in with a passkey",onClick:s},watermark:!0}),n={component:()=>{let{enabled:e,token:r}=o(),{navigate:n,setModalData:p}=a(),{initSignupWithPasskey:c,initLoginWithPasskey:m}=i();/*#__PURE__*/return t(s,{onSignup:async()=>{e&&!r?(p({passkeyAuthModalData:{passkeySignupFlow:!0},captchaModalData:{callback:t=>c({captchaToken:t,withPrivyUi:!0}),userIntentRequired:!1,onSuccessNavigateTo:"PasskeyStatusScreen",onErrorNavigateTo:"ErrorScreen"}}),n("CaptchaScreen")):(await c({withPrivyUi:!0,captchaToken:r}),p({passkeyAuthModalData:{passkeySignupFlow:!0}}),n("PasskeyStatusScreen"))},onLogin:async()=>{e&&!r?(p({passkeyAuthModalData:{passkeySignupFlow:!1},captchaModalData:{callback:t=>m({captchaToken:t,withPrivyUi:!0}),userIntentRequired:!1,onSuccessNavigateTo:"PasskeyStatusScreen",onErrorNavigateTo:"ErrorScreen"}}),n("CaptchaScreen")):(await m({withPrivyUi:!0,captchaToken:r}),p({passkeyAuthModalData:{passkeySignupFlow:!1}}),n("PasskeyStatusScreen"))}})}};export{n as PasskeySelectSignupOrLogin,s as PasskeySelectSignupOrLoginView,n as default};
|