@privy-io/react-auth 3.8.0 → 3.8.1
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-jSbfPu_e.js → AccountNotFoundScreen-Cu7enz9o.js} +1 -1
- package/dist/cjs/{Address-CZQd_MIA.js → Address-DYZ3IQKV.js} +1 -1
- package/dist/cjs/AffirmativeConsentScreen-Cl_SWg16.js +1 -0
- package/dist/cjs/{AllowlistRejectionScreen-B6roj0JU.js → AllowlistRejectionScreen-D5b9mnX_.js} +1 -1
- package/dist/cjs/{AuthenticateWithWalletScreen-BcBapHrq.js → AuthenticateWithWalletScreen-CfFbXvGY.js} +1 -1
- package/dist/cjs/AwaitingEvmToSolBridgingScreen-CCdsJbKx.js +2 -0
- package/dist/cjs/AwaitingExternalEthereumTransferScreen-CTI3rpHf.js +2 -0
- package/dist/cjs/AwaitingPasswordlessCodeScreen-ftedBDSO.js +1 -0
- package/dist/cjs/{AwaitingSolToEvmBridgingScreen-DYS3lDs0.js → AwaitingSolToEvmBridgingScreen-CaKyEgGQ.js} +1 -1
- package/dist/cjs/{BridgeNetworkSelectionView-uivzU_Y9.js → BridgeNetworkSelectionView-ekW1jVoZ.js} +1 -1
- package/dist/cjs/{Button-nXApC2Jy.js → Button-BpQ22RCK.js} +1 -1
- package/dist/cjs/CaptchaScreen-aaD10pK6.js +1 -0
- package/dist/cjs/CoinbaseOnrampStatusScreen-DXk7YS8-.js +1 -0
- package/dist/cjs/{ConnectEmailForm-BEv-7qU9.js → ConnectEmailForm-uUuYB04I.js} +1 -1
- package/dist/cjs/ConnectLedgerScreen-BsZYPosO.js +1 -0
- package/dist/cjs/{ConnectOnlyLandingScreen-bOhkl0xJ.js → ConnectOnlyLandingScreen-DDCcNqF9.js} +1 -1
- package/dist/cjs/ConnectOnlyStatusScreen-DyJB2X3z.js +1 -0
- package/dist/cjs/ConnectOrCreateScreen-Dfoq-0pD.js +1 -0
- package/dist/cjs/{ConnectPhoneForm-DK-bg2D5.js → ConnectPhoneForm-tjeQd9v8.js} +1 -1
- package/dist/cjs/{ConnectWalletView-4vj7Sq7-.js → ConnectWalletView-CxfQTEJ2.js} +1 -1
- package/dist/cjs/ConnectionStatusScreen-iMAYJhVc.js +1 -0
- package/dist/cjs/CrossAppAuthScreen-CsZ_rLLg.js +1 -0
- package/dist/cjs/{CustomLandingScreenView-tt_NEfU6.js → CustomLandingScreenView-B0bNrKZn.js} +2 -2
- package/dist/cjs/{DelegatedActionsConsentScreen-B5WlYn7z.js → DelegatedActionsConsentScreen-CyITZiB7.js} +1 -1
- package/dist/cjs/DelegatedActionsRevokeScreen-vQnlP7qN.js +1 -0
- package/dist/cjs/EmbeddedWalletConnectingScreen-D5yc0IhZ.js +1 -0
- package/dist/cjs/{EmbeddedWalletCreatedScreen-PycFyIz6.js → EmbeddedWalletCreatedScreen-BFJ6BKQ4.js} +1 -1
- package/dist/cjs/{EmbeddedWalletKeyExportScreen-BDTDQY1f.js → EmbeddedWalletKeyExportScreen-Cz3cpL6Q.js} +2 -2
- package/dist/cjs/EmbeddedWalletOnAccountCreateScreen-L4tUdjxn.js +1 -0
- package/dist/cjs/{EmbeddedWalletPasswordUpdateScreen-ZfgU86hx.js → EmbeddedWalletPasswordUpdateScreen-n5Z982kO.js} +1 -1
- package/dist/cjs/{EmbeddedWalletPasswordUpdateSplashScreen-tP8rSVUL.js → EmbeddedWalletPasswordUpdateSplashScreen-BJQXfJ5I.js} +1 -1
- package/dist/cjs/{EnrollTotp-DZ5fIrXr.js → EnrollTotp-Bo2kHSAy.js} +1 -1
- package/dist/cjs/ErrorScreen-BGI-4cUT.js +1 -0
- package/dist/cjs/FarcasterConnectStatusScreen-BKcQ6ZMu.js +2 -0
- package/dist/cjs/{FarcasterSignerStatusScreen-CDYkqsxz.js → FarcasterSignerStatusScreen-BB63F9MZ.js} +2 -2
- package/dist/cjs/{FundSolWalletWithExternalSolanaWallet-DC_xoE6W.js → FundSolWalletWithExternalSolanaWallet-DFQlLB8a.js} +1 -1
- package/dist/cjs/{FundWalletMethodHeader-zYWhBIiS.js → FundWalletMethodHeader-CZ9E9Pcd.js} +1 -1
- package/dist/cjs/{FundingEditAmountScreen-BB7-k00c.js → FundingEditAmountScreen-C8OzBV96.js} +1 -1
- package/dist/cjs/{FundingMethodSelectionScreen-BrV94GD2.js → FundingMethodSelectionScreen-GE2W8CGa.js} +1 -1
- package/dist/cjs/HCaptchaWrapper-DMLxURsO.js +1 -0
- package/dist/cjs/{InAppBrowserLoginNotPossible-y8g07-kU.js → InAppBrowserLoginNotPossible-BDJuZ0-D.js} +1 -1
- package/dist/cjs/{InstallWalletScreen-CmGi6mS1.js → InstallWalletScreen-tcaVKdvZ.js} +1 -1
- package/dist/cjs/LandingScreen-BIRSSuAB.js +1 -0
- package/dist/cjs/{LinkConflictScreen-BJXyOu2J.js → LinkConflictScreen-D6812iEs.js} +1 -1
- package/dist/cjs/LinkEmailScreen-D-kZRiYu.js +1 -0
- package/dist/cjs/{LinkPasskeyScreen-Bw7Xs741.js → LinkPasskeyScreen-Dn0beRU9.js} +1 -1
- package/dist/cjs/{LinkPhoneScreen-C4JQblY3.js → LinkPhoneScreen-D2wD2X6_.js} +1 -1
- package/dist/cjs/{LoginFailedScreen-CGT-2B2h.js → LoginFailedScreen-JL8lSBDT.js} +1 -1
- package/dist/cjs/ManualTransferScreen-rVVbGuHO.js +1 -0
- package/dist/cjs/MfaAuthEnrollmentFlowScreen-7wF7sedZ.js +1 -0
- package/dist/cjs/MfaAuthVerifyFlowScreen-DXT_z8L7.js +1 -0
- package/dist/cjs/MfaEnrollmentFlowScreen-DJWHdMZL.js +1 -0
- package/dist/cjs/MfaVerifyFlowScreen-BC3Vuttf.js +1 -0
- package/dist/cjs/{ModalHeader-DbV81e3m.js → ModalHeader-BmFtLkWJ.js} +1 -1
- package/dist/cjs/{MoonpayStatusScreen-yghPhz7v.js → MoonpayStatusScreen-DyW9zeoT.js} +1 -1
- package/dist/cjs/OAuthStatusScreen-FjNrpKlb.js +1 -0
- package/dist/cjs/PasskeySelectSignupOrLogin-DyHtky_y.js +1 -0
- package/dist/cjs/PasskeyStatusScreen-Q0ag_5Jx.js +1 -0
- package/dist/cjs/PasswordRecoveryScreen-D6vuUKqB.js +1 -0
- package/dist/cjs/{QrCode-Ua_0cVUP.js → QrCode-qgAdMqWi.js} +1 -1
- package/dist/cjs/RecoveryOAuthStatusScreen-D1xbanmh.js +1 -0
- package/dist/cjs/RecoveryPasswordCreateScreen-DW-I4Bjp.js +1 -0
- package/dist/cjs/RecoverySelectionScreen-CSsw-SMB.js +1 -0
- package/dist/cjs/{Screen-65eQbiHD.js → Screen-BAXdSOJk.js} +1 -1
- package/dist/cjs/{ScreenLayout-B_60rKhZ.js → ScreenLayout-95K6C4n8.js} +1 -1
- package/dist/cjs/{SetAutomaticRecoveryScreen-DQolobOz.js → SetAutomaticRecoveryScreen-DdYvhBam.js} +1 -1
- package/dist/cjs/{SetWalletPasswordForm-8g-lawop.js → SetWalletPasswordForm-D7TN70-K.js} +2 -2
- package/dist/cjs/{SignRequestScreen-BAgmmVVW.js → SignRequestScreen-B6DzD2bf.js} +1 -1
- package/dist/cjs/StandardSignAndSendTransactionScreen-Cl_1GhiF.js +1 -0
- package/dist/cjs/TelegramAuthScreen-D32WGqrh.js +1 -0
- package/dist/cjs/{TransactionDetails-BefABtVQ.js → TransactionDetails-B4mP9iqk.js} +1 -1
- package/dist/cjs/{TransactionErrorView-QKWh4urc.js → TransactionErrorView-BPMOzuyp.js} +2 -2
- package/dist/cjs/TransferFromWalletScreen-BbJ3ISYt.js +1 -0
- package/dist/cjs/{TransferOrBridgeLoadingScreen-C6t1_cTP.js → TransferOrBridgeLoadingScreen-DsBPxxqR.js} +1 -1
- package/dist/cjs/TurnstileWrapper-qLN0G5m7.js +1 -0
- package/dist/cjs/UpdateEmailScreen-fqqg8VfP.js +1 -0
- package/dist/cjs/{UpdatePhoneScreen-DefnuTEZ.js → UpdatePhoneScreen-BJDovBOR.js} +1 -1
- package/dist/cjs/{UserLimitReachedScreen-B76r_-LC.js → UserLimitReachedScreen-CSkM5uLj.js} +1 -1
- package/dist/cjs/WalletButtonList-jzt0Egd8.js +1 -0
- package/dist/cjs/{WalletInfoCard-CscdnrUV.js → WalletInfoCard-bdaI4ebq.js} +1 -1
- package/dist/cjs/{WalletInterstitialScreen-CG1k3EvV.js → WalletInterstitialScreen-BzSNp3dA.js} +1 -1
- package/dist/cjs/{WalletLink-DF6dDjkz.js → WalletLink-2kOfC5R5.js} +1 -1
- package/dist/cjs/abstract-smart-wallets.js +1 -1
- package/dist/cjs/context-CToLw7Dr.js +1 -0
- package/dist/cjs/{ethers-uj8IknV_.js → ethers-Djy--MKt.js} +1 -1
- package/dist/cjs/extended-chains.js +1 -1
- package/dist/cjs/farcaster.js +1 -1
- package/dist/cjs/{frame-bPqBJ8fS.js → frame-BSQIYvLs.js} +1 -1
- package/dist/cjs/{get-is-unified-wallet-DmiciSes.js → get-is-unified-wallet-CAK7Zx3C.js} +1 -1
- package/dist/cjs/{getErc20Balance-BZ5-OGfD.js → getErc20Balance-BiXU_58s.js} +1 -1
- package/dist/cjs/{getErc20TokenInfo-HX7DgcWx.js → getErc20TokenInfo-B78AxnZ3.js} +1 -1
- package/dist/cjs/{getPublicClient-EjAv8R2z.js → getPublicClient-d-gCTRgH.js} +1 -1
- package/dist/cjs/index-BqAmClyL.js +1 -0
- package/dist/cjs/{index-Cuv6j_Y0.js → index-CBf8l7UH.js} +1 -1
- package/dist/cjs/index-DKxtLOTJ.js +5 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/internal-context-D80qA_jS.js +1 -0
- package/dist/cjs/internal.js +1 -1
- package/dist/cjs/{prepareFundingModalData-BVlyr8l5.js → prepareFundingModalData-BhY38T4k.js} +1 -1
- package/dist/cjs/{reservoir-3I-Vkf2B.js → reservoir-DLqCfAka.js} +1 -1
- package/dist/cjs/{shared-CT5ocsPG.js → shared-LnNw37YZ.js} +1 -1
- package/dist/cjs/{shouldProceedtoEmbeddedWalletCreationFlow-DcjqezwI.js → shouldProceedtoEmbeddedWalletCreationFlow-D8TmPfTs.js} +1 -1
- package/dist/cjs/{smart-wallets-B7vHjGAW.js → smart-wallets-BxBo7Rwr.js} +1 -1
- package/dist/cjs/smart-wallets.js +1 -1
- package/dist/cjs/solana.js +1 -1
- package/dist/cjs/{to-ui-error-a-xwbRKZ.js → to-ui-error-DQR0PH1r.js} +1 -1
- package/dist/cjs/ui.js +1 -1
- package/dist/cjs/{use-create-wallet-without-fallback-DSOJS4h0.js → use-create-wallet-without-fallback-DVsaEUAi.js} +1 -1
- package/dist/cjs/{use-export-wallet-BRFTskbr.js → use-export-wallet-Bp3Q263k.js} +1 -1
- package/dist/cjs/{use-sign-with-user-signer-On9f1Fag.js → use-sign-with-user-signer-H6aAias8.js} +1 -1
- package/dist/cjs/{useActiveWallet-DcxqWAsq.js → useActiveWallet-rCbIz7HK.js} +1 -1
- package/dist/cjs/{useGetSolPrice-eOpcFeNE.js → useGetSolPrice-mb9rbK56.js} +1 -1
- package/dist/cjs/{useGetTokenPrice-EcT0H5rf.js → useGetTokenPrice-BXSjabMV.js} +1 -1
- package/dist/cjs/{useI18n-hYSvbQCq.js → useI18n-DnOEBAdg.js} +1 -1
- package/dist/cjs/{usePrivy-CXPeoT5g.js → usePrivy-fmKLKsT3.js} +1 -1
- package/dist/cjs/{useSolanaRpcClient-mfV88iJm.js → useSolanaRpcClient-BSb_hq8i.js} +1 -1
- package/dist/cjs/{useWalletBalance-CQAgfkRc.js → useWalletBalance-9yRQYIAe.js} +1 -1
- package/dist/cjs/{useWallets-h2xCj02C.js → useWallets-D6t7Ii2K.js} +1 -1
- package/dist/cjs/{useWallets-TxPVNWGS.js → useWallets-dr024nCy.js} +1 -1
- package/dist/dts/{events-context-CkFXl3uc.d.mts → events-context-Bt8hY3AJ.d.mts} +1 -1
- package/dist/dts/{events-context-CkFXl3uc.d.ts → events-context-Bt8hY3AJ.d.ts} +1 -1
- package/dist/dts/extended-chains.d.mts +1 -1
- package/dist/dts/extended-chains.d.ts +1 -1
- package/dist/dts/farcaster.d.mts +1 -1
- package/dist/dts/farcaster.d.ts +1 -1
- package/dist/dts/index.d.mts +17 -10
- package/dist/dts/index.d.ts +17 -10
- package/dist/dts/internal.d.mts +1 -1
- package/dist/dts/internal.d.ts +1 -1
- package/dist/dts/smart-wallets.d.mts +1 -1
- package/dist/dts/smart-wallets.d.ts +1 -1
- package/dist/dts/solana.d.mts +3 -3
- package/dist/dts/solana.d.ts +3 -3
- package/dist/dts/{types-BkkvIRg5.d.mts → types-Dx2VbdX1.d.mts} +52 -7
- package/dist/dts/{types-BkkvIRg5.d.ts → types-Dx2VbdX1.d.ts} +52 -7
- package/dist/dts/ui.d.mts +1 -1
- package/dist/dts/ui.d.ts +1 -1
- package/dist/esm/AccountNotFoundScreen-DQR0FatT.mjs +1 -0
- package/dist/esm/{Address-DtXA0OPS.mjs → Address-C1iw9r70.mjs} +1 -1
- package/dist/esm/AffirmativeConsentScreen-BU4I5ISJ.mjs +1 -0
- package/dist/esm/{AllowlistRejectionScreen-BuH5iBJ3.mjs → AllowlistRejectionScreen-WgcCN6CH.mjs} +1 -1
- package/dist/esm/{AuthenticateWithWalletScreen-CKJqrLEm.mjs → AuthenticateWithWalletScreen-D6Zy69An.mjs} +1 -1
- package/dist/esm/AwaitingEvmToSolBridgingScreen-ByIVuwRF.mjs +2 -0
- package/dist/esm/AwaitingExternalEthereumTransferScreen-Bq0rCErj.mjs +2 -0
- package/dist/esm/AwaitingPasswordlessCodeScreen-itJ4854u.mjs +1 -0
- package/dist/esm/{AwaitingSolToEvmBridgingScreen-YsM6M4T9.mjs → AwaitingSolToEvmBridgingScreen-BSxfnQcf.mjs} +1 -1
- package/dist/esm/{BridgeNetworkSelectionView-Bu0vi9_a.mjs → BridgeNetworkSelectionView-DXjTVIcQ.mjs} +1 -1
- package/dist/esm/{Button-DJ-mtuuD.mjs → Button-OlK_6fKk.mjs} +1 -1
- package/dist/esm/CaptchaScreen-BBjPbV4B.mjs +1 -0
- package/dist/esm/CoinbaseOnrampStatusScreen-CZpfBNiz.mjs +1 -0
- package/dist/esm/{ConnectEmailForm-DUgOCS2V.mjs → ConnectEmailForm-C2TJPUYV.mjs} +1 -1
- package/dist/esm/ConnectLedgerScreen-TCVn5s4x.mjs +1 -0
- package/dist/esm/{ConnectOnlyLandingScreen-BVkcUaO6.mjs → ConnectOnlyLandingScreen-CjVJO9uh.mjs} +1 -1
- package/dist/esm/ConnectOnlyStatusScreen-BGJ4l52n.mjs +1 -0
- package/dist/esm/ConnectOrCreateScreen-CZDi1Oaj.mjs +1 -0
- package/dist/esm/{ConnectPhoneForm-CbuSfwAI.mjs → ConnectPhoneForm-kW8tUq0-.mjs} +1 -1
- package/dist/esm/{ConnectWalletView-DVDOSzi0.mjs → ConnectWalletView-tpdAD3K7.mjs} +1 -1
- package/dist/esm/ConnectionStatusScreen-B3NfUQx_.mjs +1 -0
- package/dist/esm/CrossAppAuthScreen-CnvB1lhx.mjs +1 -0
- package/dist/esm/{CustomLandingScreenView-DWt9lv8W.mjs → CustomLandingScreenView-DZTOg8z4.mjs} +2 -2
- package/dist/esm/DelegatedActionsConsentScreen-DeBkGN9b.mjs +1 -0
- package/dist/esm/{DelegatedActionsRevokeScreen-B-xLCB1j.mjs → DelegatedActionsRevokeScreen-CTgPXrqu.mjs} +1 -1
- package/dist/esm/EmbeddedWalletConnectingScreen-Qu9cmWzJ.mjs +1 -0
- package/dist/esm/EmbeddedWalletCreatedScreen-DFciR3k8.mjs +1 -0
- package/dist/esm/{EmbeddedWalletKeyExportScreen-DX22sVNh.mjs → EmbeddedWalletKeyExportScreen-CEo3FI_N.mjs} +2 -2
- package/dist/esm/EmbeddedWalletOnAccountCreateScreen-C7cawTmQ.mjs +1 -0
- package/dist/esm/{EmbeddedWalletPasswordUpdateScreen-CezgHp88.mjs → EmbeddedWalletPasswordUpdateScreen-GdNNmtZR.mjs} +1 -1
- package/dist/esm/{EmbeddedWalletPasswordUpdateSplashScreen-BFamfPb_.mjs → EmbeddedWalletPasswordUpdateSplashScreen-BNOCuoES.mjs} +1 -1
- package/dist/esm/{EnrollTotp-BzAm1Ya4.mjs → EnrollTotp-CtNw20-I.mjs} +1 -1
- package/dist/esm/ErrorScreen-NoHFWbKU.mjs +1 -0
- package/dist/esm/FarcasterConnectStatusScreen-CiN00CmD.mjs +1 -0
- package/dist/esm/{FarcasterSignerStatusScreen-DIfmv7Ft.mjs → FarcasterSignerStatusScreen-MQ2QrijY.mjs} +1 -1
- package/dist/esm/{FundSolWalletWithExternalSolanaWallet-CkEgl8wO.mjs → FundSolWalletWithExternalSolanaWallet-DVaHCgDh.mjs} +1 -1
- package/dist/esm/{FundWalletMethodHeader-CbTaIDLQ.mjs → FundWalletMethodHeader-RY6-H-Ry.mjs} +1 -1
- package/dist/esm/FundingEditAmountScreen-DiZ2-4XS.mjs +1 -0
- package/dist/esm/{FundingMethodSelectionScreen-fBauGI0K.mjs → FundingMethodSelectionScreen-yZenKs6o.mjs} +1 -1
- package/dist/esm/HCaptchaWrapper-Dl2Jt_Df.mjs +1 -0
- package/dist/esm/{InAppBrowserLoginNotPossible-DBhsoAkw.mjs → InAppBrowserLoginNotPossible-CTnPeOBa.mjs} +1 -1
- package/dist/esm/{InstallWalletScreen-CEcl2LHj.mjs → InstallWalletScreen-CBxWJiQf.mjs} +1 -1
- package/dist/esm/LandingScreen-CzhCoUSE.mjs +1 -0
- package/dist/esm/{LinkConflictScreen-Bg9QTrJX.mjs → LinkConflictScreen-BnoDRUE0.mjs} +1 -1
- package/dist/esm/LinkEmailScreen-x_TPODcx.mjs +1 -0
- package/dist/esm/{LinkPasskeyScreen-CNFL2N09.mjs → LinkPasskeyScreen-D9IfHaec.mjs} +1 -1
- package/dist/esm/{LinkPhoneScreen-DnPAvact.mjs → LinkPhoneScreen-DaK-7otl.mjs} +1 -1
- package/dist/esm/{LoginFailedScreen-CkxfR75o.mjs → LoginFailedScreen-CoukYLVP.mjs} +1 -1
- package/dist/esm/ManualTransferScreen-DdumQnbt.mjs +1 -0
- package/dist/esm/MfaAuthEnrollmentFlowScreen-BsRpCR72.mjs +1 -0
- package/dist/esm/MfaAuthVerifyFlowScreen-Cr92F0yT.mjs +1 -0
- package/dist/esm/MfaEnrollmentFlowScreen-CXyaDU1D.mjs +1 -0
- package/dist/esm/MfaVerifyFlowScreen-ghKHn2BT.mjs +1 -0
- package/dist/esm/{ModalHeader-D7WajfD8.mjs → ModalHeader-CxHK1IKF.mjs} +1 -1
- package/dist/esm/{MoonpayStatusScreen-CBc4DLDR.mjs → MoonpayStatusScreen-DhMZLroP.mjs} +1 -1
- package/dist/esm/OAuthStatusScreen-BFVDc4G4.mjs +1 -0
- package/dist/esm/PasskeySelectSignupOrLogin-Dvxli58H.mjs +1 -0
- package/dist/esm/PasskeyStatusScreen-c9nu4s_d.mjs +1 -0
- package/dist/esm/PasswordRecoveryScreen-CsdO4G6h.mjs +1 -0
- package/dist/esm/{QrCode-zzqjquVm.mjs → QrCode-BI2LxLLg.mjs} +1 -1
- package/dist/esm/RecoveryOAuthStatusScreen-Dp7fnj5t.mjs +1 -0
- package/dist/esm/RecoveryPasswordCreateScreen-DdzD09T3.mjs +1 -0
- package/dist/esm/RecoverySelectionScreen-D2nDGt4R.mjs +1 -0
- package/dist/esm/{Screen-dwi2CitY.mjs → Screen-Dzz_AFFs.mjs} +1 -1
- package/dist/esm/{ScreenLayout-Dmrhdwtt.mjs → ScreenLayout-pthdsODa.mjs} +1 -1
- package/dist/esm/{SetAutomaticRecoveryScreen-Db5Xg_sQ.mjs → SetAutomaticRecoveryScreen-g1kDOe61.mjs} +1 -1
- package/dist/esm/{SetWalletPasswordForm-ZtRqoZYj.mjs → SetWalletPasswordForm-DUTEhc4R.mjs} +2 -2
- package/dist/esm/{SignRequestScreen-DdAK4SlJ.mjs → SignRequestScreen-DjLHkDxK.mjs} +1 -1
- package/dist/esm/StandardSignAndSendTransactionScreen-CFqthHKF.mjs +1 -0
- package/dist/esm/TelegramAuthScreen-B5uYbdxP.mjs +1 -0
- package/dist/esm/{TransactionDetails-fgHkAnf9.mjs → TransactionDetails-DITlhQNk.mjs} +3 -3
- package/dist/esm/{TransactionErrorView-Dgp1KSy5.mjs → TransactionErrorView-DmFbjQHi.mjs} +2 -2
- package/dist/esm/TransferFromWalletScreen-Dvp-YNqS.mjs +1 -0
- package/dist/esm/{TransferOrBridgeLoadingScreen-D3vBwM_o.mjs → TransferOrBridgeLoadingScreen-CFRKffkj.mjs} +1 -1
- package/dist/esm/TurnstileWrapper-Co-t5mTh.mjs +1 -0
- package/dist/esm/UpdateEmailScreen-DoDVvVCw.mjs +1 -0
- package/dist/esm/{UpdatePhoneScreen-Byn7UW7u.mjs → UpdatePhoneScreen-BoEnTnCl.mjs} +1 -1
- package/dist/esm/{UserLimitReachedScreen-DXDqdBpt.mjs → UserLimitReachedScreen-68Vv3bFU.mjs} +1 -1
- package/dist/esm/WalletButtonList-C1OqZHCA.mjs +1 -0
- package/dist/esm/{WalletInfoCard-DAv0WFcc.mjs → WalletInfoCard-DmIqX_B8.mjs} +1 -1
- package/dist/esm/{WalletInterstitialScreen-CKiSWjpa.mjs → WalletInterstitialScreen-Du_L0CK7.mjs} +1 -1
- package/dist/esm/{WalletLink-CjuEskpb.mjs → WalletLink-D2x4SkPO.mjs} +2 -2
- package/dist/esm/abstract-smart-wallets.mjs +1 -1
- package/dist/esm/context-B4VZqX5H.mjs +1 -0
- package/dist/esm/{ethers-CpMSCMOg.mjs → ethers-oRuqwv5W.mjs} +1 -1
- package/dist/esm/extended-chains.mjs +1 -1
- package/dist/esm/farcaster.mjs +1 -1
- package/dist/esm/{frame-BMa3kyjk.mjs → frame-BMn1PaPp.mjs} +1 -1
- package/dist/esm/{get-is-unified-wallet-DymQMSJy.mjs → get-is-unified-wallet-DXko-EzF.mjs} +1 -1
- package/dist/esm/{getErc20Balance-Dtau1386.mjs → getErc20Balance-Cl5jZN3g.mjs} +1 -1
- package/dist/esm/getErc20TokenInfo-wBcf5dYY.mjs +1 -0
- package/dist/esm/{getPublicClient-IxRndou_.mjs → getPublicClient-C_l_ocJu.mjs} +1 -1
- package/dist/esm/{index-DdlRJsoj.mjs → index-BctMJtH0.mjs} +1 -1
- package/dist/esm/index-CCrVHfyv.mjs +5 -0
- package/dist/esm/index-Ce4cEnEO.mjs +1 -0
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/{internal-context-Cvo1WmWN.mjs → internal-context-DLZicboG.mjs} +1 -1
- package/dist/esm/internal.mjs +1 -1
- package/dist/esm/{prepareFundingModalData-BUyu5Vhr.mjs → prepareFundingModalData-CndHQFiM.mjs} +1 -1
- package/dist/esm/{reservoir-B0V48m2I.mjs → reservoir-DRNnyqld.mjs} +1 -1
- package/dist/esm/{shared-DsP7M4P5.mjs → shared-BMOp6N9y.mjs} +1 -1
- package/dist/esm/shouldProceedtoEmbeddedWalletCreationFlow-DVwf2mAj.mjs +1 -0
- package/dist/esm/{smart-wallets-Cbhn7qlU.mjs → smart-wallets-B3-1-dnO.mjs} +1 -1
- package/dist/esm/smart-wallets.mjs +1 -1
- package/dist/esm/solana.mjs +1 -1
- package/dist/esm/{to-ui-error-B3m2hl6e.mjs → to-ui-error-B8DSJO-0.mjs} +1 -1
- package/dist/esm/ui.mjs +2 -2
- package/dist/esm/{use-create-wallet-without-fallback-DodUf3VP.mjs → use-create-wallet-without-fallback-COqi_EHH.mjs} +1 -1
- package/dist/esm/{use-export-wallet-CWslDKqf.mjs → use-export-wallet-CRKJ4-yx.mjs} +1 -1
- package/dist/esm/{use-sign-with-user-signer-LJ6ROduD.mjs → use-sign-with-user-signer-J1po7l19.mjs} +1 -1
- package/dist/esm/useActiveWallet-Bj-s666H.mjs +1 -0
- package/dist/esm/{useGetSolPrice-Bi0pPiUW.mjs → useGetSolPrice-fF6UX0Cj.mjs} +1 -1
- package/dist/esm/{useGetTokenPrice-B4XVfxeD.mjs → useGetTokenPrice-CnQZmfvQ.mjs} +1 -1
- package/dist/esm/{useI18n-ByKvnaXP.mjs → useI18n-DIAzggWr.mjs} +1 -1
- package/dist/esm/{usePrivy-D3OPY7tm.mjs → usePrivy-BSIhOAz8.mjs} +1 -1
- package/dist/esm/{useSolanaRpcClient-DjD2ma5c.mjs → useSolanaRpcClient-Be5Dd6m5.mjs} +1 -1
- package/dist/esm/{useWalletBalance-Xca4-c_r.mjs → useWalletBalance-BuMx9pCk.mjs} +1 -1
- package/dist/esm/{useWallets-CQMJYOF9.mjs → useWallets-Cc1ILfGS.mjs} +1 -1
- package/dist/esm/{useWallets-BplPx0Pz.mjs → useWallets-DuxHKVvE.mjs} +1 -1
- package/package.json +7 -6
- package/dist/cjs/AffirmativeConsentScreen-7a4hl59A.js +0 -1
- package/dist/cjs/AwaitingEvmToSolBridgingScreen-D1Xd83Hp.js +0 -2
- package/dist/cjs/AwaitingExternalEthereumTransferScreen-COL0WYkT.js +0 -2
- package/dist/cjs/AwaitingPasswordlessCodeScreen-Cx5fqGf6.js +0 -1
- package/dist/cjs/CaptchaScreen-025syTLo.js +0 -1
- package/dist/cjs/CoinbaseOnrampStatusScreen-ORl8wt4H.js +0 -1
- package/dist/cjs/ConnectLedgerScreen-DBYExlWR.js +0 -1
- package/dist/cjs/ConnectOnlyStatusScreen-DvTrLHyY.js +0 -1
- package/dist/cjs/ConnectOrCreateScreen-Dh4EFU5N.js +0 -1
- package/dist/cjs/ConnectionStatusScreen-Ct-KTCXS.js +0 -1
- package/dist/cjs/CrossAppAuthScreen-B-DtA7IH.js +0 -1
- package/dist/cjs/DelegatedActionsRevokeScreen-2g_ydX-Y.js +0 -1
- package/dist/cjs/EmbeddedWalletConnectingScreen-9seYvsTF.js +0 -1
- package/dist/cjs/EmbeddedWalletOnAccountCreateScreen-B0tXEtG9.js +0 -1
- package/dist/cjs/ErrorScreen-Cob9AO30.js +0 -1
- package/dist/cjs/FarcasterConnectStatusScreen-C5FoWA6N.js +0 -2
- package/dist/cjs/LandingScreen-B9jb8n_d.js +0 -1
- package/dist/cjs/LinkEmailScreen-zyJFrvy-.js +0 -1
- package/dist/cjs/ManualTransferScreen-DPz98CSt.js +0 -1
- package/dist/cjs/MfaAuthEnrollmentFlowScreen-BBKMKDGR.js +0 -1
- package/dist/cjs/MfaAuthVerifyFlowScreen-3LKUo_xV.js +0 -1
- package/dist/cjs/MfaEnrollmentFlowScreen-B2YgNRCC.js +0 -1
- package/dist/cjs/MfaVerifyFlowScreen-BhVqkM2f.js +0 -1
- package/dist/cjs/OAuthStatusScreen-q9MFItPT.js +0 -1
- package/dist/cjs/PasskeySelectSignupOrLogin-BKBH0QxK.js +0 -1
- package/dist/cjs/PasskeyStatusScreen-DVx4lzwq.js +0 -1
- package/dist/cjs/PasswordRecoveryScreen-BmGdXVfh.js +0 -1
- package/dist/cjs/RecoveryOAuthStatusScreen-DUobwBXF.js +0 -1
- package/dist/cjs/RecoveryPasswordCreateScreen-vQG4ErlF.js +0 -1
- package/dist/cjs/RecoverySelectionScreen-E2l_NO8y.js +0 -1
- package/dist/cjs/StandardSignAndSendTransactionScreen-BUB57iWU.js +0 -1
- package/dist/cjs/TelegramAuthScreen-D5uhx6WN.js +0 -1
- package/dist/cjs/TransferFromWalletScreen-C_0IpL-A.js +0 -1
- package/dist/cjs/UpdateEmailScreen-BUAgWudx.js +0 -1
- package/dist/cjs/WalletButtonList-bICzXZXM.js +0 -1
- package/dist/cjs/context-JUEgi5-6.js +0 -1
- package/dist/cjs/index-BNNk54gK.js +0 -1
- package/dist/cjs/index-DvDeCr_m.js +0 -5
- package/dist/cjs/internal-context-VDPFkIXN.js +0 -1
- package/dist/esm/AccountNotFoundScreen-CmhSsknC.mjs +0 -1
- package/dist/esm/AffirmativeConsentScreen-C6AcYU94.mjs +0 -1
- package/dist/esm/AwaitingEvmToSolBridgingScreen-DuO5iRV2.mjs +0 -2
- package/dist/esm/AwaitingExternalEthereumTransferScreen-C50_Dj-N.mjs +0 -2
- package/dist/esm/AwaitingPasswordlessCodeScreen-Bb0UxW46.mjs +0 -1
- package/dist/esm/CaptchaScreen-CWQAXaCK.mjs +0 -1
- package/dist/esm/CoinbaseOnrampStatusScreen-NdySyA5D.mjs +0 -1
- package/dist/esm/ConnectLedgerScreen-3wp1wuP2.mjs +0 -1
- package/dist/esm/ConnectOnlyStatusScreen-CyT_IEgy.mjs +0 -1
- package/dist/esm/ConnectOrCreateScreen-BlIxCxVJ.mjs +0 -1
- package/dist/esm/ConnectionStatusScreen-DNdZyKcL.mjs +0 -1
- package/dist/esm/CrossAppAuthScreen-DEF_slEx.mjs +0 -1
- package/dist/esm/DelegatedActionsConsentScreen-DqeBCJkz.mjs +0 -1
- package/dist/esm/EmbeddedWalletConnectingScreen-BCg7qeI6.mjs +0 -1
- package/dist/esm/EmbeddedWalletCreatedScreen-jGepSDyo.mjs +0 -1
- package/dist/esm/EmbeddedWalletOnAccountCreateScreen-hkifQ988.mjs +0 -1
- package/dist/esm/ErrorScreen-DFAo4S7A.mjs +0 -1
- package/dist/esm/FarcasterConnectStatusScreen-Ys1uAk-s.mjs +0 -1
- package/dist/esm/FundingEditAmountScreen-Cz4tmsMX.mjs +0 -1
- package/dist/esm/LandingScreen-BvRIrtFN.mjs +0 -1
- package/dist/esm/LinkEmailScreen-SlCMvM43.mjs +0 -1
- package/dist/esm/ManualTransferScreen-px_MUbVh.mjs +0 -1
- package/dist/esm/MfaAuthEnrollmentFlowScreen-RbHifi_a.mjs +0 -1
- package/dist/esm/MfaAuthVerifyFlowScreen-B3SIiFnH.mjs +0 -1
- package/dist/esm/MfaEnrollmentFlowScreen-LgmZFVEZ.mjs +0 -1
- package/dist/esm/MfaVerifyFlowScreen-DZkVptvz.mjs +0 -1
- package/dist/esm/OAuthStatusScreen-DvD84FHd.mjs +0 -1
- package/dist/esm/PasskeySelectSignupOrLogin-DZP4Hj5r.mjs +0 -1
- package/dist/esm/PasskeyStatusScreen-bP3yfXNt.mjs +0 -1
- package/dist/esm/PasswordRecoveryScreen-Bt_Cf8-l.mjs +0 -1
- package/dist/esm/RecoveryOAuthStatusScreen-y6_gmb9s.mjs +0 -1
- package/dist/esm/RecoveryPasswordCreateScreen-CloUjFKm.mjs +0 -1
- package/dist/esm/RecoverySelectionScreen-FxCwz-PR.mjs +0 -1
- package/dist/esm/StandardSignAndSendTransactionScreen-C0IrbkCx.mjs +0 -1
- package/dist/esm/TelegramAuthScreen-vp2lrJFZ.mjs +0 -1
- package/dist/esm/TransferFromWalletScreen-CTAGaF9C.mjs +0 -1
- package/dist/esm/UpdateEmailScreen-BBtChP9Q.mjs +0 -1
- package/dist/esm/WalletButtonList-CGloXTN0.mjs +0 -1
- package/dist/esm/context-Cb5MFcME.mjs +0 -1
- package/dist/esm/getErc20TokenInfo-CKA_MDcy.mjs +0 -1
- package/dist/esm/index-B_e8abKi.mjs +0 -1
- package/dist/esm/index-CI666IP9.mjs +0 -5
- package/dist/esm/shouldProceedtoEmbeddedWalletCreationFlow-CxerhsH3.mjs +0 -1
- package/dist/esm/useActiveWallet-hrZcON-K.mjs +0 -1
|
@@ -1 +1 @@
|
|
|
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 i}from"react";import{P as a,S as c}from"./Button-
|
|
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 i}from"react";import{P as a,S as c}from"./Button-OlK_6fKk.mjs";import{styled as s}from"styled-components";import{M as l,B as d}from"./ModalHeader-CxHK1IKF.mjs";import{e as p}from"./StackedContainer-BrIQsdas.mjs";import{A as u}from"./Address-C1iw9r70.mjs";import{u as m}from"./internal-context-DLZicboG.mjs";import{a as h}from"./get-is-unified-wallet-DXko-EzF.mjs";import{e as f}from"./capitalizeFirstLetter-DmLYqXsO.mjs";import{u as g}from"./context-B4VZqX5H.mjs";import y from"@heroicons/react/24/outline/ExclamationCircleIcon";import x from"@heroicons/react/24/outline/Square2StackIcon";import"./useActiveWallet-Bj-s666H.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-CndHQFiM.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-C_l_ocJu.mjs";import"./useWallets-DuxHKVvE.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 b=/*#__PURE__*/s.span.withConfig({displayName:"CircleBorder",componentId:"sc-9056b8b8-0"})(["&&{width:82px;height:82px;border-width:4px;border-style:solid;border-color:",";border-bottom-color:transparent;border-radius:50%;display:inline-block;box-sizing:border-box;animation:rotation 1.2s linear infinite;transition:border-color 800ms;border-bottom-color:",";}"],(e=>e.color??"var(--privy-color-accent)"),(e=>e.color??"var(--privy-color-accent)"));function w(o){/*#__PURE__*/return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",...o,children:[/*#__PURE__*/r("circle",{cx:"12",cy:"12",r:"10"}),/*#__PURE__*/r("line",{x1:"12",x2:"12",y1:"8",y2:"12"}),/*#__PURE__*/r("line",{x1:"12",x2:"12.01",y1:"16",y2:"16"})]})}const v=({onTransfer:e,isTransferring:o,transferSuccess:t})=>/*#__PURE__*/r(a,{...t?{success:!0,children:"Success!"}:{warn:!0,loading:o,onClick:e,children:"Transfer and delete account"}}),C=/*#__PURE__*/s.div.withConfig({displayName:"ConnectContainer",componentId:"sc-3505eb4c-0"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;width:100%;padding-bottom:16px;"]),T=/*#__PURE__*/s.div.withConfig({displayName:"GappedContainer",componentId:"sc-3505eb4c-1"})(["display:flex;flex-direction:column;&& p{font-size:14px;}width:100%;gap:16px;"]),k=/*#__PURE__*/s.div.withConfig({displayName:"DisclosedAccountContainer",componentId:"sc-3505eb4c-2"})(["display:flex;cursor:pointer;align-items:center;width:100%;border:1px solid var(--privy-color-foreground-4) !important;border-radius:var(--privy-border-radius-md);padding:8px 10px;font-size:14px;font-weight:500;gap:8px;"]),I=/*#__PURE__*/s(y).withConfig({displayName:"StyledExclamationCircleIcon",componentId:"sc-3505eb4c-3"})(["position:relative;width:",";height:",";color:var(--privy-color-foreground-3);margin-left:auto;"],(({$iconSize:e})=>`${e}px`),(({$iconSize:e})=>`${e}px`)),A=/*#__PURE__*/s(x).withConfig({displayName:"StyledCopyIcon",componentId:"sc-3505eb4c-4"})(["position:relative;width:15px;height:15px;color:var(--privy-color-foreground-3);margin-left:auto;"]),S=/*#__PURE__*/s.ol.withConfig({displayName:"ListContainer",componentId:"sc-3505eb4c-5"})(["display:flex;flex-direction:column;font-size:14px;width:100%;text-align:left;"]),j=/*#__PURE__*/s.li.withConfig({displayName:"ListItem",componentId:"sc-3505eb4c-6"})(["font-size:14px;list-style-type:auto;list-style-position:outside;margin-left:1rem;margin-bottom:0.5rem;&:last-child{margin-bottom:0;}"]),W=/*#__PURE__*/s.div.withConfig({displayName:"CircleContainer",componentId:"sc-3505eb4c-7"})(["position:relative;width:60px;height:60px;margin:10px;display:flex;justify-content:center;align-items:center;"]);let M=()=>/*#__PURE__*/r(W,{children:/*#__PURE__*/r(I,{$iconSize:60})});const N=({address:t,onClose:i,onRetry:a,onTransfer:c,isTransferring:s,transferSuccess:p})=>{let{defaultChain:m}=g(),h=m.blockExplorers?.default.url??"https://etherscan.io";/*#__PURE__*/return e(o,{children:[/*#__PURE__*/r(l,{onClose:i,backFn:a}),/*#__PURE__*/e(C,{children:[/*#__PURE__*/r(M,{}),/*#__PURE__*/e(T,{children:[/*#__PURE__*/r("h3",{children:"Check account assets before transferring"}),/*#__PURE__*/r("p",{children:"Before transferring, ensure there are no assets in the other account. Assets in that account will not transfer automatically and may be lost."}),/*#__PURE__*/e(S,{children:[/*#__PURE__*/r("p",{children:" To check your balance, you can:"}),/*#__PURE__*/r(j,{children:"Log out and log back into the other account, or "}),/*#__PURE__*/e(j,{children:["Copy your wallet address and use a"," ",/*#__PURE__*/r("u",{children:/*#__PURE__*/r("a",{target:"_blank",href:h,children:"block explorer"})})," ","to see if the account holds any assets."]})]}),/*#__PURE__*/e(k,{onClick:()=>navigator.clipboard.writeText(t).catch(console.error),children:[/*#__PURE__*/r(n,{color:"var(--privy-color-foreground-1)",strokeWidth:2,height:"28px",width:"28px"}),/*#__PURE__*/r(u,{address:t,showCopyIcon:!1}),/*#__PURE__*/r(A,{})]}),/*#__PURE__*/r(v,{onTransfer:c,isTransferring:s,transferSuccess:p})]})]}),/*#__PURE__*/r(d,{})]})},z={component:()=>{let{initiateAccountTransfer:e,closePrivyModal:o}=m(),{data:t,navigate:n,lastScreen:a,setModalData:c}=h(),[s,l]=i(void 0),[d,p]=i(!1),[u,f]=i(!1),g=async()=>{try{if(!t?.accountTransfer?.nonce||!t?.accountTransfer?.account)throw Error("missing account transfer inputs");f(!0),await e({nonce:t?.accountTransfer?.nonce,account:t?.accountTransfer?.account,accountType:t?.accountTransfer?.linkMethod,externalWalletMetadata:t?.accountTransfer?.externalWalletMetadata,telegramWebAppData:t?.accountTransfer?.telegramWebAppData,telegramAuthResult:t?.accountTransfer?.telegramAuthResult,farcasterEmbeddedAddress:t?.accountTransfer?.farcasterEmbeddedAddress,oAuthUserInfo:t?.accountTransfer?.oAuthUserInfo}),p(!0),f(!1),setTimeout(o,1e3)}catch(e){c({errorModalData:{error:e,previousScreen:a||"LinkConflictScreen"}}),n("ErrorScreen",!0)}};return s?/*#__PURE__*/r(N,{address:s,onClose:o,onRetry:()=>l(void 0),onTransfer:g,isTransferring:u,transferSuccess:d}):/*#__PURE__*/r(E,{onClose:o,onInfo:()=>l(t?.accountTransfer?.embeddedWalletAddress),onContinue:()=>l(t?.accountTransfer?.embeddedWalletAddress),onTransfer:g,isTransferring:u,transferSuccess:d,data:t})}},E=({onClose:n,onContinue:i,onInfo:s,onTransfer:u,transferSuccess:m,isTransferring:h,data:g})=>{if(!g?.accountTransfer?.linkMethod||!g?.accountTransfer?.displayName)return;let y={method:g?.accountTransfer?.linkMethod,handle:g?.accountTransfer?.displayName,disclosedAccount:g?.accountTransfer?.embeddedWalletAddress?{type:"wallet",handle:g?.accountTransfer?.embeddedWalletAddress}:void 0};/*#__PURE__*/return e(o,{children:[/*#__PURE__*/r(l,{closeable:!0}),/*#__PURE__*/e(C,{children:[/*#__PURE__*/r(p,{children:/*#__PURE__*/e("div",{children:[/*#__PURE__*/r(b,{color:"var(--privy-color-error)"}),/*#__PURE__*/r(t,{height:38,width:38,stroke:"var(--privy-color-error)"})]})}),/*#__PURE__*/e(T,{children:[/*#__PURE__*/e("h3",{children:[function(e){switch(e){case"sms":return"Phone number";case"email":return"Email address";case"siwe":return"Wallet address";case"siws":return"Solana wallet address";case"linkedin":return"LinkedIn profile";case"google":case"apple":case"discord":case"github":case"instagram":case"spotify":case"tiktok":case"line":case"twitch":case"twitter":case"telegram":case"farcaster":return`${f(e.replace("_oauth",""))} profile`;default:return e.startsWith("privy:")?"Cross-app account":e}}(y.method)," is associated with another account"]}),/*#__PURE__*/e("p",{children:["Do you want to transfer",/*#__PURE__*/r("b",{children:y.handle?` ${y.handle}`:""})," to this account instead? This will delete your other account."]}),/*#__PURE__*/r(L,{onClick:s,disclosedAccount:y.disclosedAccount})]}),/*#__PURE__*/e(T,{style:{gap:12,marginTop:12},children:[g?.accountTransfer?.embeddedWalletAddress?/*#__PURE__*/r(a,{onClick:i,children:"Continue"}):/*#__PURE__*/r(v,{onTransfer:u,transferSuccess:m,isTransferring:h}),/*#__PURE__*/r(c,{onClick:n,children:"No thanks"})]})]}),/*#__PURE__*/r(d,{})]})};function L({disclosedAccount:o,onClick:t}){return o?/*#__PURE__*/e(k,{onClick:t,children:[/*#__PURE__*/r(n,{color:"var(--privy-color-foreground-1)",strokeWidth:2,height:"28px",width:"28px"}),/*#__PURE__*/r(u,{address:o.handle,showCopyIcon:!1}),/*#__PURE__*/r(w,{width:15,height:15,color:"var(--privy-color-foreground-3)",style:{marginLeft:"auto"}})]}):null}export{z as LinkConflictScreen,E as LinkConflictScreenView,z as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import o from"@heroicons/react/24/outline/EnvelopeIcon";import{C as r}from"./ConnectEmailForm-C2TJPUYV.mjs";import{B as i}from"./Layouts-Bmf8DxNP.mjs";import{u as e}from"./context-B4VZqX5H.mjs";import{S as m}from"./ScreenLayout-pthdsODa.mjs";import"lucide-react";import"react";import"styled-components";import"./internal-context-DLZicboG.mjs";import"ofetch";import"./index-CCrVHfyv.mjs";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"./get-is-unified-wallet-DXko-EzF.mjs";import"viem";import"eventemitter3";import"./useActiveWallet-Bj-s666H.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-CndHQFiM.mjs";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-C_l_ocJu.mjs";import"./useWallets-DuxHKVvE.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"@scure/base";import"./usePrivy-BSIhOAz8.mjs";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-BMn1PaPp.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-J1po7l19.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./Button-OlK_6fKk.mjs";import"./Chip-Bsgj4Yc-.mjs";import"./LoadingSkeleton-CHdaq3pb.mjs";import"./EmailInputForm-B4hjCxRU.mjs";import"./ErrorMessage-Cx8GKGhL.mjs";import"tinycolor2";import"./Screen-Dzz_AFFs.mjs";import"./ModalHeader-CxHK1IKF.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-CJMgUOnw.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 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{CheckCircle as i,FingerprintIcon as o,Trash2 as n}from"lucide-react";import{useState as r,useEffect as a}from"react";import{styled as s,css as c}from"styled-components";import{G as d}from"./useActiveWallet-
|
|
1
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{CheckCircle as i,FingerprintIcon as o,Trash2 as n}from"lucide-react";import{useState as r,useEffect as a}from"react";import{styled as s,css as c}from"styled-components";import{G as d}from"./useActiveWallet-Bj-s666H.mjs";import{T as l,a as p}from"./TodoList-Dn0Qu-vv.mjs";import{u as m,c as h,b as y}from"./internal-context-DLZicboG.mjs";import{u}from"./get-is-unified-wallet-DXko-EzF.mjs";import{S as f}from"./ScreenLayout-pthdsODa.mjs";import"zustand";import"./context-B4VZqX5H.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"react-device-detect";import"./prepareFundingModalData-CndHQFiM.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-C_l_ocJu.mjs";import"./useWallets-DuxHKVvE.mjs";import"ofetch";import"./Button-OlK_6fKk.mjs";import"./Screen-Dzz_AFFs.mjs";import"./ModalHeader-CxHK1IKF.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-CJMgUOnw.mjs";const g=({passkeys:t,isLoading:n,errorReason:r,success:a,expanded:s,onLinkPasskey:c,onUnlinkPasskey:d,onExpand:l,onBack:p,onClose:m})=>/*#__PURE__*/e(f,a?{title:"Passkeys updated",icon:i,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:t,expanded:s,onUnlink:d,onExpand:l})}:{icon:o,title:"Set up passkey verification",subtitle:"Verify with passkey",primaryCta:{label:"Add new passkey",onClick:c,loading:n},onClose:m,watermark:!0,helpText:r||void 0,children:0===t.length?/*#__PURE__*/e(x,{}):/*#__PURE__*/e(k,{children:/*#__PURE__*/e(v,{passkeys:t,expanded:s,onUnlink:d,onExpand:l})})});let k=/*#__PURE__*/s.div.withConfig({displayName:"ContentContainer",componentId:"sc-a752cbd1-0"})(["margin-bottom:12px;"]),v=({passkeys:i,expanded:o,onUnlink:a,onExpand:s})=>{let[c,l]=r([]),p=o?i.length:2;/*#__PURE__*/return t("div",{children:[/*#__PURE__*/e(N,{children:"Your passkeys"}),/*#__PURE__*/t(j,{children:[i.slice(0,p).map((i=>{/*#__PURE__*/return t(A,{children:[/*#__PURE__*/t("div",{children:[/*#__PURE__*/e(P,{children:(o=i,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__*/t(L,{children:["Last used:"," ",(i.latestVerifiedAt??i.firstVerifiedAt)?.toLocaleString()??"N/A"]})]}),/*#__PURE__*/e(B,{disabled:c.includes(i.credentialId),onClick:()=>(async e=>{l((t=>t.concat([e]))),await a(e),l((t=>t.filter((t=>t!==e))))})(i.credentialId),children:c.includes(i.credentialId)?/*#__PURE__*/e(d,{}):/*#__PURE__*/e(n,{size:16})})]},i.credentialId);var o})),i.length>2&&!o&&/*#__PURE__*/e(I,{onClick:s,children:"View all"})]})]})},x=()=>/*#__PURE__*/t(l,{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:t,unlinkPasskey:i}=u(),{linkWithPasskey:o,closePrivyModal:n}=m(),s=t?.linkedAccounts.filter((e=>"passkey"===e.type)),[c,d]=r(!1),[l,p]=r(""),[f,k]=r(!1),[v,x]=r(!1);return a((()=>{0===s.length&&x(!1)}),[s.length]),/*#__PURE__*/e(g,{passkeys:s,isLoading:c,errorReason:l,success:f,expanded:v,onLinkPasskey:()=>{d(!0),o().then((()=>k(!0))).catch((e=>{if(e instanceof h){if(e.privyErrorCode===y.CANNOT_LINK_MORE_OF_TYPE)return void p("Cannot link more passkeys to account.");if(e.privyErrorCode===y.PASSKEY_NOT_ALLOWED)return void p("Passkey request timed out or rejected by user.")}p("Unknown error occurred.")})).finally((()=>{d(!1)}))},onUnlinkPasskey:async e=>(d(!0),await i(e).then((()=>k(!0))).catch((e=>{e instanceof h&&e.privyErrorCode===y.MISSING_MFA_CREDENTIALS?p("Cannot unlink a passkey enrolled in MFA"):p("Unknown error occurred.")})).finally((()=>{d(!1)}))),onExpand:()=>x(!0),onBack:()=>x(!1),onClose:()=>n()})}},C=/*#__PURE__*/s.div.withConfig({displayName:"DoubleIconWrapper",componentId:"sc-a752cbd1-1"})(["display:flex;align-items:center;justify-content:center;width:180px;height:90px;border-radius:50%;svg + svg{margin-left:12px;}> svg{z-index:2;color:var(--privy-color-accent) !important;stroke:var(--privy-color-accent) !important;fill:var(--privy-color-accent) !important;}"]);let b=/*#__PURE__*/c(["&&{width:100%;font-size:0.875rem;line-height:1rem;@media (min-width:440px){font-size:14px;}display:flex;gap:12px;justify-content:center;padding:6px 8px;background-color:var(--privy-color-background);transition:background-color 200ms ease;color:var(--privy-color-accent) !important;:focus{outline:none;box-shadow:none;}}"]);const I=/*#__PURE__*/s.button.withConfig({displayName:"LinkButton",componentId:"sc-a752cbd1-2"})(["",""],b);let j=/*#__PURE__*/s.div.withConfig({displayName:"List",componentId:"sc-a752cbd1-3"})(["display:flex;flex-direction:column;align-items:stretch;gap:0.8rem;padding:0.5rem 0rem 0rem;flex-grow:1;width:100%;"]),N=/*#__PURE__*/s.div.withConfig({displayName:"PasskeyListTitle",componentId:"sc-a752cbd1-4"})(["line-height:20px;height:20px;font-size:1em;font-weight:450;display:flex;justify-content:flex-beginning;width:100%;"]),P=/*#__PURE__*/s.div.withConfig({displayName:"PasskeyItemTitle",componentId:"sc-a752cbd1-5"})(["font-size:1em;line-height:1.3em;font-weight:500;color:var(--privy-color-foreground-2);padding:0.2em 0;"]),L=/*#__PURE__*/s.div.withConfig({displayName:"PasskeyItemSubtitle",componentId:"sc-a752cbd1-6"})(["font-size:0.875rem;line-height:1rem;color:#64668b;padding:0.2em 0;"]),A=/*#__PURE__*/s.div.withConfig({displayName:"PasskeyListItem",componentId:"sc-a752cbd1-7"})(["display:flex;align-items:center;justify-content:space-between;padding:1em;gap:10px;font-size:0.875rem;line-height:1rem;text-align:left;border-radius:8px;border:1px solid #e2e3f0 !important;width:100%;height:5em;"]),E=/*#__PURE__*/c([":focus,:hover,:active{outline:none;}display:flex;width:2em;height:2em;justify-content:center;align-items:center;svg{color:var(--privy-color-error);}svg:hover{color:var(--privy-color-foreground-3);}"]),B=/*#__PURE__*/s.button.withConfig({displayName:"PasskeyItemUnlinkButton",componentId:"sc-a752cbd1-8"})(["",""],E);export{C as DoubleIconWrapper,I as LinkButton,w as LinkPasskeyScreen,g as LinkPasskeyView,w as default};
|
|
@@ -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-kW8tUq0-.mjs";import{u as i}from"./context-B4VZqX5H.mjs";import{u as n}from"./internal-context-DLZicboG.mjs";import{a as m}from"./get-is-unified-wallet-DXko-EzF.mjs";import{S as a}from"./ScreenLayout-pthdsODa.mjs";import"styled-components";import"@privy-io/js-sdk-core";import"./useActiveWallet-Bj-s666H.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-CndHQFiM.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-C_l_ocJu.mjs";import"./useWallets-DuxHKVvE.mjs";import"./Button-OlK_6fKk.mjs";import"./Chip-Bsgj4Yc-.mjs";import"./LoadingSkeleton-CHdaq3pb.mjs";import"tinycolor2";import"ofetch";import"./Screen-Dzz_AFFs.mjs";import"./ModalHeader-CxHK1IKF.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-CJMgUOnw.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-DLZicboG.mjs";import{a as r}from"./get-is-unified-wallet-DXko-EzF.mjs";import{S as i}from"./ScreenLayout-pthdsODa.mjs";import"ofetch";import"react";import"viem";import"./context-B4VZqX5H.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./Button-OlK_6fKk.mjs";import"styled-components";import"./useActiveWallet-Bj-s666H.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-CndHQFiM.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-C_l_ocJu.mjs";import"./useWallets-DuxHKVvE.mjs";import"./Screen-Dzz_AFFs.mjs";import"./ModalHeader-CxHK1IKF.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-CJMgUOnw.mjs";const n=({title:o="Could not connect with wallet",subtitle:r="Please check that Phantom multichain is enabled and try again.",primaryCtaText:n="Try again",secondaryCtaText:a="Cancel",onTryAgain:m,onCancel:c})=>/*#__PURE__*/t(i,{title:o,subtitle:r,icon:e,iconVariant:"error",primaryCta:{label:n,onClick:m},secondaryCta:{label:a,onClick:c},watermark:!0}),a={component:()=>{let{closePrivyModal:e}=o(),{navigate:i}=r();/*#__PURE__*/return t(n,{onTryAgain:()=>{i("LandingScreen")},onCancel:async()=>{await e()}})}};export{a as LoginFailedScreen,n as LoginFailedScreenView,a as default};
|
|
@@ -0,0 +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}from"./Button-OlK_6fKk.mjs";import{F as d}from"./Layouts-Bmf8DxNP.mjs";import{B as l}from"./ModalHeader-CxHK1IKF.mjs";import{Q as p}from"./QrCode-BI2LxLLg.mjs";import{t as u}from"./FundWalletMethodHeader-RY6-H-Ry.mjs";import{I as f}from"./InfoBanner-D6C6Bt8L.mjs";import{S as h}from"./Subtitle-DkvfP2Ev.mjs";import{T as g}from"./Title-D0pfZff-.mjs";import{W as v}from"./WalletInfoCard-DmIqX_B8.mjs";import{u as j}from"./context-B4VZqX5H.mjs";import{v as y,D as C}from"./useActiveWallet-Bj-s666H.mjs";import{u as S}from"./internal-context-DLZicboG.mjs";import{a as I}from"./get-is-unified-wallet-DXko-EzF.mjs";import{u as b}from"./useWalletBalance-BuMx9pCk.mjs";import{u as T}from"./useWallets-DuxHKVvE.mjs";import{O as w}from"./analytics-mkkvFRju.mjs";import{z as A,D}from"./index-CCrVHfyv.mjs";import{g as k}from"./getChainName-DjpPdUSc.mjs";import{g as F}from"./getUsdcMintAddress-DFI1hv05.mjs";import{g as M}from"./transaction-CnfuREWo.mjs";import{g as B}from"./getErc20Balance-Cl5jZN3g.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-Cx8GKGhL.mjs";import"./LabelXs-BOisBtqT.mjs";import"./Address-C1iw9r70.mjs";import"./shared-CtYf3O54.mjs";import"tinycolor2";import"zustand";import"react-device-detect";import"./prepareFundingModalData-CndHQFiM.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-C_l_ocJu.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"@scure/base";import"./usePrivy-BSIhOAz8.mjs";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-BMn1PaPp.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-J1po7l19.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./getFormattedUsdFromLamports-B6EqSEho.mjs";const U={component:()=>{let{wallets:D}=T(),{connectors:U}=S(),$=U.filter(y).flatMap((e=>e.wallets)),{data:x,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=x?.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?$.find((({address:e})=>e===G.address)):D.find((({address:e})=>C(e)===C(G.address)));if(!G)return L({errorModalData:{error:Error("Couldn't find funding config"),previousScreen:O||"FundingMethodSelectionScreen"},funding:x?.funding,solanaFundingData:x?.solanaFundingData,sendTransaction:x?.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 B({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:k(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(d,{style:{gap:"1rem",margin:re||te?"1rem 0":"0"},children:[/*#__PURE__*/e(p,{url:`${G.chainType}:${G.address}${oe}`,size:200,squareLogoElement:E}),/*#__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(l,{})]})}};let E=({...r})=>/*#__PURE__*/e(D,{color:"black",...r});export{U as ManualTransferScreen,U as default};
|
|
@@ -0,0 +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{P as a}from"./Button-OlK_6fKk.mjs";import{L as s}from"./useActiveWallet-Bj-s666H.mjs";import{M as m,a as l}from"./ModalHeader-CxHK1IKF.mjs";import{u as c}from"./context-B4VZqX5H.mjs";import{u as p,a as u}from"./get-is-unified-wallet-DXko-EzF.mjs";import{M as d,E as h,a as y,b as f}from"./EnrollTotp-CtNw20-I.mjs";import{A as v,C as j,I as k,T as g,S as C,B as w}from"./PinInput-C3_MNxMt.mjs";import"styled-components";import"zustand";import"react-device-detect";import"./prepareFundingModalData-CndHQFiM.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"./internal-context-DLZicboG.mjs";import"ofetch";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-C_l_ocJu.mjs";import"./useWallets-DuxHKVvE.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/XMarkIcon";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-Bsgj4Yc-.mjs";import"./LoadingSkeleton-CHdaq3pb.mjs";import"@heroicons/react/24/outline/ArrowRightEndOnRectangleIcon";import"@heroicons/react/24/outline/ClockIcon";import"./ErrorScreen-NoHFWbKU.mjs";import"lucide-react";import"./index-CCrVHfyv.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"@scure/base";import"./usePrivy-BSIhOAz8.mjs";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-BMn1PaPp.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-J1po7l19.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./reservoir-DRNnyqld.mjs";import"./ScreenLayout-pthdsODa.mjs";import"./Screen-Dzz_AFFs.mjs";import"./index-CJMgUOnw.mjs";import"./LinkPasskeyScreen-D9IfHaec.mjs";import"./TodoList-Dn0Qu-vv.mjs";import"./CopyToClipboard-DatKc59_.mjs";import"./copy-Bx2Jwc5_.mjs";import"./Layouts-Bmf8DxNP.mjs";import"./Column-DQ5Vw9t1.mjs";import"./LabelXs-BOisBtqT.mjs";import"./Subtitle-DkvfP2Ev.mjs";import"./Title-D0pfZff-.mjs";import"./shared-CtYf3O54.mjs";import"@heroicons/react/24/solid/ShieldCheckIcon";import"./QrCode-BI2LxLLg.mjs";import"qrcode";const M={component:()=>{let{user:M,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(),$=async()=>{D?H(D):M?await K({user:M}):H(Error("Must be logged in to manage MFA")),setTimeout((()=>{R(null),F(null)}),500)};if(S.current=$,!I?.mfaEnroll)throw Error("Missing modal data for MFA enrollment screen.");let{onFailure:H,onSuccess:K,onBack:Q,mfaMethods:X,verify:q,generateTotpSecret:z,enrollTotp:J,unenrollTotp:N,enrollPasskey:V}=I.mfaEnroll,Y=M?.mfaMethods.includes("sms"),G=M?.mfaMethods.includes("totp"),Z=M?.mfaMethods.includes("passkey"),_=!!M?.phone,ee=M?.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 K({user:o})}catch(e){O(e)}finally{W(!1),B(!1)}}if(!b||!M||!A)/*#__PURE__*/return e(o,{children:[/*#__PURE__*/t(m,{onClose:$,backFn:Q},"header"),/*#__PURE__*/t(v,{children:/*#__PURE__*/t(d,{})}),/*#__PURE__*/t(j,{children:/*#__PURE__*/t(s,{})}),/*#__PURE__*/t(l,{})]});if("sms"===E)return null;if("totp"===E)/*#__PURE__*/return e(o,{children:[/*#__PURE__*/t(m,{backFn:oe,onClose:$},"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(w,{children:/*#__PURE__*/t(a,{$warn:!0,onClick:async function(){try{O(void 0),W(!0);let e=await N();return await K({user:e})}catch(e){O(e)}finally{W(!1),R(null)}},loading:U,children:"Remove"})}),/*#__PURE__*/t(l,{})]});if("passkey"===E){let i=I.mfaEnroll.shouldUnlinkOnUnenrollMfa??!0;/*#__PURE__*/return e(o,{children:[/*#__PURE__*/t(m,{backFn:oe,onClose:$},"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(w,{children:/*#__PURE__*/t(a,{$warn:!0,onClick:async function(){try{O(void 0),W(!0);let e=await V([]);return await K({user:e})}catch(e){O(e)}finally{W(!1),R(null)}},loading:U,children:"Remove"})}),/*#__PURE__*/t(l,{})]})}return 0!==X.length||Y||G||Z?"sms"===P?null:"totp"===P&&T?/*#__PURE__*/t(h,{onClose:$,onReset:oe,submitEnrollmentWithTotp:e=>async function(e){try{O(void 0),W(!0);let o=await J(e);return await K({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:$,submitEnrollmentWithPasskey:te}):/*#__PURE__*/t(f,{showIntro:!0,userMfaMethods:M.mfaMethods,appMfaMethods:A.mfa.methods,userHasAuthSms:_,backFn:Q,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:$,setRemovingMfaMethod:async function(e){O(void 0);try{await q()}catch(e){return void O(e)}R(e)}}):/*#__PURE__*/e(o,{children:[/*#__PURE__*/t(m,{onClose:$,backFn:Q},"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(w,{children:/*#__PURE__*/t(a,{onClick:$,children:"Close"})}),/*#__PURE__*/t(l,{})]})}};export{M as MfaAuthEnrollmentFlowScreen,M as default};
|
|
@@ -0,0 +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-DXko-EzF.mjs";import{V as m,a as n,b as a,t as c}from"./to-ui-error-B8DSJO-0.mjs";import"viem";import"./context-B4VZqX5H.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./internal-context-DLZicboG.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-CxHK1IKF.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"./ScreenLayout-pthdsODa.mjs";import"./Button-OlK_6fKk.mjs";import"./useActiveWallet-Bj-s666H.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-CndHQFiM.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-C_l_ocJu.mjs";import"./useWallets-DuxHKVvE.mjs";import"./Screen-Dzz_AFFs.mjs";import"./index-CJMgUOnw.mjs";import"./PinInput-C3_MNxMt.mjs";import"@heroicons/react/24/outline/CalendarIcon";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"./StackedContainer-BrIQsdas.mjs";import"./useGetTokenPrice-CnQZmfvQ.mjs";import"./useGetSolPrice-fF6UX0Cj.mjs";import"./index-CCrVHfyv.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"@scure/base";import"./usePrivy-BSIhOAz8.mjs";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-BMn1PaPp.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-J1po7l19.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./TransactionDetails-DITlhQNk.mjs";import"./WalletLink-D2x4SkPO.mjs";import"./ethers-oRuqwv5W.mjs";import"./getFormattedUsdFromLamports-B6EqSEho.mjs";import"./transaction-CnfuREWo.mjs";import"./Layouts-Bmf8DxNP.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()},B=r(!1);return t((()=>{!B.current&&u&&(B.current=!0,P(u).finally((()=>{B.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};
|
|
@@ -0,0 +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{P as c,S as m}from"./Button-OlK_6fKk.mjs";import{L as d}from"./useActiveWallet-Bj-s666H.mjs";import{M as h,a as u}from"./ModalHeader-CxHK1IKF.mjs";import{u as p}from"./context-B4VZqX5H.mjs";import{u as f}from"./internal-context-DLZicboG.mjs";import{a as y,u as v}from"./get-is-unified-wallet-DXko-EzF.mjs";import{d as C,f as w,g as k,h as g,i as j,u as b}from"./index-CCrVHfyv.mjs";import{M,E as S,a as E,b as I}from"./EnrollTotp-CtNw20-I.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-kW8tUq0-.mjs";import{I as W,T as B,S as T,C as L,a as A,B as N,N as U,A as O,L as D,b as Y,c as $}from"./PinInput-C3_MNxMt.mjs";import{ErrorScreenView as q}from"./ErrorScreen-NoHFWbKU.mjs";import"styled-components";import"zustand";import"react-device-detect";import"./prepareFundingModalData-CndHQFiM.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-C_l_ocJu.mjs";import"./useWallets-DuxHKVvE.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/XMarkIcon";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"@scure/base";import"./usePrivy-BSIhOAz8.mjs";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-BMn1PaPp.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-J1po7l19.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-Bsgj4Yc-.mjs";import"./LoadingSkeleton-CHdaq3pb.mjs";import"@heroicons/react/24/outline/ArrowRightEndOnRectangleIcon";import"@heroicons/react/24/outline/ClockIcon";import"./LinkPasskeyScreen-D9IfHaec.mjs";import"lucide-react";import"./TodoList-Dn0Qu-vv.mjs";import"./ScreenLayout-pthdsODa.mjs";import"./Screen-Dzz_AFFs.mjs";import"./index-CJMgUOnw.mjs";import"./CopyToClipboard-DatKc59_.mjs";import"./copy-Bx2Jwc5_.mjs";import"./Layouts-Bmf8DxNP.mjs";import"./Column-DQ5Vw9t1.mjs";import"./LabelXs-BOisBtqT.mjs";import"./Subtitle-DkvfP2Ev.mjs";import"./Title-D0pfZff-.mjs";import"./shared-CtYf3O54.mjs";import"@heroicons/react/24/solid/ShieldCheckIcon";import"./QrCode-BI2LxLLg.mjs";import"qrcode";import"./reservoir-DRNnyqld.mjs";const H=({appName:t,onComplete:n,onReset:i,onClose:l})=>{let[s,m]=a(""),[d,f]=a(!1),[v,b]=a(null),[M,S]=a("enroll"),{initEnrollmentWithSms:E,submitEnrollmentWithSms:I}=C(),{data:O}=y(),D=p();function Y(){O?.mfaEnrollmentFlow?.onSuccess(),n()}return v?/*#__PURE__*/e(q,{allowlistConfig:D.allowlistConfig,error:v,onBack:()=>b(null),onRetry:()=>b(null)}):/*#__PURE__*/o(r,"enroll"===M?{children:[/*#__PURE__*/e(h,{backFn:i,onClose:l},"header"),/*#__PURE__*/e(W,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(P,{})}),/*#__PURE__*/e(B,{children:"Set up SMS verification"}),/*#__PURE__*/o(T,{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}),m(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(u,{})]}:d?{children:[/*#__PURE__*/e(h,{onClose:Y},"header"),/*#__PURE__*/e(W,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(F,{})}),/*#__PURE__*/e(B,{children:"SMS verification added"}),/*#__PURE__*/o(T,{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(c,{onClick:Y,children:"Done"})}),/*#__PURE__*/e(u,{})]}:{children:[/*#__PURE__*/e(h,{backFn:function(){"verify"===M?S("enroll"):i()},onClose:l},"header"),/*#__PURE__*/e(W,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(P,{})}),/*#__PURE__*/e(B,{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(T,{children:["To continue, enter the 6-digit code sent to ",/*#__PURE__*/e("strong",{children:R(s)})]})]}),/*#__PURE__*/e(u,{})]})},K={component:()=>{let{user:w,enrollInMfa:k,ready:g}=v(),[j,F]=a(null),{unenrollWithSms:P,unenrollWithTotp:R,unenrollWithPasskey:x,submitEnrollmentWithTotp:A,initEnrollmentWithPasskey:U,submitEnrollmentWithPasskey:q,initEnrollmentWithTotp:K}=C(),{data:Q,onUserCloseViaDialogOrKeybindRef:V}=y(),X=p(),{closePrivyModal:z}=f(),{promptMfa:J}=b(),[G,Z]=a(!1),[_,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();V.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 q({credentialIds:e},{removeForLogin:Q?.mfaEnrollmentFlow?.shouldUnlinkOnUnenrollMfa}),Q?.mfaEnrollmentFlow?.onSuccess(),te()}catch(e){ae(e)}finally{ie(!1)}}if(s((()=>{he&&Z(!0)}),[he]),!g||!w||!X/*#__PURE__*/)return o(r,{children:[/*#__PURE__*/e(h,{onClose:te},"header"),/*#__PURE__*/e(O,{children:/*#__PURE__*/e(M,{})}),/*#__PURE__*/e(L,{children:/*#__PURE__*/e(d,{})}),/*#__PURE__*/e(u,{})]});if("sms"===j)/*#__PURE__*/return o(r,{children:[/*#__PURE__*/e(h,{backFn:pe,onClose:te},"header"),/*#__PURE__*/e(W,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(t,{})}),/*#__PURE__*/e(B,{children:"Remove SMS verification?"}),/*#__PURE__*/o(T,{children:["MFA adds an extra layer of security to your ",X?.name," account. Make sure you have other methods to secure your account."]}),/*#__PURE__*/e(N,{children:/*#__PURE__*/e(c,{$warn:!0,onClick:async function(){F(null);try{await P()}catch(e){F(null)}},children:"Remove"})}),/*#__PURE__*/e(u,{})]});if("totp"===j)/*#__PURE__*/return o(r,{children:[/*#__PURE__*/e(h,{backFn:pe,onClose:te},"header"),/*#__PURE__*/e(W,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(t,{})}),/*#__PURE__*/e(B,{children:"Remove authenticator app verification?"}),/*#__PURE__*/o(T,{children:["MFA adds an extra layer of security to your ",X?.name," account. Make sure you have other methods to secure your account."]}),/*#__PURE__*/e(N,{children:/*#__PURE__*/e(c,{$warn:!0,onClick:async function(){F(null);try{await R()}catch(e){F(null)}},children:"Remove"})}),/*#__PURE__*/e(u,{})]});if("passkey"===j){let n=Q?.mfaEnrollmentFlow?.shouldUnlinkOnUnenrollMfa??!0;/*#__PURE__*/return o(r,{children:[/*#__PURE__*/e(h,{backFn:pe,onClose:te},"header"),/*#__PURE__*/e(W,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(t,{})}),/*#__PURE__*/e(B,{children:"Are you sure you want to remove this passkey?"}),/*#__PURE__*/e(T,{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(c,{$warn:!0,onClick:async function(){F(null);try{await x({removeForLogin:Q?.mfaEnrollmentFlow?.shouldUnlinkOnUnenrollMfa})}catch(e){F(null)}},children:"Remove"})}),/*#__PURE__*/e(u,{})]})}if(0===Q.mfaEnrollmentFlow.mfaMethods.length&&!he)/*#__PURE__*/return o(r,{children:[/*#__PURE__*/e(h,{onClose:te},"header"),/*#__PURE__*/e(W,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(n,{})}),/*#__PURE__*/e(B,{children:"Add more security"}),/*#__PURE__*/o(T,{children:[X?.name," does not have any verification methods enabled."]}),/*#__PURE__*/e(N,{children:/*#__PURE__*/e(c,{onClick:te,children:"Close"})}),/*#__PURE__*/e(u,{})]});let ye=!he&&!G;return ye?/*#__PURE__*/o(r,{children:[/*#__PURE__*/e(h,{onClose:te},"header"),/*#__PURE__*/e(W,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(n,{})}),/*#__PURE__*/e(B,{children:"Transaction Protection"}),/*#__PURE__*/e(T,{children:"Set up transaction protection to add an extra layer of security to your account"}),/*#__PURE__*/o(D,{children:[/*#__PURE__*/o(Y,{children:[/*#__PURE__*/e($,{children:/*#__PURE__*/e(i,{})}),"Enable 2-Step verification for your ",X?.name," wallet."]}),/*#__PURE__*/o(Y,{children:[/*#__PURE__*/e($,{children:/*#__PURE__*/e(l,{})}),"You'll be prompted to authenticate to complete transactions."]})]}),/*#__PURE__*/o(N,{children:[/*#__PURE__*/e(c,{onClick:()=>Z(!0),children:"Continue"}),/*#__PURE__*/e(m,{onClick:te,children:"Not now"})]}),/*#__PURE__*/e(u,{})]}):"sms"===_?/*#__PURE__*/e(H,{appName:X?.name||"Privy",onComplete:te,onReset:pe,onClose:te}):"totp"===_&&oe?/*#__PURE__*/e(S,{onClose:te,onReset:pe,submitEnrollmentWithTotp:({mfaCode:e})=>async function(e){try{return ae(void 0),await A({mfaCode:e}),Q?.mfaEnrollmentFlow?.onSuccess(),te()}catch(e){ae(e)}finally{F(null)}}(e),totpInfo:{...oe,appName:X?.name||"Privy"}}):"passkey"===_?/*#__PURE__*/e(E,{onReset:pe,onClose:te,submitEnrollmentWithPasskey:fe}):/*#__PURE__*/e(I,{showIntro:ye,userMfaMethods:w.mfaMethods,appMfaMethods:X.mfa.methods,userHasAuthSms:ce,backFn:function(){Z(!1)},handleSelectMethod:async function(e){try{await J()}catch(e){return void ae(e)}return"totp"===e?(ee(e),re(null),void K().then((e=>{re(e)})).catch((()=>{re(null),pe()}))):"passkey"===e&&1===ue.length?await fe():void ee(e)},isTotpLoading:"totp"===_&&!oe,isPasskeyLoading:ne,error:le,onClose:te,setRemovingMfaMethod:async e=>{try{await J()}catch(e){return void ae(e)}F(e)}})}};export{K as MfaEnrollmentFlowScreen,K as default};
|
|
@@ -0,0 +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-DXko-EzF.mjs";import{u as n}from"./index-CCrVHfyv.mjs";import{V as m,a as s,b as c,t as a}from"./to-ui-error-B8DSJO-0.mjs";import"viem";import"./context-B4VZqX5H.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./internal-context-DLZicboG.mjs";import"ofetch";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-Bj-s666H.mjs";import"zustand";import"styled-components";import"react-device-detect";import"./prepareFundingModalData-CndHQFiM.mjs";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-C_l_ocJu.mjs";import"./useWallets-DuxHKVvE.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"@scure/base";import"./usePrivy-BSIhOAz8.mjs";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-BMn1PaPp.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-J1po7l19.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-CxHK1IKF.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-pthdsODa.mjs";import"./Button-OlK_6fKk.mjs";import"./Screen-Dzz_AFFs.mjs";import"./index-CJMgUOnw.mjs";import"./PinInput-C3_MNxMt.mjs";import"@heroicons/react/24/outline/CalendarIcon";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"./StackedContainer-BrIQsdas.mjs";import"./useGetTokenPrice-CnQZmfvQ.mjs";import"./useGetSolPrice-fF6UX0Cj.mjs";import"./TransactionDetails-DITlhQNk.mjs";import"./WalletLink-D2x4SkPO.mjs";import"./ethers-oRuqwv5W.mjs";import"./getFormattedUsdFromLamports-B6EqSEho.mjs";import"./transaction-CnfuREWo.mjs";import"./Layouts-Bmf8DxNP.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,3 +1,3 @@
|
|
|
1
|
-
import{jsx as o,jsxs as c}from"react/jsx-runtime";import{styled as e}from"styled-components";import{u as a}from"./context-
|
|
1
|
+
import{jsx as o,jsxs as c}from"react/jsx-runtime";import{styled as e}from"styled-components";import{u as a}from"./context-B4VZqX5H.mjs";import i from"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import r from"@heroicons/react/24/outline/QuestionMarkCircleIcon";import n from"@heroicons/react/24/outline/XMarkIcon";import{u as l}from"./internal-context-DLZicboG.mjs";function t(c){/*#__PURE__*/return o("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 460 40",...c,children:/*#__PURE__*/o("g",{fill:c.color||"var(--privy-color-foreground)",children:/*#__PURE__*/o("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 d=/*#__PURE__*/e.span.withConfig({displayName:"TermsAndConditionsContainer",componentId:"sc-ff3bd734-0"})(["margin-top:16px;font-size:13px;text-align:center;color:var(--privy-color-foreground-3);display:block;&& > a{color:var(--privy-color-accent);}"]);function h({app:{legal:{privacyPolicyUrl:e,termsAndConditionsUrl:a,requireUsersAcceptTerms:i}},alwaysShowImplicitConsent:r}){let n=!(!e||!a);return i&&!r||!a&&!e?
|
|
2
2
|
/*#__PURE__*/o(d,{}):
|
|
3
3
|
/*#__PURE__*/ /*#__PURE__*/c(d,{children:["By logging in I agree to the"," ",a&&/*#__PURE__*/o("a",{href:a,target:"_blank",children:n?"Terms":"Terms of Service"}),n&&" & ",e&&/*#__PURE__*/o("a",{href:e,target:"_blank",children:"Privacy Policy"})]})}const s=({className:c})=>{let{appearance:e}=a();/*#__PURE__*/return o(v,{className:c,children:e.footerLogo??/*#__PURE__*/o(p,{href:"https://www.privy.io/",target:"_blank",id:"protected-by-privy",children:/*#__PURE__*/o(t,{color:"currentColor",height:13,width:150})})})};let p=/*#__PURE__*/e.a.withConfig({displayName:"PrivyLink",componentId:"sc-ff3bd734-1"})(["&&{padding:0;color:var(--privy-color-foreground-3);}"]);const v=/*#__PURE__*/e.div.withConfig({displayName:"ModalFooter",componentId:"sc-ff3bd734-2"})(["display:flex;align-items:center;justify-content:center;padding-top:8px;padding-bottom:12px;gap:8px;font-size:13px;&& a{padding:0.5rem 0;&:hover{text-decoration:none;}}@media all and (display-mode:standalone){padding-bottom:30px;}"]),m=({backFn:c})=>/*#__PURE__*/o("div",{children:/*#__PURE__*/o(x,{onClick:c,children:/*#__PURE__*/o(i,{height:"16px",width:"16px",strokeWidth:2})})}),f=({infoFn:c})=>/*#__PURE__*/o("div",{children:/*#__PURE__*/o(u,{"aria-label":"info",onClick:c,children:/*#__PURE__*/o(r,{height:"22px",width:"22px",strokeWidth:2})})}),g=c=>/*#__PURE__*/o("div",{children:/*#__PURE__*/o(x,{"aria-label":"close modal",onClick:c.onClose,children:/*#__PURE__*/o(n,{height:"16px",width:"16px",strokeWidth:2})})}),y=({backFn:e,infoFn:i,onClose:r,title:n,closeable:t=!0,className:d})=>{let{closePrivyModal:h}=l(),s=a();/*#__PURE__*/return c(w,{className:d,children:[/*#__PURE__*/c(b,{children:[e&&/*#__PURE__*/o(m,{backFn:e}),/*#__PURE__*/o("div",{style:{height:24}}),i&&/*#__PURE__*/o(f,{infoFn:i})]}),n&&/*#__PURE__*/o(Z,{id:"privy-dialog-title",children:n}),/*#__PURE__*/o(C,{children:!s.render.standalone&&t&&/*#__PURE__*/o(g,{onClose:r||(()=>h())})})]})};let x=/*#__PURE__*/e.button.withConfig({displayName:"StyledButton",componentId:"sc-bc3cd0df-0"})(["&&{cursor:pointer;display:flex;opacity:0.6;background-color:var(--privy-color-background-2);border-radius:var(--privy-border-radius-full);padding:4px;> svg{margin:auto;color:var(--privy-color-foreground);}:hover{opacity:1;}}"]),u=/*#__PURE__*/e(x).withConfig({displayName:"TransparentStyledButton",componentId:"sc-bc3cd0df-1"})(["&&{background-color:transparent;}"]),w=/*#__PURE__*/e.div.withConfig({displayName:"StyledHeader",componentId:"sc-bc3cd0df-2"})(["padding:16px 0;display:flex;align-items:center;justify-content:space-between;h2{font-size:16px;line-height:24px;font-weight:600;color:var(--privy-color-foreground);}"]),b=/*#__PURE__*/e.div.withConfig({displayName:"LeftActionContainer",componentId:"sc-bc3cd0df-3"})(["flex:1;align-items:center;display:flex;gap:8px;"]),C=/*#__PURE__*/e.div.withConfig({displayName:"RightActionContainer",componentId:"sc-bc3cd0df-4"})(["flex:1;display:flex;justify-content:flex-end;"]),Z=/*#__PURE__*/e.div.withConfig({displayName:"TitleContainer",componentId:"sc-bc3cd0df-5"})(["overflow:hidden;white-space:nowrap;max-width:100%;text-overflow:ellipsis;text-align:center;color:var(--privy-color-foreground-2);"]);export{s as B,y as M,h as T,v as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t,jsxs as e,Fragment as o}from"react/jsx-runtime";import r 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{P as s}from"./Button-
|
|
1
|
+
import{jsx as t,jsxs as e,Fragment as o}from"react/jsx-runtime";import r 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{P as s}from"./Button-OlK_6fKk.mjs";import{a as c}from"./Layouts-Bmf8DxNP.mjs";import{L as l,a7 as m}from"./useActiveWallet-Bj-s666H.mjs";import{M as d,B as u}from"./ModalHeader-CxHK1IKF.mjs";import{u as p}from"./context-B4VZqX5H.mjs";import{u as h}from"./internal-context-DLZicboG.mjs";import{a as f}from"./get-is-unified-wallet-DXko-EzF.mjs";import{u as g}from"./index-BctMJtH0.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-CndHQFiM.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-C_l_ocJu.mjs";import"./useWallets-DuxHKVvE.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"tinycolor2";import"ofetch";import"./analytics-mkkvFRju.mjs";const y=({size:o=61,...r})=>/*#__PURE__*/t("svg",{width:o,height:o,viewBox:"0 0 61 61",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r,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 C={component:()=>{let{data:r,setModalData:i,navigateBack:n}=f(),a=p(),{closePrivyModal:s}=h(),{externalTransactionId:c}=r?.moonpayStatus,l=g(c||null,a.fundingMethodConfig.moonpay.useSandbox??!1);/*#__PURE__*/return e(o,{children:[/*#__PURE__*/t(d,{title:"Fund account",backFn:()=>{let t={...r?.funding,showAlternateFundingMethod:!0};t.usingDefaultFundingMethod&&(t.usingDefaultFundingMethod=!1),i({funding:t,solanaFundingData:r?.solanaFundingData}),n()}}),/*#__PURE__*/t(v,{status:l,onClickCta:s}),/*#__PURE__*/t(u,{})]})}};let v=({status:r,onClickCta:i})=>{let{title:a,body:l,cta:m}=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:""}}})(r)),[r]);/*#__PURE__*/return e(o,{children:[/*#__PURE__*/e(j,{children:[/*#__PURE__*/t(w,{status:r}),/*#__PURE__*/e(c,{children:[/*#__PURE__*/t("h3",{children:a}),/*#__PURE__*/t(b,{children:l})]})]}),m&&/*#__PURE__*/t(s,{onClick:i,children:m})]})},w=({status:o})=>{if(!o||"pending"===o){let o="var(--privy-color-foreground-4)";/*#__PURE__*/return e("div",{style:{position:"relative"},children:[/*#__PURE__*/t(l,{color:o,style:{position:"absolute"}}),/*#__PURE__*/t(m,{color:o}),/*#__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(r,{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}})(o),a=(s=o)?{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)"}[s]:"var(--privy-color-foreground-4)";var s;/*#__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=/*#__PURE__*/a.p.withConfig({displayName:"StatusBody",componentId:"sc-76c9ed5b-0"})(["font-size:1rem;color:var(--privy-color-foreground-3);margin-bottom:1rem;display:flex;flex-direction:column;gap:1rem;"]),j=/*#__PURE__*/a.div.withConfig({displayName:"ConnectContainer",componentId:"sc-76c9ed5b-1"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;margin-left:1.75rem;margin-right:1.75rem;padding:2rem 0;"]);export{C as MoonpayStatusScreen,C as default};
|
|
@@ -0,0 +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-DXko-EzF.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-6jomarO4.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 A}from"./context-B4VZqX5H.mjs";import{b as T,u as S,j as w}from"./internal-context-DLZicboG.mjs";import{s as b}from"./shouldProceedtoEmbeddedWalletCreationFlow-DVwf2mAj.mjs";import{S as C}from"./ScreenLayout-pthdsODa.mjs";import{e as _}from"./capitalizeFirstLetter-DmLYqXsO.mjs";import{o as j}from"./index-CCrVHfyv.mjs";import"viem";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"./Button-OlK_6fKk.mjs";import"styled-components";import"./useActiveWallet-Bj-s666H.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-CndHQFiM.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-C_l_ocJu.mjs";import"./useWallets-DuxHKVvE.mjs";import"./Screen-Dzz_AFFs.mjs";import"./ModalHeader-CxHK1IKF.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-CJMgUOnw.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"@scure/base";import"./usePrivy-BSIhOAz8.mjs";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-BMn1PaPp.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-J1po7l19.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===T.LINKED_TO_ANOTHER_USER&&(o.detail="This account has already been linked to another user."),e?.privyErrorCode===T.INVALID_CREDENTIALS&&(o.retryable=!0,o.detail="Something went wrong. Try again."),e.privyErrorCode===T.OAUTH_USER_DENIED&&(o.detail=`Retry and check ${i} to finish connecting your account.`,o.retryable=!0),e?.privyErrorCode===T.TOO_MANY_REQUESTS&&(o.detail="Too many requests. Please wait before trying again."),e?.privyErrorCode===T.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===T.OAUTH_ACCOUNT_SUSPENDED){let e=U(t,r).name;o.detail=`Your ${e} account is suspended. Please try another login method.`}return e?.privyErrorCode===T.CANNOT_LINK_MORE_OF_TYPE&&(o.detail="You cannot authorize more than one account for this user."),e?.privyErrorCode===T.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===T.ALLOWLIST_REJECTED)return N(void 0),d(),void l("AllowlistRejectionScreen");if(e?.privyErrorCode===T.USER_LIMIT_REACHED)return console.error(new w(e).toString()),N(void 0),d(),void l("UserLimitReachedScreen");if(e?.privyErrorCode===T.USER_DOES_NOT_EXIST)return N(void 0),d(),void l("AccountNotFoundScreen");if(e?.privyErrorCode===T.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")}),A);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")}),A);return()=>clearTimeout(e)}{let e=setTimeout((()=>f({shouldCallAuthOnSuccess:!0,isSuccess:!0})),A);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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{FingerprintIcon as e}from"lucide-react";import{a as o}from"./index-CCrVHfyv.mjs";import{u as i}from"./internal-context-DLZicboG.mjs";import{a as r}from"./get-is-unified-wallet-DXko-EzF.mjs";import{S as a}from"./ScreenLayout-pthdsODa.mjs";import"react";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-Bj-s666H.mjs";import"zustand";import"./context-B4VZqX5H.mjs";import"tinycolor2";import"styled-components";import"react-device-detect";import"./prepareFundingModalData-CndHQFiM.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-C_l_ocJu.mjs";import"./useWallets-DuxHKVvE.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"@scure/base";import"./usePrivy-BSIhOAz8.mjs";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"ofetch";import"js-cookie";import"./frame-BMn1PaPp.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-J1po7l19.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./Button-OlK_6fKk.mjs";import"./Screen-Dzz_AFFs.mjs";import"./ModalHeader-CxHK1IKF.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-CJMgUOnw.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:r,onLogin:s})=>/*#__PURE__*/t(a,{title:o,subtitle:i,icon:e,primaryCta:{label:"Create new account",onClick:r},secondaryCta:{label:"Log in with a passkey",onClick:s},watermark:!0}),n={component:()=>{let{enabled:e,token:a}=o(),{navigate:n,setModalData:p}=r(),{initSignupWithPasskey:c,initLoginWithPasskey:m}=i();/*#__PURE__*/return t(s,{onSignup:async()=>{e&&!a?(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:a}),p({passkeyAuthModalData:{passkeySignupFlow:!0}}),n("PasskeyStatusScreen"))},onLogin:async()=>{e&&!a?(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:a}),p({passkeyAuthModalData:{passkeySignupFlow:!1}}),n("PasskeyStatusScreen"))}})}};export{n as PasskeySelectSignupOrLogin,s as PasskeySelectSignupOrLoginView,n as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{FingerprintIcon as r}from"lucide-react";import{useState as t,useRef as o,useEffect as s}from"react";import{styled as i}from"styled-components";import{u as a,q as n}from"./context-B4VZqX5H.mjs";import{c,b as m,u}from"./internal-context-DLZicboG.mjs";import{a as l,u as p}from"./get-is-unified-wallet-DXko-EzF.mjs";import{s as d}from"./shouldProceedtoEmbeddedWalletCreationFlow-DVwf2mAj.mjs";import{S as y}from"./ScreenLayout-pthdsODa.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"viem";import"./index-CCrVHfyv.mjs";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-Bj-s666H.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-CndHQFiM.mjs";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-C_l_ocJu.mjs";import"./useWallets-DuxHKVvE.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"@scure/base";import"./usePrivy-BSIhOAz8.mjs";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-BMn1PaPp.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-J1po7l19.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./Button-OlK_6fKk.mjs";import"./Screen-Dzz_AFFs.mjs";import"./ModalHeader-CxHK1IKF.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-CJMgUOnw.mjs";const h=({status:t,passkeySignupFlow:o=!1,error:s,onRetry:i})=>/*#__PURE__*/e(y,{title:(()=>{switch(t){case"loading":return"Waiting for passkey";case"success":return"Success";case"error":return"Something went wrong"}})(),subtitle:/*#__PURE__*/e(g,{children:(()=>{switch(t){case"loading":return o?"Please follow prompts to register your passkey.":"Please follow prompts to verify your passkey.\nYou will have to sign up with another method first to register a passkey for your account.";case"success":return"You've successfully logged in with your passkey.";case"error":if(s instanceof c){if(s.privyErrorCode===m.CANNOT_LINK_MORE_OF_TYPE)return"Cannot link more passkeys to account.";if(s.privyErrorCode===m.PASSKEY_NOT_ALLOWED)return"Passkey request timed out or rejected by user.\nYou will have to sign up with another method first to register a passkey for your account."}return"An unknown error occurred.\nYou will have to sign up with another method first to register a passkey for your account."}})()}),icon:r,iconVariant:"loading",iconLoadingStatus:{success:"success"===t,fail:"error"===t},primaryCta:"error"===t&&i?{label:"Retry",onClick:i}:"success"===t?{label:"Continue",disabled:!0}:void 0,watermark:!0}),f={component:()=>{let{data:r,setModalData:i,navigate:c}=l(),m=a(),{loginWithPasskey:y,signupWithPasskey:f,closePrivyModal:g,createAnalyticsEvent:v}=u(),{user:w,logout:j}=p(),{passkeySignupFlow:k}=r?.passkeyAuthModalData??{},S=n-500,[b,C]=t("loading"),[A,P]=t(null),E=o([]),W=e=>{E.current=[e,...E.current]};s((()=>()=>{E.current.forEach((e=>clearTimeout(e))),E.current=[]}),[]);let T=async()=>{C("loading");try{k?await f():await y(),C("success")}catch(e){P(e),C("error")}};return s((()=>{if("success"===b&&w){if(m?.legal.requireUsersAcceptTerms&&!w.hasAcceptedTerms)return void W(setTimeout((()=>{c("AffirmativeConsentScreen")}),S));if(!d(w,m?.embeddedWallets))return void W(setTimeout((()=>{g({shouldCallAuthOnSuccess:!0,isSuccess:!0})}),n));W(setTimeout((()=>{i({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),v({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"PasskeyStatusScreen"}}),j()},callAuthOnSuccessOnClose:!0}}),c("EmbeddedWalletOnAccountCreateScreen")}),S))}}),[w,b]),s((()=>{T()}),[]),/*#__PURE__*/e(h,{status:b,passkeySignupFlow:k,error:A,onRetry:T})}};let g=/*#__PURE__*/i.span.withConfig({displayName:"SubtitleText",componentId:"sc-5f92460f-0"})(["white-space:pre-wrap;"]);export{f as PasskeyStatusScreen,h as PasskeyStatusScreenView,f as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsxs as e,jsx as r}from"react/jsx-runtime";import o from"@heroicons/react/24/outline/ShieldCheckIcon";import{useState as t,useEffect as i}from"react";import{styled as s,css as a}from"styled-components";import{u as n,a as c,h as l}from"./get-is-unified-wallet-DXko-EzF.mjs";import{P as m}from"./Button-OlK_6fKk.mjs";import{S as d}from"./Layouts-Bmf8DxNP.mjs";import{P as p,a as u,I as h,H as y,S as v}from"./shared-BMOp6N9y.mjs";import{r as f}from"./index-CCrVHfyv.mjs";import{u as w,l as g}from"./internal-context-DLZicboG.mjs";import{S as j}from"./Screen-Dzz_AFFs.mjs";import"viem";import"./context-B4VZqX5H.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./useActiveWallet-Bj-s666H.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-CndHQFiM.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-C_l_ocJu.mjs";import"./useWallets-DuxHKVvE.mjs";import"@heroicons/react/24/outline/ArrowPathIcon";import"@heroicons/react/24/outline/EyeIcon";import"@heroicons/react/24/outline/EyeSlashIcon";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"@scure/base";import"./usePrivy-BSIhOAz8.mjs";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"ofetch";import"js-cookie";import"./frame-BMn1PaPp.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-J1po7l19.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./ModalHeader-CxHK1IKF.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-CJMgUOnw.mjs";const b={component:()=>{let[s,a]=t(!0),{authenticated:m,user:b}=n(),{walletProxy:A,closePrivyModal:k,createAnalyticsEvent:P,client:S}=w(),{navigate:N,data:E,onUserCloseViaDialogOrKeybindRef:M}=c(),[T,W]=t(void 0),[_,B]=t(""),[H,R]=t(!1),{entropyId:U,entropyIdVerifier:F,onCompleteNavigateTo:O,onSuccess:V,onFailure:z}=E.recoverWallet,D=(e="User exited before their wallet could be recovered")=>{k({shouldCallAuthOnSuccess:!1}),z("string"==typeof e?new g(e):e)};M.current=D,i((()=>{if(!m)return D("User must be authenticated and have a Privy wallet before it can be recovered")}),[m]);/*#__PURE__*/return e(j,{children:[/*#__PURE__*/r(j.Header,{icon:o,title:"Enter your password",subtitle:"Please provision your account on this new device. To continue, enter your recovery password.",showClose:!0,onClose:D}),/*#__PURE__*/r(j.Body,{children:/*#__PURE__*/r(C,{children:/*#__PURE__*/e("div",{children:[/*#__PURE__*/e(p,{children:[/*#__PURE__*/r(u,{type:s?"password":"text",onChange:e=>(e=>{e&&W(e)})(e.target.value),disabled:H,style:{paddingRight:"2.3rem"}}),/*#__PURE__*/r(h,{style:{right:"0.75rem"},children:s?/*#__PURE__*/r(y,{onClick:()=>a(!1)}):/*#__PURE__*/r(v,{onClick:()=>a(!0)})})]}),!!_&&/*#__PURE__*/r(x,{children:_})]})})}),/*#__PURE__*/e(j.Footer,{children:[/*#__PURE__*/r(j.HelpText,{children:/*#__PURE__*/e(d,{children:[/*#__PURE__*/r("h4",{children:"Why is this necessary?"}),/*#__PURE__*/r("p",{children:"You previously set a password for this wallet. This helps ensure only you can access it"})]})}),/*#__PURE__*/r(j.Actions,{children:/*#__PURE__*/r(I,{loading:H||!A,disabled:!T,onClick:async()=>{R(!0);let e=await S.getAccessToken(),r=l(b,U);if(!e||!r||null===T)return D("User must be authenticated and have a Privy wallet before it can be recovered");try{P({eventName:"embedded_wallet_recovery_started",payload:{walletAddress:r.address}}),await(A?.recover({accessToken:e,entropyId:U,entropyIdVerifier:F,recoveryPassword:T})),B(""),O?N(O):k({shouldCallAuthOnSuccess:!1}),V?.(r),P({eventName:"embedded_wallet_recovery_completed",payload:{walletAddress:r.address}})}catch(e){f(e)?B("Invalid recovery password, please try again."):B("An error has occurred, please try again.")}finally{R(!1)}},$hideAnimations:!U&&H,children:"Recover your account"})}),/*#__PURE__*/r(j.Watermark,{})]})]})}};let C=/*#__PURE__*/s.div.withConfig({displayName:"Content",componentId:"sc-1247f710-0"})(["display:flex;flex-direction:column;gap:1.5rem;"]),x=/*#__PURE__*/s.div.withConfig({displayName:"ErrorMessage",componentId:"sc-1247f710-1"})(["line-height:20px;height:20px;font-size:13px;color:var(--privy-color-error);text-align:left;margin-top:0.5rem;"]),I=/*#__PURE__*/s(m).withConfig({displayName:"NoAnimationPrimaryButton",componentId:"sc-1247f710-2"})(["",""],(({$hideAnimations:e})=>e&&/*#__PURE__*/a(["&&{transition:none;}"])));export{b as PasswordRecoveryScreen,b as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as e,jsxs as r,Fragment as o}from"react/jsx-runtime";import t from"qrcode";import l from"react";import{styled as i}from"styled-components";import{u as n}from"./context-
|
|
1
|
+
import{jsx as e,jsxs as r,Fragment as o}from"react/jsx-runtime";import t from"qrcode";import l from"react";import{styled as i}from"styled-components";import{u as n}from"./context-B4VZqX5H.mjs";import{a2 as c,a3 as a}from"./useActiveWallet-Bj-s666H.mjs";const g=()=>/*#__PURE__*/e("svg",{width:"200",height:"200",viewBox:"-77 -77 200 200",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"28px",width:"28px"},children:/*#__PURE__*/e("rect",{width:"50",height:"50",fill:"black",rx:10,ry:10})});let h=(e,r,o,t,l)=>{for(let i=r;i<r+t;i++)for(let r=o;r<o+l;r++){let o=e?.[r];o&&o[i]&&(o[i]=0)}return e},m=(e,r)=>{let o=t.create(e,{errorCorrectionLevel:r}).modules,l=a(Array.from(o.data),o.size);return l=h(l,0,0,7,7),l=h(l,l.length-7,0,7,7),h(l,0,l.length-7,7,7)},d=({x:r,y:t,cellSize:l,bgColor:i,fgColor:n})=>
|
|
2
2
|
/*#__PURE__*/e(o,{children:[0,1,2].map((o=>/*#__PURE__*/e("circle",{r:l*(7-2*o)/2,cx:r+7*l/2,cy:t+7*l/2,fill:o%2!=0?i:n},`finder-${r}-${t}-${o}`)))}),s=({cellSize:r,matrixSize:t,bgColor:l,fgColor:i})=>/*#__PURE__*/e(o,{children:[[0,0],[(t-7)*r,0],[0,(t-7)*r]].map((([o,t])=>/*#__PURE__*/e(d,{x:o,y:t,cellSize:r,bgColor:l,fgColor:i},`finder-${o}-${t}`)))}),p=({matrix:r,cellSize:t,color:i})=>/*#__PURE__*/e(o,{children:r.map(((r,o)=>r.map(((r,n)=>r?/*#__PURE__*/e("rect",{height:t-.4,width:t-.4,x:o*t+.1*t,y:n*t+.1*t,rx:.5*t,ry:.5*t,fill:i},`cell-${o}-${n}`):/*#__PURE__*/e(l.Fragment,{},`circle-${o}-${n}`)))))}),f=({cellSize:t,matrixSize:l,element:i,sizePercentage:n,bgColor:c})=>{if(!i)/*#__PURE__*/return e(o,{});let a=l*(n||.14),g=Math.floor(l/2-a/2),h=Math.floor(l/2+a/2);(h-g)%2!=l%2&&(h+=1);let m=(h-g)*t,d=m-.2*m,s=g*t;/*#__PURE__*/return r(o,{children:[/*#__PURE__*/e("rect",{x:g*t,y:g*t,width:m,height:m,fill:c}),/*#__PURE__*/e(i,{x:s+.1*m,y:s+.1*m,height:d,width:d})]})},u=o=>{let t=o.outputSize,l=m(o.url,o.errorCorrectionLevel),i=t/l.length,n=c(2*i,{min:.025*t,max:.036*t});/*#__PURE__*/return r("svg",{height:o.outputSize,width:o.outputSize,viewBox:`0 0 ${o.outputSize} ${o.outputSize}`,style:{height:"100%",width:"100%",padding:`${n}px`},children:[/*#__PURE__*/e(p,{matrix:l,cellSize:i,color:o.fgColor}),/*#__PURE__*/e(s,{cellSize:i,matrixSize:l.length,fgColor:o.fgColor,bgColor:o.bgColor}),/*#__PURE__*/e(f,{cellSize:i,element:o.logo?.element,bgColor:o.bgColor,matrixSize:l.length})]})},C=/*#__PURE__*/i.div.attrs({className:"ph-no-capture"}).withConfig({displayName:"QrContainer",componentId:"sc-597e27f3-0"})(["display:flex;justify-content:center;align-items:center;height:",";width:",";margin:auto;background-color:",";&&{border-width:2px;border-color:",";border-radius:var(--privy-border-radius-md);}"],(e=>`${e.$size}px`),(e=>`${e.$size}px`),(e=>e.$bgColor),(e=>e.$borderColor));const x=r=>{let{appearance:o}=n(),t=r.bgColor||"#FFFFFF",l=r.fgColor||"#000000",i=r.size||160,c="dark"===o.palette.colorScheme?t:l;/*#__PURE__*/return e(C,{$size:i,$bgColor:t,$fgColor:l,$borderColor:c,children:/*#__PURE__*/e(u,{url:r.url,logo:{element:r.squareLogoElement??g},outputSize:i,bgColor:t,fgColor:l,errorCorrectionLevel:r.errorCorrectionLevel||"Q"})})};export{x as Q};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsxs as e,Fragment as t,jsx as r}from"react/jsx-runtime";import{useState as o,useEffect as a,useCallback as i}from"react";import{P as c}from"./Button-OlK_6fKk.mjs";import{M as s,B as l}from"./ModalHeader-CxHK1IKF.mjs";import{C as n}from"./ScreenHeader-Biz1wq02.mjs";import{q as d}from"./context-B4VZqX5H.mjs";import{v as p,w as u,x as m,R as h,o as v}from"./index-CCrVHfyv.mjs";import{a as w,f as y,b as f,u as _}from"./internal-context-DLZicboG.mjs";import{a as A,u as E,g}from"./get-is-unified-wallet-DXko-EzF.mjs";import{a8 as C,a9 as b,aa as R}from"./paths-3HW55qZg.mjs";import{g as k}from"./useWallets-DuxHKVvE.mjs";import{a as T}from"./events-context-CI0iqAXA.mjs";import{u as O}from"./use-create-wallet-without-fallback-COqi_EHH.mjs";import{A as N,G as S,R as I}from"./styles-BxA7nKxI.mjs";import"styled-components";import"./useActiveWallet-Bj-s666H.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-CndHQFiM.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"viem";import"viem/utils";import"./getPublicClient-C_l_ocJu.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"tinycolor2";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"@scure/base";import"./usePrivy-BSIhOAz8.mjs";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"ofetch";import"js-cookie";import"./frame-BMn1PaPp.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-J1po7l19.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";async function j({url:e,popup:t,provider:r}){return t.location=e,new Promise(((e,r)=>{function o(){t?.close(),window.removeEventListener("message",a)}function a(t){t.data&&("PRIVY_OAUTH_RESPONSE"===t.data.type&&t.data.stateCode&&t.data.authorizationCode&&(e(t.data),o()),"https://cdn.apple-cloudkit.com"===t.origin&&t.data.ckSession&&(e({type:"PRIVY_OAUTH_RESPONSE",ckWebAuthToken:t.data.ckSession}),o()),"PRIVY_OAUTH_ERROR"===t.data.type&&(r(t.data.error),o()))}window.addEventListener("message",a)}))}async function x({api:e,provider:t,stateCode:r,codeVerifier:o,authorizationCode:a}){if(!a||!r)throw new w("[OAuth AuthFlow] Authorization and state codes code must be set prior to calling authenicate.");if("undefined"===a)throw new w("User denied confirmation during OAuth flow");try{return(await e.post(C,{authorization_code:a,state_code:r,code_verifier:o,provider:t})).access_token}catch(e){let t=y(e);if(t.privyErrorCode)throw new w(t.message||"Invalid code during OAuth flow.",void 0,t.privyErrorCode);if("User denied confirmation during OAuth flow"===t.message)throw new w("Invalid code during oauth flow.",void 0,f.OAUTH_USER_DENIED);throw new w("Invalid code during OAuth flow.",void 0,f.UNKNOWN_AUTH_ERROR)}}async function M({api:e,provider:t}){let r=p(),o=u(),a=await m(r);try{return"icloud"===t?{url:(await e.post(b,{client_type:"web"})).url}:{url:(await e.post(R,{redirect_to:window.location.href,code_challenge:a,state_code:o})).url,codeVerifier:r,stateCode:o,provider:t}}catch(e){throw y(e)}}let U={"google-drive":{name:"Google Drive",component:S},icloud:{name:"iCloud",component:N}};const W={component:()=>{let{logout:p}=E(),{navigate:u,setModalData:m,data:y}=A(),{closePrivyModal:C,createAnalyticsEvent:b}=_(),{execute:R}=(()=>{let{client:e,walletProxy:t,refreshSessionAndUser:r}=_(),{data:o}=A(),{user:a}=E(),i=T(),{create:c}=O();return{execute:async({provider:s,action:l,popup:n,shouldCreateEth:d,shouldCreateSol:p})=>{let u,m;if(!e)throw new w("Missing client");function h(t){if(!t&&e)throw e.createAnalyticsEvent({eventName:"recovery_oauth_error",payload:{error:"Unable to open recovery OAuth popup",provider:s}}),new w("Recovery OAuth failed")}switch(s){case"google-drive":{let t,r,{url:o,codeVerifier:a,stateCode:i}=await M({api:e.api,provider:s});h(o);try{let a=await j({url:o,popup:n,provider:s});if(t=a.stateCode,r=a.authorizationCode,t!==i)throw e.createAnalyticsEvent({eventName:"possible_phishing_attempt",payload:{provider:s,storedStateCode:i??"",returnedStateCode:t??""}}),new w("Unexpected auth flow. This may be a phishing attempt.",void 0,f.OAUTH_UNEXPECTED)}catch(t){throw e.createAnalyticsEvent({eventName:"recovery_oauth_error",payload:{error:t.toString(),provider:s}}),new w("Recovery OAuth failed")}[u,m]=await Promise.all([e.getAccessToken(),x({api:e.api,provider:s,codeVerifier:a,stateCode:t,authorizationCode:r})]);break}case"icloud":{let{url:t}=await M({api:e.api,provider:s});h(t);let{ckWebAuthToken:r}=await j({url:t,popup:n,provider:s});m=r,u=await e.getAccessToken()}}if(!t)throw new w("Cannot connect to wallet proxy");if(!u)throw new w("Unable to authorize user");switch(l){case"recover":{let r=o?.recoverWallet?.entropyId,a=o?.recoverWallet?.entropyIdVerifier;if(!r||!a)throw new w("Recovery OAuth failed");e.createAnalyticsEvent({eventName:"embedded_wallet_recovery_started",payload:{walletAddress:r,recoveryMethod:s}}),await t.recover({accessToken:u,entropyId:r,entropyIdVerifier:a,recoveryAccessToken:m}),e.createAnalyticsEvent({eventName:"embedded_wallet_recovery_completed",payload:{walletAddress:r,recoveryMethod:s}});break}case"create-wallet":{let t;if(e.createAnalyticsEvent({eventName:"embedded_wallet_creation_started"}),d&&p)t=await c({recoveryMethod:s,recoveryAccessToken:m,chainType:"ethereum",walletIndex:0,latestUser:a}),t=await c({chainType:"solana",walletIndex:0,latestUser:t.user});else if(p)t=await c({recoveryMethod:s,recoveryAccessToken:m,chainType:"solana",walletIndex:0,latestUser:a});else{if(!d)throw Error("Invalid args to create wallet");t=await c({recoveryMethod:s,recoveryAccessToken:m,chainType:"ethereum",walletIndex:0,latestUser:a})}if(!t)throw i("createWallet","onError",f.UNKNOWN_EMBEDDED_WALLET_ERROR),Error("Failed to create wallet");e.createAnalyticsEvent({eventName:"embedded_wallet_creation_completed",payload:{walletAddress:t.account.address}}),i("createWallet","onSuccess",{wallet:t.account});break}case"set-recovery":{let o=g(a);if(!o)throw i("setWalletRecovery","onError",f.EMBEDDED_WALLET_NOT_FOUND),Error("Embedded wallet not found");e.createAnalyticsEvent({eventName:"embedded_wallet_set_recovery_started",payload:{walletAddress:o.address,existingRecoveryMethod:o.recoveryMethod,targetRecoveryMethod:s}});let{entropyId:c,entropyIdVerifier:l}=k(a);await t.setRecovery({accessToken:u,entropyId:c,entropyIdVerifier:l,recoveryMethod:s,recoveryAccessToken:m});let n=g(await r());if(!n)throw i("createWallet","onError",f.UNKNOWN_EMBEDDED_WALLET_ERROR),Error("Failed to set recovery on wallet");e.createAnalyticsEvent({eventName:"embedded_wallet_set_recovery_completed",payload:{walletAddress:o.address,existingRecoveryMethod:o.recoveryMethod,targetRecoveryMethod:s}}),i("setWalletRecovery","onSuccess",{method:s,wallet:n});break}default:throw new w("Unsupported recovery action")}}}})(),[N,S]=o(!1),{provider:W,action:D,isInAccountCreateFlow:P,shouldCreateEth:V,shouldCreateSol:L}=y?.recoveryOAuthStatus,[z,H]=o(void 0),[$,B]=o("create-wallet"===D);if("user-passcode"===W)throw Error("RecoveryOAuthScreen should never be called with a wallet that specifies recoveryMethod: `user-passcode`");let F=U[W].name,G=U[W].component,K=y?.recoverWallet?.onCompleteNavigateTo,Y=new h((async(e="create-wallet")=>(B(!0),new Promise(((t,r)=>{setTimeout((async()=>{try{let r=window.open();await R({provider:W,action:e,popup:r,shouldCreateEth:V,shouldCreateSol:L}),S(!0),t()}catch(t){H({message:`${"recover"===e?"Recovery":"Back up"} with ${F} unsuccessful`,detail:"recover"===D?`Please verify that you are selecting the ${F} account associated with your backup.`:"",retryable:!0}),r()}}),0)})))));a((()=>{"recover"!==D&&Y.execute(P?"create-wallet":"set-recovery")}),[]),a((()=>{if(!N)return;let e=setTimeout((()=>{P?(m({createWallet:{onSuccess:()=>{},onFailure:e=>{b({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"RecoveryOAuthScreen"}}),p()},callAuthOnSuccessOnClose:!0,shouldCreateEth:!1,shouldCreateSol:!1}}),u("EmbeddedWalletCreatedScreen")):C({shouldCallAuthOnSuccess:!1})}),d);return()=>clearTimeout(e)}),[N]);let X=i((async()=>{await Y.execute("recover"),K?u(K):S(!0)}),[]),q="google-drive"===W?"Google Drive":"Apple iCloud",Q=N&&`Successfully ${"recover"===D?"recovered":"backed up"} with ${q}.`||z&&z.message||`${"recover"===D?"Recovering":"Backing up"} with ${q}...`,J=z?z.detail:"";/*#__PURE__*/return e(t,{children:[/*#__PURE__*/r(s,{}),$?/*#__PURE__*/r(t,{children:/*#__PURE__*/e(I,{children:[/*#__PURE__*/r(n,{title:Q,icon:/*#__PURE__*/r(G,{style:{width:"38px",height:"38px"}}),description:J}),z&&z?.retryable?/*#__PURE__*/r(c,{onClick:()=>{v(),H(void 0),"create-wallet"===D?Y.execute("create-wallet"):X()},disabled:!N&&!z?.retryable,children:"Try again"}):null]})}):/*#__PURE__*/e(I,{children:[/*#__PURE__*/r(n,{title:"Confirm it's really you",icon:/*#__PURE__*/r(G,{style:{height:42,width:48}}),description:`To confirm your identity, please log in to ${q} where your account is backed up.`}),/*#__PURE__*/e(c,{onClick:X,children:["Confirm with ",q]})]}),/*#__PURE__*/r(l,{})]})}};export{W as RecoveryOAuthScreen,W as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{useState as t,useEffect as o}from"react";import{u as r}from"./context-B4VZqX5H.mjs";import{R as i}from"./index-CCrVHfyv.mjs";import{u as s,l as a}from"./internal-context-DLZicboG.mjs";import{u as n}from"./use-create-wallet-without-fallback-COqi_EHH.mjs";import{a as c,u as l}from"./get-is-unified-wallet-DXko-EzF.mjs";import{S as m,g as p}from"./SetWalletPasswordForm-DUTEhc4R.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-Bj-s666H.mjs";import"zustand";import"styled-components";import"react-device-detect";import"./prepareFundingModalData-CndHQFiM.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-C_l_ocJu.mjs";import"./useWallets-DuxHKVvE.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"@scure/base";import"./usePrivy-BSIhOAz8.mjs";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"ofetch";import"js-cookie";import"./frame-BMn1PaPp.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-J1po7l19.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"./Layouts-Bmf8DxNP.mjs";import"./ModalHeader-CxHK1IKF.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"./shared-BMOp6N9y.mjs";import"@heroicons/react/24/outline/ArrowPathIcon";import"@heroicons/react/24/outline/EyeIcon";import"@heroicons/react/24/outline/EyeSlashIcon";import"./Button-OlK_6fKk.mjs";import"./Checkbox-NmGCZeKL.mjs";import"@heroicons/react/24/outline/KeyIcon";import"@heroicons/react/24/solid/CheckCircleIcon";import"fast-password-entropy";import"secure-password-utilities";import"secure-password-utilities/wordlists";import"@heroicons/react/24/outline/ArrowDownTrayIcon";import"@heroicons/react/24/outline/ClipboardDocumentCheckIcon";import"@heroicons/react/24/outline/DocumentDuplicateIcon";import"@heroicons/react/24/solid/XCircleIcon";import"./ScreenHeader-Biz1wq02.mjs";const u={component:()=>{let{navigate:u,data:d,onUserCloseViaDialogOrKeybindRef:h}=c(),w=r(),[y,v]=t(""),[f,j]=t(!1),[g,C]=t(),[I,b]=t(null),{create:S}=n(),{authenticated:x,user:P}=l(),{closePrivyModal:A,isNewUserThisSession:k,initializeWalletProxy:M}=s(),{onSuccess:U,onFailure:E,callAuthOnSuccessOnClose:T,shouldCreateEth:O,shouldCreateSol:W}=d.createWallet,[D,L]=t(null),R=new i((async()=>{try{let e;if(O&&W)e=await S({recoveryMethod:"user-passcode",recoveryPassword:g,chainType:"ethereum",walletIndex:0,latestUser:P}),e=await S({chainType:"solana",walletIndex:0,latestUser:e.user});else if(W)e=await S({recoveryMethod:"user-passcode",recoveryPassword:g,chainType:"solana",walletIndex:0,latestUser:P});else{if(!O)throw Error("Invalid args to create wallet");e=await S({recoveryMethod:"user-passcode",recoveryPassword:g,chainType:"ethereum",walletIndex:0,latestUser:P})}L(e),k?u("EmbeddedWalletCreatedScreen"):(U(e),A({shouldCallAuthOnSuccess:T}))}catch(e){v(e.message)}}));o((()=>{I||M(3e4).then((e=>b(e)))}),[I]),o((()=>{if(!x||!P)return u("LandingScreen"),void E(Error("User must be authenticated before creating a Privy wallet"))}),[x]),h.current=()=>null;/*#__PURE__*/return e(m,{config:{initiatedBy:"automatic"},appName:w?.name||"privy",loading:!I,buttonLoading:f,buttonHideAnimations:!D&&f,isResettingPassword:!1,error:y,password:g||"",onClose:()=>{D&&"user-passcode"!==D.account.recoveryMethod?(E(new a("User created a wallet but failed to set a password for it")),A({shouldCallAuthOnSuccess:!1})):D?(U(D),A({shouldCallAuthOnSuccess:T})):(E(new a("User wallet creation failed")),A({shouldCallAuthOnSuccess:!1}))},onPasswordChange:C,onPasswordGenerate:()=>C(p()),onSubmit:async()=>(j(!0),R.execute().then((()=>new Promise((e=>setTimeout(e,250))))).finally((()=>j(!1))))})}};export{u as EmbeddedWalletPasswordCreateScreen,u as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsxs as e,jsx as o,Fragment as r}from"react/jsx-runtime";import t from"@heroicons/react/24/outline/LockClosedIcon";import i from"@heroicons/react/24/outline/PencilSquareIcon";import s from"@heroicons/react/24/outline/QuestionMarkCircleIcon";import{useState as c}from"react";import{styled as n}from"styled-components";import{a,u as l,g as p}from"./get-is-unified-wallet-DXko-EzF.mjs";import{P as d}from"./Button-OlK_6fKk.mjs";import{M as m,B as u}from"./ModalHeader-CxHK1IKF.mjs";import{C as h}from"./ScreenHeader-Biz1wq02.mjs";import{u as y}from"./context-B4VZqX5H.mjs";import{u as v}from"./internal-context-DLZicboG.mjs";import{y as g}from"./index-CCrVHfyv.mjs";import{R as f,A as w,G as C,a as j}from"./styles-BxA7nKxI.mjs";import{U as k}from"./useActiveWallet-Bj-s666H.mjs";import"viem";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/XMarkIcon";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"uuid";import"jose";import"eventemitter3";import"./useWallets-DuxHKVvE.mjs";import"./prepareFundingModalData-CndHQFiM.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"react-device-detect";import"viem/utils";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"@scure/base";import"./usePrivy-BSIhOAz8.mjs";import"./events-context-CI0iqAXA.mjs";import"zustand";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./getPublicClient-C_l_ocJu.mjs";import"js-cookie";import"./frame-BMn1PaPp.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-J1po7l19.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";let S=/*#__PURE__*/n.div.withConfig({displayName:"IconContainer",componentId:"sc-1c4e63fb-0"})(["width:24px;height:24px;display:flex;justify-content:center;align-items:center;"]),A={"google-drive":"Google Drive",icloud:"iCloud","user-passcode":"password",privy:"Privy","privy-v2":"Privy"},b=({onClose:t})=>/*#__PURE__*/e(j,{children:[/*#__PURE__*/o(h,{title:"Why do I need to secure my account?",icon:/*#__PURE__*/o(s,{width:48}),description:/*#__PURE__*/e(r,{children:[/*#__PURE__*/o("p",{children:"Your app uses cryptography to secure your account. App secrets are split and encrypted so only you can access them."}),/*#__PURE__*/o("p",{children:"To use this app on new devices, secure account secrets using a password, your Google or your Apple account. It’s important you don’t lose access to the method you choose."})]})}),/*#__PURE__*/o(d,{onClick:t,children:"Select backup method"})]});const I={component:()=>{let[s,n]=c(!1),{navigate:d,lastScreen:j,navigateBack:I,setModalData:x,data:M,onUserCloseViaDialogOrKeybindRef:P}=a(),{user:O}=l(),{embeddedWallets:W}=y(),{closePrivyModal:R}=v(),F=p(O),B=null===F,{isInAccountCreateFlow:D,isResettingPassword:E,shouldCreateEth:G,shouldCreateSol:U}=M.recoverySelection,H=F&&"privy"!==F.recoveryMethod,L=H?/*#__PURE__*/e("span",{children:["Your account is currently secured using"," ",/*#__PURE__*/o("strong",{children:A[F?.recoveryMethod||"user-passcode"]}),"."]}):"Select a method for logging in on new devices and recovering your account.";function Y(e){x({recoveryOAuthStatus:{provider:e,action:B?"create-wallet":"set-recovery",isInAccountCreateFlow:D,shouldCreateEth:G,shouldCreateSol:U}}),d("RecoveryOAuthScreen")}function q(){M?.setWalletPassword?.onFailure(Error("User exited set recovery flow")),R({shouldCallAuthOnSuccess:M?.setWalletPassword?.callAuthOnSuccessOnClose??!1})}return P.current=q,/*#__PURE__*/e(r,{children:[/*#__PURE__*/o(m,{onClose:q,backFn:s?()=>n(!1):j?I:void 0,infoFn:j||s?void 0:()=>n(!0)},"header"),s?/*#__PURE__*/o(b,{onClose:()=>n(!1)}):/*#__PURE__*/e(r,{children:[/*#__PURE__*/o(h,{title:H?"Update backup method":"Secure your account",icon:/*#__PURE__*/o(t,{width:48}),description:L}),/*#__PURE__*/o(f,{children:W.userOwnedRecoveryOptions.filter((e=>!["icloud","google-drive"].includes(F?.recoveryMethod||"")||e!==F?.recoveryMethod)).sort().map((r=>{switch(r){case"google-drive":/*#__PURE__*/return e(k,{onClick:()=>Y("google-drive"),children:[/*#__PURE__*/o(S,{children:/*#__PURE__*/o(C,{style:{width:18}})}),"Back up to Google Drive"]},r);case"icloud":/*#__PURE__*/return e(k,{onClick:()=>Y("icloud"),children:[/*#__PURE__*/o(S,{children:/*#__PURE__*/o(w,{style:{width:24}})}),"Back up to Apple iCloud"]},r);case"user-passcode":/*#__PURE__*/return e(k,{onClick:()=>{d(g({isCreatingWallet:B,skipSplashScreen:!0}))},children:[/*#__PURE__*/o(S,{children:/*#__PURE__*/o(i,{style:{width:18}})}),E?"Reset your":"Set a"," password"]},r);default:return null}}))})]}),/*#__PURE__*/o(u,{})]})}};export{I as RecoverySelectionScreen,I as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as e,jsxs as r}from"react/jsx-runtime";import i from"react";import{styled as o}from"styled-components";import{a4 as n}from"./useActiveWallet-
|
|
1
|
+
import{jsx as e,jsxs as r}from"react/jsx-runtime";import i from"react";import{styled as o}from"styled-components";import{a4 as n}from"./useActiveWallet-Bj-s666H.mjs";import{M as a,B as t}from"./ModalHeader-CxHK1IKF.mjs";import{N as c}from"./index-CJMgUOnw.mjs";const l=/*#__PURE__*/o.div.withConfig({displayName:"ScreenRoot",componentId:"sc-2e815abe-0"})(["--screen-space:16px;--screen-space-lg:calc(var(--screen-space) * 1.5);position:relative;overflow:hidden;margin:0 calc(-1 * var(--screen-space));height:100%;border-radius:var(--privy-border-radius-lg);"]),d=/*#__PURE__*/o.div.withConfig({displayName:"ScreenRootInner",componentId:"sc-2e815abe-1"})(["display:flex;flex-direction:column;gap:calc(var(--screen-space) * 1.5);width:100%;background:var(--privy-color-background);padding:0 var(--screen-space-lg) var(--screen-space);height:100%;border-radius:var(--privy-border-radius-lg);"]),s=/*#__PURE__*/o.div.withConfig({displayName:"HeaderContainer",componentId:"sc-2e815abe-2"})(["position:relative;display:flex;flex-direction:column;"]),p=/*#__PURE__*/o(a).withConfig({displayName:"StyledModalHeader",componentId:"sc-2e815abe-3"})(["margin:0 -8px;"]),g=/*#__PURE__*/o.div.withConfig({displayName:"BodyContainer",componentId:"sc-2e815abe-4"})(["flex:1 1 auto;display:flex;flex-direction:column;overflow-y:auto;padding:3px;margin:-3px;&::-webkit-scrollbar{display:none;}scrollbar-gutter:stable both-edges;scrollbar-width:none;-ms-overflow-style:none;"," background-repeat:no-repeat;background-size:100% 32px,100% 16px;background-attachment:local,scroll;"],(({$colorScheme:e})=>"light"===e?"background: linear-gradient(var(--privy-color-background), var(--privy-color-background) 70%) bottom, linear-gradient(rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0.06)) bottom;":"dark"===e?"background: linear-gradient(var(--privy-color-background), var(--privy-color-background) 70%) bottom, linear-gradient(rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, 0.06)) bottom;":void 0)),h=/*#__PURE__*/o.div.withConfig({displayName:"FooterContainer",componentId:"sc-2e815abe-5"})(["display:flex;flex-direction:column;gap:var(--screen-space-lg);"]);let m=/*#__PURE__*/o.div.withConfig({displayName:"CenteredHeader",componentId:"sc-2e815abe-6"})(["text-align:center;display:flex;flex-direction:column;align-items:center;gap:var(--screen-space);"]),v=/*#__PURE__*/o.div.withConfig({displayName:"TitleContainer",componentId:"sc-2e815abe-7"})(["display:flex;flex-direction:column;gap:4px;"]),u=/*#__PURE__*/o.h3.withConfig({displayName:"HeaderTitle",componentId:"sc-2e815abe-8"})(["&&{font-size:20px;line-height:32px;font-weight:500;color:var(--privy-color-foreground);margin:0;}"]),f=/*#__PURE__*/o.p.withConfig({displayName:"HeaderSubtitle",componentId:"sc-2e815abe-9"})(["&&{margin:0;font-size:16px;font-weight:300;line-height:24px;color:var(--privy-color-foreground);}"]),y=/*#__PURE__*/o.div.withConfig({displayName:"IconContainer",componentId:"sc-2e815abe-10"})(["background:",";border-radius:50%;width:64px;height:64px;display:flex;align-items:center;justify-content:center;"],(({$variant:e})=>{switch(e){case"success":return"var(--privy-color-success-bg, #EAFCEF)";case"warning":return"var(--privy-color-warn, #FEF3C7)";case"error":return"var(--privy-color-error-bg, #FEE2E2)";case"loading":case"logo":return"transparent";default:return"var(--privy-color-background-2)"}})),b=/*#__PURE__*/o.div.withConfig({displayName:"LogoContainer",componentId:"sc-2e815abe-11"})(["display:flex;align-items:center;justify-content:center;margin-bottom:var(--screen-space);img,svg{max-height:90px;max-width:180px;}"]),x=/*#__PURE__*/o.div.withConfig({displayName:"LoadingWithIconContainer",componentId:"sc-2e815abe-12"})(["display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;height:82px;> div{position:relative;}> div > :first-child{position:relative;}> div > :last-child{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);}"]);const w=({children:r,...i})=>/*#__PURE__*/e(l,{children:/*#__PURE__*/e(d,{...i,children:r})});let C=/*#__PURE__*/o.div.withConfig({displayName:"ProgressBarContainer",componentId:"sc-2e815abe-13"})(["position:absolute;top:0;left:calc(-1 * var(--screen-space-lg));width:calc(100% + calc(var(--screen-space-lg) * 2));height:4px;background:var(--privy-color-background-2);border-top-left-radius:inherit;border-top-right-radius:inherit;overflow:hidden;"]),k=/*#__PURE__*/o(t).withConfig({displayName:"StyledBlobbyFooter",componentId:"sc-2e815abe-14"})(["padding:0;&& a{padding:0;color:var(--privy-color-foreground-3);}"]),I=/*#__PURE__*/o.div.withConfig({displayName:"ProgressBarFill",componentId:"sc-2e815abe-15"})(["height:100%;width:","%;background:var(--privy-color-foreground-3);border-radius:2px;transition:width 300ms ease-in-out;"],(({pct:e})=>e)),N=({step:r})=>r?/*#__PURE__*/e(C,{children:/*#__PURE__*/e(I,{pct:Math.min(100,r.current/r.total*100)})}):null;w.Header=({title:i,subtitle:o,icon:n,iconVariant:a,iconLoadingStatus:t,showBack:c,onBack:l,showInfo:d,onInfo:g,showClose:h,onClose:y,step:b,...x})=>/*#__PURE__*/r(s,{...x,children:[/*#__PURE__*/e(p,{backFn:c?l:void 0,infoFn:d?g:void 0,onClose:h?y:void 0,closeable:h}),(n||a||i||o)&&/*#__PURE__*/r(m,{children:[n||a?/*#__PURE__*/e(w.Icon,{icon:n,variant:a,loadingStatus:t}):null,/*#__PURE__*/r(v,{children:[i&&/*#__PURE__*/e(u,{children:i}),o&&/*#__PURE__*/e(f,{children:o})]})]}),b&&/*#__PURE__*/e(N,{step:b})]}),(w.Body=/*#__PURE__*/i.forwardRef((({children:r,...i},o)=>/*#__PURE__*/e(g,{ref:o,...i,children:r})))).displayName="Screen.Body",w.Footer=({children:r,...i})=>/*#__PURE__*/e(h,{id:"privy-content-footer-container",...i,children:r}),w.Actions=({children:r,...i})=>/*#__PURE__*/e(E,{...i,children:r}),w.HelpText=({children:r,...i})=>/*#__PURE__*/e(S,{...i,children:r}),w.Watermark=()=>/*#__PURE__*/e(k,{}),w.Icon=({icon:o,variant:a="subtle",loadingStatus:t})=>"logo"===a&&o?/*#__PURE__*/e(b,"string"==typeof o?{children:/*#__PURE__*/e("img",{src:o,alt:""})}:/*#__PURE__*/i.isValidElement(o)?{children:o}:{children:/*#__PURE__*/i.createElement(o)}):"loading"===a?o?
|
|
2
2
|
/*#__PURE__*/e(x,{children:/*#__PURE__*/r("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:[/*#__PURE__*/e(n,{success:t?.success,fail:t?.fail}),"string"==typeof o?
|
|
3
3
|
/*#__PURE__*/e("span",{style:{background:`url('${o}') 0 0 / contain`,height:"38px",width:"38px",borderRadius:"6px",margin:"auto",backgroundSize:"contain"}}):/*#__PURE__*/i.isValidElement(o)?
|
|
4
4
|
/*#__PURE__*/i.cloneElement(o,{style:{width:"38px",height:"38px"}}):
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as r,Fragment as e,jsx as l}from"react/jsx-runtime";import{B as t}from"./Button-
|
|
1
|
+
import{jsxs as r,Fragment as e,jsx as l}from"react/jsx-runtime";import{B as t}from"./Button-OlK_6fKk.mjs";import{S as a}from"./Screen-Dzz_AFFs.mjs";const n=({primaryCta:n,secondaryCta:i,helpText:s,watermark:c=!0,children:d,...m})=>{let o=n||i?/*#__PURE__*/r(e,{children:[n&&(()=>{let{label:r,...e}=n,a=e.variant||"primary";/*#__PURE__*/return l(t,{...e,variant:a,style:{width:"100%",...e.style},children:r})})(),i&&(()=>{let{label:r,...e}=i,a=e.variant||"secondary";/*#__PURE__*/return l(t,{...e,variant:a,style:{width:"100%",...e.style},children:r})})()]}):null;/*#__PURE__*/return r(a,{id:m.id,className:m.className,children:[/*#__PURE__*/l(a.Header,{...m}),d?/*#__PURE__*/l(a.Body,{children:d}):null,s||o||c?/*#__PURE__*/r(a.Footer,{children:[s?/*#__PURE__*/l(a.HelpText,{children:s}):null,o?/*#__PURE__*/l(a.Actions,{children:o}):null,c?/*#__PURE__*/l(a.Watermark,{}):null]}):null]})};export{n as S};
|
package/dist/esm/{SetAutomaticRecoveryScreen-Db5Xg_sQ.mjs → SetAutomaticRecoveryScreen-g1kDOe61.mjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,Fragment as r,jsx as o}from"react/jsx-runtime";import t from"@heroicons/react/24/outline/ExclamationTriangleIcon";import i from"@heroicons/react/24/outline/LockClosedIcon";import{useState as n}from"react";import{u as l,a,h as s}from"./get-is-unified-wallet-
|
|
1
|
+
import{jsxs as e,Fragment as r,jsx as o}from"react/jsx-runtime";import t from"@heroicons/react/24/outline/ExclamationTriangleIcon";import i from"@heroicons/react/24/outline/LockClosedIcon";import{useState as n}from"react";import{u as l,a,h as s}from"./get-is-unified-wallet-DXko-EzF.mjs";import{a as c}from"./Button-OlK_6fKk.mjs";import{M as m,B as d}from"./ModalHeader-CxHK1IKF.mjs";import{styled as p}from"styled-components";import{S as u}from"./Subtitle-DkvfP2Ev.mjs";import{T as y}from"./Title-D0pfZff-.mjs";import{q as h}from"./context-B4VZqX5H.mjs";import{u as f}from"./internal-context-DLZicboG.mjs";import{Y as v}from"./useActiveWallet-Bj-s666H.mjs";import"viem";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"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"zustand";import"react-device-detect";import"./prepareFundingModalData-CndHQFiM.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-C_l_ocJu.mjs";import"./useWallets-DuxHKVvE.mjs";const g=/*#__PURE__*/p.div.withConfig({displayName:"WithCircleBorder",componentId:"sc-e4fc5563-0"})(["&&{border-width:4px;}display:flex;justify-content:center;align-items:center;padding:1rem;aspect-ratio:1;border-style:solid;border-color:",";border-radius:50%;"],(e=>e.$color??"var(--privy-color-accent)")),w={component:()=>{let{user:p}=l(),{client:w,walletProxy:j,refreshSessionAndUser:I,closePrivyModal:b}=f(),x=a(),{entropyId:C,entropyIdVerifier:T}=x.data?.recoverWallet,[k,M]=n(!1),[S,W]=n(null),[A,P]=n(null);function U(){if(!k){if(A)return x.data?.setWalletPassword?.onFailure(A),void b();if(!S)return x.data?.setWalletPassword?.onFailure(Error("User exited set recovery flow")),void b()}}x.onUserCloseViaDialogOrKeybindRef.current=U;let E=!(!k&&!S);/*#__PURE__*/return e(r,A?{children:[/*#__PURE__*/o(m,{onClose:U},"header"),/*#__PURE__*/o(g,{$color:"var(--privy-color-error)",style:{alignSelf:"center"},children:/*#__PURE__*/o(t,{height:38,width:38,stroke:"var(--privy-color-error)"})}),/*#__PURE__*/o(y,{style:{marginTop:"0.5rem"},children:"Something went wrong"}),/*#__PURE__*/o(v,{style:{minHeight:"2rem"}}),/*#__PURE__*/o(c,{onClick:()=>P(null),children:"Try again"}),/*#__PURE__*/o(d,{})]}:{children:[/*#__PURE__*/o(m,{onClose:U},"header"),/*#__PURE__*/o(i,{style:{width:"3rem",height:"3rem",alignSelf:"center"}}),/*#__PURE__*/o(y,{style:{marginTop:"0.5rem"},children:"Automatically secure your account"}),/*#__PURE__*/o(u,{style:{marginTop:"1rem"},children:"When you log into a new device, you’ll only need to authenticate to access your account. Never get logged out if you forget your password."}),/*#__PURE__*/o(v,{style:{minHeight:"2rem"}}),/*#__PURE__*/o(c,{loading:k,disabled:E,onClick:()=>async function(){M(!0);try{let e=await w.getAccessToken(),r=s(p,C);if(!e||!j||!r)return;if(!(await j.setRecovery({accessToken:e,entropyId:C,entropyIdVerifier:T,existingRecoveryMethod:r.recoveryMethod,recoveryMethod:"privy"})).entropyId)throw Error("Unable to set recovery on wallet");let o=await I();if(!o)throw Error("Unable to set recovery on wallet");let t=s(o,r.address);if(!t)throw Error("Unabled to set recovery on wallet");W(!!o),setTimeout((()=>{x.data?.setWalletPassword?.onSuccess(t),b()}),h)}catch(e){P(e)}finally{M(!1)}}(),children:S?"Success":"Confirm"}),/*#__PURE__*/o(d,{})]})}};export{w as SetAutomaticRecoveryScreen,w as default};
|