@privy-io/react-auth 3.13.1 → 3.14.0-snapshot-20260210202919
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-iNQ-eJ82.js → AccountNotFoundScreen-DNUMjwCF.js} +1 -1
- package/dist/cjs/{Address-BAzd87pQ.js → Address-B-WU8e3D.js} +1 -1
- package/dist/cjs/{AffirmativeConsentScreen-Ba1XAxqh.js → AffirmativeConsentScreen-B8lK52OI.js} +1 -1
- package/dist/cjs/{AllowlistRejectionScreen-CMZahkkw.js → AllowlistRejectionScreen-AsvVSyDR.js} +1 -1
- package/dist/cjs/AuthenticateWithWalletScreen-CqGImE25.js +1 -0
- package/dist/cjs/{AwaitingEvmToSolBridgingScreen-BWaBsau9.js → AwaitingEvmToSolBridgingScreen-Dsadt2Fv.js} +1 -1
- package/dist/cjs/{AwaitingExternalEthereumTransferScreen-DN7h9ETe.js → AwaitingExternalEthereumTransferScreen-BppL--7R.js} +1 -1
- package/dist/cjs/{AwaitingPasswordlessCodeScreen-D2KbYvKF.js → AwaitingPasswordlessCodeScreen-CJlNgLf2.js} +1 -1
- package/dist/cjs/{AwaitingSolToEvmBridgingScreen-C06q4jjQ.js → AwaitingSolToEvmBridgingScreen-CuUOuMHh.js} +2 -2
- package/dist/cjs/{BridgeNetworkSelectionView-BBifxbuQ.js → BridgeNetworkSelectionView-eDn7j1Dc.js} +6 -6
- package/dist/cjs/{CaptchaScreen-Bj5yik5Q.js → CaptchaScreen-CdrpNbYC.js} +1 -1
- package/dist/cjs/{CoinbaseOnrampStatusScreen-CP5PYZBV.js → CoinbaseOnrampStatusScreen-Cf5cbx9G.js} +1 -1
- package/dist/cjs/{ConnectEmailForm-DSB_ECav.js → ConnectEmailForm-7YVNWl4y.js} +1 -1
- package/dist/cjs/{ConnectLedgerScreen-BazfRtiX.js → ConnectLedgerScreen-BHkUM6T3.js} +1 -1
- package/dist/cjs/ConnectOnlyLandingScreen-DBKDoCfI.js +1 -0
- package/dist/cjs/{ConnectOnlyStatusScreen-5aAg7ONz.js → ConnectOnlyStatusScreen-BLvvvYgL.js} +1 -1
- package/dist/cjs/ConnectOrCreateScreen-DGsOVOri.js +1 -0
- package/dist/cjs/{ConnectPhoneForm-lBXP5nI1.js → ConnectPhoneForm-BmVjUjmG.js} +1 -1
- package/dist/cjs/ConnectWalletView-Cb01591v.js +169 -0
- package/dist/cjs/{ConnectionStatusScreen-BL6n6Ct-.js → ConnectionStatusScreen-DRu3wPUZ.js} +1 -1
- package/dist/cjs/CopyToClipboard-CC0DCGEH.js +39 -0
- package/dist/cjs/{CrossAppAuthScreen-fjiTzpoh.js → CrossAppAuthScreen-DLj1proN.js} +1 -1
- package/dist/cjs/{CustomLandingScreenView-CQqBEerN.js → CustomLandingScreenView-CGoiE-Ww.js} +3 -3
- package/dist/cjs/{DelegatedActionsConsentScreen-C2DG4aoM.js → DelegatedActionsConsentScreen-GLpwcyY9.js} +1 -1
- package/dist/cjs/{DelegatedActionsRevokeScreen-CCr2Kw57.js → DelegatedActionsRevokeScreen-N30KSLfw.js} +1 -1
- package/dist/cjs/{EmbeddedWalletConnectingScreen-BW3TLACZ.js → EmbeddedWalletConnectingScreen-B4g6iH9a.js} +1 -1
- package/dist/cjs/{EmbeddedWalletCreatedScreen-yTh0CETA.js → EmbeddedWalletCreatedScreen-D8KIpojM.js} +1 -1
- package/dist/cjs/{EmbeddedWalletKeyExportScreen-CLwKZG9l.js → EmbeddedWalletKeyExportScreen-D5EgSIZG.js} +2 -2
- package/dist/cjs/{EmbeddedWalletOnAccountCreateScreen-BJ9tuKSI.js → EmbeddedWalletOnAccountCreateScreen-B4oS64WM.js} +1 -1
- package/dist/cjs/{EmbeddedWalletPasswordUpdateScreen-C3Pu2FvV.js → EmbeddedWalletPasswordUpdateScreen-cAYWzHIk.js} +1 -1
- package/dist/cjs/{EmbeddedWalletPasswordUpdateSplashScreen-Dzvq3GAs.js → EmbeddedWalletPasswordUpdateSplashScreen-BoeyN0tp.js} +1 -1
- package/dist/cjs/{EnrollTotp-Dzazx21f.js → EnrollTotp-B-9Eye0m.js} +7 -7
- package/dist/cjs/{ErrorScreen-Dbie0wkk.js → ErrorScreen-bMmc5gQ_.js} +1 -1
- package/dist/cjs/{FarcasterConnectStatusScreen-B7w0TBzB.js → FarcasterConnectStatusScreen-CIpqMvyl.js} +1 -1
- package/dist/cjs/FarcasterSignerStatusScreen-MFR4tCkV.js +29 -0
- package/dist/cjs/{FundSolWalletWithExternalSolanaWallet-Czi1l_qS.js → FundSolWalletWithExternalSolanaWallet-l8jBZLaN.js} +2 -2
- package/dist/cjs/{FundWalletMethodHeader-2kXHTrGK.js → FundWalletMethodHeader-DEG0gSQr.js} +1 -1
- package/dist/cjs/FundingEditAmountScreen-2ktIPVYi.js +1 -0
- package/dist/cjs/{FundingMethodSelectionScreen-CwORHNKY.js → FundingMethodSelectionScreen-r7iV7Ftb.js} +1 -1
- package/dist/cjs/{InAppBrowserLoginNotPossible-D9m4nJvR.js → InAppBrowserLoginNotPossible-C2VduxXy.js} +1 -1
- package/dist/cjs/{InstallWalletScreen-D2iE62NY.js → InstallWalletScreen-DPx7SL-z.js} +1 -1
- package/dist/cjs/LandingScreen-B-eNMi9V.js +1 -0
- package/dist/cjs/{LinkConflictScreen-CQiPRZsR.js → LinkConflictScreen-Cnh05aRC.js} +2 -2
- package/dist/cjs/{LinkEmailScreen-DaTzx7Fk.js → LinkEmailScreen-BY2X5Iqy.js} +1 -1
- package/dist/cjs/{LinkPasskeyScreen-DR1inEW4.js → LinkPasskeyScreen-CQYKVLhX.js} +1 -1
- package/dist/cjs/{LinkPhoneScreen-Den2l7u5.js → LinkPhoneScreen-DzLe9Fiy.js} +1 -1
- package/dist/cjs/{LoginFailedScreen-CG5VpqB1.js → LoginFailedScreen--rjnALVH.js} +1 -1
- package/dist/cjs/{ManualTransferScreen-QVz0bbM4.js → ManualTransferScreen-C8jSM6eb.js} +1 -1
- package/dist/cjs/MfaAuthEnrollmentFlowScreen-CRdqzHSW.js +1 -0
- package/dist/cjs/{MfaAuthVerifyFlowScreen-BmhIWVUg.js → MfaAuthVerifyFlowScreen-BD0AuWXf.js} +1 -1
- package/dist/cjs/MfaEnrollmentFlowScreen-B5ycifV_.js +1 -0
- package/dist/cjs/{MfaVerifyFlowScreen-NBi3M6EX.js → MfaVerifyFlowScreen-D7k62uSo.js} +1 -1
- package/dist/cjs/{ModalHeader-CabvEpAG.js → ModalHeader-CtKHzKGg.js} +17 -11
- package/dist/cjs/{MoonpayStatusScreen-DQCYOZ0M.js → MoonpayStatusScreen-CqqNZbjM.js} +1 -1
- package/dist/cjs/{OAuthStatusScreen-Dzo0z0tK.js → OAuthStatusScreen-Be_T97BL.js} +1 -1
- package/dist/cjs/{PasskeySelectSignupOrLogin-D6KxIann.js → PasskeySelectSignupOrLogin-BtC_DSMa.js} +1 -1
- package/dist/cjs/{PasskeyStatusScreen-DfcsZHZm.js → PasskeyStatusScreen-Bep_MVh0.js} +1 -1
- package/dist/cjs/{PasswordRecoveryScreen-DfpNr526.js → PasswordRecoveryScreen-BLjiikK6.js} +1 -1
- package/dist/cjs/{QrCode-B5K0VLPw.js → QrCode-jC-CR_0T.js} +1 -1
- package/dist/cjs/{RecoveryOAuthStatusScreen-CaoYW19J.js → RecoveryOAuthStatusScreen-DsFB_aGc.js} +1 -1
- package/dist/cjs/{RecoveryPasswordCreateScreen-BEEpGGv7.js → RecoveryPasswordCreateScreen-CNF0356T.js} +1 -1
- package/dist/cjs/{RecoverySelectionScreen-C2tuntn9.js → RecoverySelectionScreen-CXPcbLC4.js} +1 -1
- package/dist/cjs/{Screen-BXzBiTIN.js → Screen-BZt4LJMK.js} +6 -6
- package/dist/cjs/{ScreenLayout-SSjax2iq.js → ScreenLayout-B07q0ZPf.js} +1 -1
- package/dist/cjs/{SetAutomaticRecoveryScreen-DDVOX064.js → SetAutomaticRecoveryScreen-DI1qB2po.js} +1 -1
- package/dist/cjs/{SetWalletPasswordForm-CjifRxS3.js → SetWalletPasswordForm-BHF_A7Dk.js} +3 -3
- package/dist/cjs/{SignRequestScreen-B6fS5qTS.js → SignRequestScreen-CO86eseO.js} +4 -4
- package/dist/cjs/{StandardSignAndSendTransactionScreen-B5BX6LFZ.js → StandardSignAndSendTransactionScreen-CwpWBYar.js} +3 -3
- package/dist/cjs/{TelegramAuthScreen-CrpOhr2m.js → TelegramAuthScreen-DLqow-_l.js} +1 -1
- package/dist/cjs/{TransactionDetails-CGZ0hDXd.js → TransactionDetails-Bg5jCOCx.js} +1 -1
- package/dist/cjs/{TransactionErrorView-C5-4kCDL.js → TransactionErrorView-6tseFNpm.js} +7 -7
- package/dist/cjs/{TransferFromWalletScreen-Be_N5MeO.js → TransferFromWalletScreen-Ci0tFxZH.js} +2 -2
- package/dist/cjs/{TransferOrBridgeLoadingScreen-BGp5x3h8.js → TransferOrBridgeLoadingScreen-DXT4zz90.js} +2 -2
- package/dist/cjs/{UpdateEmailScreen-GKUeQDLE.js → UpdateEmailScreen-CVta1e7f.js} +1 -1
- package/dist/cjs/{UpdatePhoneScreen-BUA9FZ9k.js → UpdatePhoneScreen-CjJZkCNB.js} +1 -1
- package/dist/cjs/{UserLimitReachedScreen-ByQxJS_K.js → UserLimitReachedScreen-CXIbd9RI.js} +1 -1
- package/dist/cjs/{WalletInfoCard-BYZGsWwj.js → WalletInfoCard-DBa62siD.js} +1 -1
- package/dist/cjs/{WalletInterstitialScreen-t0tp0uiQ.js → WalletInterstitialScreen-CsL8VHXz.js} +1 -1
- package/dist/cjs/{WalletLink-Bj02lEf9.js → WalletLink-BOiDSVfa.js} +1 -1
- package/dist/cjs/{WalletOverflowButton-p3vpo0QR.js → WalletOverflowButton-DRG7e1fY.js} +1 -1
- package/dist/cjs/abstract-smart-wallets.js +1 -1
- package/dist/cjs/{context-CuNnvCIL.js → context-BC-5kj78.js} +1 -1
- package/dist/cjs/{ethers-C_dhPYcC.js → ethers-KrqK37LW.js} +1 -1
- package/dist/cjs/extended-chains.js +1 -1
- package/dist/cjs/{get-is-unified-wallet-C2yi08Zy.js → get-is-unified-wallet-BzEUbDK3.js} +1 -1
- package/dist/cjs/index-B6OzAz9u.js +174 -0
- package/dist/cjs/{index-TUET0BYX.js → index-Bk3J-obQ.js} +2 -2
- package/dist/cjs/{index-CKUeuhfu.js → index-CHVwKo_g.js} +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/internal.js +1 -1
- package/dist/cjs/{shared-AII0g-d1.js → shared-BNxRpOKo.js} +1 -1
- package/dist/cjs/{shouldProceedtoEmbeddedWalletCreationFlow-DE4oGpYl.js → shouldProceedtoEmbeddedWalletCreationFlow-Cnc_Wnd5.js} +1 -1
- package/dist/cjs/{smart-wallets-BypZdOsC.js → smart-wallets-Brk6mOXb.js} +1 -1
- package/dist/cjs/smart-wallets.js +1 -1
- package/dist/cjs/solana.js +1 -1
- package/dist/cjs/{styles-D7QQZERY.js → styles-CcKJSwKY.js} +1 -1
- package/dist/cjs/{to-ui-error-DNNop_FY.js → to-ui-error-bCwYNt_S.js} +2 -2
- package/dist/cjs/ui.js +12 -12
- package/dist/cjs/use-export-wallet-1UzcKhL7.js +1 -0
- package/dist/cjs/{use-export-wallet-B7CUqWdP.js → use-export-wallet-Dd8Kpwba.js} +1 -1
- package/dist/cjs/{useActiveWallet-D5qqs3GS.js → useActiveWallet-CR03NUpG.js} +1 -1
- package/dist/cjs/{useGetTokenPrice-BRQnbdi2.js → useGetTokenPrice-iN4PCLKm.js} +1 -1
- package/dist/cjs/{useI18n-DKrZl8KW.js → useI18n-B_3-ntpk.js} +1 -1
- package/dist/cjs/{usePrivy-BKHhRZMn.js → usePrivy-OGD5cMxb.js} +1 -1
- package/dist/cjs/{useSolanaRpcClient-DXykrMtX.js → useSolanaRpcClient-DFZ8wsSW.js} +1 -1
- package/dist/cjs/{useWallets-Bv9SU-di.js → useWallets-Cuyz25d9.js} +1 -1
- package/dist/cjs/{useWallets-CP2-zXxW.js → useWallets-DtMRGL0-.js} +1 -1
- package/dist/dts/index.d.mts +2 -2
- package/dist/dts/index.d.ts +2 -2
- package/dist/esm/{AccountNotFoundScreen-Dty9AII6.mjs → AccountNotFoundScreen-kpo_wXTb.mjs} +1 -1
- package/dist/esm/{Address-BmCgxKQR.mjs → Address-Dc9fwaMF.mjs} +1 -1
- package/dist/esm/{AffirmativeConsentScreen-CZ3QtNmP.mjs → AffirmativeConsentScreen-HVhY1iYD.mjs} +1 -1
- package/dist/esm/{AllowlistRejectionScreen-DUd4GJIK.mjs → AllowlistRejectionScreen-BAf0N49J.mjs} +1 -1
- package/dist/esm/AuthenticateWithWalletScreen-DiSqjcWS.mjs +1 -0
- package/dist/esm/{AwaitingEvmToSolBridgingScreen-DCpcHpQX.mjs → AwaitingEvmToSolBridgingScreen-BjQ36yjF.mjs} +2 -2
- package/dist/esm/{AwaitingExternalEthereumTransferScreen-D1V2_vDk.mjs → AwaitingExternalEthereumTransferScreen-DP2JIEp3.mjs} +1 -1
- package/dist/esm/{AwaitingPasswordlessCodeScreen-DGAxwdL6.mjs → AwaitingPasswordlessCodeScreen-DKEvEwtc.mjs} +1 -1
- package/dist/esm/{AwaitingSolToEvmBridgingScreen-B6Xv92AB.mjs → AwaitingSolToEvmBridgingScreen-F5PFLObw.mjs} +1 -1
- package/dist/esm/{BridgeNetworkSelectionView-tyz86GlM.mjs → BridgeNetworkSelectionView-CzgPnmSN.mjs} +10 -10
- package/dist/esm/{CaptchaScreen-BL1nWi7c.mjs → CaptchaScreen-Bu46wWXz.mjs} +1 -1
- package/dist/esm/{CoinbaseOnrampStatusScreen-DhIZ3gwP.mjs → CoinbaseOnrampStatusScreen-COkmXcpj.mjs} +1 -1
- package/dist/esm/ConnectEmailForm-DeDXSXOw.mjs +3 -0
- package/dist/esm/{ConnectLedgerScreen-CURsQoYz.mjs → ConnectLedgerScreen-Bi1O0Lnl.mjs} +1 -1
- package/dist/esm/ConnectOnlyLandingScreen-DIkv-j5m.mjs +1 -0
- package/dist/esm/{ConnectOnlyStatusScreen-VM7nNu6X.mjs → ConnectOnlyStatusScreen-D9TWuaHq.mjs} +1 -1
- package/dist/esm/ConnectOrCreateScreen-czTLAMjE.mjs +1 -0
- package/dist/esm/{ConnectPhoneForm-nVYECWzo.mjs → ConnectPhoneForm-D3J7UDS4.mjs} +1 -1
- package/dist/esm/{ConnectWalletView-BXqs6pWG.mjs → ConnectWalletView-C0GcJSOP.mjs} +7 -9
- package/dist/esm/{ConnectionStatusScreen-SAx7YO5y.mjs → ConnectionStatusScreen-Cl_-0PvG.mjs} +2 -2
- package/dist/esm/CopyToClipboard-DSTf_eKU.mjs +39 -0
- package/dist/esm/{CrossAppAuthScreen-V6LW9fie.mjs → CrossAppAuthScreen-DJLQlQd-.mjs} +1 -1
- package/dist/esm/{CustomLandingScreenView-B4a5Rc9z.mjs → CustomLandingScreenView-BAs-WDHG.mjs} +4 -4
- package/dist/esm/{DelegatedActionsConsentScreen-0_shAgnh.mjs → DelegatedActionsConsentScreen-Da2g3sXL.mjs} +1 -1
- package/dist/esm/{DelegatedActionsRevokeScreen-olNf5JQw.mjs → DelegatedActionsRevokeScreen-Dfn7FXtL.mjs} +1 -1
- package/dist/esm/{EmbeddedWalletConnectingScreen-Dleo6nTw.mjs → EmbeddedWalletConnectingScreen-D6tpyyX6.mjs} +1 -1
- package/dist/esm/{EmbeddedWalletCreatedScreen-Dx0eaEaV.mjs → EmbeddedWalletCreatedScreen-c6ORbL8O.mjs} +1 -1
- package/dist/esm/{EmbeddedWalletKeyExportScreen-B-6Lfc6D.mjs → EmbeddedWalletKeyExportScreen-D7VLN_vu.mjs} +2 -2
- package/dist/esm/{EmbeddedWalletOnAccountCreateScreen-DbiGNXpt.mjs → EmbeddedWalletOnAccountCreateScreen-COzgE4dd.mjs} +1 -1
- package/dist/esm/{EmbeddedWalletPasswordUpdateScreen-fA9JGXuz.mjs → EmbeddedWalletPasswordUpdateScreen-BVMQP7yd.mjs} +1 -1
- package/dist/esm/{EmbeddedWalletPasswordUpdateSplashScreen-CTPO_C5V.mjs → EmbeddedWalletPasswordUpdateSplashScreen-CWUgL7m1.mjs} +1 -1
- package/dist/esm/{EnrollTotp-D6VGtjIL.mjs → EnrollTotp-U0Jk_J--.mjs} +5 -5
- package/dist/esm/{ErrorScreen-Ba4Ml9CI.mjs → ErrorScreen-BaE0-mzx.mjs} +1 -1
- package/dist/esm/{FarcasterConnectStatusScreen-BN_wRxNV.mjs → FarcasterConnectStatusScreen-4SgMYfEP.mjs} +2 -2
- package/dist/esm/FarcasterSignerStatusScreen-BMwwcbSb.mjs +28 -0
- package/dist/esm/{FundSolWalletWithExternalSolanaWallet-B3Y84dbg.mjs → FundSolWalletWithExternalSolanaWallet-BDe2TFOC.mjs} +1 -1
- package/dist/esm/{FundWalletMethodHeader-Ce0vLrUa.mjs → FundWalletMethodHeader-C3QM4h3L.mjs} +1 -1
- package/dist/esm/{FundingEditAmountScreen-DeM_ClwN.mjs → FundingEditAmountScreen-IalOk6gH.mjs} +1 -1
- package/dist/esm/{FundingMethodSelectionScreen-Be8LIw6i.mjs → FundingMethodSelectionScreen-BQAohPbk.mjs} +1 -1
- package/dist/esm/{InAppBrowserLoginNotPossible-7kqa69SP.mjs → InAppBrowserLoginNotPossible-B2zaxs1h.mjs} +1 -1
- package/dist/esm/{InstallWalletScreen-EfqvUoSZ.mjs → InstallWalletScreen-DVe8lA3J.mjs} +1 -1
- package/dist/esm/LandingScreen-B6yu6nWg.mjs +1 -0
- package/dist/esm/{LinkConflictScreen-B-yRqIRn.mjs → LinkConflictScreen-DzGN3f1P.mjs} +1 -1
- package/dist/esm/{LinkEmailScreen-CQ5mnYS9.mjs → LinkEmailScreen-BQbelwU_.mjs} +1 -1
- package/dist/esm/{LinkPasskeyScreen-BfGROb2f.mjs → LinkPasskeyScreen-DM05y9x2.mjs} +1 -1
- package/dist/esm/{LinkPhoneScreen-CVNSbTfD.mjs → LinkPhoneScreen-DeRWy-B0.mjs} +1 -1
- package/dist/esm/{LoginFailedScreen-B2KtCyAw.mjs → LoginFailedScreen-KBf-1t3h.mjs} +1 -1
- package/dist/esm/{ManualTransferScreen-C2Rl54K3.mjs → ManualTransferScreen-fwncmmcv.mjs} +1 -1
- package/dist/esm/MfaAuthEnrollmentFlowScreen-jwzT070s.mjs +1 -0
- package/dist/esm/{MfaAuthVerifyFlowScreen-zG9ps8-7.mjs → MfaAuthVerifyFlowScreen-ChKeIb2B.mjs} +1 -1
- package/dist/esm/MfaEnrollmentFlowScreen-OWHkPPKf.mjs +1 -0
- package/dist/esm/{MfaVerifyFlowScreen-6eccLZxg.mjs → MfaVerifyFlowScreen-Cw8SLRu1.mjs} +1 -1
- package/dist/esm/{ModalHeader-CvLNEZ0F.mjs → ModalHeader-Dgah8j-h.mjs} +28 -22
- package/dist/esm/{MoonpayStatusScreen-u9OjnVb2.mjs → MoonpayStatusScreen-BEKe2qdA.mjs} +1 -1
- package/dist/esm/{OAuthStatusScreen-C4KNGm-v.mjs → OAuthStatusScreen-J0C_mTYe.mjs} +1 -1
- package/dist/esm/{PasskeySelectSignupOrLogin-DM959Ikc.mjs → PasskeySelectSignupOrLogin-DY6xFBmQ.mjs} +1 -1
- package/dist/esm/{PasskeyStatusScreen-BfUHTu2T.mjs → PasskeyStatusScreen-ErT1tdQ8.mjs} +1 -1
- package/dist/esm/{PasswordRecoveryScreen-BnkB7Xwe.mjs → PasswordRecoveryScreen-Bgi9GfGJ.mjs} +1 -1
- package/dist/esm/{QrCode-AKgpho6r.mjs → QrCode-CV7y6Con.mjs} +1 -1
- package/dist/esm/RecoveryOAuthStatusScreen-CgpdP8kk.mjs +1 -0
- package/dist/esm/RecoveryPasswordCreateScreen-zbsBy0zO.mjs +1 -0
- package/dist/esm/{RecoverySelectionScreen-CJG-J3Aj.mjs → RecoverySelectionScreen-DPS-dNY6.mjs} +2 -2
- package/dist/esm/{Screen-DnEl8dVF.mjs → Screen-D4UVyUmz.mjs} +5 -5
- package/dist/esm/{ScreenLayout-kyRBwF5n.mjs → ScreenLayout-BxduQYcn.mjs} +1 -1
- package/dist/esm/{SetAutomaticRecoveryScreen-CXNCqRU4.mjs → SetAutomaticRecoveryScreen-DNZZB2sI.mjs} +1 -1
- package/dist/esm/{SetWalletPasswordForm-Bns8qtXn.mjs → SetWalletPasswordForm-DP0zxdTl.mjs} +4 -4
- package/dist/esm/{SignRequestScreen-7t8KCRXP.mjs → SignRequestScreen-iYnPeziQ.mjs} +3 -3
- package/dist/esm/{StandardSignAndSendTransactionScreen-BIJeFjT1.mjs → StandardSignAndSendTransactionScreen-D8byiEkI.mjs} +2 -2
- package/dist/esm/{TelegramAuthScreen-D-cJY_dj.mjs → TelegramAuthScreen-B73-F_A2.mjs} +1 -1
- package/dist/esm/{TransactionDetails-DhYW2qjK.mjs → TransactionDetails-DSClEY-S.mjs} +1 -1
- package/dist/esm/{TransactionErrorView-DtnhZ5P5.mjs → TransactionErrorView-DmcW7szz.mjs} +8 -8
- package/dist/esm/{TransferFromWalletScreen-BdIo62Cg.mjs → TransferFromWalletScreen-up6JSuSm.mjs} +2 -2
- package/dist/esm/{TransferOrBridgeLoadingScreen-C9hX5Ost.mjs → TransferOrBridgeLoadingScreen-BGi2Pwv6.mjs} +1 -1
- package/dist/esm/UpdateEmailScreen-BDhNAVjM.mjs +1 -0
- package/dist/esm/{UpdatePhoneScreen-C7fQ2ohl.mjs → UpdatePhoneScreen-BykKJQg4.mjs} +1 -1
- package/dist/esm/{UserLimitReachedScreen-dLjGUBN-.mjs → UserLimitReachedScreen-DlEmBPVa.mjs} +1 -1
- package/dist/esm/{WalletInfoCard-CVCh-Z5E.mjs → WalletInfoCard-Auf8KAhE.mjs} +2 -2
- package/dist/esm/{WalletInterstitialScreen-C8UPLmif.mjs → WalletInterstitialScreen-4rr799hK.mjs} +1 -1
- package/dist/esm/{WalletLink-xufwYyQh.mjs → WalletLink-Cn4LEfB8.mjs} +6 -6
- package/dist/esm/{WalletOverflowButton-qXN0KcGe.mjs → WalletOverflowButton-C1Qm1edE.mjs} +1 -1
- package/dist/esm/abstract-smart-wallets.mjs +1 -1
- package/dist/esm/context-CiVjsvSu.mjs +1 -0
- package/dist/esm/{ethers-DGsvPPEp.mjs → ethers-DJb7a8Zi.mjs} +1 -1
- package/dist/esm/extended-chains.mjs +1 -1
- package/dist/esm/{get-is-unified-wallet-C6sEzDpG.mjs → get-is-unified-wallet-o1p06vNx.mjs} +1 -1
- package/dist/esm/index-Bwrmi8Zh.mjs +174 -0
- package/dist/esm/{index-BMpFxPbi.mjs → index-CSPS-alu.mjs} +1 -1
- package/dist/esm/{index--X7RfrXS.mjs → index-Dq6gowPx.mjs} +3 -3
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/internal.mjs +1 -1
- package/dist/esm/{shared-CSN6-8CF.mjs → shared-xDqgT98p.mjs} +1 -1
- package/dist/esm/{shouldProceedtoEmbeddedWalletCreationFlow-BdpCzEJT.mjs → shouldProceedtoEmbeddedWalletCreationFlow-C8hGTGhw.mjs} +1 -1
- package/dist/esm/{smart-wallets-DjBZWleC.mjs → smart-wallets-BbVGC7zD.mjs} +1 -1
- package/dist/esm/smart-wallets.mjs +1 -1
- package/dist/esm/solana.mjs +1 -1
- package/dist/esm/{styles-aArPlAod.mjs → styles-C11VS_7r.mjs} +1 -1
- package/dist/esm/{to-ui-error-DKeOToXI.mjs → to-ui-error-Mi0mdU5e.mjs} +2 -2
- package/dist/esm/ui.mjs +1 -1
- package/dist/esm/{use-export-wallet-BcHSx5WT.mjs → use-export-wallet-BKlUCY84.mjs} +1 -1
- package/dist/esm/use-export-wallet-CP-hSjOG.mjs +1 -0
- package/dist/esm/{useActiveWallet-36SuARye.mjs → useActiveWallet-Dm548R2J.mjs} +1 -1
- package/dist/esm/{useGetTokenPrice-CgGm0Ecu.mjs → useGetTokenPrice-BYyTcAvM.mjs} +1 -1
- package/dist/esm/{useI18n-CbESkJQ7.mjs → useI18n-DHUnRp_f.mjs} +1 -1
- package/dist/esm/{usePrivy-D_kd_mMH.mjs → usePrivy-kABlAB4n.mjs} +1 -1
- package/dist/esm/{useSolanaRpcClient-DajzMnxc.mjs → useSolanaRpcClient-Bhhf26b_.mjs} +1 -1
- package/dist/esm/{useWallets-02TRgRMN.mjs → useWallets-BSSZRV2z.mjs} +1 -1
- package/dist/esm/{useWallets-BwdySlks.mjs → useWallets-HI_iUYAd.mjs} +1 -1
- package/package.json +5 -5
- package/dist/cjs/AuthenticateWithWalletScreen-BpfHRQ17.js +0 -1
- package/dist/cjs/ConnectOnlyLandingScreen-CsbSt3la.js +0 -1
- package/dist/cjs/ConnectOrCreateScreen-C0t-tK0s.js +0 -1
- package/dist/cjs/ConnectWalletView-EuTf-6Vt.js +0 -171
- package/dist/cjs/CopyToClipboard-BCe_l6_D.js +0 -39
- package/dist/cjs/FarcasterSignerStatusScreen-CTZRoFL3.js +0 -29
- package/dist/cjs/FundingEditAmountScreen-xtC8kXZ9.js +0 -1
- package/dist/cjs/LandingScreen-Cclv1lfx.js +0 -1
- package/dist/cjs/MfaAuthEnrollmentFlowScreen-CgEdqCAi.js +0 -1
- package/dist/cjs/MfaEnrollmentFlowScreen-BSALpHSu.js +0 -1
- package/dist/cjs/copy-BiZ7dtqy.js +0 -1
- package/dist/cjs/index-DyCLWLpL.js +0 -174
- package/dist/cjs/use-export-wallet-COKs2yxH.js +0 -1
- package/dist/esm/AuthenticateWithWalletScreen-Fa-n1Sey.mjs +0 -1
- package/dist/esm/ConnectEmailForm-DvQJmoTc.mjs +0 -3
- package/dist/esm/ConnectOnlyLandingScreen-CBjbbuDg.mjs +0 -1
- package/dist/esm/ConnectOrCreateScreen-8FxDiOyl.mjs +0 -1
- package/dist/esm/CopyToClipboard-BGTSFnT3.mjs +0 -39
- package/dist/esm/FarcasterSignerStatusScreen-B8IyPJhe.mjs +0 -28
- package/dist/esm/LandingScreen-DPaqiLpx.mjs +0 -1
- package/dist/esm/MfaAuthEnrollmentFlowScreen-D6ujM0kh.mjs +0 -1
- package/dist/esm/MfaEnrollmentFlowScreen-gELi8Ppl.mjs +0 -1
- package/dist/esm/RecoveryOAuthStatusScreen-DaP1Oh1u.mjs +0 -1
- package/dist/esm/RecoveryPasswordCreateScreen-B-dLBQVH.mjs +0 -1
- package/dist/esm/UpdateEmailScreen-0TGU13Qv.mjs +0 -1
- package/dist/esm/context-CwMpvKNV.mjs +0 -1
- package/dist/esm/copy-Bx2Jwc5_.mjs +0 -1
- package/dist/esm/index-C47JxA4c.mjs +0 -174
- package/dist/esm/use-export-wallet-CwQ5-CS4.mjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{CheckCircle as t,XCircle as r}from"lucide-react";import{useMemo as i,useRef as o,useState as s,useEffect as a}from"react";import{a as n,C as c}from"./index-
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{CheckCircle as t,XCircle as r}from"lucide-react";import{useMemo as i,useRef as o,useState as s,useEffect as a}from"react";import{a as n,C as c}from"./index-Bwrmi8Zh.mjs";import{a as m}from"./get-is-unified-wallet-o1p06vNx.mjs";import{S as u}from"./ScreenLayout-BxduQYcn.mjs";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-Dm548R2J.mjs";import"zustand";import"./context-CiVjsvSu.mjs";import"tinycolor2";import"styled-components";import"react-device-detect";import"./use-export-wallet-CP-hSjOG.mjs";import"./internal-context-Z-fyxadS.mjs";import"ofetch";import"viem/utils";import"./useWallets-BSSZRV2z.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-kABlAB4n.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./ModalHeader-Dgah8j-h.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-D4UVyUmz.mjs";import"./index-Dq_xe9dz.mjs";const p=({status:o,title:s,description:a,userIntentRequired:n,retriesRemaining:c,hasSelectedCta:m,onContinue:p,onRetry:l})=>{let d=i((()=>{switch(o){case"loading":default:return;case"success":return n?{label:m?"Continuing...":"Continue",onClick:p,disabled:m,loading:m}:void 0;case"error":return c>0?{label:"Retry",onClick:l}:void 0}}),[o,m,p,l]),g=i((()=>({loading:"loading",ready:"subtle",disabled:"subtle",success:"success",error:"error"}[o]||"loading")),[o]);/*#__PURE__*/return e(u,{icon:"loading"===o||"ready"===o?void 0:"success"===o?t:r,iconVariant:g,title:s,subtitle:a,primaryCta:d,watermark:!0})},l={component:()=>{let{lastScreen:t,data:r,navigate:i,setModalData:u}=m(),{status:l,token:d,waitForResult:g,reset:y,execute:h}=n(),v=o([]),j=e=>{v.current=[e,...v.current]},[C,f]=s(!0);a((()=>(j(setTimeout(f,1e3,!1)),()=>{v.current.forEach((e=>clearTimeout(e))),v.current=[]})),[]);let[b,w]=s(""),[k,R]=s("Checking that you are a human..."),[S,x]=s(!1),[I,T]=s(3),P=r?.captchaModalData,A=async e=>{try{await(P?.callback(e)),P?.onSuccessNavigateTo&&i(P?.onSuccessNavigateTo,!1)}catch(e){if(e instanceof c)return;u({errorModalData:{error:e,previousScreen:t||"LandingScreen"}}),i(P?.onErrorNavigateTo||"ErrorScreen",!1)}};a((()=>{"success"===l?j(setTimeout((async()=>{let e=await g();!e||P?.userIntentRequired||A(e)}),1e3)):"ready"===l&&j(setTimeout((()=>{"ready"===l&&h()}),500))}),[l]),a((()=>{if(!C)switch(l){case"success":w("Success!"),R("CAPTCHA passed successfully."),P?.userIntentRequired||setTimeout((()=>{x(!0),A(d)}),2e3);break;case"loading":w(""),R("Checking that you are a human...");break;case"error":w("Something went wrong"),R(I<=0?"If you use an adblocker or VPN, try disabling and re-attempting.":"You did not pass CAPTCHA. Please try again.")}}),[l,C,S]);/*#__PURE__*/return e(p,{status:l,title:b,description:k,userIntentRequired:P?.userIntentRequired,retriesRemaining:I,hasSelectedCta:S,onContinue:()=>{x(!0),A(d)},onRetry:async()=>{if(I<=0)return;T((e=>e-1)),y(),h();let e=await g();!e||P?.userIntentRequired||A(e)}})}};export{l as CaptchaScreen,p as CaptchaScreenView,l as default};
|
package/dist/esm/{CoinbaseOnrampStatusScreen-DhIZ3gwP.mjs → CoinbaseOnrampStatusScreen-COkmXcpj.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as e,Fragment as r,jsx as t}from"react/jsx-runtime";import o from"@heroicons/react/24/solid/ArrowsRightLeftIcon";import i from"@heroicons/react/24/solid/CheckCircleIcon";import{useState as n,useRef as a,useEffect as s,useMemo as c}from"react";import{styled as m}from"styled-components";import{M as l,B as d,P as p}from"./ModalHeader-
|
|
1
|
+
import{jsxs as e,Fragment as r,jsx as t}from"react/jsx-runtime";import o from"@heroicons/react/24/solid/ArrowsRightLeftIcon";import i from"@heroicons/react/24/solid/CheckCircleIcon";import{useState as n,useRef as a,useEffect as s,useMemo as c}from"react";import{styled as m}from"styled-components";import{M as l,B as d,P as p}from"./ModalHeader-Dgah8j-h.mjs";import{a as u}from"./Layouts-BlFm53ED.mjs";import{L as g,a7 as f}from"./useActiveWallet-Dm548R2J.mjs";import{u as h}from"./internal-context-Z-fyxadS.mjs";import{a as v}from"./get-is-unified-wallet-o1p06vNx.mjs";import{O as y}from"./analytics-mkkvFRju.mjs";import{H as b}from"./index-Bwrmi8Zh.mjs";import"./context-CiVjsvSu.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"zustand";import"react-device-detect";import"./use-export-wallet-CP-hSjOG.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-BSSZRV2z.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"ofetch";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-kABlAB4n.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";const w={component:()=>{let{data:o,setModalData:i,navigate:c,navigateBack:m}=v(),{closePrivyModal:p,createAnalyticsEvent:u,client:g}=h(),[f,b]=n("pending-in-flow"),w=a(0),C={...o?.funding,showAlternateFundingMethod:!0};C.usingDefaultFundingMethod&&(C.usingDefaultFundingMethod=!1);let{partnerUserId:k,popup:x}=o?.coinbaseOnrampStatus??{};return s((()=>{if("pending-in-flow"===f||"pending-after-flow"===f){let e=setInterval((async()=>{if(k)try{let{status:e}=await g.getCoinbaseOnRampStatus({partnerUserId:k});if("success"===e)return void b("success");if("failure"===e)throw Error("There was an error completing Coinbase Onramp flow.");if(w.current>=3)return i({funding:C,solanaFundingData:o?.solanaFundingData}),void c("FundingMethodSelectionScreen");x?.closed&&(w.current=w.current+1,b("pending-after-flow"))}catch(e){console.error(e),b("error"),u({eventName:y,payload:{status:"failure",provider:"coinbase-onramp",error:e.message}}),i({funding:{...C,errorMessage:"Something went wrong adding funds. Please try again or use another method."},solanaFundingData:o?.solanaFundingData}),c("FundingMethodSelectionScreen")}}),1500);return()=>clearInterval(e)}}),[k,x,f]),/*#__PURE__*/e(r,{children:[/*#__PURE__*/t(l,{title:"Fund account",backFn:()=>{i({funding:C,solanaFundingData:o?.solanaFundingData}),m()}},"header"),/*#__PURE__*/t(j,{status:f,onClickCta:p}),/*#__PURE__*/t(d,{})]})}};let j=({status:o,onClickCta:i})=>{let{title:n,body:a,cta:s}=c((()=>(e=>{switch(e){case"success":return{title:"You've funded your account!",body:"It may take a few minutes for the assets to appear.",cta:"Continue"};case"pending-after-flow":return{title:"In Progress",body:"Almost done. Retrieving transaction status from Coinbase",cta:""};case"error":case"pending-in-flow":return{title:"In Progress",body:"Go back to Coinbase Onramp to finish funding your account.",cta:""}}})(o)),[o]);/*#__PURE__*/return e(r,{children:[/*#__PURE__*/e(x,{children:[/*#__PURE__*/t(C,{isSucccess:"success"===o}),/*#__PURE__*/e(u,{children:[/*#__PURE__*/t("h3",{children:n}),/*#__PURE__*/t(k,{children:a})]})]}),s&&/*#__PURE__*/t(p,{onClick:i,children:s})]})},C=({isSucccess:r})=>{if(!r){let r="var(--privy-color-foreground-4)";/*#__PURE__*/return e("div",{style:{position:"relative"},children:[/*#__PURE__*/t(g,{color:r,style:{position:"absolute"}}),/*#__PURE__*/t(f,{color:r}),/*#__PURE__*/t(b,{style:{position:"absolute",width:"2.8rem",height:"2.8rem",top:"1.2rem",left:"1.2rem"}})]})}let n=r?i:()=>/*#__PURE__*/t(o,{width:"3rem",height:"3rem",style:{backgroundColor:"var(--privy-color-foreground-4)",color:"var(--privy-color-background)",borderRadius:"100%",padding:"0.5rem",margin:"0.5rem"}}),a=r?"var(--privy-color-success)":"var(--privy-color-foreground-4)";/*#__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})})},k=m.p`
|
|
2
2
|
font-size: 1rem;
|
|
3
3
|
color: var(--privy-color-foreground-3);
|
|
4
4
|
margin-bottom: 1rem;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{jsxs as e,Fragment as r,jsx as a}from"react/jsx-runtime";import{Mail as i}from"lucide-react";import{forwardRef as t,useState as o,useEffect as n}from"react";import{styled as l}from"styled-components";import{u as s}from"./context-CiVjsvSu.mjs";import{u as m,c,b as d}from"./internal-context-Z-fyxadS.mjs";import{a as p}from"./index-Bwrmi8Zh.mjs";import{u,a as h}from"./get-is-unified-wallet-o1p06vNx.mjs";import{F as g,a1 as f,V as y}from"./useActiveWallet-Dm548R2J.mjs";import{E,P as S}from"./ModalHeader-Dgah8j-h.mjs";import{C as b}from"./Chip-D2-wZOHJ.mjs";import{I as v,a as k}from"./EmailInputForm-Dgoii4vf.mjs";import{E as C}from"./ErrorMessage-D8VaAP5m.mjs";const j=/*#__PURE__*/t(((t,l)=>{let[y,v]=o(t.defaultValue||""),[k,j]=o(""),[T,A]=o(!1),{authenticated:L}=u(),{initLoginWithEmail:M}=m(),{navigate:D,setModalData:I,currentScreen:U,data:F}=h(),{enabled:N,token:W}=p(),[_,R]=o(!1),{accountType:V}=g(),q=s();n((()=>{!y&&q.disablePlusEmails&&F?.inlineError?.error instanceof c&&F?.inlineError?.error.privyErrorCode===d.DISALLOWED_PLUS_EMAIL&&!k&&j("Please enter a valid email address without a '+'."),k&&j("")}),[y]);let z=f(y),H=T||!z,K=()=>{var e;I({login:F?.login,inlineError:void 0}),!N||W||L?(e=W,A(!0),M({email:y,captchaToken:e,disableSignup:F?.login?.disableSignup,withPrivyUi:!0}).then((()=>{D("AwaitingPasswordlessCodeScreen")})).catch((e=>{I({errorModalData:{error:e,previousScreen:U||"LandingScreen"}}),D("ErrorScreen")})).finally((()=>{A(!1)}))):(I({captchaModalData:{callback:e=>M({email:y,captchaToken:e,withPrivyUi:!0}),userIntentRequired:!1,onSuccessNavigateTo:"AwaitingPasswordlessCodeScreen",onErrorNavigateTo:"ErrorScreen"}}),D("CaptchaScreen"))};/*#__PURE__*/return e(r,{children:[/*#__PURE__*/e(w,{children:[k&&/*#__PURE__*/a(C,{style:{display:"block",marginTop:"0.25rem",textAlign:"left"},children:k}),/*#__PURE__*/e(x,{stacked:t.stacked,$error:!!k,children:[/*#__PURE__*/a(P,{children:/*#__PURE__*/a(i,{})}),/*#__PURE__*/a("input",{ref:l,id:"email-input",className:"login-method-button",type:"email",placeholder:"your@email.com",onFocus:()=>R(!0),onChange:e=>v(e.target.value),onKeyUp:e=>{"Enter"===e.key&&K()},value:y,autoComplete:"email"}),"email"!==V||_?t.stacked?/*#__PURE__*/a("span",{}):/*#__PURE__*/a(E,{isSubmitting:T,onClick:K,disabled:H,children:"Submit"}):/*#__PURE__*/a(b,{color:"gray",children:"Recent"})]})]}),t.stacked?/*#__PURE__*/a(S,{loadingText:null,loading:T,disabled:H,onClick:K,style:{width:"100%"},children:"Submit"}):null]})}));let w=v,x=k,P=l(y)`
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
`;export{j as C};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as t,jsxs as e}from"react/jsx-runtime";import{ArrowRightLeft as i}from"lucide-react";import{styled as o}from"styled-components";import{a as r}from"./get-is-unified-wallet-
|
|
1
|
+
import{jsx as t,jsxs as e}from"react/jsx-runtime";import{ArrowRightLeft as i}from"lucide-react";import{styled as o}from"styled-components";import{a as r}from"./get-is-unified-wallet-o1p06vNx.mjs";import{S as n}from"./ScreenLayout-BxduQYcn.mjs";import{G as m}from"./index-Bwrmi8Zh.mjs";import"viem";import"react";import"./context-CiVjsvSu.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./internal-context-Z-fyxadS.mjs";import"ofetch";import"./ModalHeader-Dgah8j-h.mjs";import"./useActiveWallet-Dm548R2J.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-CP-hSjOG.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-BSSZRV2z.mjs";import"./events-context-CI0iqAXA.mjs";import"./getPublicClient-B4uPLKn-.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-D4UVyUmz.mjs";import"./index-Dq_xe9dz.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-kABlAB4n.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";const s=e=>/*#__PURE__*/t("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"-0.625 12.48 397.647 399.546",width:"2500",height:"674",preserveAspectRatio:"none",...e,children:/*#__PURE__*/t("g",{children:/*#__PURE__*/t("path",{fill:"#333745",d:"M 333.9 12.8 L 150.9 12.8 L 150.9 258.4 L 396.5 258.4 L 396.5 76.7 C 396.6 42.2 368.4 12.8 333.9 12.8 Z M 94.7 12.8 L 64 12.8 C 29.5 12.8 0 40.9 0 76.8 L 0 107.5 L 94.7 107.5 L 94.7 12.8 Z M 0 165 L 94.7 165 L 94.7 259.7 L 0 259.7 L 0 165 Z M 301.9 410.6 L 332.6 410.6 C 367.1 410.6 396.6 382.5 396.6 346.6 L 396.6 316 L 301.9 316 L 301.9 410.6 Z M 150.9 316 L 245.6 316 L 245.6 410.7 L 150.9 410.7 L 150.9 316 Z M 0 316 L 0 346.7 C 0 381.2 28.1 410.7 64 410.7 L 94.7 410.7 L 94.7 316 L 0 316 Z"})})}),p=({onContinueWithLedger:o,onContinueWithoutLedger:r,title:p="Phantom supports Ledger",subtitle:a="Are you using a Ledger hardware wallet?\nContinue to sign with Ledger"})=>/*#__PURE__*/t(n,{title:p,subtitle:/*#__PURE__*/t(u,{children:a}),primaryCta:{label:"Continue with Ledger",onClick:o},secondaryCta:{label:"Continue without Ledger",onClick:r},watermark:!0,children:/*#__PURE__*/e(l,{children:[/*#__PURE__*/t(m,{style:{width:"48px",height:"48px"}}),/*#__PURE__*/t(i,{strokeWidth:2,color:"var(--privy-color-icon-subtle)",width:22,height:22}),/*#__PURE__*/t(s,{style:{width:"48px",height:"48px"}})]})});function a(){let{data:e,setModalData:i,navigate:o}=r();/*#__PURE__*/return t(p,{onContinueWithLedger:function(){i({...e,login:{...e?.login,isSigningInWithLedgerSolana:!0}}),o("ConnectionStatusScreen")},onContinueWithoutLedger:function(){i({...e,login:{...e?.login,isSigningInWithLedgerSolana:!1}}),o("ConnectionStatusScreen")}})}const c={component:a};let l=o.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
justify-content: center;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{useRef as t}from"react";import{u as o}from"./context-CiVjsvSu.mjs";import{u as r,c as n,b as i}from"./internal-context-Z-fyxadS.mjs";import{a}from"./events-context-CI0iqAXA.mjs";import{a as l}from"./get-is-unified-wallet-o1p06vNx.mjs";import{i as c}from"./ConnectWalletView-C0GcJSOP.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"viem";import"@heroicons/react/24/outline";import"@tanstack/react-virtual";import"react-device-detect";import"styled-components";import"./ModalHeader-Dgah8j-h.mjs";import"./useActiveWallet-Dm548R2J.mjs";import"zustand";import"./use-export-wallet-CP-hSjOG.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-BSSZRV2z.mjs";import"./getPublicClient-B4uPLKn-.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"./Link-DJ5gq9Di.mjs";import"./QrCode-CV7y6Con.mjs";import"qrcode";import"./EmailInputForm-Dgoii4vf.mjs";import"./ErrorMessage-D8VaAP5m.mjs";import"./useI18n-DHUnRp_f.mjs";import"./WalletCards-DH1rqayz.mjs";import"./Screen-D4UVyUmz.mjs";import"./index-Dq_xe9dz.mjs";const m={component:()=>{let{closePrivyModal:m}=r(),{data:s,navigate:p}=l(),d=o(),u=a(),C=s?.externalConnectWallet?.description,j=t(s?.externalConnectWallet?.walletList??d.appearance.walletList),E=t(s?.externalConnectWallet?.walletChainType??d.appearance.walletChainType);/*#__PURE__*/return e(c,{walletList:j.current,walletChainType:E.current,preSelectedWalletId:s?.externalConnectWallet?.preSelectedWalletId,hideHeader:s?.externalConnectWallet?.hideHeader,onBack:s?.funding?()=>p("FundingMethodSelectionScreen"):void 0,onClose:()=>{u("connectWallet","onError",i.GENERIC_CONNECT_WALLET_ERROR),m()},onConnect:({connector:e,wallet:t})=>{u("connectWallet","onSuccess",{wallet:t});let o=s?.externalConnectWallet?.onCompleteNavigateTo;o?p(o({address:t.address,walletClientType:e?.walletClientType,walletChainType:e?.chainType})):m()},onConnectError:e=>{e instanceof n?(console.warn(e.cause?e.cause:e.message),u("connectWallet","onError",e.privyErrorCode||i.GENERIC_CONNECT_WALLET_ERROR)):(console.warn(e),u("connectWallet","onError",i.UNKNOWN_CONNECT_WALLET_ERROR))},customDescription:C,app:d,connectOnly:!0})},isUnauthenticatedScreem:!0};export{m as ConnectOnlyLandingScreen,m as default};
|
package/dist/esm/{ConnectOnlyStatusScreen-VM7nNu6X.mjs → ConnectOnlyStatusScreen-D9TWuaHq.mjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{useState as t,useEffect as o}from"react";import{isMobile as r}from"react-device-detect";import{C as i}from"./use-export-wallet-
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{useState as t,useEffect as o}from"react";import{isMobile as r}from"react-device-detect";import{C as i}from"./use-export-wallet-CP-hSjOG.mjs";import{q as n}from"./context-CiVjsvSu.mjs";import{Q as a}from"./useActiveWallet-Dm548R2J.mjs";import{u as s}from"./internal-context-Z-fyxadS.mjs";import{a as l}from"./get-is-unified-wallet-o1p06vNx.mjs";import{S as c}from"./ScreenLayout-BxduQYcn.mjs";import{B as m}from"./index-Bwrmi8Zh.mjs";import{getErrorDetails as p}from"./ConnectionStatusScreen-Cl_-0PvG.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"viem/utils";import"./useWallets-BSSZRV2z.mjs";import"tinycolor2";import"zustand";import"styled-components";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"ofetch";import"./ModalHeader-Dgah8j-h.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-D4UVyUmz.mjs";import"./index-Dq_xe9dz.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-kABlAB4n.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./Link-DJ5gq9Di.mjs";import"./useI18n-DHUnRp_f.mjs";import"./shouldProceedtoEmbeddedWalletCreationFlow-C8hGTGhw.mjs";const u=({walletLogo:t,success:o,errorMessage:r,title:n,subtitle:a,onRetry:s,onUseDifferentWallet:l,onBack:m,numRetries:p,maxRetries:u})=>/*#__PURE__*/e(c,{title:n,subtitle:a,icon:t,iconVariant:"loading",iconLoadingStatus:{success:o,fail:!!r},primaryCta:r===i.ERROR_USER_EXISTS?{label:"Use a different wallet",onClick:l}:!o&&r?.retryable&&p<u?{label:"Retry",onClick:s,disabled:!r?.retryable||p>=u}:!o&&r&&p>=u?{label:"Use a different wallet",onClick:l}:void 0,onBack:m,watermark:!0}),d={component:()=>{let i,{navigateBack:c,navigate:d,lastScreen:w,currentScreen:f,data:y,setModalData:g}=l(),{walletConnectionStatus:j,closePrivyModal:v}=s(),[C,h]=t(void 0),[k,b]=t(0),x=a(j?.connector?.walletClientType||"unknown"),S="connected"===j?.status,T="switching_to_supported_chain"===j?.status;o((()=>{if(S){let e;if(y?.externalConnectWallet?.onCompleteNavigateTo){let t=y.externalConnectWallet.onCompleteNavigateTo,o=j.connectedWallet?.address;e=setTimeout((()=>{if(y.funding&&j.connector){let e=j.connector.wallets.find((e=>e.address===o));g({...y,funding:{...y.funding,connectedWallet:e}})}d(t({address:o,walletClientType:j.connector?.walletClientType,walletChainType:j.connector?.chainType}))}),n)}else e=setTimeout(v,n);return()=>clearTimeout(e)}}),[S]);o((()=>{var e;j?.connectError&&(e=j?.connectError,h(p(e)))}),[j]);let R=j?.connector?.connectorType||"injected",W=j?.connector?.walletClientType||"unknown",B=x?.metadata?.shortName||x?.name||j?.connector?.walletBranding.name||"Browser Extension",E=x?.image_url?.md||j?.connector?.walletBranding.icon||(t=>/*#__PURE__*/e(m,{...t})),M="Browser Extension"===B?B.toLowerCase():B;i=S?`Successfully connected with ${M}`:C?C.message:T?"Switching networks":`Waiting for ${M}`;let _="Don’t see your wallet? Check your other browser windows.";return S?_="You’re good to go!":k>=2&&C?_="Unable to connect wallet":C?_=C.detail:T?_="Switch your wallet to the requested network.":"metamask"===W&&r?_="Click to continue to open and connect MetaMask.":"metamask"===W?_="For the best experience, connect only one wallet at a time.":"wallet_connect_v2"===R?_="Open your mobile wallet app to continue":"coinbase_wallet"===R&&(_="Confirm in the Coinbase app/popup to continue."),/*#__PURE__*/e(u,{walletName:B,walletLogo:E,success:S,errorMessage:C,title:i,subtitle:_,onRetry:()=>{b(k+1),h(void 0),j?.connectRetry()},onUseDifferentWallet:c,onBack:f===w?void 0:c,numRetries:k,maxRetries:2})}};export{d as ConnectOnlyStatusScreen,u as ConnectOnlyStatusScreenView,d as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{u as o}from"./context-CiVjsvSu.mjs";import{C as r,L as i}from"./CustomLandingScreenView-BAs-WDHG.mjs";import"react";import"@privy-io/js-sdk-core";import"tinycolor2";import"@heroicons/react/24/outline/UserCircleIcon";import"styled-components";import"./ModalHeader-Dgah8j-h.mjs";import"./useActiveWallet-Dm548R2J.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-CP-hSjOG.mjs";import"./internal-context-Z-fyxadS.mjs";import"ofetch";import"eventemitter3";import"viem/utils";import"./get-is-unified-wallet-o1p06vNx.mjs";import"viem";import"./useWallets-BSSZRV2z.mjs";import"./events-context-CI0iqAXA.mjs";import"./getPublicClient-B4uPLKn-.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-Bwrmi8Zh.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-kABlAB4n.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./ConnectWalletView-C0GcJSOP.mjs";import"@heroicons/react/24/outline";import"@tanstack/react-virtual";import"lucide-react";import"./Link-DJ5gq9Di.mjs";import"./QrCode-CV7y6Con.mjs";import"qrcode";import"./EmailInputForm-Dgoii4vf.mjs";import"./ErrorMessage-D8VaAP5m.mjs";import"./useI18n-DHUnRp_f.mjs";import"./WalletCards-DH1rqayz.mjs";import"./Screen-D4UVyUmz.mjs";import"./index-Dq_xe9dz.mjs";import"./ConnectEmailForm-DeDXSXOw.mjs";import"./Chip-D2-wZOHJ.mjs";import"./LoadingSkeleton-U6-3yFwI.mjs";import"./farcaster-DPlSjvF5.mjs";import"@heroicons/react/24/outline/FingerPrintIcon";import"./ConnectPhoneForm-D3J7UDS4.mjs";import"./twitter-BoAxhlj6.mjs";import"./twitch-5IOe4sIQ.mjs";import"./telegram-B-JqnkqZ.mjs";import"./WalletOverflowButton-C1Qm1edE.mjs";import"./ScreenLayout-BxduQYcn.mjs";const e={component:()=>{let e=o();return e.loginMethodsAndOrder&&e.loginMethodsAndOrder.primary.length>0?/*#__PURE__*/t(r,{connectOnly:!0}):/*#__PURE__*/t(i,{connectOnly:!0})}};export{e as ConnectOrCreateScreen,e as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as o,jsxs as e,Fragment as r}from"react/jsx-runtime";import{forwardRef as n,useState as t,useEffect as i}from"react";import{styled as a}from"styled-components";import{countryCodesAndNumbers as d,validatePhoneNumber as l,phoneNumberTypingFormatter as c,getPlaceholderPhoneNumber as p,getCountryCallingCode as u,getPhoneCountryCodeAndNumber as h,formatPhoneNumber as s}from"@privy-io/js-sdk-core";import{u as g}from"./context-
|
|
1
|
+
import{jsx as o,jsxs as e,Fragment as r}from"react/jsx-runtime";import{forwardRef as n,useState as t,useEffect as i}from"react";import{styled as a}from"styled-components";import{countryCodesAndNumbers as d,validatePhoneNumber as l,phoneNumberTypingFormatter as c,getPlaceholderPhoneNumber as p,getCountryCallingCode as u,getPhoneCountryCodeAndNumber as h,formatPhoneNumber as s}from"@privy-io/js-sdk-core";import{u as g}from"./context-CiVjsvSu.mjs";import{F as m}from"./useActiveWallet-Dm548R2J.mjs";import{E as b,P as x}from"./ModalHeader-Dgah8j-h.mjs";import{C as v}from"./Chip-D2-wZOHJ.mjs";const f=({value:r,onChange:n})=>/*#__PURE__*/o("select",{value:r,onChange:n,children:d.map((o=>/*#__PURE__*/e("option",{value:o.code,children:[o.code," +",o.callCode]},o.code)))}),w=/*#__PURE__*/n(((n,a)=>{let d=g(),[w,k]=t(!1),{accountType:$}=m(),[N,P]=t(""),[S,j]=t(d?.intl.defaultCountry??"US"),V=l(N,S),z=c(S),T=p(S),U=u(S),L=!V,[q,E]=t(!1),B=U.length,D=o=>{let e=o.target.value;j(e),P(""),n.onChange&&n.onChange({rawPhoneNumber:N,qualifiedPhoneNumber:s(N,e),countryCode:e,isValid:l(N,S)})},F=(o,e)=>{try{let r=o.replace(/\D/g,"")===N.replace(/\D/g,"")?o:z.input(o);P(r),n.onChange&&n.onChange({rawPhoneNumber:r,qualifiedPhoneNumber:s(o,e),countryCode:e,isValid:l(o,e)})}catch(o){console.error("Error processing phone number:",o)}},I=()=>{E(!0);let o=s(N,S);n.onSubmit({rawPhoneNumber:N,qualifiedPhoneNumber:o,countryCode:S,isValid:l(N,S)}).finally((()=>E(!1)))};return i((()=>{if(n.defaultValue){let o=h(n.defaultValue);z.reset(),D({target:{value:o.countryCode}}),F(o.phone,o.countryCode)}}),[n.defaultValue]),/*#__PURE__*/e(r,{children:[/*#__PURE__*/o(y,{children:/*#__PURE__*/e(C,{$callingCodeLength:B,$stacked:n.stacked,children:[/*#__PURE__*/o(f,{value:S,onChange:D}),/*#__PURE__*/o("input",{ref:a,id:"phone-number-input",className:"login-method-button",type:"tel",placeholder:T,onFocus:()=>k(!0),onChange:o=>{F(o.target.value,S)},onKeyUp:o=>{"Enter"===o.key&&I()},value:N,autoComplete:"tel"}),"phone"!==$||w||n.hideRecent?n.stacked||n.noIncludeSubmitButton?/*#__PURE__*/o("span",{}):/*#__PURE__*/o(b,{isSubmitting:q,onClick:I,disabled:L,children:"Submit"}):/*#__PURE__*/o(v,{color:"gray",children:"Recent"})]})}),n.stacked&&!n.noIncludeSubmitButton?/*#__PURE__*/o(x,{loading:q,loadingText:null,onClick:I,disabled:L,children:"Submit"}):null]})}));let y=a.div`
|
|
2
2
|
width: 100%;
|
|
3
3
|
`,C=a.label`
|
|
4
4
|
--country-code-dropdown-width: calc(54px + calc(12 * ${o=>o.$callingCodeLength}px));
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import{jsxs as e,jsx as n,Fragment as t}from"react/jsx-runtime";import{MagnifyingGlassIcon as l}from"@heroicons/react/24/outline";import{useVirtualizer as i}from"@tanstack/react-virtual";import{useState as a,useMemo as o,useCallback as r,useRef as c,useEffect as s}from"react";import{isMobile as d}from"react-device-detect";import{styled as h}from"styled-components";import{a as m,T as u}from"./ModalHeader-
|
|
1
|
+
import{jsxs as e,jsx as n,Fragment as t}from"react/jsx-runtime";import{MagnifyingGlassIcon as l}from"@heroicons/react/24/outline";import{useVirtualizer as i}from"@tanstack/react-virtual";import{useState as a,useMemo as o,useCallback as r,useRef as c,useEffect as s}from"react";import{isMobile as d}from"react-device-detect";import{styled as h}from"styled-components";import{a as m,T as u}from"./ModalHeader-Dgah8j-h.mjs";import{Check as p,Copy as g}from"lucide-react";import{L as w}from"./Link-DJ5gq9Di.mjs";import{Q as f}from"./QrCode-CV7y6Con.mjs";import{E as y}from"./EmailInputForm-Dgoii4vf.mjs";import{u as v,q as b}from"./context-CiVjsvSu.mjs";import{u as C}from"./useI18n-DHUnRp_f.mjs";import{M as x,q as _,d as k,e as L,K as W,V as T,w as z,S}from"./useActiveWallet-Dm548R2J.mjs";import{u as A,P as E,b as j}from"./internal-context-Z-fyxadS.mjs";import{W as K}from"./WalletCards-DH1rqayz.mjs";import{W as B,h as q}from"./use-export-wallet-CP-hSjOG.mjs";import{S as O}from"./Screen-D4UVyUmz.mjs";let I=h.button`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
|
+
justify-content: end;
|
|
4
5
|
gap: 0.5rem;
|
|
5
6
|
|
|
6
|
-
&:hover {
|
|
7
|
-
text-decoration: underline;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
7
|
svg {
|
|
11
8
|
width: 0.875rem;
|
|
12
9
|
height: 0.875rem;
|
|
@@ -18,11 +15,12 @@ import{jsxs as e,jsx as n,Fragment as t}from"react/jsx-runtime";import{Magnifyin
|
|
|
18
15
|
font-size: 0.875rem;
|
|
19
16
|
color: var(--privy-color-foreground-2);
|
|
20
17
|
`,U=h(p)`
|
|
21
|
-
color: var(--privy-color-success);
|
|
18
|
+
color: var(--privy-color-icon-success);
|
|
19
|
+
flex-shrink: 0;
|
|
22
20
|
`,$=h(g)`
|
|
23
21
|
color: var(--privy-color-foreground-3);
|
|
24
|
-
|
|
25
|
-
`;function F({children:t,iconOnly:l,value:i,hideCopyIcon:o,...r}){let[c,s]=a(!1);/*#__PURE__*/return e(
|
|
22
|
+
flex-shrink: 0;
|
|
23
|
+
`;function F({children:t,iconOnly:l,value:i,hideCopyIcon:o,...r}){let[c,s]=a(!1);/*#__PURE__*/return e(I,{...r,onClick:()=>{navigator.clipboard.writeText(i||("string"==typeof t?t:"")).catch(console.error),s(!0),setTimeout((()=>s(!1)),1500)},children:[t," ",c?/*#__PURE__*/e(N,{children:[/*#__PURE__*/n(U,{})," ",!l&&"Copied"]}):!o&&/*#__PURE__*/n($,{})]})}const M={phantom:{mobile:{native:"phantom://",universal:"https://phantom.app/ul/"}},solflare:{mobile:{native:void 0,universal:"https://solflare.com/ul/v1/"}},metamask:{image_url:{sm:x,md:x}}};class P{static normalize(e){return e.replace(/[-_]wallet$/,"").replace(/[-_]extension$/,"").toLowerCase()}isEth(e){return e.chains.some((e=>e.includes("eip155:")))}isSol(e){return e.chains.some((e=>e.includes("solana:")))}inAllowList(e,n){if(!this.normalizedAllowList||0===this.normalizedAllowList.length||"listing"===n&&this.includeWalletConnect)return!0;let t=P.normalize(e);return this.normalizedAllowList.some((e=>t===P.normalize(e)))}inDenyList(e,n){return"listing"===n&&"rabby"===e||"agw"===P.normalize(e)}chainMatches(e){return"ethereum-only"===this.chainFilter?"ethereum"===e:"solana-only"!==this.chainFilter||"solana"===e}getAllowListKey(e,n,t,l){let i=P.normalize(e);for(let e of this.normalizedAllowList||[])if(i===P.normalize(e))return e;if("connector"===n){if(("injected"===t||"solana_adapter"===t)&&"ethereum"===l&&this.detectedEth)return"detected_ethereum_wallets";if(("injected"===t||"solana_adapter"===t)&&"solana"===l&&this.detectedSol)return"detected_solana_wallets"}if("listing"===n&&this.includeWalletConnect)return"wallet_connect"}connectorOk(e){return!!("null"!==e.connectorType&&"walletconnect_solana"!==e.walletBranding.id&&this.chainMatches(e.chainType)&&(this.inAllowList(e.walletClientType,"connector")||("injected"===e.connectorType||"solana_adapter"===e.connectorType)&&("ethereum"===e.chainType&&this.detectedEth||"solana"===e.chainType&&this.detectedSol)))}listingOk(e){if(e.slug.includes("coinbase"))return!1;if("ethereum-only"===this.chainFilter){if(!this.isEth(e))return!1}else if("solana-only"===this.chainFilter&&!this.isSol(e))return!1;return!(!this.inAllowList(e.slug,"listing")||this.inDenyList(e.slug,"listing"))}getWallets(e,n){let t=new Map,l=e=>{let n=t.get(e.id);if(n){n.chainType!==e.chainType&&(n.chainType="multi");let t=new Set(n.chains);e.chains.forEach((e=>t.add(e))),n.chains=Array.from(t),!n.icon&&e.icon&&(n.icon=e.icon),!n.url&&e.url&&(n.url=e.url),!n.listing&&e.listing&&(n.listing=e.listing),!n.allowListKey&&e.allowListKey&&(n.allowListKey=e.allowListKey)}else t.set(e.id,e)};e.filter((e=>this.connectorOk(e))).forEach((e=>{let n=P.normalize(e.walletClientType);l({id:n,label:e.walletBranding?.name??n,source:"connector",connector:e,chainType:e.chainType,icon:e.walletBranding?.icon,url:void 0,chains:["ethereum"===e.chainType?"eip155":"solana"],allowListKey:this.getAllowListKey(e.walletClientType,"connector",e.connectorType,e.chainType)})}));let i=e.find((e=>"wallet_connect_v2"===e.connectorType)),a=e.find((e=>"walletconnect_solana"===e.walletBranding.id));n.filter((e=>this.listingOk(e))).forEach((n=>{let t=[...n.chains].filter((e=>e.includes("eip155:")||e.includes("solana:")));if(e.some((e=>P.normalize(e.walletClientType)===P.normalize(n.slug)&&"ethereum"===e.chainType&&"null"!==e.connectorType))||i||n.mobile.native||n.mobile.universal||_[n.slug]?.chainTypes.includes("ethereum")||(t=t.filter((e=>!e.includes("eip155:")))),e.some((e=>P.normalize(e.walletClientType)===P.normalize(n.slug)&&"solana"===e.chainType&&"null"!==e.connectorType))||a||n.mobile.native||n.mobile.universal||_[n.slug]?.chainTypes.includes("solana")||(t=t.filter((e=>!e.includes("solana:")))),!t.length)return;let o=P.normalize(n.slug),r=M[n.slug],c=r?.image_url?.sm||n.image_url?.sm;t.some((e=>e.includes("eip155:")))&&l({id:o,label:n.name||o,source:"listing",listing:n,chainType:"ethereum",icon:c,url:n.homepage,chains:t,allowListKey:this.getAllowListKey(n.slug,"listing")}),t.some((e=>e.includes("solana:")))&&l({id:o,label:n.name||o,source:"listing",listing:n,chainType:"solana",icon:c,url:n.homepage,chains:t,allowListKey:this.getAllowListKey(n.slug,"listing")})})),this.includeWalletConnectQr&&i&&l({id:"wallet_connect_qr",label:"WalletConnect",source:"connector",connector:i,chainType:"ethereum",icon:B,url:void 0,chains:["eip155"],allowListKey:"wallet_connect_qr"}),this.includeWalletConnectQrSolana&&a&&l({id:"wallet_connect_qr_solana",label:"WalletConnect",source:"connector",connector:a,chainType:"solana",icon:B,url:void 0,chains:["solana"],allowListKey:"wallet_connect_qr_solana"});let o=Array.from(t.values());o.forEach((e=>{let n=M[e.listing?.slug||e.id];n?.image_url?.sm&&(e.icon=n.image_url.sm)}));let r=new Map;return this.normalizedAllowList?.forEach(((e,n)=>{r.set(P.normalize(e),n)})),{wallets:o.slice().sort(((e,n)=>{if(e.allowListKey&&n.allowListKey){let t=this.normalizedAllowList?.findIndex((n=>P.normalize(n)===P.normalize(e.allowListKey)))??-1,l=this.normalizedAllowList?.findIndex((e=>P.normalize(e)===P.normalize(n.allowListKey)))??-1;if(t!==l&&t>=0&&l>=0)return t-l}if(e.allowListKey&&!n.allowListKey)return-1;if(!e.allowListKey&&n.allowListKey)return 1;let t=P.normalize(e.id),l=P.normalize(n.id);"binance-defi"===t?t="binance":"universalprofiles"===t?t="universal_profile":"cryptocom-defi"===t?t="cryptocom":"bitkeep"===t&&(t="bitget_wallet"),"binance-defi"===l?l="binance":"universalprofiles"===l?l="universal_profile":"cryptocom-defi"===l?l="cryptocom":"bitkeep"===l&&(l="bitget_wallet");let i=r.has(t),a=r.has(l);return i&&a?r.get(t)-r.get(l):i?-1:a?1:"connector"===e.source&&"listing"===n.source?-1:"listing"===e.source&&"connector"===n.source?1:e.label.toLowerCase().localeCompare(n.label.toLowerCase())})),walletCount:o.length}}constructor(e,n){this.chainFilter=e,n&&n.length>0&&(this.normalizedAllowList=n.map(String),this.normalizedAllowList.includes("binance")&&this.normalizedAllowList.push("binance-defi-wallet"),this.normalizedAllowList.includes("bitget_wallet")&&this.normalizedAllowList.push("bitkeep")),this.detectedEth=this.normalizedAllowList?.includes("detected_ethereum_wallets")??!1,this.detectedSol=this.normalizedAllowList?.includes("detected_solana_wallets")??!1,this.includeWalletConnect=this.normalizedAllowList?.includes("wallet_connect")??!1,this.includeWalletConnectQr=this.normalizedAllowList?.includes("wallet_connect_qr")??!1,this.includeWalletConnectQrSolana=this.normalizedAllowList?.includes("wallet_connect_qr_solana")??!1}}var Q=t=>/*#__PURE__*/e("svg",{viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",...t,children:[/*#__PURE__*/n("path",{d:"m0 0h32v32h-32z",fill:"#5469d4"}),/*#__PURE__*/n("path",{d:"m15.997 5.333-.143.486v14.106l.143.143 6.548-3.87z",fill:"#c2ccf4"}),/*#__PURE__*/n("path",{d:"m15.996 5.333-6.548 10.865 6.548 3.87z",fill:"#fff"}),/*#__PURE__*/n("path",{d:"m15.997 21.306-.08.098v5.025l.08.236 6.552-9.227z",fill:"#c2ccf4"}),/*#__PURE__*/n("path",{d:"m15.996 26.665v-5.36l-6.548-3.867z",fill:"#fff"}),/*#__PURE__*/n("path",{d:"m15.995 20.07 6.548-3.87-6.548-2.976v6.847z",fill:"#8698e8"}),/*#__PURE__*/n("path",{d:"m9.448 16.2 6.548 3.87v-6.846z",fill:"#c2ccf4"})]}),D=t=>/*#__PURE__*/e("svg",{viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",...t,children:[/*#__PURE__*/e("linearGradient",{id:"a",gradientUnits:"userSpaceOnUse",x1:"7.233",x2:"24.766",y1:"24.766",y2:"7.234",children:[/*#__PURE__*/n("stop",{offset:"0",stopColor:"#9945ff"}),/*#__PURE__*/n("stop",{offset:".2",stopColor:"#7962e7"}),/*#__PURE__*/n("stop",{offset:"1",stopColor:"#00d18c"})]}),/*#__PURE__*/n("path",{d:"m0 0h32v32h-32z",fill:"#10111a"}),/*#__PURE__*/n("path",{clipRule:"evenodd",d:"m9.873 20.41a.645.645 0 0 1 .476-.21l14.662.012a.323.323 0 0 1 .238.54l-3.123 3.438a.643.643 0 0 1 -.475.21l-14.662-.012a.323.323 0 0 1 -.238-.54zm15.376-2.862a.322.322 0 0 1 -.238.54l-14.662.012a.642.642 0 0 1 -.476-.21l-3.122-3.44a.323.323 0 0 1 .238-.54l14.662-.012a.644.644 0 0 1 .475.21zm-15.376-9.738a.644.644 0 0 1 .476-.21l14.662.012a.322.322 0 0 1 .238.54l-3.123 3.438a.643.643 0 0 1 -.475.21l-14.662-.012a.323.323 0 0 1 -.238-.54z",fill:"url(#a)",fillRule:"evenodd"})]});const R=h.div`
|
|
26
24
|
display: flex;
|
|
27
25
|
justify-content: space-between;
|
|
28
26
|
align-items: center;
|
|
@@ -95,7 +93,7 @@ import{jsxs as e,jsx as n,Fragment as t}from"react/jsx-runtime";import{Magnifyin
|
|
|
95
93
|
100% 32px,
|
|
96
94
|
100% 16px;
|
|
97
95
|
background-attachment: local, scroll;
|
|
98
|
-
`;function X({enabled:e=!0,walletList:n,walletChainType:t}){let l=v(),{connectors:i}=A(),{listings:r,loading:c}=k(e),s=t??l.appearance.walletChainType,d=n??l.appearance?.walletList,h=o((()=>new P(s,d)),[s,d]),{wallets:m,walletCount:u}=o((()=>h.getWallets(i,r)),[h,i,r]),[p,g]=a(""),w=o((()=>p?m.filter((e=>e.label.toLowerCase().includes(p.toLowerCase()))):m),[p,m]),[f,y]=a();return{selected:f,setSelected:y,search:p,setSearch:g,loadingListings:c,wallets:w,walletCount:u}}let Z=e=>!e||"string"!=typeof e&&(e instanceof T||e instanceof S);const ee=({index:l,style:i,data:a,recent:o})=>{let r=a.wallets[l],{walletChainType:c,handleWalletClick:s}=a,{t:d}=C(),h={...i,boxSizing:"border-box"};return r?/*#__PURE__*/e(ie,{style:h,onClick:()=>s(r),children:[r.icon&&(r.connector&&!Z(r.connector)?/*#__PURE__*/n(V,{children:"string"==typeof r.icon?/*#__PURE__*/n(Y,{src:r.icon}):/*#__PURE__*/n(r.icon,{style:{width:"32px",height:"32px"}})}):"string"==typeof r.icon?/*#__PURE__*/n(Y,{src:r.icon}):/*#__PURE__*/n(r.icon,{style:{width:"32px",height:"32px"}})),/*#__PURE__*/n(re,{children:r.label}),o?/*#__PURE__*/e(t,{children:[/*#__PURE__*/n(G,{children:d("connectWallet.lastUsed")}),/*#__PURE__*/n(ae,{children:/*#__PURE__*/e(t,{children:["ethereum-only"===c&&/*#__PURE__*/n(Q,{}),"solana-only"===c&&/*#__PURE__*/n(D,{})]})})]}):/*#__PURE__*/n(ae,{children:!("ethereum-only"===c||"solana-only"===c)&&/*#__PURE__*/e(t,{children:[r.chains?.some((e=>e.startsWith("eip155")))&&/*#__PURE__*/n(Q,{}),r.chains?.some((e=>e.startsWith("solana")))&&/*#__PURE__*/n(D,{})]})})]}):null};var ne=({className:h,customDescription:p,connectOnly:g,preSelectedWalletId:x,hideHeader:k,...B})=>{let O=v(),{t:N}=C(),{connectors:U}=A(),$=B.walletChainType||O.appearance.walletChainType,F=B.walletList||O.appearance?.walletList,{onBack:R,onClose:H,app:V}=B,{selected:G,setSelected:J,qrUrl:ne,setQrUrl:de,connecting:he,uiState:me,errorCode:ue,wallets:pe,walletCount:ge,handleConnect:we,handleBack:fe,showSearchBar:ye,isInitialConnectView:ve,title:be,search:Ce,setSearch:xe}=function({onConnect:e,onBack:n,onClose:t,onConnectError:l,walletList:i,walletChainType:c,app:s}){let h=v(),{connectors:m}=A(),{t:u}=C(),{wallets:p,walletCount:g,search:w,setSearch:f,selected:y,setSelected:x}=X({enabled:L(i??[]),walletList:i,walletChainType:c}),[_,k]=a(),[z,T]=a(),[S,j]=a(),[K,B]=a(),q=!y&&!S&&!K,I=q&&(g>6||w.length>0),O=m.find((e=>"wallet_connect_v2"===e.connectorType)),N=r((async(n,t)=>{if(n){if(K?.connector===n&&"loading"===_)return void console.log("Already connecting to this wallet, skipping duplicate attempt");if(k("loading"),"string"==typeof n)return B({connector:n,name:t?.name??"Wallet",icon:t?.icon,id:t?.id,url:t?.url}),void window.open(n,"_blank");B({connector:n,name:t?.name??n.walletBranding.name??"Wallet",icon:t?.icon??n.walletBranding.icon,id:t?.id,url:t?.url});try{let t=await n.connect({showPrompt:!0});if(!t)return k("error"),T(void 0),void l?.(new E("Unable to connect wallet"));k("success"),T(void 0),W({address:t.address,client:t.walletClientType,appId:h.id}),setTimeout((()=>{e({connector:n,wallet:t})}),b)}catch(n){if(console.error("ERROR: ",{e:n}),n?.message?.includes("already pending for origin")||n?.message?.includes("wallet_requestPermissions"))return void console.log("Connection request already pending, maintaining loading state");k("error"),T(n?.privyErrorCode),l?.(n instanceof Error?n:new E(n?.message||"Unable to connect wallet"))}}}),[h.id,e,K,_]),U=r((()=>S?(k(void 0),T(void 0),B(void 0),void j(void 0)):K?(k(void 0),T(void 0),void B(void 0)):y?(k(void 0),T(void 0),B(void 0),void x(void 0)):"error"===_||"loading"===_?(k(void 0),T(void 0),void B(void 0)):void n?.()),[S,K,y,_,n]),$=o((()=>K?.connector===O&&S&&d&&K?.name?u("connectWallet.goToWallet",{walletName:K.name}):K?.connector===O&&S&&K?.name?u("connectWallet.scanToConnect",{walletName:K.name}):S&&K?.name?u(d?"connectWallet.goToWallet":"connectWallet.scanToConnect",{walletName:K.name}):"string"==typeof K?.connector?u("connectWallet.openOrInstall",{walletName:K.name}):y&&!K?u("connectWallet.selectNetwork"):K?null:u("connectWallet.selectYourWallet")),[K,S,y,O,u]);return{selected:y,setSelected:x,qrUrl:S,setQrUrl:j,connecting:K,uiState:_,errorCode:z,search:w,setSearch:f,wallets:p,walletCount:g,wc:O,isInitialConnectView:q,showSearchBar:I,title:$,handleConnect:N,handleBack:U,onClose:t,onConnect:e,app:s}}({...B,walletList:F,walletChainType:$}),_e=U.find((e=>"wallet_connect_v2"===e.connectorType)),ke=U.find((e=>"walletconnect_solana"===e.walletBranding.id)),Le=c(null),We=i({count:pe.length,getScrollElement:()=>Le.current,estimateSize:()=>56,overscan:6,gap:5}),ze=r((async e=>{let n="solana-only"!==$&&e.chains?.some((e=>e.startsWith("eip155"))),t="ethereum-only"!==$&&e.chains?.some((e=>e.startsWith("solana"))),l=()=>{let n=e.id;return _[n]||_[`${n}_wallet`]},i=n=>{let t=P.normalize(e.id);return U.find((e=>P.normalize(e.walletClientType)===t&&e.chainType===n&&!("ethereum"===e.chainType&&e instanceof T||"solana"===e.chainType&&e instanceof S)))},a=async()=>{if(!_e||!e.listing)return!1;let n=M[e.listing.slug]?{...e.listing,...M[e.listing.slug]}:e.listing;return _e.setWalletEntry(n,de),await _e.resetConnection(e.id),await we(_e,{name:e.label,icon:e.icon,id:e.id,url:e.url}),!0},o=async()=>!!ke&&!!e.listing&&(await ke.disconnect(),ke.wallet.setWalletEntry(e.listing,de),await new Promise((e=>setTimeout(e,100))),await we(ke,{name:e.label,icon:e.icon,id:e.id,url:e.url}),!0),r=async n=>{let t=(e=>{let n=l();if(n)return n.getMobileRedirect({isSolana:e,connectOnly:!!g,useUniversalLink:!1})})(n);return!!t&&(await we(t,{name:e.label,icon:e.icon,id:e.id,url:e.url}),!0)};if(n&&t)J(e);else{if(n&&!t){let n=i("ethereum");if(n&&!Z(n))return void await we(n,{name:e.label,icon:e.icon,id:e.id,url:e.url});if(d&&l()){if(await r(!1)||await a())return}else if(await a()||await r(!1))return}if(t&&!n){let n=i("solana");if(n&&!Z(n))return void await we(n,{name:e.label,icon:e.icon,id:e.id,url:e.url});if(d){if(await r(!0)||await o())return}else if(await o()||await r(!0))return}if(!Z(e.connector)){if(_e&&"wallet_connect_v2"===e.connector?.connectorType)if(await _e.resetConnection(e.id),"wallet_connect_qr"!==e.id&&e.listing){let n=M[e.listing.slug]?{...e.listing,...M[e.listing.slug]}:e.listing;_e.setWalletEntry(n,de)}else _e.setWalletEntry({id:"wallet_connect_qr",name:"WalletConnect",rdns:"",slug:"wallet-connect",homepage:"",chains:["eip155"],mobile:{native:"",universal:void 0}},de);return ke&&"walletconnect_solana"===e.connector?.walletBranding.id&&(await ke.disconnect(),"wallet_connect_qr_solana"!==e.id&&e.listing?ke.wallet.setWalletEntry(e.listing,de):ke.wallet.setWalletEntry({id:"wallet_connect_solana_qr",name:"WalletConnect",rdns:"",slug:"wallet-connect-solana",homepage:"",chains:["solana"],mobile:{native:"",universal:void 0}},de),await new Promise((e=>setTimeout(e,100)))),void await we(e.connector,{name:e.label,icon:e.icon,id:e.id,url:e.url})}e.url&&await we(e.url,{name:e.label,icon:e.icon,id:e.id,url:e.url})}}),[_e,ke,we,J,de,$,g,U]);return s((()=>{if(!x)return;let e=pe.find((({id:e})=>e===x));e&&ze(e).catch(console.error)}),[x]),/*#__PURE__*/e(I,{className:h,children:[/*#__PURE__*/n(I.Header,{icon:k&&ve?void 0:he&&!ne||ne&&d&&he?.icon?he.icon:he?void 0:K,iconVariant:he&&!ne||ne&&d?"loading":void 0,iconLoadingStatus:he&&!ne||ne&&d?{success:"success"===me,fail:"error"===me}:void 0,title:k&&ve?void 0:he&&!ne?N("connectWallet.waitingForWallet",{walletName:he.name}):ne&&d?N("connectWallet.waitingForWallet",{walletName:he?.name??"connection"}):be,subtitle:k&&ve?void 0:he&&!ne&&"string"==typeof he.connector?N("connectWallet.installAndConnect",{walletName:he.name}):he&&!ne&&"string"!=typeof he.connector?"error"===me?ue===j.NO_SOLANA_ACCOUNTS?`The connected wallet has no Solana accounts. Please add a Solana account in ${he.name} and try again.`:N("connectWallet.tryConnectingAgain"):N("connectionStatus.connectOneWallet"):ve?p??(V?N("connectWallet.connectToAccount",{appName:V.name}):null):null,showBack:!!R||!ve,showClose:!0,onBack:R||fe,onClose:H}),/*#__PURE__*/e(I.Body,{ref:Le,$colorScheme:O.appearance.palette.colorScheme,style:{marginBottom:ne?"0.5rem":void 0},children:[ye&&/*#__PURE__*/n(te,{children:/*#__PURE__*/e(y,{style:{background:"transparent"},children:[/*#__PURE__*/n(z,{children:/*#__PURE__*/n(l,{})}),/*#__PURE__*/n("input",{className:"login-method-button",type:"text",placeholder:N("connectWallet.searchPlaceholder",{count:String(ge)}),onChange:e=>xe(e.target.value),value:Ce})]})}),ne&&d&&"loading"===me&&/*#__PURE__*/e("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"1rem"},children:[/*#__PURE__*/n(m,{variant:"primary",onClick:()=>window.open(ne.universal??ne.native,"_blank"),style:{width:"100%"},children:N("connectWallet.openInApp")}),/*#__PURE__*/n(ce,{value:ne.universal??ne.native,iconOnly:!0,children:"Copy link"})]}),ne&&!d&&"loading"===me&&/*#__PURE__*/n("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"1rem"},children:/*#__PURE__*/n(ce,{value:ne.universal??ne.native,iconOnly:!0,children:N("connectWallet.copyLink")})}),ne&&!d&&/*#__PURE__*/n(f,{size:280,url:ne.universal??ne.native,squareLogoElement:he?.icon?"string"==typeof he.icon?e=>/*#__PURE__*/n("svg",{...e,children:/*#__PURE__*/n("image",{href:he.icon,height:e.height,width:e.width})}):he.icon:q}),ne&&!d&&he?.url&&("binance"===he.id||"binanceus"===he.id||"binance-defi"===he.id)&&/*#__PURE__*/e(se,{children:[/*#__PURE__*/e("span",{children:["Don't have ",he.name,"? "]}),/*#__PURE__*/n(w,{href:he.url,target:"_blank",size:"sm",children:"Download here"})]}),/*#__PURE__*/e(le,{children:[he&&!ne&&"string"==typeof he.connector&&/*#__PURE__*/e(ie,{onClick:()=>window.open(he.connector,"_blank"),children:[he.icon&&("string"==typeof he.icon?/*#__PURE__*/n(Y,{src:he.icon}):/*#__PURE__*/n(he.icon,{})),/*#__PURE__*/n(re,{children:he.name})]}),G?.chains.some((e=>e.startsWith("eip155")))&&!he&&/*#__PURE__*/e(ie,{onClick:()=>ze({...G,chains:G.chains.filter((e=>e.startsWith("eip155")))}),children:[G.icon&&("string"==typeof G.icon?/*#__PURE__*/n(Y,{src:G.icon}):/*#__PURE__*/n(G.icon,{})),/*#__PURE__*/n(re,{children:G.label}),/*#__PURE__*/n(ae,{children:/*#__PURE__*/n(Q,{})})]}),G?.chains.some((e=>e.startsWith("solana")))&&!he&&/*#__PURE__*/e(ie,{onClick:()=>ze({...G,chains:G.chains.filter((e=>e.startsWith("solana")))}),children:[G.icon&&("string"==typeof G.icon?/*#__PURE__*/n(Y,{src:G.icon}):/*#__PURE__*/n(G.icon,{})),/*#__PURE__*/n(re,{children:G.label}),/*#__PURE__*/n(ae,{children:/*#__PURE__*/n(D,{})})]}),ve&&/*#__PURE__*/e(t,{children:[!(ge>0)&&/*#__PURE__*/n(oe,{children:N("connectWallet.noWalletsFound")}),ge>0&&!ne&&/*#__PURE__*/n("div",{style:{maxHeight:56*Math.min(pe.length,5)+5,width:"100%"},children:/*#__PURE__*/n("div",{style:{height:`${We.getTotalSize()}px`,width:"100%",position:"relative"},children:We.getVirtualItems().map((e=>/*#__PURE__*/n(ee,{index:e.index,style:{position:"absolute",top:0,left:0,height:`${e.size}px`,transform:`translateY(${e.start}px)`},data:{wallets:pe,walletChainType:$,handleWalletClick:ze}},e.key)))})})]})]})]}),/*#__PURE__*/e(I.Footer,{children:[he&&!ne&&"string"!=typeof he.connector&&"error"===me&&/*#__PURE__*/n(I.Actions,{children:/*#__PURE__*/n(m,{style:{width:"100%",alignItems:"center"},variant:"error",onClick:()=>we(he.connector,{name:he.name,icon:he.icon,id:he.id,url:he.url}),children:N("connectWallet.retry")})}),!!(V&&V.legal.privacyPolicyUrl&&V.legal.termsAndConditionsUrl)&&/*#__PURE__*/n(u,{app:V,alwaysShowImplicitConsent:!0}),/*#__PURE__*/n(I.Watermark,{})]})]})};let te=h.div`
|
|
96
|
+
`;function X({enabled:e=!0,walletList:n,walletChainType:t}){let l=v(),{connectors:i}=A(),{listings:r,loading:c}=k(e),s=t??l.appearance.walletChainType,d=n??l.appearance?.walletList,h=o((()=>new P(s,d)),[s,d]),{wallets:m,walletCount:u}=o((()=>h.getWallets(i,r)),[h,i,r]),[p,g]=a(""),w=o((()=>p?m.filter((e=>e.label.toLowerCase().includes(p.toLowerCase()))):m),[p,m]),[f,y]=a();return{selected:f,setSelected:y,search:p,setSearch:g,loadingListings:c,wallets:w,walletCount:u}}let Z=e=>!e||"string"!=typeof e&&(e instanceof z||e instanceof S);const ee=({index:l,style:i,data:a,recent:o})=>{let r=a.wallets[l],{walletChainType:c,handleWalletClick:s}=a,{t:d}=C(),h={...i,boxSizing:"border-box"};return r?/*#__PURE__*/e(ie,{style:h,onClick:()=>s(r),children:[r.icon&&(r.connector&&!Z(r.connector)?/*#__PURE__*/n(V,{children:"string"==typeof r.icon?/*#__PURE__*/n(Y,{src:r.icon}):/*#__PURE__*/n(r.icon,{style:{width:"32px",height:"32px"}})}):"string"==typeof r.icon?/*#__PURE__*/n(Y,{src:r.icon}):/*#__PURE__*/n(r.icon,{style:{width:"32px",height:"32px"}})),/*#__PURE__*/n(re,{children:r.label}),o?/*#__PURE__*/e(t,{children:[/*#__PURE__*/n(G,{children:d("connectWallet.lastUsed")}),/*#__PURE__*/n(ae,{children:/*#__PURE__*/e(t,{children:["ethereum-only"===c&&/*#__PURE__*/n(Q,{}),"solana-only"===c&&/*#__PURE__*/n(D,{})]})})]}):/*#__PURE__*/n(ae,{children:!("ethereum-only"===c||"solana-only"===c)&&/*#__PURE__*/e(t,{children:[r.chains?.some((e=>e.startsWith("eip155")))&&/*#__PURE__*/n(Q,{}),r.chains?.some((e=>e.startsWith("solana")))&&/*#__PURE__*/n(D,{})]})})]}):null};var ne=({className:h,customDescription:p,connectOnly:g,preSelectedWalletId:x,hideHeader:k,...B})=>{let I=v(),{t:N}=C(),{connectors:U}=A(),$=B.walletChainType||I.appearance.walletChainType,F=B.walletList||I.appearance?.walletList,{onBack:R,onClose:H,app:V}=B,{selected:G,setSelected:J,qrUrl:ne,setQrUrl:de,connecting:he,uiState:me,errorCode:ue,wallets:pe,walletCount:ge,handleConnect:we,handleBack:fe,showSearchBar:ye,isInitialConnectView:ve,title:be,search:Ce,setSearch:xe}=function({onConnect:e,onBack:n,onClose:t,onConnectError:l,walletList:i,walletChainType:c,app:s}){let h=v(),{connectors:m}=A(),{t:u}=C(),{wallets:p,walletCount:g,search:w,setSearch:f,selected:y,setSelected:x}=X({enabled:L(i??[]),walletList:i,walletChainType:c}),[_,k]=a(),[T,z]=a(),[S,j]=a(),[K,B]=a(),q=!y&&!S&&!K,O=q&&(g>6||w.length>0),I=m.find((e=>"wallet_connect_v2"===e.connectorType)),N=r((async(n,t)=>{if(n){if(K?.connector===n&&"loading"===_)return void console.log("Already connecting to this wallet, skipping duplicate attempt");if(k("loading"),"string"==typeof n)return B({connector:n,name:t?.name??"Wallet",icon:t?.icon,id:t?.id,url:t?.url}),void window.open(n,"_blank");B({connector:n,name:t?.name??n.walletBranding.name??"Wallet",icon:t?.icon??n.walletBranding.icon,id:t?.id,url:t?.url});try{let t=await n.connect({showPrompt:!0});if(!t)return k("error"),z(void 0),void l?.(new E("Unable to connect wallet"));k("success"),z(void 0),W({address:t.address,client:t.walletClientType,appId:h.id}),setTimeout((()=>{e({connector:n,wallet:t})}),b)}catch(n){if(console.error("ERROR: ",{e:n}),n?.message?.includes("already pending for origin")||n?.message?.includes("wallet_requestPermissions"))return void console.log("Connection request already pending, maintaining loading state");k("error"),z(n?.privyErrorCode),l?.(n instanceof Error?n:new E(n?.message||"Unable to connect wallet"))}}}),[h.id,e,K,_]),U=r((()=>S?(k(void 0),z(void 0),B(void 0),void j(void 0)):K?(k(void 0),z(void 0),void B(void 0)):y?(k(void 0),z(void 0),B(void 0),void x(void 0)):"error"===_||"loading"===_?(k(void 0),z(void 0),void B(void 0)):void n?.()),[S,K,y,_,n]),$=o((()=>K?.connector===I&&S&&d&&K?.name?u("connectWallet.goToWallet",{walletName:K.name}):K?.connector===I&&S&&K?.name?u("connectWallet.scanToConnect",{walletName:K.name}):S&&K?.name?u(d?"connectWallet.goToWallet":"connectWallet.scanToConnect",{walletName:K.name}):"string"==typeof K?.connector?u("connectWallet.openOrInstall",{walletName:K.name}):y&&!K?u("connectWallet.selectNetwork"):K?null:u("connectWallet.selectYourWallet")),[K,S,y,I,u]);return{selected:y,setSelected:x,qrUrl:S,setQrUrl:j,connecting:K,uiState:_,errorCode:T,search:w,setSearch:f,wallets:p,walletCount:g,wc:I,isInitialConnectView:q,showSearchBar:O,title:$,handleConnect:N,handleBack:U,onClose:t,onConnect:e,app:s}}({...B,walletList:F,walletChainType:$}),_e=U.find((e=>"wallet_connect_v2"===e.connectorType)),ke=U.find((e=>"walletconnect_solana"===e.walletBranding.id)),Le=c(null),We=i({count:pe.length,getScrollElement:()=>Le.current,estimateSize:()=>56,overscan:6,gap:5}),Te=r((async e=>{let n="solana-only"!==$&&e.chains?.some((e=>e.startsWith("eip155"))),t="ethereum-only"!==$&&e.chains?.some((e=>e.startsWith("solana"))),l=()=>{let n=e.id;return _[n]||_[`${n}_wallet`]},i=n=>{let t=P.normalize(e.id);return U.find((e=>P.normalize(e.walletClientType)===t&&e.chainType===n&&!("ethereum"===e.chainType&&e instanceof z||"solana"===e.chainType&&e instanceof S)))},a=async()=>{if(!_e||!e.listing)return!1;let n=M[e.listing.slug]?{...e.listing,...M[e.listing.slug]}:e.listing;return _e.setWalletEntry(n,de),await _e.resetConnection(e.id),await we(_e,{name:e.label,icon:e.icon,id:e.id,url:e.url}),!0},o=async()=>!!ke&&!!e.listing&&(await ke.disconnect(),ke.wallet.setWalletEntry(e.listing,de),await new Promise((e=>setTimeout(e,100))),await we(ke,{name:e.label,icon:e.icon,id:e.id,url:e.url}),!0),r=async n=>{let t=(e=>{let n=l();if(n)return n.getMobileRedirect({isSolana:e,connectOnly:!!g,useUniversalLink:!1})})(n);return!!t&&(await we(t,{name:e.label,icon:e.icon,id:e.id,url:e.url}),!0)};if(n&&t)J(e);else{if(n&&!t){let n=i("ethereum");if(n&&!Z(n))return void await we(n,{name:e.label,icon:e.icon,id:e.id,url:e.url});if(d&&l()){if(await r(!1)||await a())return}else if(await a()||await r(!1))return}if(t&&!n){let n=i("solana");if(n&&!Z(n))return void await we(n,{name:e.label,icon:e.icon,id:e.id,url:e.url});if(d){if(await r(!0)||await o())return}else if(await o()||await r(!0))return}if(!Z(e.connector)){if(_e&&"wallet_connect_v2"===e.connector?.connectorType)if(await _e.resetConnection(e.id),"wallet_connect_qr"!==e.id&&e.listing){let n=M[e.listing.slug]?{...e.listing,...M[e.listing.slug]}:e.listing;_e.setWalletEntry(n,de)}else _e.setWalletEntry({id:"wallet_connect_qr",name:"WalletConnect",rdns:"",slug:"wallet-connect",homepage:"",chains:["eip155"],mobile:{native:"",universal:void 0}},de);return ke&&"walletconnect_solana"===e.connector?.walletBranding.id&&(await ke.disconnect(),"wallet_connect_qr_solana"!==e.id&&e.listing?ke.wallet.setWalletEntry(e.listing,de):ke.wallet.setWalletEntry({id:"wallet_connect_solana_qr",name:"WalletConnect",rdns:"",slug:"wallet-connect-solana",homepage:"",chains:["solana"],mobile:{native:"",universal:void 0}},de),await new Promise((e=>setTimeout(e,100)))),void await we(e.connector,{name:e.label,icon:e.icon,id:e.id,url:e.url})}e.url&&await we(e.url,{name:e.label,icon:e.icon,id:e.id,url:e.url})}}),[_e,ke,we,J,de,$,g,U]);return s((()=>{if(!x)return;let e=pe.find((({id:e})=>e===x));e&&Te(e).catch(console.error)}),[x]),/*#__PURE__*/e(O,{className:h,children:[/*#__PURE__*/n(O.Header,{icon:k&&ve?void 0:he&&!ne||ne&&d&&he?.icon?he.icon:he?void 0:K,iconVariant:he&&!ne||ne&&d?"loading":void 0,iconLoadingStatus:he&&!ne||ne&&d?{success:"success"===me,fail:"error"===me}:void 0,title:k&&ve?void 0:he&&!ne?N("connectWallet.waitingForWallet",{walletName:he.name}):ne&&d?N("connectWallet.waitingForWallet",{walletName:he?.name??"connection"}):be,subtitle:k&&ve?void 0:he&&!ne&&"string"==typeof he.connector?N("connectWallet.installAndConnect",{walletName:he.name}):he&&!ne&&"string"!=typeof he.connector?"error"===me?ue===j.NO_SOLANA_ACCOUNTS?`The connected wallet has no Solana accounts. Please add a Solana account in ${he.name} and try again.`:N("connectWallet.tryConnectingAgain"):N("connectionStatus.connectOneWallet"):ve?p??(V?N("connectWallet.connectToAccount",{appName:V.name}):null):null,showBack:!!R||!ve,showClose:!0,onBack:R||fe,onClose:H}),/*#__PURE__*/e(O.Body,{ref:Le,$colorScheme:I.appearance.palette.colorScheme,style:{marginBottom:ne?"0.5rem":void 0},children:[ye&&/*#__PURE__*/n(te,{children:/*#__PURE__*/e(y,{style:{background:"transparent"},children:[/*#__PURE__*/n(T,{children:/*#__PURE__*/n(l,{})}),/*#__PURE__*/n("input",{className:"login-method-button",type:"text",placeholder:N("connectWallet.searchPlaceholder",{count:String(ge)}),onChange:e=>xe(e.target.value),value:Ce})]})}),ne&&d&&"loading"===me&&/*#__PURE__*/e("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"1rem"},children:[/*#__PURE__*/n(m,{variant:"primary",onClick:()=>window.open(ne.universal??ne.native,"_blank"),style:{width:"100%"},children:N("connectWallet.openInApp")}),/*#__PURE__*/n(ce,{value:ne.universal??ne.native,iconOnly:!0,children:"Copy link"})]}),ne&&!d&&"loading"===me&&/*#__PURE__*/n("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"1rem"},children:/*#__PURE__*/n(ce,{value:ne.universal??ne.native,iconOnly:!0,children:N("connectWallet.copyLink")})}),ne&&!d&&/*#__PURE__*/n(f,{size:280,url:ne.universal??ne.native,squareLogoElement:he?.icon?"string"==typeof he.icon?e=>/*#__PURE__*/n("svg",{...e,children:/*#__PURE__*/n("image",{href:he.icon,height:e.height,width:e.width})}):he.icon:q}),ne&&!d&&he?.url&&("binance"===he.id||"binanceus"===he.id||"binance-defi"===he.id)&&/*#__PURE__*/e(se,{children:[/*#__PURE__*/e("span",{children:["Don't have ",he.name,"? "]}),/*#__PURE__*/n(w,{href:he.url,target:"_blank",size:"sm",children:"Download here"})]}),/*#__PURE__*/e(le,{children:[he&&!ne&&"string"==typeof he.connector&&/*#__PURE__*/e(ie,{onClick:()=>window.open(he.connector,"_blank"),children:[he.icon&&("string"==typeof he.icon?/*#__PURE__*/n(Y,{src:he.icon}):/*#__PURE__*/n(he.icon,{})),/*#__PURE__*/n(re,{children:he.name})]}),G?.chains.some((e=>e.startsWith("eip155")))&&!he&&/*#__PURE__*/e(ie,{onClick:()=>Te({...G,chains:G.chains.filter((e=>e.startsWith("eip155")))}),children:[G.icon&&("string"==typeof G.icon?/*#__PURE__*/n(Y,{src:G.icon}):/*#__PURE__*/n(G.icon,{})),/*#__PURE__*/n(re,{children:G.label}),/*#__PURE__*/n(ae,{children:/*#__PURE__*/n(Q,{})})]}),G?.chains.some((e=>e.startsWith("solana")))&&!he&&/*#__PURE__*/e(ie,{onClick:()=>Te({...G,chains:G.chains.filter((e=>e.startsWith("solana")))}),children:[G.icon&&("string"==typeof G.icon?/*#__PURE__*/n(Y,{src:G.icon}):/*#__PURE__*/n(G.icon,{})),/*#__PURE__*/n(re,{children:G.label}),/*#__PURE__*/n(ae,{children:/*#__PURE__*/n(D,{})})]}),ve&&/*#__PURE__*/e(t,{children:[!(ge>0)&&/*#__PURE__*/n(oe,{children:N("connectWallet.noWalletsFound")}),ge>0&&!ne&&/*#__PURE__*/n("div",{style:{maxHeight:56*Math.min(pe.length,5)+5,width:"100%"},children:/*#__PURE__*/n("div",{style:{height:`${We.getTotalSize()}px`,width:"100%",position:"relative"},children:We.getVirtualItems().map((e=>/*#__PURE__*/n(ee,{index:e.index,style:{position:"absolute",top:0,left:0,height:`${e.size}px`,transform:`translateY(${e.start}px)`},data:{wallets:pe,walletChainType:$,handleWalletClick:Te}},e.key)))})})]})]})]}),/*#__PURE__*/e(O.Footer,{children:[he&&!ne&&"string"!=typeof he.connector&&"error"===me&&/*#__PURE__*/n(O.Actions,{children:/*#__PURE__*/n(m,{style:{width:"100%",alignItems:"center"},variant:"error",onClick:()=>we(he.connector,{name:he.name,icon:he.icon,id:he.id,url:he.url}),children:N("connectWallet.retry")})}),!!(V&&V.legal.privacyPolicyUrl&&V.legal.termsAndConditionsUrl)&&/*#__PURE__*/n(u,{app:V,alwaysShowImplicitConsent:!0}),/*#__PURE__*/n(O.Watermark,{})]})]})};let te=h.div`
|
|
99
97
|
position: sticky;
|
|
100
98
|
// Offset by negative margin to account for focus outline
|
|
101
99
|
margin-top: -3px;
|
package/dist/esm/{ConnectionStatusScreen-SAx7YO5y.mjs → ConnectionStatusScreen-Cl_-0PvG.mjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import{useRef as o,useEffect as i,useState as a,useCallback as r}from"react";import{isMobile as l}from"react-device-detect";import{styled as c}from"styled-components";import{a as s,S as d,W as m,B as u,b as p}from"./index-
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import{useRef as o,useEffect as i,useState as a,useCallback as r}from"react";import{isMobile as l}from"react-device-detect";import{styled as c}from"styled-components";import{a as s,S as d,W as m,B as u,b as p}from"./index-Bwrmi8Zh.mjs";import{L as g}from"./Link-DJ5gq9Di.mjs";import{u as w,q as h}from"./context-CiVjsvSu.mjs";import{u as S}from"./useI18n-DHUnRp_f.mjs";import{C as y,P as f,d as C}from"./use-export-wallet-CP-hSjOG.mjs";import{Q as b,k as v,T}from"./useActiveWallet-Dm548R2J.mjs";import{isHex as _,getAddress as E}from"viem";import{b as R,u as k,k as A}from"./internal-context-Z-fyxadS.mjs";import{u as W,a as I}from"./get-is-unified-wallet-o1p06vNx.mjs";import{s as L}from"./shouldProceedtoEmbeddedWalletCreationFlow-C8hGTGhw.mjs";import{u as j}from"./PrivyPluginContext-2QN2dVUw.mjs";import{e as U}from"./usePrivy-kABlAB4n.mjs";import{S as O}from"./ScreenLayout-BxduQYcn.mjs";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"eventemitter3";import"./useWallets-BSSZRV2z.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"viem/utils";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"@scure/base";import"./events-context-CI0iqAXA.mjs";import"zustand";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./getPublicClient-B4uPLKn-.mjs";import"ofetch";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"tinycolor2";import"./ModalHeader-Dgah8j-h.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-D4UVyUmz.mjs";import"./index-Dq_xe9dz.mjs";const N=e=>{let t=localStorage.getItem("-walletlink:https://www.walletlink.org:Addresses")?.split(" ").filter((e=>_(e,{strict:!0}))).map((e=>E(e)));return!!t?.length&&!!e?.linkedAccounts.filter((e=>"wallet"==e.type&&t.includes(e.address))).length};const M=e=>e?.privyErrorCode===R.LINKED_TO_ANOTHER_USER?y.ERROR_USER_EXISTS:e instanceof f&&!e.details.default?e.details:e instanceof C?y.ERROR_TIMED_OUT:e?.privyErrorCode===R.CANNOT_LINK_MORE_OF_TYPE?y.ERROR_USER_LIMIT_REACHED:y.ERROR_WALLET_CONNECTION,x=({walletLogo:o,title:i,subtitle:a,signSuccess:r,errorMessage:l,connectSuccess:c,separateConnectAndSign:s,signing:d,walletConnectRedirectUri:m,walletConnectFallbackUniversalUri:u,hasTabbedAway:p,showCoinbaseWalletResetCta:w,numRetries:h,onBack:f,onSign:C,onRetry:b,onCoinbaseReset:v,onDifferentWallet:T})=>{let{t:_}=S(),E=w?{label:"Use a different wallet",onClick:v,disabled:r}:l===y.ERROR_USER_EXISTS&&f?{label:"Use a different wallet",onClick:T}:c&&!r&&s?{label:d?"Signing":"Sign with your wallet",onClick:C,disabled:d}:!r&&l?.retryable&&h<2?{label:"Retry",onClick:b,disabled:!1}:r||l?void 0:{label:_("connectionStatus.connecting"),onClick:()=>{},disabled:!0};/*#__PURE__*/return e(O,{title:i,subtitle:a,icon:o,iconVariant:"loading",iconLoadingStatus:{success:r,fail:!!l},primaryCta:E,onBack:f,watermark:!0,children:!c&&m&&!p&&/*#__PURE__*/t(B,{children:[_("connectionStatus.stillHere")," ",/*#__PURE__*/e(g,{href:m,target:"_blank",variant:"underlined",size:"sm",children:_("connectionStatus.tryConnectingAgain")}),u&&/*#__PURE__*/t(n,{children:[" ",_("connectionStatus.or")," ",/*#__PURE__*/e(g,{href:u,target:"_blank",variant:"underlined",size:"sm",children:_("connectionStatus.useDifferentLink")})]})]})})},D={component:()=>{let t,[n,c]=a(!1),[g,f]=a(!1),[C,_]=a(void 0),{authenticated:E,logout:O}=W(),{navigate:D,navigateBack:B,lastScreen:F,currentScreen:P,setModalData:q,data:H}=I(),X=w(),{t:z}=S(),{getAuthFlow:Q,walletConnectionStatus:Y,closePrivyModal:J,initLoginWithWallet:K,loginWithWallet:V,updateWallets:$,createAnalyticsEvent:G}=k(),{walletConnectors:Z}=W(),[ee,te]=a(0),{user:ne}=W(),oe=j(),[ie]=a(ne?.linkedAccounts.length||0),[ae,re]=a(""),[le,ce]=a(""),[se,de]=a(!1),{hasTabbedAway:me}=function(){let[e,t]=a(!1),n=r((()=>{document.hidden&&t(!0)}),[]);return i((()=>(document.addEventListener("visibilitychange",n),()=>document.removeEventListener("visibilitychange",n))),[n]),{hasTabbedAway:e,reset:()=>t(!1)}}(),{enabled:ue,token:pe}=s(),ge=b(Y?.connector?.walletClientType||"unknown"),we=l&&"wallet_connect_v2"===Y?.connector?.connectorType||l&&"coinbase_wallet"===Y?.connector?.connectorType||l&&"base_account"===Y?.connector?.connectorType||l&&"injected"===Y?.connector?.connectorType&&"phantom"===Y?.connector?.walletClientType||l&&"solana_adapter"===Y?.connector?.connectorType&&"mobile_wallet_adapter"===Y.connector.walletClientType,he="connected"===Y?.status,Se="switching_to_supported_chain"===Y?.status;i((()=>{let e=Q(),t=e instanceof p||e instanceof d?e:void 0;he&&"solana"===Y.connector?.chainType&&"phantom"===Y.connector?.walletClientType&&oe(U)&&void 0===H?.login?.isSigningInWithLedgerSolana?D("ConnectLedgerScreen",!1):(he&&!t&&(!ue||pe||E?K(Y.connectedWallet,pe,H?.login?.disableSignup,H?.login?.isSigningInWithLedgerSolana?"transaction":"plain").then((()=>{de(!0)})):(q({captchaModalData:{callback:e=>K(Y.connectedWallet,e,H?.login?.disableSignup,H?.login?.isSigningInWithLedgerSolana?"transaction":"plain").then((()=>{de(!0)})),userIntentRequired:!1,onSuccessNavigateTo:"ConnectionStatusScreen",onErrorNavigateTo:"ErrorScreen"}}),D("CaptchaScreen",!1))),t instanceof d&&H?.login?.isSigningInWithLedgerSolana&&(t.messageType="transaction"),t&&we&&he&&!t.preparedMessage?t.buildMessage():t&&!we&&he&&(g||(async()=>{f(!0),_(void 0);try{"wallet_connect_v2"===Y?.connector?.connectorType&&"metamask"===Y?.connector?.walletClientType&&await v(2500),await fe()}catch(e){console.warn("Auto-prompted signature failed",e)}finally{f(!1)}})()))}),[ee,he,se]),i((()=>{if(ne&&n){let e=h-500;if(X?.legal.requireUsersAcceptTerms&&!ne.hasAcceptedTerms){let t=setTimeout((()=>{D("AffirmativeConsentScreen")}),e);return()=>clearTimeout(t)}if(L(ne,X.embeddedWallets)){let t=setTimeout((()=>{q({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),G({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"ConnectionStatusScreen"}}),O()},callAuthOnSuccessOnClose:!0}}),D("EmbeddedWalletOnAccountCreateScreen")}),e);return()=>clearTimeout(t)}$();let t=setTimeout((()=>J({shouldCallAuthOnSuccess:!0,isSuccess:!0})),h);return()=>clearTimeout(t)}}),[ne,n]);let ye=e=>{if(e?.privyErrorCode!==R.ALLOWLIST_REJECTED){if(e?.privyErrorCode===R.USER_LIMIT_REACHED)return console.error(new A(e).toString()),void D("UserLimitReachedScreen");if(e?.privyErrorCode!==R.USER_DOES_NOT_EXIST)return e?.privyErrorCode===R.ACCOUNT_TRANSFER_REQUIRED&&e.data?.data?.nonce?(q({accountTransfer:{nonce:e.data?.data?.nonce,account:Q()?.meta.address,displayName:e.data?.data?.account?.displayName,externalWalletMetadata:{walletClientType:Q()?.meta.walletClientType,chainId:Q()?.meta.chainId,connectorType:Q()?.meta.connectorType},linkMethod:Q()instanceof p?"siwe":"siws",embeddedWalletAddress:e.data?.data?.otherUser?.embeddedWalletAddress}}),void D("LinkConflictScreen")):void _(M(e));D("AccountNotFoundScreen")}else D("AllowlistRejectionScreen")};async function fe(){try{await V(),c(!0)}catch(e){ye(e)}finally{f(!1)}}i((()=>{Y?.connectError&&ye(Y?.connectError)}),[Y]),((e,t)=>{let n=o((()=>{}));i((()=>{n.current=e})),i((()=>{if(null!==t){let e=setInterval((()=>n.current()),t||0);return()=>clearInterval(e)}}),[t])})((()=>{let e="wallet_connect_v2"===Ce&&Y?.connector instanceof m?Y.connector.redirectUri:void 0;e&&re(e);let t="wallet_connect_v2"===Ce&&Y?.connector instanceof m?Y.connector.fallbackUniversalRedirectUri:void 0;t&&ce(t)}),Y?.connector instanceof m&&!ae?500:null);let Ce=Y?.connector?.connectorType||"injected",be=Y?.connector?.walletClientType||"unknown",ve=ge?.metadata?.shortName||ge?.name||Y?.connector?.walletBranding.name||"Browser Extension",Te=ge?.image_url?.md||Y?.connector?.walletBranding.icon||(t=>/*#__PURE__*/e(u,{...t})),_e="Browser Extension"===ve?ve.toLowerCase():ve;t=n?z("connectionStatus.successfullyConnected",{walletName:_e}):C?z("connectionStatus.errorTitle",{errorMessage:C.message}):Se?"Switching networks":he?g&&we?"Signing":"Sign to verify":`Waiting for ${_e}`;let Ee=z("connectionStatus.checkOtherWindows");n?Ee=ie===(ne?.linkedAccounts.length||0)?"Wallet was already linked.":"You're good to go!":ee>=2&&C?Ee="Unable to connect wallet":C?Ee=C.detail:Se?Ee="Switch your wallet to the requested network.":he&&we?Ee="Sign the message in your wallet to verify it belongs to you.":"metamask"===be&&l?Ee="Click continue to open and connect MetaMask.":"metamask"===be?Ee="For the best experience, connect only one wallet at a time.":"wallet_connect"===Ce?Ee="Open your mobile wallet app to continue":"coinbase_wallet"===Ce?T()||(Ee=N(ne)?"Continue with the Coinbase app. Not the right wallet? Reset your connection below.":"Confirm in the Coinbase app/popup to continue."):H?.login?.isSigningInWithLedgerSolana&&(Ee="Ledger requires a transaction to verify your identity. You'll sign a transaction that performs no onchain action.");let Re=Z?.walletConnectors?.find((e=>"coinbase_wallet"===e.walletClientType)),ke="coinbase_wallet"===be&&(N(ne)||C===y.ERROR_USER_EXISTS);/*#__PURE__*/return e(x,{walletLogo:Te,title:t,subtitle:Ee,signSuccess:n,errorMessage:C,connectSuccess:he,separateConnectAndSign:we,signing:g,walletConnectRedirectUri:ae,walletConnectFallbackUniversalUri:le,hasTabbedAway:me,showCoinbaseWalletResetCta:ke,numRetries:ee,onBack:F&&P!==F?B:void 0,onSign:()=>{f(!0),fe()},onRetry:()=>{te(ee+1),_(void 0),he?(f(!0),fe()):Y?.connectRetry()},onCoinbaseReset:()=>{Re&&Re?.disconnect()},onDifferentWallet:B})}};let B=c.p`
|
|
2
2
|
text-align: center;
|
|
3
3
|
color: var(--privy-color-foreground-2);
|
|
4
4
|
font-size: 14px;
|
|
5
5
|
line-height: 22px;
|
|
6
6
|
margin: 16px 0;
|
|
7
|
-
`;export{D as ConnectionStatusScreen,
|
|
7
|
+
`;export{D as ConnectionStatusScreen,x as ConnectionStatusView,D as default,M as getErrorDetails};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import{jsx as o,jsxs as r}from"react/jsx-runtime";import{useState as e}from"react";import{styled as t}from"styled-components";const i=({style:r,color:e,...t})=>/*#__PURE__*/o("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:e||"currentColor",style:{height:"1.5rem",width:"1.5rem",...r},...t,children:/*#__PURE__*/o("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})}),c=({color:r,...e})=>/*#__PURE__*/o("svg",{version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 115.77 122.88",xmlSpace:"preserve",...e,children:/*#__PURE__*/o("g",{children:/*#__PURE__*/o("path",{fill:r||"currentColor",className:"st0",d:"M89.62,13.96v7.73h12.19h0.01v0.02c3.85,0.01,7.34,1.57,9.86,4.1c2.5,2.51,4.06,5.98,4.07,9.82h0.02v0.02 v73.27v0.01h-0.02c-0.01,3.84-1.57,7.33-4.1,9.86c-2.51,2.5-5.98,4.06-9.82,4.07v0.02h-0.02h-61.7H40.1v-0.02 c-3.84-0.01-7.34-1.57-9.86-4.1c-2.5-2.51-4.06-5.98-4.07-9.82h-0.02v-0.02V92.51H13.96h-0.01v-0.02c-3.84-0.01-7.34-1.57-9.86-4.1 c-2.5-2.51-4.06-5.98-4.07-9.82H0v-0.02V13.96v-0.01h0.02c0.01-3.85,1.58-7.34,4.1-9.86c2.51-2.5,5.98-4.06,9.82-4.07V0h0.02h61.7 h0.01v0.02c3.85,0.01,7.34,1.57,9.86,4.1c2.5,2.51,4.06,5.98,4.07,9.82h0.02V13.96L89.62,13.96z M79.04,21.69v-7.73v-0.02h0.02 c0-0.91-0.39-1.75-1.01-2.37c-0.61-0.61-1.46-1-2.37-1v0.02h-0.01h-61.7h-0.02v-0.02c-0.91,0-1.75,0.39-2.37,1.01 c-0.61,0.61-1,1.46-1,2.37h0.02v0.01v64.59v0.02h-0.02c0,0.91,0.39,1.75,1.01,2.37c0.61,0.61,1.46,1,2.37,1v-0.02h0.01h12.19V35.65 v-0.01h0.02c0.01-3.85,1.58-7.34,4.1-9.86c2.51-2.5,5.98-4.06,9.82-4.07v-0.02h0.02H79.04L79.04,21.69z M105.18,108.92V35.65v-0.02 h0.02c0-0.91-0.39-1.75-1.01-2.37c-0.61-0.61-1.46-1-2.37-1v0.02h-0.01h-61.7h-0.02v-0.02c-0.91,0-1.75,0.39-2.37,1.01 c-0.61,0.61-1,1.46-1,2.37h0.02v0.01v73.27v0.02h-0.02c0,0.91,0.39,1.75,1.01,2.37c0.61,0.61,1.46,1,2.37,1v-0.02h0.01h61.7h0.02 v0.02c0.91,0,1.75-0.39,2.37-1.01c0.61-0.61,1-1.46,1-2.37h-0.02V108.92L105.18,108.92z"})})}),h=t=>{let[h,n]=e(!1);/*#__PURE__*/return r(v,{color:t.color,onClick:()=>{n(!0),navigator.clipboard.writeText(t.text),setTimeout((()=>n(!1)),1500)},$justCopied:h,children:[h?/*#__PURE__*/o(i,{style:{height:"14px",width:"14px"},strokeWidth:"2"}):/*#__PURE__*/o(c,{style:{height:"14px",width:"14px"}}),h?"Copied":"Copy"," ",t.itemName?t.itemName:"to Clipboard"]})};let v=t.button`
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
gap: 6px;
|
|
5
|
+
|
|
6
|
+
&& {
|
|
7
|
+
margin: 8px 2px;
|
|
8
|
+
font-size: 14px;
|
|
9
|
+
color: ${o=>o.$justCopied?"var(--privy-color-foreground)":o.color||"var(--privy-color-foreground-3)"};
|
|
10
|
+
font-weight: ${o=>o.$justCopied?"medium":"normal"};
|
|
11
|
+
transition: color 350ms ease;
|
|
12
|
+
|
|
13
|
+
:focus,
|
|
14
|
+
:active {
|
|
15
|
+
background-color: transparent;
|
|
16
|
+
border: none;
|
|
17
|
+
outline: none;
|
|
18
|
+
box-shadow: none;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
:hover {
|
|
22
|
+
color: ${o=>o.$justCopied?"var(--privy-color-foreground)":"var(--privy-color-foreground-2)"};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
:active {
|
|
26
|
+
color: 'var(--privy-color-foreground)';
|
|
27
|
+
font-weight: medium;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@media (max-width: 440px) {
|
|
31
|
+
margin: 12px 2px;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
svg {
|
|
36
|
+
width: 14px;
|
|
37
|
+
height: 14px;
|
|
38
|
+
}
|
|
39
|
+
`;export{h as C};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{useMemo as t,useState as o,useEffect as r}from"react";import{u as i,q as a}from"./context-
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{useMemo as t,useState as o,useEffect as r}from"react";import{u as i,q as a}from"./context-CiVjsvSu.mjs";import{R as s}from"./index-Bwrmi8Zh.mjs";import{u as n,a as c,e as p,b as l}from"./internal-context-Z-fyxadS.mjs";import{a as m}from"./get-is-unified-wallet-o1p06vNx.mjs";import{z as u}from"./useActiveWallet-Dm548R2J.mjs";import{s as d}from"./shouldProceedtoEmbeddedWalletCreationFlow-C8hGTGhw.mjs";import{S as f}from"./ScreenLayout-BxduQYcn.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"uuid";import"jose";import"eventemitter3";import"./useWallets-BSSZRV2z.mjs";import"./use-export-wallet-CP-hSjOG.mjs";import"viem/utils";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"react-device-detect";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-kABlAB4n.mjs";import"./events-context-CI0iqAXA.mjs";import"@scure/base";import"styled-components";import"zustand";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"viem";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./getPublicClient-B4uPLKn-.mjs";import"ofetch";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./ModalHeader-Dgah8j-h.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-D4UVyUmz.mjs";import"./index-Dq_xe9dz.mjs";const h=({providerApp:o,success:r,error:i,onClose:a})=>{let{title:s,subtitle:n}=t((()=>r?{title:`Successfully connected with ${o.name}`,subtitle:"You're good to go!"}:i?{title:"Authentication failed",subtitle:i.message}:{title:`Connecting to ${o.name}`,subtitle:`Please check the pop-up from ${o.name} to continue`}),[r,i,o.name]);/*#__PURE__*/return e(f,{title:s,subtitle:n,icon:o.logoUrl,iconVariant:"loading",iconLoadingStatus:{success:r,fail:!!i},onBack:a,watermark:!0})},v={component:()=>{let t=i(),{data:f,navigate:v,setModalData:g,onUserCloseViaDialogOrKeybindRef:y}=m(),{crossAppAuthFlow:A,updateWallets:j,closePrivyModal:b,createAnalyticsEvent:S}=n(),{logout:w}=u(),[C,I]=o({}),T=f?.crossAppAuth,U=new c(`There was an issue connecting your ${T?.name} account. Please try again.`),x=new s((async e=>{if(T?.popup)try{let t=await A({appId:e,popup:T.popup,action:T.action,disableSignup:T.disableSignup});I({data:t})}catch(e){if(e instanceof c)I({error:e});else if(e instanceof p){if(e.privyErrorCode===l.ACCOUNT_TRANSFER_REQUIRED&&e.data?.data?.nonce)return g({accountTransfer:{nonce:e.data?.data?.nonce,account:e.data?.data?.subject,displayName:e.data?.data?.account?.displayName,linkMethod:`privy:${T.appId}`,embeddedWalletAddress:e.data?.data?.otherUser?.embeddedWalletAddress,oAuthUserInfo:e.data?.data?.otherUser?.oAuthUserInfo}}),void v("LinkConflictScreen");T.popup&&T.popup.close(),I({error:U})}else I({error:U})}else I({error:U})})),k=()=>{C.data&&(j(),T?.onSuccess(C.data),b({shouldCallAuthOnSuccess:!0,isSuccess:!0})),T?.onError(C.error??new c("User canceled flow")),b({shouldCallAuthOnSuccess:!1,isSuccess:!1})};return y.current=k,r((()=>{T?.appId?.length&&x.execute(T.appId)}),[T?.appId]),r((()=>{if(!C.data)return;let e=C.data;if(t.legal.requireUsersAcceptTerms&&!e.hasAcceptedTerms){let e=setTimeout((()=>{v("AffirmativeConsentScreen")}),a);return()=>clearTimeout(e)}if(d(e,t.embeddedWallets)){let e=setTimeout((()=>{g({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),S({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,provider:`privy:${T?.appId}`,screen:"CrossAppAuthScreen"}}),w()},callAuthOnSuccessOnClose:!0}}),v("EmbeddedWalletOnAccountCreateScreen")}),a);return()=>clearTimeout(e)}let o=setTimeout(k,a);return()=>clearTimeout(o)}),[C.data]),T?.appId?/*#__PURE__*/e(h,{providerApp:{id:T?.appId,logoUrl:T?.logoUrl,name:T?.name},success:!!C.data,error:C.error,onClose:k}):(console.warn("Missing data for Screen"),null)},isShownBeforeReady:!0};export{v as CrossAppAuthScreen,h as CrossAppAuthScreenView,v as default};
|