@privy-io/react-auth 3.10.0-beta-20251223041507 → 3.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{AccountNotFoundScreen-C7clL66d.js → AccountNotFoundScreen-DpWbazhN.js} +1 -1
- package/dist/cjs/{Address-BdN5tzBx.js → Address-B_I2EZZe.js} +1 -1
- package/dist/cjs/{AffirmativeConsentScreen-nqY_Fe-R.js → AffirmativeConsentScreen-9ZT_Z3WZ.js} +1 -1
- package/dist/cjs/{AllowlistRejectionScreen-re6ZG8Lh.js → AllowlistRejectionScreen-DkSBlXbO.js} +1 -1
- package/dist/cjs/AuthenticateWithWalletScreen-B8X_BqjA.js +1 -0
- package/dist/cjs/{AwaitingEvmToSolBridgingScreen-BM3IBmq9.js → AwaitingEvmToSolBridgingScreen-TqLrYeHi.js} +1 -1
- package/dist/cjs/{AwaitingExternalEthereumTransferScreen-B4XlcGzI.js → AwaitingExternalEthereumTransferScreen-Dy4mxIoc.js} +1 -1
- package/dist/cjs/{AwaitingPasswordlessCodeScreen-DSbqJ8sw.js → AwaitingPasswordlessCodeScreen-gcHc0S-p.js} +1 -1
- package/dist/cjs/{AwaitingSolToEvmBridgingScreen-CwXoMm_a.js → AwaitingSolToEvmBridgingScreen-DtJ9-ogk.js} +1 -1
- package/dist/cjs/{BridgeNetworkSelectionView-C5hl7Cvq.js → BridgeNetworkSelectionView-dk0l0q-M.js} +1 -1
- package/dist/cjs/{Button-BdtKzmGp.js → Button-BEaVAnh4.js} +1 -1
- package/dist/cjs/{CaptchaScreen-MMvbG1XU.js → CaptchaScreen-C_mEgCfb.js} +1 -1
- package/dist/cjs/{CoinbaseOnrampStatusScreen-C13g-VeP.js → CoinbaseOnrampStatusScreen-retAGRaW.js} +1 -1
- package/dist/cjs/{ConnectEmailForm-BdLI53Fd.js → ConnectEmailForm-CfACIV6_.js} +1 -1
- package/dist/cjs/{ConnectLedgerScreen-BnmjZTW8.js → ConnectLedgerScreen-B_lID1I6.js} +1 -1
- package/dist/cjs/ConnectOnlyLandingScreen-ByTgLbTP.js +1 -0
- package/dist/cjs/{ConnectOnlyStatusScreen-DR659M9-.js → ConnectOnlyStatusScreen-9JAufomE.js} +1 -1
- package/dist/cjs/{ConnectOrCreateScreen-D6R6Ec06.js → ConnectOrCreateScreen-BF_OuFpX.js} +1 -1
- package/dist/cjs/{ConnectPhoneForm-GsUfLBeN.js → ConnectPhoneForm-C0SpJtis.js} +1 -1
- package/dist/cjs/ConnectWalletView-B7tEQCbZ.js +1 -0
- package/dist/cjs/{ConnectionStatusScreen-BdTKJ00Z.js → ConnectionStatusScreen-CLgTwzQu.js} +1 -1
- package/dist/cjs/{CrossAppAuthScreen-MjQpsKtB.js → CrossAppAuthScreen-M__fDCJH.js} +1 -1
- package/dist/cjs/{CustomLandingScreenView-CQhEjDH5.js → CustomLandingScreenView-D-7kPzjH.js} +2 -2
- package/dist/cjs/{DelegatedActionsConsentScreen-CFXpRnY2.js → DelegatedActionsConsentScreen-Co_Y95XG.js} +1 -1
- package/dist/cjs/{DelegatedActionsRevokeScreen-DZdidxUM.js → DelegatedActionsRevokeScreen-YAYK0-5r.js} +1 -1
- package/dist/cjs/{EmbeddedWalletConnectingScreen-DbMJXa_S.js → EmbeddedWalletConnectingScreen-ziUZeTLk.js} +1 -1
- package/dist/cjs/{EmbeddedWalletCreatedScreen-D6nEuVl0.js → EmbeddedWalletCreatedScreen-CG0y5Ke2.js} +1 -1
- package/dist/cjs/{EmbeddedWalletKeyExportScreen-DS5HJZhL.js → EmbeddedWalletKeyExportScreen-DFqz986K.js} +1 -1
- package/dist/cjs/{EmbeddedWalletOnAccountCreateScreen-XuCxKKiu.js → EmbeddedWalletOnAccountCreateScreen-B4WNBQna.js} +1 -1
- package/dist/cjs/{EmbeddedWalletPasswordUpdateScreen-B82XtLOT.js → EmbeddedWalletPasswordUpdateScreen-Y2DUG4YB.js} +1 -1
- package/dist/cjs/{EmbeddedWalletPasswordUpdateSplashScreen-hQeZx9F-.js → EmbeddedWalletPasswordUpdateSplashScreen-Dy8KboAq.js} +1 -1
- package/dist/cjs/{EnrollTotp-CDSds4bp.js → EnrollTotp-CasC3VFI.js} +1 -1
- package/dist/cjs/{ErrorScreen-C6W1-E6m.js → ErrorScreen-BrKj88o9.js} +1 -1
- package/dist/cjs/{FarcasterConnectStatusScreen-DmABWqds.js → FarcasterConnectStatusScreen-BLXWWJmD.js} +2 -2
- package/dist/cjs/{FarcasterSignerStatusScreen-n5XqsgJH.js → FarcasterSignerStatusScreen-Cr0xAGvg.js} +1 -1
- package/dist/cjs/{FundSolWalletWithExternalSolanaWallet-CJDB0jUQ.js → FundSolWalletWithExternalSolanaWallet-BdR31dg6.js} +2 -2
- package/dist/cjs/{FundWalletMethodHeader-uzk-ixZP.js → FundWalletMethodHeader-CxH_zVnz.js} +1 -1
- package/dist/cjs/{FundingEditAmountScreen-Dm9R9JPI.js → FundingEditAmountScreen-CP4EaEYh.js} +1 -1
- package/dist/cjs/{FundingMethodSelectionScreen-iEpU1hs4.js → FundingMethodSelectionScreen-BgZw0u6b.js} +1 -1
- package/dist/cjs/{InAppBrowserLoginNotPossible-Beb8qlZC.js → InAppBrowserLoginNotPossible-Cg9HwW8w.js} +1 -1
- package/dist/cjs/{InstallWalletScreen-BIWgPJfK.js → InstallWalletScreen-DRTLmXtV.js} +1 -1
- package/dist/cjs/{LandingScreen-D7OP1_yo.js → LandingScreen-Crcwq_g8.js} +1 -1
- package/dist/cjs/{LinkConflictScreen-CX0CaiYv.js → LinkConflictScreen-C3dRaiQk.js} +1 -1
- package/dist/cjs/{LinkEmailScreen-B9k2kjn3.js → LinkEmailScreen-DgQb2Wg1.js} +1 -1
- package/dist/cjs/{LinkPasskeyScreen-DtKPxsUK.js → LinkPasskeyScreen-52yLU_Q-.js} +1 -1
- package/dist/cjs/{LinkPhoneScreen-CJYR_lfw.js → LinkPhoneScreen-DQXhoFL4.js} +1 -1
- package/dist/cjs/{LoginFailedScreen-BlAMh708.js → LoginFailedScreen-yCmKlIj1.js} +1 -1
- package/dist/cjs/{ManualTransferScreen-DbmalI1O.js → ManualTransferScreen-Dk4BMFPw.js} +1 -1
- package/dist/cjs/{MfaAuthEnrollmentFlowScreen-C8TLvuYX.js → MfaAuthEnrollmentFlowScreen-yFdG0eOh.js} +1 -1
- package/dist/cjs/{MfaAuthVerifyFlowScreen-BAPSbY4D.js → MfaAuthVerifyFlowScreen-BZJ1SkGe.js} +1 -1
- package/dist/cjs/{MfaEnrollmentFlowScreen-BbuKW8By.js → MfaEnrollmentFlowScreen-DSsoPwhQ.js} +1 -1
- package/dist/cjs/{MfaVerifyFlowScreen-BDn-Sudi.js → MfaVerifyFlowScreen-CtOltjrq.js} +1 -1
- package/dist/cjs/{ModalHeader-OWSWMCEF.js → ModalHeader-n6Aqpos_.js} +1 -1
- package/dist/cjs/{MoonpayStatusScreen-LPtLXxZw.js → MoonpayStatusScreen-IxyonJvb.js} +1 -1
- package/dist/cjs/{OAuthStatusScreen-DzQX1znk.js → OAuthStatusScreen-D1DDf9yn.js} +1 -1
- package/dist/cjs/{PasskeySelectSignupOrLogin-iQFF1Hxe.js → PasskeySelectSignupOrLogin-D4XaKl_E.js} +1 -1
- package/dist/cjs/{PasskeyStatusScreen-CZJcGz9v.js → PasskeyStatusScreen-CFQM6Nh7.js} +1 -1
- package/dist/cjs/{PasswordRecoveryScreen-DxDNndVU.js → PasswordRecoveryScreen-DZhILc6f.js} +1 -1
- package/dist/cjs/{QrCode-C4hJtM22.js → QrCode-D-MkB93C.js} +1 -1
- package/dist/cjs/{RecoveryOAuthStatusScreen-BnLWeDeU.js → RecoveryOAuthStatusScreen-C47Vu6bz.js} +1 -1
- package/dist/cjs/{RecoveryPasswordCreateScreen-ShjkS8Nf.js → RecoveryPasswordCreateScreen-Cd7NUBpB.js} +1 -1
- package/dist/cjs/{RecoverySelectionScreen-C6S4JMZQ.js → RecoverySelectionScreen-C62og2VL.js} +1 -1
- package/dist/cjs/{Screen-D7sTdyLl.js → Screen-J7z62u7O.js} +1 -1
- package/dist/cjs/{ScreenLayout-BQP-gfLF.js → ScreenLayout-D6r13vU7.js} +1 -1
- package/dist/cjs/{SetAutomaticRecoveryScreen-DWtJH_0r.js → SetAutomaticRecoveryScreen-3unBTQcy.js} +1 -1
- package/dist/cjs/{SetWalletPasswordForm-CcidPSjk.js → SetWalletPasswordForm-Bw9mi-NI.js} +2 -2
- package/dist/cjs/{SignRequestScreen-D9Wl7ftq.js → SignRequestScreen-ZHkIJ3-6.js} +1 -1
- package/dist/cjs/{StandardSignAndSendTransactionScreen-zYrTR6bp.js → StandardSignAndSendTransactionScreen-A5KpXb14.js} +1 -1
- package/dist/cjs/{TelegramAuthScreen-CP6vsDtM.js → TelegramAuthScreen-qw6gcnZA.js} +1 -1
- package/dist/cjs/{TransactionDetails-DTH_TZpQ.js → TransactionDetails-6aFlRhNd.js} +2 -2
- package/dist/cjs/{TransactionErrorView-BUDEmz2T.js → TransactionErrorView-U-Fg5udU.js} +1 -1
- package/dist/cjs/{TransferFromWalletScreen-CrOo6G6H.js → TransferFromWalletScreen-DnUQ6O_8.js} +1 -1
- package/dist/cjs/{TransferOrBridgeLoadingScreen-DGvT2b_c.js → TransferOrBridgeLoadingScreen-C3pf0mwq.js} +1 -1
- package/dist/cjs/{UpdateEmailScreen-B1bG_2YL.js → UpdateEmailScreen-dPy98Sn_.js} +1 -1
- package/dist/cjs/{UpdatePhoneScreen-B5Wl9kel.js → UpdatePhoneScreen-CtNBijCK.js} +1 -1
- package/dist/cjs/{UserLimitReachedScreen-BIPUsBl1.js → UserLimitReachedScreen-DwbMomyS.js} +1 -1
- package/dist/cjs/{WalletInfoCard-BewbaIC_.js → WalletInfoCard-DxO9lMen.js} +1 -1
- package/dist/cjs/{WalletInterstitialScreen-Br5fazrn.js → WalletInterstitialScreen-CsZg29Za.js} +1 -1
- package/dist/cjs/{WalletLink-Da_ICG1G.js → WalletLink-J6Gw0D9R.js} +1 -1
- package/dist/cjs/{WalletOverflowButton-CHPYVqpu.js → WalletOverflowButton-Tdaiid33.js} +1 -1
- package/dist/cjs/abstract-smart-wallets.js +1 -1
- package/dist/cjs/{context-bxRrRk2e.js → context-BPd2qxKv.js} +1 -1
- package/dist/cjs/{ethers-C1-7vvVS.js → ethers-CqH8abGL.js} +1 -1
- package/dist/cjs/extended-chains.js +1 -1
- package/dist/cjs/{get-is-unified-wallet-RpTO1Sce.js → get-is-unified-wallet-D6pn8A8g.js} +1 -1
- package/dist/cjs/{index-BzsdDRPs.js → index-B4TzPiCM.js} +1 -1
- package/dist/cjs/{index-CwJGaDuo.js → index-BsEjyknv.js} +1 -1
- package/dist/cjs/index-Dz7affvL.js +5 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/internal.js +1 -1
- package/dist/cjs/{prepareFundingModalData-DSU36mVl.js → prepareFundingModalData-Do7d2fgq.js} +1 -1
- package/dist/cjs/{shared-cL6fofyC.js → shared-CbD3Tm1u.js} +1 -1
- package/dist/cjs/{shouldProceedtoEmbeddedWalletCreationFlow-DNSXSeaZ.js → shouldProceedtoEmbeddedWalletCreationFlow-BjZ_f-Zv.js} +1 -1
- package/dist/cjs/{smart-wallets-xKqtP8Ub.js → smart-wallets-DFIScSPs.js} +1 -1
- package/dist/cjs/smart-wallets.js +1 -1
- package/dist/cjs/solana.js +1 -1
- package/dist/cjs/{to-ui-error-B3W7oUF5.js → to-ui-error-B83yFdtm.js} +1 -1
- package/dist/cjs/ui.js +1 -1
- package/dist/cjs/{use-create-wallet-without-fallback-D8LW9DKc.js → use-create-wallet-without-fallback-BSl4qcLv.js} +1 -1
- package/dist/cjs/{use-export-wallet-C2suPEqR.js → use-export-wallet-ABk4jSh5.js} +1 -1
- package/dist/cjs/{useActiveWallet-hSS_Ajap.js → useActiveWallet-B-Pd49hn.js} +1 -1
- package/dist/cjs/{useGetTokenPrice-oMgVfBGa.js → useGetTokenPrice-Cm0Ldnuy.js} +1 -1
- package/dist/cjs/{useI18n-D7JXe5tP.js → useI18n-5uCrUblH.js} +1 -1
- package/dist/cjs/{usePrivy-DX4q_wvG.js → usePrivy-CANb3vg4.js} +1 -1
- package/dist/cjs/{useSolanaRpcClient-D0_ipP49.js → useSolanaRpcClient-BBCvBn6x.js} +1 -1
- package/dist/cjs/{useWallets-_HUqLUqD.js → useWallets-Bi_kf80t.js} +1 -1
- package/dist/cjs/{useWallets-KrPOPwD6.js → useWallets-CTdzIPwr.js} +1 -1
- package/dist/dts/{events-context-BYT6PpDG.d.ts → events-context-BTan6II8.d.mts} +1 -1
- package/dist/dts/{events-context-BYT6PpDG.d.mts → events-context-BTan6II8.d.ts} +1 -1
- package/dist/dts/extended-chains.d.mts +1 -1
- package/dist/dts/extended-chains.d.ts +1 -1
- package/dist/dts/farcaster.d.mts +1 -1
- package/dist/dts/farcaster.d.ts +1 -1
- package/dist/dts/index.d.mts +43 -32
- package/dist/dts/index.d.ts +43 -32
- package/dist/dts/internal.d.mts +1 -1
- package/dist/dts/internal.d.ts +1 -1
- package/dist/dts/smart-wallets.d.mts +1 -1
- package/dist/dts/smart-wallets.d.ts +1 -1
- package/dist/dts/solana.d.mts +3 -3
- package/dist/dts/solana.d.ts +3 -3
- package/dist/dts/{types-D7U23FgR.d.mts → types-B4eMcjTQ.d.mts} +2 -1
- package/dist/dts/{types-D7U23FgR.d.ts → types-B4eMcjTQ.d.ts} +2 -1
- package/dist/dts/ui.d.mts +1 -1
- package/dist/dts/ui.d.ts +1 -1
- package/dist/esm/{AccountNotFoundScreen-m-ulnyRC.mjs → AccountNotFoundScreen-S6aY2Bit.mjs} +1 -1
- package/dist/esm/{Address-Bb7zLnoh.mjs → Address-BZeOq9QH.mjs} +1 -1
- package/dist/esm/{AffirmativeConsentScreen-BZiI7gaY.mjs → AffirmativeConsentScreen-Duhzxm_H.mjs} +1 -1
- package/dist/esm/{AllowlistRejectionScreen-DYujQEMu.mjs → AllowlistRejectionScreen-BMPe-U6U.mjs} +1 -1
- package/dist/esm/AuthenticateWithWalletScreen-B0-JIF_P.mjs +1 -0
- package/dist/esm/AwaitingEvmToSolBridgingScreen-SpjPGAVg.mjs +2 -0
- package/dist/esm/{AwaitingExternalEthereumTransferScreen-QSi_jFuT.mjs → AwaitingExternalEthereumTransferScreen-MaJkRZM2.mjs} +1 -1
- package/dist/esm/{AwaitingPasswordlessCodeScreen-CRZX91TB.mjs → AwaitingPasswordlessCodeScreen-CpmHzcEh.mjs} +1 -1
- package/dist/esm/{AwaitingSolToEvmBridgingScreen-C5nKj1yd.mjs → AwaitingSolToEvmBridgingScreen-B3HJI5qn.mjs} +2 -2
- package/dist/esm/{BridgeNetworkSelectionView-B-gh55-1.mjs → BridgeNetworkSelectionView-ITdiT09i.mjs} +1 -1
- package/dist/esm/{Button-BTB0FpvZ.mjs → Button-CrJpeX0e.mjs} +1 -1
- package/dist/esm/{CaptchaScreen-Y0vNrbk0.mjs → CaptchaScreen-BEvV9l59.mjs} +1 -1
- package/dist/esm/{CoinbaseOnrampStatusScreen-qhDq6qtP.mjs → CoinbaseOnrampStatusScreen-CYKvPSTa.mjs} +1 -1
- package/dist/esm/{ConnectEmailForm-eTN3xUik.mjs → ConnectEmailForm-CzIQouaK.mjs} +1 -1
- package/dist/esm/{ConnectLedgerScreen-C-dhUpqp.mjs → ConnectLedgerScreen-B84x_XJQ.mjs} +1 -1
- package/dist/esm/ConnectOnlyLandingScreen-DOUEqxQS.mjs +1 -0
- package/dist/esm/{ConnectOnlyStatusScreen-C7OMszka.mjs → ConnectOnlyStatusScreen-C2DOQ20l.mjs} +1 -1
- package/dist/esm/ConnectOrCreateScreen-ls3v_wzh.mjs +1 -0
- package/dist/esm/{ConnectPhoneForm-DmGv_fDg.mjs → ConnectPhoneForm-BeT3tDQM.mjs} +1 -1
- package/dist/esm/ConnectWalletView-Ch6TwKX_.mjs +1 -0
- package/dist/esm/{ConnectionStatusScreen-4_pj5yk1.mjs → ConnectionStatusScreen-BFOC7TO_.mjs} +1 -1
- package/dist/esm/{CrossAppAuthScreen-D8abJvV4.mjs → CrossAppAuthScreen-BbWHC41s.mjs} +1 -1
- package/dist/esm/{CustomLandingScreenView-BYAB5iWk.mjs → CustomLandingScreenView-CKarTBuo.mjs} +2 -2
- package/dist/esm/{DelegatedActionsConsentScreen-BPTr4yVf.mjs → DelegatedActionsConsentScreen-h8zjYxdK.mjs} +1 -1
- package/dist/esm/{DelegatedActionsRevokeScreen-NY7ZuJZA.mjs → DelegatedActionsRevokeScreen-C1RofLwl.mjs} +1 -1
- package/dist/esm/{EmbeddedWalletConnectingScreen-CnprUZbY.mjs → EmbeddedWalletConnectingScreen-DRLC8HnL.mjs} +1 -1
- package/dist/esm/{EmbeddedWalletCreatedScreen-BlrNZpYf.mjs → EmbeddedWalletCreatedScreen-BiqITDV_.mjs} +1 -1
- package/dist/esm/{EmbeddedWalletKeyExportScreen-Dd5N7zPF.mjs → EmbeddedWalletKeyExportScreen-lPloqMsw.mjs} +2 -2
- package/dist/esm/{EmbeddedWalletOnAccountCreateScreen-h5zGIqOI.mjs → EmbeddedWalletOnAccountCreateScreen-DjXY44ON.mjs} +1 -1
- package/dist/esm/{EmbeddedWalletPasswordUpdateScreen-UJaVcH1p.mjs → EmbeddedWalletPasswordUpdateScreen-CfZ6F7Xo.mjs} +1 -1
- package/dist/esm/{EmbeddedWalletPasswordUpdateSplashScreen-CMyJVKRi.mjs → EmbeddedWalletPasswordUpdateSplashScreen-1u-5wz14.mjs} +1 -1
- package/dist/esm/{EnrollTotp-D1Y019Iq.mjs → EnrollTotp-Ds_-ZGUd.mjs} +1 -1
- package/dist/esm/{ErrorScreen-KfzBkWlg.mjs → ErrorScreen-A7eS3gFZ.mjs} +1 -1
- package/dist/esm/{FarcasterConnectStatusScreen-C18PKycv.mjs → FarcasterConnectStatusScreen-CoUFovnM.mjs} +1 -1
- package/dist/esm/{FarcasterSignerStatusScreen-Crgxbwaw.mjs → FarcasterSignerStatusScreen-DJMF_7OC.mjs} +1 -1
- package/dist/esm/{FundSolWalletWithExternalSolanaWallet-BsnoBDOC.mjs → FundSolWalletWithExternalSolanaWallet-BCElohac.mjs} +1 -1
- package/dist/esm/{FundWalletMethodHeader-C6QXrL4P.mjs → FundWalletMethodHeader-DBV2Rnau.mjs} +1 -1
- package/dist/esm/FundingEditAmountScreen-hLQBUAs6.mjs +1 -0
- package/dist/esm/{FundingMethodSelectionScreen-BqxUw0Mf.mjs → FundingMethodSelectionScreen-CQ6Kjv8P.mjs} +1 -1
- package/dist/esm/{InAppBrowserLoginNotPossible-BIUZ9A4G.mjs → InAppBrowserLoginNotPossible-B6aOQR90.mjs} +1 -1
- package/dist/esm/{InstallWalletScreen-TAbe1EVV.mjs → InstallWalletScreen-gwlyer4j.mjs} +1 -1
- package/dist/esm/LandingScreen-BkCClWy8.mjs +1 -0
- package/dist/esm/{LinkConflictScreen-55SLx3hx.mjs → LinkConflictScreen-C0K1Bw7W.mjs} +1 -1
- package/dist/esm/{LinkEmailScreen-Xzy79V-m.mjs → LinkEmailScreen-DDH1Ent-.mjs} +1 -1
- package/dist/esm/{LinkPasskeyScreen-D6FiejG9.mjs → LinkPasskeyScreen-75b0FmMc.mjs} +1 -1
- package/dist/esm/{LinkPhoneScreen-sf2CMtqv.mjs → LinkPhoneScreen-CZaTFcuX.mjs} +1 -1
- package/dist/esm/{LoginFailedScreen-bwxW7s9F.mjs → LoginFailedScreen-Csu_ek1s.mjs} +1 -1
- package/dist/esm/{ManualTransferScreen-D__iGi-r.mjs → ManualTransferScreen-Cn8sFLD_.mjs} +1 -1
- package/dist/esm/{MfaAuthEnrollmentFlowScreen-C-bjwRJj.mjs → MfaAuthEnrollmentFlowScreen-9HiNxKYV.mjs} +1 -1
- package/dist/esm/{MfaAuthVerifyFlowScreen-B9d5FlYJ.mjs → MfaAuthVerifyFlowScreen-C9Pe8A-f.mjs} +1 -1
- package/dist/esm/{MfaEnrollmentFlowScreen-CFLh4E-x.mjs → MfaEnrollmentFlowScreen-C-VfRmbP.mjs} +1 -1
- package/dist/esm/{MfaVerifyFlowScreen-BpIzH2DY.mjs → MfaVerifyFlowScreen-BLzgEe8U.mjs} +1 -1
- package/dist/esm/{ModalHeader-20vQXDeu.mjs → ModalHeader-YP9pLMEP.mjs} +1 -1
- package/dist/esm/{MoonpayStatusScreen-CRNJ6piv.mjs → MoonpayStatusScreen-tt17kvkR.mjs} +1 -1
- package/dist/esm/{OAuthStatusScreen-DngcR9YB.mjs → OAuthStatusScreen-DA8QEDgm.mjs} +1 -1
- package/dist/esm/{PasskeySelectSignupOrLogin-Db_bv7rS.mjs → PasskeySelectSignupOrLogin-BnOxpeKy.mjs} +1 -1
- package/dist/esm/{PasskeyStatusScreen-Ckj7CcsN.mjs → PasskeyStatusScreen-CqoYgdZ0.mjs} +1 -1
- package/dist/esm/{PasswordRecoveryScreen-BX5mNuIA.mjs → PasswordRecoveryScreen-BgFiWz_H.mjs} +1 -1
- package/dist/esm/{QrCode-C7So9kgj.mjs → QrCode-C0_lXRph.mjs} +1 -1
- package/dist/esm/{RecoveryOAuthStatusScreen-CH9_ywci.mjs → RecoveryOAuthStatusScreen-B698r-dZ.mjs} +1 -1
- package/dist/esm/{RecoveryPasswordCreateScreen-CVvb7FPI.mjs → RecoveryPasswordCreateScreen-U7uAGUdt.mjs} +1 -1
- package/dist/esm/{RecoverySelectionScreen-Bhj-0m8Y.mjs → RecoverySelectionScreen-CvZ8jmi2.mjs} +1 -1
- package/dist/esm/{Screen-BUPcYMtI.mjs → Screen-CpIMiJNF.mjs} +1 -1
- package/dist/esm/{ScreenLayout-6iIsKpRq.mjs → ScreenLayout-t3qtbQ3-.mjs} +1 -1
- package/dist/esm/{SetAutomaticRecoveryScreen-BH63Ni6A.mjs → SetAutomaticRecoveryScreen-BlqLhOJS.mjs} +1 -1
- package/dist/esm/{SetWalletPasswordForm-BK0mdI5e.mjs → SetWalletPasswordForm-DMOSI5Cu.mjs} +2 -2
- package/dist/esm/{SignRequestScreen-BDw7xxk7.mjs → SignRequestScreen-Bc6WEdOH.mjs} +1 -1
- package/dist/esm/{StandardSignAndSendTransactionScreen-DYM2d5Hk.mjs → StandardSignAndSendTransactionScreen-CNnIfg-v.mjs} +1 -1
- package/dist/esm/{TelegramAuthScreen-DT2RJ9om.mjs → TelegramAuthScreen-C_5cJWas.mjs} +1 -1
- package/dist/esm/{TransactionDetails-lKP8UN4t.mjs → TransactionDetails-Dpy5T9tM.mjs} +3 -3
- package/dist/esm/{TransactionErrorView-CCIFQVpG.mjs → TransactionErrorView-Dyy8JzAg.mjs} +1 -1
- package/dist/esm/{TransferFromWalletScreen-I5s2zHDy.mjs → TransferFromWalletScreen-DsWLEs0t.mjs} +1 -1
- package/dist/esm/{TransferOrBridgeLoadingScreen-B_NJD8Kh.mjs → TransferOrBridgeLoadingScreen-CKF3jFy2.mjs} +1 -1
- package/dist/esm/{UpdateEmailScreen-BD0-0Aj5.mjs → UpdateEmailScreen-DjS9mWl8.mjs} +1 -1
- package/dist/esm/{UpdatePhoneScreen-DnHd2jee.mjs → UpdatePhoneScreen-0Wm7i3sR.mjs} +1 -1
- package/dist/esm/{UserLimitReachedScreen-xflcj6OH.mjs → UserLimitReachedScreen-C4J0L2bZ.mjs} +1 -1
- package/dist/esm/{WalletInfoCard-CpBKe1da.mjs → WalletInfoCard-QxupP_e1.mjs} +1 -1
- package/dist/esm/{WalletInterstitialScreen-D7r0v78D.mjs → WalletInterstitialScreen-ofT84gQY.mjs} +1 -1
- package/dist/esm/{WalletLink-Cz8vvc1q.mjs → WalletLink-DFEVbh0m.mjs} +1 -1
- package/dist/esm/{WalletOverflowButton-0as7efhF.mjs → WalletOverflowButton-gDOg31Q5.mjs} +1 -1
- package/dist/esm/abstract-smart-wallets.mjs +1 -1
- package/dist/esm/context-BOoFAPna.mjs +1 -0
- package/dist/esm/{ethers-CVqqoG3x.mjs → ethers-DnpKeAXc.mjs} +1 -1
- package/dist/esm/extended-chains.mjs +1 -1
- package/dist/esm/{get-is-unified-wallet-DJwJGV0c.mjs → get-is-unified-wallet-Ca5aEojK.mjs} +1 -1
- package/dist/esm/index-CUao1WyN.mjs +5 -0
- package/dist/esm/{index-PcBcXwU-.mjs → index-DL7cst3F.mjs} +1 -1
- package/dist/esm/{index-DZtcKggn.mjs → index-Doo2h9wE.mjs} +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/internal.mjs +1 -1
- package/dist/esm/{prepareFundingModalData-BHvIzv1P.mjs → prepareFundingModalData-CzDMa8gy.mjs} +1 -1
- package/dist/esm/{shared-BWmKXy6D.mjs → shared-C_3e8pDa.mjs} +1 -1
- package/dist/esm/{shouldProceedtoEmbeddedWalletCreationFlow-B6qJ8fhx.mjs → shouldProceedtoEmbeddedWalletCreationFlow-BkG4QVN4.mjs} +1 -1
- package/dist/esm/{smart-wallets-BGPCB0ep.mjs → smart-wallets-DUDljgWK.mjs} +1 -1
- package/dist/esm/smart-wallets.mjs +1 -1
- package/dist/esm/solana.mjs +1 -1
- package/dist/esm/to-ui-error-BuXu0iWM.mjs +1 -0
- package/dist/esm/ui.mjs +1 -1
- package/dist/esm/{use-create-wallet-without-fallback-C_y-siw-.mjs → use-create-wallet-without-fallback-4kJuPNnl.mjs} +1 -1
- package/dist/esm/{use-export-wallet-DapEzFil.mjs → use-export-wallet-DLpQ6ZuE.mjs} +1 -1
- package/dist/esm/{useActiveWallet-DDf-vaMZ.mjs → useActiveWallet-BdFIc7_K.mjs} +1 -1
- package/dist/esm/{useGetTokenPrice-2p261ACv.mjs → useGetTokenPrice-Cw9UgOp3.mjs} +1 -1
- package/dist/esm/{useI18n-BRYVrLjs.mjs → useI18n-fcpgyVzo.mjs} +1 -1
- package/dist/esm/{usePrivy-dzRKwB0-.mjs → usePrivy-CeQ3C1KS.mjs} +1 -1
- package/dist/esm/{useSolanaRpcClient-7AG_puUr.mjs → useSolanaRpcClient-DyBoxaVM.mjs} +1 -1
- package/dist/esm/{useWallets-N0hQJNER.mjs → useWallets-3r4yfFNg.mjs} +1 -1
- package/dist/esm/{useWallets-B4MGwFyP.mjs → useWallets-CZrLXHtS.mjs} +1 -1
- package/package.json +3 -3
- package/dist/cjs/AuthenticateWithWalletScreen-xtyc2rtb.js +0 -1
- package/dist/cjs/ConnectOnlyLandingScreen-BDGZs0Ro.js +0 -1
- package/dist/cjs/ConnectWalletView-C7gK4cbO.js +0 -1
- package/dist/cjs/index-DG6nzSst.js +0 -5
- package/dist/esm/AuthenticateWithWalletScreen-BJNgLR93.mjs +0 -1
- package/dist/esm/AwaitingEvmToSolBridgingScreen-CTM7spSX.mjs +0 -2
- package/dist/esm/ConnectOnlyLandingScreen-BXCcG8rx.mjs +0 -1
- package/dist/esm/ConnectOrCreateScreen-CsSyifOf.mjs +0 -1
- package/dist/esm/ConnectWalletView-BwcROWqJ.mjs +0 -1
- package/dist/esm/FundingEditAmountScreen-B_s1b9Zt.mjs +0 -1
- package/dist/esm/LandingScreen-Bdy5KSMA.mjs +0 -1
- package/dist/esm/context-CoegzSND.mjs +0 -1
- package/dist/esm/index-DcaQ9VMZ.mjs +0 -5
- package/dist/esm/to-ui-error-Cc8LO7vH.mjs +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),s=require("@heroicons/react/24/outline"),r=require("react"),n=require("styled-components"),i=require("@privy-io/js-sdk-core"),o=require("./Button-BdtKzmGp.js"),l=require("./ModalHeader-OWSWMCEF.js"),t=require("./Value-C-XtZyFa.js"),a=require("./Row-CxDF-VMy.js"),d=require("./ErrorMessage-f0cRWc29.js"),c=require("./LabelXs-CYMv6rOZ.js"),x=require("./Subtitle-Dtmrw8l5.js"),h=require("./Title-C-tHJvrb.js"),u=require("./Address-BdN5tzBx.js"),m=require("./WalletInfoCard-BewbaIC_.js"),j=require("./context-bxRrRk2e.js"),p=require("./useActiveWallet-hSS_Ajap.js"),g=require("./LoadingSkeleton-DoCrfGnl.js"),b=require("viem"),f=require("./shared-BPGwTh8c.js"),w=require("./Checkbox-DXPQZFlQ.js"),y=require("./ErrorBanner-CMjaobRI.js"),S=require("./WarningBanner-B_Gs_15p.js"),k=require("@heroicons/react/24/outline/ClipboardDocumentCheckIcon"),v=require("@heroicons/react/24/outline/ClipboardDocumentIcon"),I=require("@heroicons/react/24/outline/ExclamationCircleIcon"),L=require("./internal-context-NWsAL807.js");function C(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var R=/*#__PURE__*/C(k),A=/*#__PURE__*/C(v),T=/*#__PURE__*/C(I);const V=/*#__PURE__*/n.styled(t.LabelSm).withConfig({displayName:"InteractiveLabel",componentId:"sc-b57d0824-0"})(["cursor:pointer;display:inline-flex;gap:8px;align-items:center;color:var(--privy-color-accent);svg{fill:var(--privy-color-accent);}"]);var N=({iconUrl:s,value:r,symbol:n,usdValue:i,nftName:o,nftCount:l,decimals:t,$isLoading:a})=>{if(a)/*#__PURE__*/return e.jsx(M,{$isLoading:a});let d=r&&i&&t?function(e,s,r){let n=parseFloat(e),i=parseFloat(r);if(0===n||0===i||Number.isNaN(n)||Number.isNaN(i))return e;let o=Math.ceil(-Math.log10(.01/(i/n))),l=Math.pow(10,o=Math.max(o=Math.min(o,s),1)),t=+(Math.floor(n*l)/l).toFixed(o).replace(/\.?0+$/,"");return Intl.NumberFormat(void 0,{maximumFractionDigits:s}).format(t)}(r,t,i):r;/*#__PURE__*/return e.jsxs("div",{children:[/*#__PURE__*/e.jsxs(M,{$isLoading:a,children:[s&&/*#__PURE__*/e.jsx(F,{src:s,alt:"Token icon"}),l&&l>1?l+"x":void 0," ",o,d," ",n]}),i&&/*#__PURE__*/e.jsxs(E,{$isLoading:a,children:["$",i]})]})};let M=/*#__PURE__*/n.styled.span.withConfig({displayName:"Value",componentId:"sc-991db279-0"})(["color:var(--privy-color-foreground);font-size:0.875rem;font-weight:500;line-height:1.375rem;word-break:break-all;text-align:right;display:flex;justify-content:flex-end;",""],g.LoadingSkeleton);const E=/*#__PURE__*/n.styled.span.withConfig({displayName:"Subvalue",componentId:"sc-991db279-1"})(["color:var(--privy-color-foreground-2);font-size:12px;font-weight:400;line-height:18px;word-break:break-all;text-align:right;display:flex;justify-content:flex-end;",""],g.LoadingSkeleton);let F=/*#__PURE__*/n.styled.img.withConfig({displayName:"TokenIcon",componentId:"sc-991db279-2"})(["height:14px;width:14px;margin-right:4px;object-fit:contain;"]);const q=s=>{let{chain:r,transactionDetails:n,isTokenContractInfoLoading:i,symbol:o}=s,{action:l,functionName:d}=n;/*#__PURE__*/return e.jsx(f.Box,{children:/*#__PURE__*/e.jsxs(a.Rows,{children:["transaction"!==l&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Action"}),/*#__PURE__*/e.jsx(t.Value,{children:d})]}),"mint"===d&&"args"in n&&n.args.filter((e=>e)).map(((s,n)=>/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:`Param ${n}`}),/*#__PURE__*/e.jsx(t.Value,{children:"string"==typeof s&&b.isAddress(s)?/*#__PURE__*/e.jsx(u.Address,{address:s,url:r?.blockExplorers?.default?.url,showCopyIcon:!1}):s?.toString()})]},n))),"setApprovalForAll"===d&&n.operator&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Operator"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:n.operator,url:r?.blockExplorers?.default?.url,showCopyIcon:!1})})]}),"setApprovalForAll"===d&&void 0!==n.approved&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Set approval to"}),/*#__PURE__*/e.jsx(t.Value,{children:n.approved?"true":"false"})]}),"transfer"===d||"transferFrom"===d||"safeTransferFrom"===d||"approve"===d?/*#__PURE__*/e.jsxs(e.Fragment,{children:["formattedAmount"in n&&n.formattedAmount&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Amount"}),/*#__PURE__*/e.jsxs(t.Value,{$isLoading:i,children:[n.formattedAmount," ",o]})]}),"tokenId"in n&&n.tokenId&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Token ID"}),/*#__PURE__*/e.jsx(t.Value,{children:n.tokenId.toString()})]})]}):null,"safeBatchTransferFrom"===d&&/*#__PURE__*/e.jsxs(e.Fragment,{children:["amounts"in n&&n.amounts&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Amounts"}),/*#__PURE__*/e.jsx(t.Value,{children:n.amounts.join(", ")})]}),"tokenIds"in n&&n.tokenIds&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Token IDs"}),/*#__PURE__*/e.jsx(t.Value,{children:n.tokenIds.join(", ")})]})]}),"approve"===d&&n.spender&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Spender"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:n.spender,url:r?.blockExplorers?.default?.url,showCopyIcon:!1})})]}),("transferFrom"===d||"safeTransferFrom"===d||"safeBatchTransferFrom"===d)&&n.transferFrom&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Transferring from"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:n.transferFrom,url:r?.blockExplorers?.default?.url,showCopyIcon:!1})})]}),("transferFrom"===d||"safeTransferFrom"===d||"safeBatchTransferFrom"===d)&&n.transferTo&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Transferring to"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:n.transferTo,url:r?.blockExplorers?.default?.url,showCopyIcon:!1})})]})]})})},$=({variant:s,setPreventMaliciousTransaction:r,colorScheme:n="light",preventMaliciousTransaction:i})=>"warn"===s?/*#__PURE__*/e.jsx(D,{children:/*#__PURE__*/e.jsxs(S.WarningBanner,{theme:n,children:[/*#__PURE__*/e.jsx("span",{style:{fontWeight:"500"},children:"Warning: Suspicious transaction"}),/*#__PURE__*/e.jsx("br",{}),"This has been flagged as a potentially deceptive request. Approving could put your assets or funds at risk."]})}):"error"===s?/*#__PURE__*/e.jsx(e.Fragment,{children:/*#__PURE__*/e.jsxs(D,{children:[/*#__PURE__*/e.jsx(y.ErrorBanner,{theme:n,children:/*#__PURE__*/e.jsxs("div",{children:[/*#__PURE__*/e.jsx("strong",{children:"This is a malicious transaction"}),/*#__PURE__*/e.jsx("br",{}),"This transaction transfers tokens to a known malicious address. Proceeding may result in the loss of valuable assets."]})}),/*#__PURE__*/e.jsxs(O,{children:[/*#__PURE__*/e.jsx(w.Checkbox,{color:"var(--privy-color-error)",checked:!i,readOnly:!0,onClick:()=>r(!i)}),/*#__PURE__*/e.jsx("span",{children:"I understand and want to proceed anyways."})]})]})}):null;let D=/*#__PURE__*/n.styled.div.withConfig({displayName:"BannerContainer",componentId:"sc-ab8a5a0b-0"})(["margin-top:1.5rem;"]),O=/*#__PURE__*/n.styled.div.withConfig({displayName:"CheckboxContainer",componentId:"sc-ab8a5a0b-1"})(["display:flex;align-items:center;gap:0.5rem;margin-top:0.75rem;"]);const B=({transactionIndex:e,maxIndex:s})=>"number"!=typeof e||0===s?"":` (${e+1} / ${s+1})`;let P=/*#__PURE__*/n.styled(m.WalletInfoCard).withConfig({displayName:"StyledWalletInfoCard",componentId:"sc-cbe5ab37-0"})(["",""],(e=>e.$useSmallMargins?"margin-top: 0.5rem;":"margin-top: 2rem;")),X=/*#__PURE__*/n.styled(a.Rows).withConfig({displayName:"InstructionRows",componentId:"sc-cbe5ab37-1"})(["margin-top:0.5rem;border:1px solid var(--privy-color-foreground-4);border-radius:var(--privy-border-radius-sm);padding:0.5rem;"]),W="There was an error preparing your transaction. Your transaction request will likely fail.",z=/*#__PURE__*/n.styled.div.withConfig({displayName:"ImageContainer",componentId:"sc-cbe5ab37-2"})(["display:flex;width:100%;justify-content:center;max-height:40px;> img{object-fit:contain;border-radius:var(--privy-border-radius-sm);}"]),H=/*#__PURE__*/n.styled.span.withConfig({displayName:"SponsoredRow",componentId:"sc-cbe5ab37-3"})(["display:inline-flex;align-items:center;gap:0.3rem;"]),U=/*#__PURE__*/n.styled.span.withConfig({displayName:"SponsoredText",componentId:"sc-cbe5ab37-4"})(["font-size:14px;font-weight:500;color:var(--privy-color-foreground);"]);let G=()=>/*#__PURE__*/e.jsxs(K,{children:[/*#__PURE__*/e.jsx(_,{}),/*#__PURE__*/e.jsx(Z,{})]});let J=/*#__PURE__*/n.styled.div.withConfig({displayName:"TransactionErrorScreenContainer",componentId:"sc-d58f10e6-0"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;"]),Q=/*#__PURE__*/n.styled.span.withConfig({displayName:"ErrorCode",componentId:"sc-d58f10e6-1"})(["color:var(--privy-color-foreground);text-align:center;font-size:1.125rem;font-weight:500;line-height:1.25rem;text-align:center;margin:10px;"]),Y=/*#__PURE__*/n.styled.span.withConfig({displayName:"Subtitle",componentId:"sc-d58f10e6-2"})(["margin-top:4px;margin-bottom:10px;color:var(--privy-color-foreground-3);text-align:center;font-size:0.875rem;font-style:normal;font-weight:400;line-height:20px;letter-spacing:-0.008px;"]),K=/*#__PURE__*/n.styled.div.withConfig({displayName:"CircleContainer",componentId:"sc-d58f10e6-3"})(["position:relative;width:60px;height:60px;margin:10px;display:flex;justify-content:center;align-items:center;"]),Z=/*#__PURE__*/n.styled(T.default).withConfig({displayName:"StyledExclamationCircleIcon",componentId:"sc-d58f10e6-4"})(["position:absolute;width:35px;height:35px;color:var(--privy-color-error);"]),_=/*#__PURE__*/n.styled.div.withConfig({displayName:"StyledRedCircle",componentId:"sc-d58f10e6-5"})(["position:absolute;width:60px;height:60px;border-radius:50%;background-color:var(--privy-color-error);opacity:0.1;"]),ee=/*#__PURE__*/n.styled(o.PrimaryButton).withConfig({displayName:"RetryButton",componentId:"sc-d58f10e6-6"})(["&&{margin-top:24px;}transition:color 350ms ease,background-color 350ms ease;"]),se=/*#__PURE__*/n.styled.span.withConfig({displayName:"TextBoxTitle",componentId:"sc-d58f10e6-7"})(["width:100%;text-align:left;font-size:0.825rem;color:var(--privy-color-foreground);padding:4px;"]),re=/*#__PURE__*/n.styled.div.withConfig({displayName:"TextBoxContainer",componentId:"sc-d58f10e6-8"})(["width:100%;margin:5px;display:flex;flex-direction:column;justify-content:center;align-items:center;"]),ne=/*#__PURE__*/n.styled.text.withConfig({displayName:"HelperText",componentId:"sc-d58f10e6-9"})(["position:relative;width:100%;padding:5px;font-size:0.8rem;color:var(--privy-color-foreground-3);text-align:left;word-wrap:break-word;"]),ie=/*#__PURE__*/n.styled.span.withConfig({displayName:"TextBox",componentId:"sc-d58f10e6-10"})(["position:relative;width:100%;background-color:var(--privy-color-background-2);padding:8px 12px;border-radius:10px;margin-top:5px;font-size:14px;color:var(--privy-color-foreground-3);text-align:left;word-wrap:break-word;",""],(e=>e.$clickable&&"cursor: pointer;\n transition: background-color 0.3s;\n padding-right: 45px;\n\n &:hover {\n background-color: var(--privy-color-foreground-4);\n }")),oe=/*#__PURE__*/n.styled(A.default).withConfig({displayName:"StyledClipboardIcon",componentId:"sc-d58f10e6-11"})(["position:absolute;top:13px;right:13px;width:24px;height:24px;"]),le=/*#__PURE__*/n.styled(R.default).withConfig({displayName:"StyledClipboardCheckIcon",componentId:"sc-d58f10e6-12"})(["position:absolute;top:13px;right:13px;width:24px;height:24px;"]),te=({clicked:s})=>s?/*#__PURE__*/e.jsx(le,{}):/*#__PURE__*/e.jsx(oe,{});exports.SendSolanaTransactionScreenView=({img:n,title:m,subtitle:g,cta:b,instructions:f,network:w,blockExplorerUrl:y,isMissingFunds:S,submitError:k,parseError:v,total:I,swap:L,transactingWalletAddress:C,fee:R,balance:A,disabled:T,isSubmitting:N,isPreparing:M,isTokenPriceLoading:E,onClick:F,onClose:q,onBack:$,isSponsored:D})=>{let O=M||E,[B,G]=r.useState(!1),J=j.useAppConfig();/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(l.ModalHeader,{onClose:q,backFn:$}),n&&/*#__PURE__*/e.jsx(z,{children:n}),/*#__PURE__*/e.jsx(h.Title,{style:{marginTop:n?"1.5rem":0},children:m}),/*#__PURE__*/e.jsx(x.Subtitle,{children:g}),/*#__PURE__*/e.jsxs(a.Rows,{style:{marginTop:"2rem",marginBottom:".5rem"},children:[(I||O)&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Amount"}),/*#__PURE__*/e.jsx(t.Value,{$isLoading:O,children:I})]}),L&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Swap"}),/*#__PURE__*/e.jsx(t.Value,{children:L})]}),w&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Network"}),/*#__PURE__*/e.jsx(t.Value,{children:w})]}),(R||O||void 0!==D)&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Estimated fee"}),/*#__PURE__*/e.jsx(t.Value,{$isLoading:O,children:D&&!O?/*#__PURE__*/e.jsxs(H,{children:[/*#__PURE__*/e.jsxs(U,{children:["Sponsored by ",J.name]}),/*#__PURE__*/e.jsx(s.BoltIcon,{height:16,width:16})]}):R})]})]}),/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsxs(V,{onClick:()=>G((e=>!e)),children:[/*#__PURE__*/e.jsx("span",{children:"Advanced"}),/*#__PURE__*/e.jsx(s.ChevronDownIcon,{height:"16px",width:"16px",strokeWidth:"2",style:{transition:"all 300ms",transform:B?"rotate(180deg)":void 0}})]})}),B&&/*#__PURE__*/e.jsx(e.Fragment,{children:f.map(((s,r)=>"sol-transfer"===s.type?/*#__PURE__*/e.jsxs(X,{children:[/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsxs(c.LabelXs,{children:["Transfer ",s.withSeed?"with seed":""]})}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Amount"}),/*#__PURE__*/e.jsxs(t.Value,{children:[i.formatTokenAmount({amount:s.value,decimals:s.token.decimals})," ",s.token.symbol]})]}),!!s.toAccount&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Destination"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.toAccount,url:y})})]})]},r):"spl-transfer"===s.type?/*#__PURE__*/e.jsxs(X,{children:[/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsxs(c.LabelXs,{children:["Transfer ",s.token.symbol]})}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Amount"}),/*#__PURE__*/e.jsx(t.Value,{children:s.value.toString()})]}),!!s.fromAta&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Source"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.fromAta,url:y})})]}),!!s.toAta&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Destination"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.toAta,url:y})})]}),!!s.token.address&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Token"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.token.address,url:y})})]})]},r):"ata-creation"===s.type?/*#__PURE__*/e.jsxs(X,{children:[/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsx(c.LabelXs,{children:"Create token account"})}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Program ID"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.program,url:y})})]}),!!s.owner&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Owner"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.owner,url:y})})]})]},r):"create-account"===s.type?/*#__PURE__*/e.jsxs(X,{children:[/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsxs(c.LabelXs,{children:["Create account ",s.withSeed?"with seed":""]})}),!!s.account&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Account"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.account,url:y})})]}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Amount"}),/*#__PURE__*/e.jsxs(t.Value,{children:[i.formatTokenAmount({amount:s.value,decimals:9})," SOL"]})]})]},r):"spl-init-account"===s.type?/*#__PURE__*/e.jsxs(X,{children:[/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsx(c.LabelXs,{children:"Initialize token account"})}),!!s.account&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Account"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.account,url:y})})]}),!!s.mint&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Mint"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.mint,url:y})})]}),!!s.owner&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Owner"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.owner,url:y})})]})]},r):"spl-close-account"===s.type?/*#__PURE__*/e.jsxs(X,{children:[/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsx(c.LabelXs,{children:"Close token account"})}),!!s.source&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Source"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.source,url:y})})]}),!!s.destination&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Destination"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.destination,url:y})})]}),!!s.owner&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Owner"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.owner,url:y})})]})]},r):"spl-sync-native"===s.type?/*#__PURE__*/e.jsxs(X,{children:[/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsx(c.LabelXs,{children:"Sync native"})}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Program ID"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.program,url:y})})]})]},r):"raydium-swap-base-input"===s.type?/*#__PURE__*/e.jsxs(X,{children:[/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsxs(c.LabelXs,{children:["Raydium swap"," ",s.tokenIn&&s.tokenOut?`${s.tokenIn.symbol} → ${s.tokenOut.symbol}`:""]})}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Amount in"}),/*#__PURE__*/e.jsx(t.Value,{children:s.amountIn.toString()})]}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Minimum amount out"}),/*#__PURE__*/e.jsx(t.Value,{children:s.minimumAmountOut.toString()})]}),s.mintIn&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Token in"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.mintIn,url:y})})]}),s.mintOut&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Token out"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.mintOut,url:y})})]})]},r):"raydium-swap-base-output"===s.type?/*#__PURE__*/e.jsxs(X,{children:[/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsxs(c.LabelXs,{children:["Raydium swap"," ",s.tokenIn&&s.tokenOut?`${s.tokenIn.symbol} → ${s.tokenOut.symbol}`:""]})}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Max amount in"}),/*#__PURE__*/e.jsx(t.Value,{children:s.maxAmountIn.toString()})]}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Amount out"}),/*#__PURE__*/e.jsx(t.Value,{children:s.amountOut.toString()})]}),s.mintIn&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Token in"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.mintIn,url:y})})]}),s.mintOut&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Token out"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.mintOut,url:y})})]})]},r):"jupiter-swap-shared-accounts-route"===s.type?/*#__PURE__*/e.jsxs(X,{children:[/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsxs(c.LabelXs,{children:["Jupiter swap"," ",s.tokenIn&&s.tokenOut?`${s.tokenIn.symbol} → ${s.tokenOut.symbol}`:""]})}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"In amount"}),/*#__PURE__*/e.jsx(t.Value,{children:s.inAmount.toString()})]}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Quoted out amount"}),/*#__PURE__*/e.jsx(t.Value,{children:s.quotedOutAmount.toString()})]}),s.mintIn&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Token in"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.mintIn,url:y})})]}),s.mintOut&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Token out"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.mintOut,url:y})})]})]},r):"jupiter-swap-exact-out-route"===s.type?/*#__PURE__*/e.jsxs(X,{children:[/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsxs(c.LabelXs,{children:["Jupiter swap"," ",s.tokenIn&&s.tokenOut?`${s.tokenIn.symbol} → ${s.tokenOut.symbol}`:""]})}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Quoted in amount"}),/*#__PURE__*/e.jsx(t.Value,{children:s.quotedInAmount.toString()})]}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Amount out"}),/*#__PURE__*/e.jsx(t.Value,{children:s.outAmount.toString()})]}),s.mintIn&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Token in"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.mintIn,url:y})})]}),s.mintOut&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Token out"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.mintOut,url:y})})]})]},r):/*#__PURE__*/e.jsxs(X,{children:[/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Program ID"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.program,url:y})})]}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Data"}),/*#__PURE__*/e.jsx(t.Value,{children:s.discriminator})]})]},r)))}),/*#__PURE__*/e.jsx(p.Grow,{}),k?/*#__PURE__*/e.jsx(d.ErrorMessage,{style:{marginTop:"2rem"},children:k.message}):v?/*#__PURE__*/e.jsx(d.ErrorMessage,{style:{marginTop:"2rem"},children:W}):null,/*#__PURE__*/e.jsx(P,{$useSmallMargins:!(!v&&!k),title:"",address:C,balance:A,errMsg:M||v||k||!S?void 0:"Add funds on Solana to complete transaction."}),/*#__PURE__*/e.jsx(o.PrimaryButton,{style:{marginTop:"1rem"},loading:N,disabled:T||M,onClick:F,children:b}),/*#__PURE__*/e.jsx(l.BlobbyFooter,{})]})},exports.SendTransactionScreenView=({img:n,submitError:i,prepareError:c,onClose:m,action:g,title:b,subtitle:f,to:w,tokenAddress:y,network:S,missingFunds:k,fee:v,from:I,cta:L,disabled:C,chain:R,isSubmitting:A,isPreparing:T,isTokenPriceLoading:M,isTokenContractInfoLoading:E,isSponsored:F,symbol:D,balance:O,onClick:X,transactionDetails:G,transactionIndex:J,maxIndex:Q,onBack:Y,chainName:K,validation:Z,hasScanDetails:_,setIsScanDetailsOpen:ee,preventMaliciousTransaction:se,setPreventMaliciousTransaction:re,tokensSent:ne,tokensReceived:ie,isScanning:oe,isCancellable:le,functionName:te})=>{let{showTransactionDetails:ae,setShowTransactionDetails:de,hasMoreDetails:ce,isErc20Ish:xe}=(e=>{let[s,n]=r.useState(!1),i=!0,o=!1;return(!e||e.isErc20Ish||"transaction"===e.action)&&(i=!1),i&&(o=Object.entries(e||{}).some((([e,s])=>s&&!["action","isErc20Ish","isNFTIsh"].includes(e)))),{showTransactionDetails:s,setShowTransactionDetails:n,hasMoreDetails:i&&o,isErc20Ish:e?.isErc20Ish}})(G),he=j.useAppConfig(),ue=xe&&E||T||M||oe;/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(l.ModalHeader,{onClose:m,backFn:Y}),n&&/*#__PURE__*/e.jsx(z,{children:n}),/*#__PURE__*/e.jsxs(h.Title,{style:{marginTop:n?"1.5rem":0},children:[b,/*#__PURE__*/e.jsx(B,{maxIndex:Q,transactionIndex:J})]}),/*#__PURE__*/e.jsx(x.Subtitle,{children:f}),/*#__PURE__*/e.jsxs(a.Rows,{style:{marginTop:"2rem"},children:[(!!ne[0]||ue)&&/*#__PURE__*/e.jsxs(a.Row,{children:[ie.length>0?/*#__PURE__*/e.jsx(t.LabelSm,{children:"Send"}):/*#__PURE__*/e.jsx(t.LabelSm,{children:"approve"===g?"Approval amount":"Amount"}),/*#__PURE__*/e.jsx("div",{className:"flex flex-col",children:ne.map(((s,r)=>/*#__PURE__*/e.jsx(N,{iconUrl:s.iconUrl,value:"setApprovalForAll"===te?"All":s.value,usdValue:s.usdValue,symbol:s.symbol,nftName:s.nftName,nftCount:s.nftCount,decimals:s.decimals},r)))})]}),ie.length>0&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Receive"}),/*#__PURE__*/e.jsx("div",{className:"flex flex-col",children:ie.map(((s,r)=>/*#__PURE__*/e.jsx(N,{iconUrl:s.iconUrl,value:s.value,usdValue:s.usdValue,symbol:s.symbol,nftName:s.nftName,nftCount:s.nftCount,decimals:s.decimals},r)))})]}),G&&"spender"in G&&G?.spender?/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Spender"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:G.spender,url:R?.blockExplorers?.default?.url})})]}):null,w&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"To"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:w,url:R?.blockExplorers?.default?.url,showCopyIcon:!0})})]}),y&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Token address"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:y,url:R?.blockExplorers?.default?.url})})]}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Network"}),/*#__PURE__*/e.jsx(t.Value,{children:S})]}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Estimated fee"}),/*#__PURE__*/e.jsx(t.Value,{$isLoading:T||M||void 0===F,children:F?/*#__PURE__*/e.jsxs(H,{children:[/*#__PURE__*/e.jsxs(U,{children:["Sponsored by ",he.name]}),/*#__PURE__*/e.jsx(s.BoltIcon,{height:16,width:16})]}):v})]}),ce&&!_&&/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(a.Row,{className:"cursor-pointer",onClick:()=>de(!ae),children:/*#__PURE__*/e.jsxs(t.LabelSmPrimary,{className:"flex items-center gap-x-1",children:["Details"," ",/*#__PURE__*/e.jsx(s.ChevronDownIcon,{style:{width:"0.75rem",marginLeft:"0.25rem",transform:ae?"rotate(180deg)":void 0}})]})}),ae&&G&&/*#__PURE__*/e.jsx(q,{action:g,chain:R,transactionDetails:G,isTokenContractInfoLoading:E,symbol:D})]}),_&&/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsxs(V,{onClick:()=>ee(!0),children:[/*#__PURE__*/e.jsx("span",{className:"text-color-primary",children:"Details"}),/*#__PURE__*/e.jsx(s.ArrowRightIcon,{height:"14px",width:"14px",strokeWidth:"2"})]})})]}),/*#__PURE__*/e.jsx(p.Grow,{}),i?/*#__PURE__*/e.jsx(d.ErrorMessage,{style:{marginTop:"2rem"},children:i.message}):c&&0===J?
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),s=require("@heroicons/react/24/outline"),r=require("react"),n=require("styled-components"),i=require("@privy-io/js-sdk-core"),o=require("./Button-BEaVAnh4.js"),l=require("./ModalHeader-n6Aqpos_.js"),t=require("./Value-C-XtZyFa.js"),a=require("./Row-CxDF-VMy.js"),d=require("./ErrorMessage-f0cRWc29.js"),c=require("./LabelXs-CYMv6rOZ.js"),x=require("./Subtitle-Dtmrw8l5.js"),h=require("./Title-C-tHJvrb.js"),u=require("./Address-B_I2EZZe.js"),m=require("./WalletInfoCard-DxO9lMen.js"),j=require("./context-BPd2qxKv.js"),p=require("./useActiveWallet-B-Pd49hn.js"),g=require("./LoadingSkeleton-DoCrfGnl.js"),b=require("viem"),f=require("./shared-BPGwTh8c.js"),w=require("./Checkbox-DXPQZFlQ.js"),y=require("./ErrorBanner-CMjaobRI.js"),S=require("./WarningBanner-B_Gs_15p.js"),k=require("@heroicons/react/24/outline/ClipboardDocumentCheckIcon"),v=require("@heroicons/react/24/outline/ClipboardDocumentIcon"),I=require("@heroicons/react/24/outline/ExclamationCircleIcon"),L=require("./internal-context-NWsAL807.js");function C(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var R=/*#__PURE__*/C(k),A=/*#__PURE__*/C(v),T=/*#__PURE__*/C(I);const V=/*#__PURE__*/n.styled(t.LabelSm).withConfig({displayName:"InteractiveLabel",componentId:"sc-b57d0824-0"})(["cursor:pointer;display:inline-flex;gap:8px;align-items:center;color:var(--privy-color-accent);svg{fill:var(--privy-color-accent);}"]);var N=({iconUrl:s,value:r,symbol:n,usdValue:i,nftName:o,nftCount:l,decimals:t,$isLoading:a})=>{if(a)/*#__PURE__*/return e.jsx(M,{$isLoading:a});let d=r&&i&&t?function(e,s,r){let n=parseFloat(e),i=parseFloat(r);if(0===n||0===i||Number.isNaN(n)||Number.isNaN(i))return e;let o=Math.ceil(-Math.log10(.01/(i/n))),l=Math.pow(10,o=Math.max(o=Math.min(o,s),1)),t=+(Math.floor(n*l)/l).toFixed(o).replace(/\.?0+$/,"");return Intl.NumberFormat(void 0,{maximumFractionDigits:s}).format(t)}(r,t,i):r;/*#__PURE__*/return e.jsxs("div",{children:[/*#__PURE__*/e.jsxs(M,{$isLoading:a,children:[s&&/*#__PURE__*/e.jsx(F,{src:s,alt:"Token icon"}),l&&l>1?l+"x":void 0," ",o,d," ",n]}),i&&/*#__PURE__*/e.jsxs(E,{$isLoading:a,children:["$",i]})]})};let M=/*#__PURE__*/n.styled.span.withConfig({displayName:"Value",componentId:"sc-991db279-0"})(["color:var(--privy-color-foreground);font-size:0.875rem;font-weight:500;line-height:1.375rem;word-break:break-all;text-align:right;display:flex;justify-content:flex-end;",""],g.LoadingSkeleton);const E=/*#__PURE__*/n.styled.span.withConfig({displayName:"Subvalue",componentId:"sc-991db279-1"})(["color:var(--privy-color-foreground-2);font-size:12px;font-weight:400;line-height:18px;word-break:break-all;text-align:right;display:flex;justify-content:flex-end;",""],g.LoadingSkeleton);let F=/*#__PURE__*/n.styled.img.withConfig({displayName:"TokenIcon",componentId:"sc-991db279-2"})(["height:14px;width:14px;margin-right:4px;object-fit:contain;"]);const q=s=>{let{chain:r,transactionDetails:n,isTokenContractInfoLoading:i,symbol:o}=s,{action:l,functionName:d}=n;/*#__PURE__*/return e.jsx(f.Box,{children:/*#__PURE__*/e.jsxs(a.Rows,{children:["transaction"!==l&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Action"}),/*#__PURE__*/e.jsx(t.Value,{children:d})]}),"mint"===d&&"args"in n&&n.args.filter((e=>e)).map(((s,n)=>/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:`Param ${n}`}),/*#__PURE__*/e.jsx(t.Value,{children:"string"==typeof s&&b.isAddress(s)?/*#__PURE__*/e.jsx(u.Address,{address:s,url:r?.blockExplorers?.default?.url,showCopyIcon:!1}):s?.toString()})]},n))),"setApprovalForAll"===d&&n.operator&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Operator"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:n.operator,url:r?.blockExplorers?.default?.url,showCopyIcon:!1})})]}),"setApprovalForAll"===d&&void 0!==n.approved&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Set approval to"}),/*#__PURE__*/e.jsx(t.Value,{children:n.approved?"true":"false"})]}),"transfer"===d||"transferFrom"===d||"safeTransferFrom"===d||"approve"===d?/*#__PURE__*/e.jsxs(e.Fragment,{children:["formattedAmount"in n&&n.formattedAmount&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Amount"}),/*#__PURE__*/e.jsxs(t.Value,{$isLoading:i,children:[n.formattedAmount," ",o]})]}),"tokenId"in n&&n.tokenId&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Token ID"}),/*#__PURE__*/e.jsx(t.Value,{children:n.tokenId.toString()})]})]}):null,"safeBatchTransferFrom"===d&&/*#__PURE__*/e.jsxs(e.Fragment,{children:["amounts"in n&&n.amounts&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Amounts"}),/*#__PURE__*/e.jsx(t.Value,{children:n.amounts.join(", ")})]}),"tokenIds"in n&&n.tokenIds&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Token IDs"}),/*#__PURE__*/e.jsx(t.Value,{children:n.tokenIds.join(", ")})]})]}),"approve"===d&&n.spender&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Spender"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:n.spender,url:r?.blockExplorers?.default?.url,showCopyIcon:!1})})]}),("transferFrom"===d||"safeTransferFrom"===d||"safeBatchTransferFrom"===d)&&n.transferFrom&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Transferring from"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:n.transferFrom,url:r?.blockExplorers?.default?.url,showCopyIcon:!1})})]}),("transferFrom"===d||"safeTransferFrom"===d||"safeBatchTransferFrom"===d)&&n.transferTo&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Transferring to"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:n.transferTo,url:r?.blockExplorers?.default?.url,showCopyIcon:!1})})]})]})})},$=({variant:s,setPreventMaliciousTransaction:r,colorScheme:n="light",preventMaliciousTransaction:i})=>"warn"===s?/*#__PURE__*/e.jsx(D,{children:/*#__PURE__*/e.jsxs(S.WarningBanner,{theme:n,children:[/*#__PURE__*/e.jsx("span",{style:{fontWeight:"500"},children:"Warning: Suspicious transaction"}),/*#__PURE__*/e.jsx("br",{}),"This has been flagged as a potentially deceptive request. Approving could put your assets or funds at risk."]})}):"error"===s?/*#__PURE__*/e.jsx(e.Fragment,{children:/*#__PURE__*/e.jsxs(D,{children:[/*#__PURE__*/e.jsx(y.ErrorBanner,{theme:n,children:/*#__PURE__*/e.jsxs("div",{children:[/*#__PURE__*/e.jsx("strong",{children:"This is a malicious transaction"}),/*#__PURE__*/e.jsx("br",{}),"This transaction transfers tokens to a known malicious address. Proceeding may result in the loss of valuable assets."]})}),/*#__PURE__*/e.jsxs(O,{children:[/*#__PURE__*/e.jsx(w.Checkbox,{color:"var(--privy-color-error)",checked:!i,readOnly:!0,onClick:()=>r(!i)}),/*#__PURE__*/e.jsx("span",{children:"I understand and want to proceed anyways."})]})]})}):null;let D=/*#__PURE__*/n.styled.div.withConfig({displayName:"BannerContainer",componentId:"sc-ab8a5a0b-0"})(["margin-top:1.5rem;"]),O=/*#__PURE__*/n.styled.div.withConfig({displayName:"CheckboxContainer",componentId:"sc-ab8a5a0b-1"})(["display:flex;align-items:center;gap:0.5rem;margin-top:0.75rem;"]);const B=({transactionIndex:e,maxIndex:s})=>"number"!=typeof e||0===s?"":` (${e+1} / ${s+1})`;let P=/*#__PURE__*/n.styled(m.WalletInfoCard).withConfig({displayName:"StyledWalletInfoCard",componentId:"sc-cbe5ab37-0"})(["",""],(e=>e.$useSmallMargins?"margin-top: 0.5rem;":"margin-top: 2rem;")),X=/*#__PURE__*/n.styled(a.Rows).withConfig({displayName:"InstructionRows",componentId:"sc-cbe5ab37-1"})(["margin-top:0.5rem;border:1px solid var(--privy-color-foreground-4);border-radius:var(--privy-border-radius-sm);padding:0.5rem;"]),W="There was an error preparing your transaction. Your transaction request will likely fail.",z=/*#__PURE__*/n.styled.div.withConfig({displayName:"ImageContainer",componentId:"sc-cbe5ab37-2"})(["display:flex;width:100%;justify-content:center;max-height:40px;> img{object-fit:contain;border-radius:var(--privy-border-radius-sm);}"]),H=/*#__PURE__*/n.styled.span.withConfig({displayName:"SponsoredRow",componentId:"sc-cbe5ab37-3"})(["display:inline-flex;align-items:center;gap:0.3rem;"]),U=/*#__PURE__*/n.styled.span.withConfig({displayName:"SponsoredText",componentId:"sc-cbe5ab37-4"})(["font-size:14px;font-weight:500;color:var(--privy-color-foreground);"]);let G=()=>/*#__PURE__*/e.jsxs(K,{children:[/*#__PURE__*/e.jsx(_,{}),/*#__PURE__*/e.jsx(Z,{})]});let J=/*#__PURE__*/n.styled.div.withConfig({displayName:"TransactionErrorScreenContainer",componentId:"sc-d58f10e6-0"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;"]),Q=/*#__PURE__*/n.styled.span.withConfig({displayName:"ErrorCode",componentId:"sc-d58f10e6-1"})(["color:var(--privy-color-foreground);text-align:center;font-size:1.125rem;font-weight:500;line-height:1.25rem;text-align:center;margin:10px;"]),Y=/*#__PURE__*/n.styled.span.withConfig({displayName:"Subtitle",componentId:"sc-d58f10e6-2"})(["margin-top:4px;margin-bottom:10px;color:var(--privy-color-foreground-3);text-align:center;font-size:0.875rem;font-style:normal;font-weight:400;line-height:20px;letter-spacing:-0.008px;"]),K=/*#__PURE__*/n.styled.div.withConfig({displayName:"CircleContainer",componentId:"sc-d58f10e6-3"})(["position:relative;width:60px;height:60px;margin:10px;display:flex;justify-content:center;align-items:center;"]),Z=/*#__PURE__*/n.styled(T.default).withConfig({displayName:"StyledExclamationCircleIcon",componentId:"sc-d58f10e6-4"})(["position:absolute;width:35px;height:35px;color:var(--privy-color-error);"]),_=/*#__PURE__*/n.styled.div.withConfig({displayName:"StyledRedCircle",componentId:"sc-d58f10e6-5"})(["position:absolute;width:60px;height:60px;border-radius:50%;background-color:var(--privy-color-error);opacity:0.1;"]),ee=/*#__PURE__*/n.styled(o.PrimaryButton).withConfig({displayName:"RetryButton",componentId:"sc-d58f10e6-6"})(["&&{margin-top:24px;}transition:color 350ms ease,background-color 350ms ease;"]),se=/*#__PURE__*/n.styled.span.withConfig({displayName:"TextBoxTitle",componentId:"sc-d58f10e6-7"})(["width:100%;text-align:left;font-size:0.825rem;color:var(--privy-color-foreground);padding:4px;"]),re=/*#__PURE__*/n.styled.div.withConfig({displayName:"TextBoxContainer",componentId:"sc-d58f10e6-8"})(["width:100%;margin:5px;display:flex;flex-direction:column;justify-content:center;align-items:center;"]),ne=/*#__PURE__*/n.styled.text.withConfig({displayName:"HelperText",componentId:"sc-d58f10e6-9"})(["position:relative;width:100%;padding:5px;font-size:0.8rem;color:var(--privy-color-foreground-3);text-align:left;word-wrap:break-word;"]),ie=/*#__PURE__*/n.styled.span.withConfig({displayName:"TextBox",componentId:"sc-d58f10e6-10"})(["position:relative;width:100%;background-color:var(--privy-color-background-2);padding:8px 12px;border-radius:10px;margin-top:5px;font-size:14px;color:var(--privy-color-foreground-3);text-align:left;word-wrap:break-word;",""],(e=>e.$clickable&&"cursor: pointer;\n transition: background-color 0.3s;\n padding-right: 45px;\n\n &:hover {\n background-color: var(--privy-color-foreground-4);\n }")),oe=/*#__PURE__*/n.styled(A.default).withConfig({displayName:"StyledClipboardIcon",componentId:"sc-d58f10e6-11"})(["position:absolute;top:13px;right:13px;width:24px;height:24px;"]),le=/*#__PURE__*/n.styled(R.default).withConfig({displayName:"StyledClipboardCheckIcon",componentId:"sc-d58f10e6-12"})(["position:absolute;top:13px;right:13px;width:24px;height:24px;"]),te=({clicked:s})=>s?/*#__PURE__*/e.jsx(le,{}):/*#__PURE__*/e.jsx(oe,{});exports.SendSolanaTransactionScreenView=({img:n,title:m,subtitle:g,cta:b,instructions:f,network:w,blockExplorerUrl:y,isMissingFunds:S,submitError:k,parseError:v,total:I,swap:L,transactingWalletAddress:C,fee:R,balance:A,disabled:T,isSubmitting:N,isPreparing:M,isTokenPriceLoading:E,onClick:F,onClose:q,onBack:$,isSponsored:D})=>{let O=M||E,[B,G]=r.useState(!1),J=j.useAppConfig();/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(l.ModalHeader,{onClose:q,backFn:$}),n&&/*#__PURE__*/e.jsx(z,{children:n}),/*#__PURE__*/e.jsx(h.Title,{style:{marginTop:n?"1.5rem":0},children:m}),/*#__PURE__*/e.jsx(x.Subtitle,{children:g}),/*#__PURE__*/e.jsxs(a.Rows,{style:{marginTop:"2rem",marginBottom:".5rem"},children:[(I||O)&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Amount"}),/*#__PURE__*/e.jsx(t.Value,{$isLoading:O,children:I})]}),L&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Swap"}),/*#__PURE__*/e.jsx(t.Value,{children:L})]}),w&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Network"}),/*#__PURE__*/e.jsx(t.Value,{children:w})]}),(R||O||void 0!==D)&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Estimated fee"}),/*#__PURE__*/e.jsx(t.Value,{$isLoading:O,children:D&&!O?/*#__PURE__*/e.jsxs(H,{children:[/*#__PURE__*/e.jsxs(U,{children:["Sponsored by ",J.name]}),/*#__PURE__*/e.jsx(s.BoltIcon,{height:16,width:16})]}):R})]})]}),/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsxs(V,{onClick:()=>G((e=>!e)),children:[/*#__PURE__*/e.jsx("span",{children:"Advanced"}),/*#__PURE__*/e.jsx(s.ChevronDownIcon,{height:"16px",width:"16px",strokeWidth:"2",style:{transition:"all 300ms",transform:B?"rotate(180deg)":void 0}})]})}),B&&/*#__PURE__*/e.jsx(e.Fragment,{children:f.map(((s,r)=>"sol-transfer"===s.type?/*#__PURE__*/e.jsxs(X,{children:[/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsxs(c.LabelXs,{children:["Transfer ",s.withSeed?"with seed":""]})}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Amount"}),/*#__PURE__*/e.jsxs(t.Value,{children:[i.formatTokenAmount({amount:s.value,decimals:s.token.decimals})," ",s.token.symbol]})]}),!!s.toAccount&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Destination"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.toAccount,url:y})})]})]},r):"spl-transfer"===s.type?/*#__PURE__*/e.jsxs(X,{children:[/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsxs(c.LabelXs,{children:["Transfer ",s.token.symbol]})}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Amount"}),/*#__PURE__*/e.jsx(t.Value,{children:s.value.toString()})]}),!!s.fromAta&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Source"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.fromAta,url:y})})]}),!!s.toAta&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Destination"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.toAta,url:y})})]}),!!s.token.address&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Token"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.token.address,url:y})})]})]},r):"ata-creation"===s.type?/*#__PURE__*/e.jsxs(X,{children:[/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsx(c.LabelXs,{children:"Create token account"})}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Program ID"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.program,url:y})})]}),!!s.owner&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Owner"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.owner,url:y})})]})]},r):"create-account"===s.type?/*#__PURE__*/e.jsxs(X,{children:[/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsxs(c.LabelXs,{children:["Create account ",s.withSeed?"with seed":""]})}),!!s.account&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Account"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.account,url:y})})]}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Amount"}),/*#__PURE__*/e.jsxs(t.Value,{children:[i.formatTokenAmount({amount:s.value,decimals:9})," SOL"]})]})]},r):"spl-init-account"===s.type?/*#__PURE__*/e.jsxs(X,{children:[/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsx(c.LabelXs,{children:"Initialize token account"})}),!!s.account&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Account"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.account,url:y})})]}),!!s.mint&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Mint"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.mint,url:y})})]}),!!s.owner&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Owner"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.owner,url:y})})]})]},r):"spl-close-account"===s.type?/*#__PURE__*/e.jsxs(X,{children:[/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsx(c.LabelXs,{children:"Close token account"})}),!!s.source&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Source"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.source,url:y})})]}),!!s.destination&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Destination"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.destination,url:y})})]}),!!s.owner&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Owner"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.owner,url:y})})]})]},r):"spl-sync-native"===s.type?/*#__PURE__*/e.jsxs(X,{children:[/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsx(c.LabelXs,{children:"Sync native"})}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Program ID"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.program,url:y})})]})]},r):"raydium-swap-base-input"===s.type?/*#__PURE__*/e.jsxs(X,{children:[/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsxs(c.LabelXs,{children:["Raydium swap"," ",s.tokenIn&&s.tokenOut?`${s.tokenIn.symbol} → ${s.tokenOut.symbol}`:""]})}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Amount in"}),/*#__PURE__*/e.jsx(t.Value,{children:s.amountIn.toString()})]}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Minimum amount out"}),/*#__PURE__*/e.jsx(t.Value,{children:s.minimumAmountOut.toString()})]}),s.mintIn&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Token in"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.mintIn,url:y})})]}),s.mintOut&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Token out"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.mintOut,url:y})})]})]},r):"raydium-swap-base-output"===s.type?/*#__PURE__*/e.jsxs(X,{children:[/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsxs(c.LabelXs,{children:["Raydium swap"," ",s.tokenIn&&s.tokenOut?`${s.tokenIn.symbol} → ${s.tokenOut.symbol}`:""]})}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Max amount in"}),/*#__PURE__*/e.jsx(t.Value,{children:s.maxAmountIn.toString()})]}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Amount out"}),/*#__PURE__*/e.jsx(t.Value,{children:s.amountOut.toString()})]}),s.mintIn&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Token in"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.mintIn,url:y})})]}),s.mintOut&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Token out"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.mintOut,url:y})})]})]},r):"jupiter-swap-shared-accounts-route"===s.type?/*#__PURE__*/e.jsxs(X,{children:[/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsxs(c.LabelXs,{children:["Jupiter swap"," ",s.tokenIn&&s.tokenOut?`${s.tokenIn.symbol} → ${s.tokenOut.symbol}`:""]})}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"In amount"}),/*#__PURE__*/e.jsx(t.Value,{children:s.inAmount.toString()})]}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Quoted out amount"}),/*#__PURE__*/e.jsx(t.Value,{children:s.quotedOutAmount.toString()})]}),s.mintIn&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Token in"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.mintIn,url:y})})]}),s.mintOut&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Token out"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.mintOut,url:y})})]})]},r):"jupiter-swap-exact-out-route"===s.type?/*#__PURE__*/e.jsxs(X,{children:[/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsxs(c.LabelXs,{children:["Jupiter swap"," ",s.tokenIn&&s.tokenOut?`${s.tokenIn.symbol} → ${s.tokenOut.symbol}`:""]})}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Quoted in amount"}),/*#__PURE__*/e.jsx(t.Value,{children:s.quotedInAmount.toString()})]}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Amount out"}),/*#__PURE__*/e.jsx(t.Value,{children:s.outAmount.toString()})]}),s.mintIn&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Token in"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.mintIn,url:y})})]}),s.mintOut&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Token out"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.mintOut,url:y})})]})]},r):/*#__PURE__*/e.jsxs(X,{children:[/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Program ID"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.program,url:y})})]}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Data"}),/*#__PURE__*/e.jsx(t.Value,{children:s.discriminator})]})]},r)))}),/*#__PURE__*/e.jsx(p.Grow,{}),k?/*#__PURE__*/e.jsx(d.ErrorMessage,{style:{marginTop:"2rem"},children:k.message}):v?/*#__PURE__*/e.jsx(d.ErrorMessage,{style:{marginTop:"2rem"},children:W}):null,/*#__PURE__*/e.jsx(P,{$useSmallMargins:!(!v&&!k),title:"",address:C,balance:A,errMsg:M||v||k||!S?void 0:"Add funds on Solana to complete transaction."}),/*#__PURE__*/e.jsx(o.PrimaryButton,{style:{marginTop:"1rem"},loading:N,disabled:T||M,onClick:F,children:b}),/*#__PURE__*/e.jsx(l.BlobbyFooter,{})]})},exports.SendTransactionScreenView=({img:n,submitError:i,prepareError:c,onClose:m,action:g,title:b,subtitle:f,to:w,tokenAddress:y,network:S,missingFunds:k,fee:v,from:I,cta:L,disabled:C,chain:R,isSubmitting:A,isPreparing:T,isTokenPriceLoading:M,isTokenContractInfoLoading:E,isSponsored:F,symbol:D,balance:O,onClick:X,transactionDetails:G,transactionIndex:J,maxIndex:Q,onBack:Y,chainName:K,validation:Z,hasScanDetails:_,setIsScanDetailsOpen:ee,preventMaliciousTransaction:se,setPreventMaliciousTransaction:re,tokensSent:ne,tokensReceived:ie,isScanning:oe,isCancellable:le,functionName:te})=>{let{showTransactionDetails:ae,setShowTransactionDetails:de,hasMoreDetails:ce,isErc20Ish:xe}=(e=>{let[s,n]=r.useState(!1),i=!0,o=!1;return(!e||e.isErc20Ish||"transaction"===e.action)&&(i=!1),i&&(o=Object.entries(e||{}).some((([e,s])=>s&&!["action","isErc20Ish","isNFTIsh"].includes(e)))),{showTransactionDetails:s,setShowTransactionDetails:n,hasMoreDetails:i&&o,isErc20Ish:e?.isErc20Ish}})(G),he=j.useAppConfig(),ue=xe&&E||T||M||oe;/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(l.ModalHeader,{onClose:m,backFn:Y}),n&&/*#__PURE__*/e.jsx(z,{children:n}),/*#__PURE__*/e.jsxs(h.Title,{style:{marginTop:n?"1.5rem":0},children:[b,/*#__PURE__*/e.jsx(B,{maxIndex:Q,transactionIndex:J})]}),/*#__PURE__*/e.jsx(x.Subtitle,{children:f}),/*#__PURE__*/e.jsxs(a.Rows,{style:{marginTop:"2rem"},children:[(!!ne[0]||ue)&&/*#__PURE__*/e.jsxs(a.Row,{children:[ie.length>0?/*#__PURE__*/e.jsx(t.LabelSm,{children:"Send"}):/*#__PURE__*/e.jsx(t.LabelSm,{children:"approve"===g?"Approval amount":"Amount"}),/*#__PURE__*/e.jsx("div",{className:"flex flex-col",children:ne.map(((s,r)=>/*#__PURE__*/e.jsx(N,{iconUrl:s.iconUrl,value:"setApprovalForAll"===te?"All":s.value,usdValue:s.usdValue,symbol:s.symbol,nftName:s.nftName,nftCount:s.nftCount,decimals:s.decimals},r)))})]}),ie.length>0&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Receive"}),/*#__PURE__*/e.jsx("div",{className:"flex flex-col",children:ie.map(((s,r)=>/*#__PURE__*/e.jsx(N,{iconUrl:s.iconUrl,value:s.value,usdValue:s.usdValue,symbol:s.symbol,nftName:s.nftName,nftCount:s.nftCount,decimals:s.decimals},r)))})]}),G&&"spender"in G&&G?.spender?/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Spender"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:G.spender,url:R?.blockExplorers?.default?.url})})]}):null,w&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"To"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:w,url:R?.blockExplorers?.default?.url,showCopyIcon:!0})})]}),y&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Token address"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:y,url:R?.blockExplorers?.default?.url})})]}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Network"}),/*#__PURE__*/e.jsx(t.Value,{children:S})]}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Estimated fee"}),/*#__PURE__*/e.jsx(t.Value,{$isLoading:T||M||void 0===F,children:F?/*#__PURE__*/e.jsxs(H,{children:[/*#__PURE__*/e.jsxs(U,{children:["Sponsored by ",he.name]}),/*#__PURE__*/e.jsx(s.BoltIcon,{height:16,width:16})]}):v})]}),ce&&!_&&/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(a.Row,{className:"cursor-pointer",onClick:()=>de(!ae),children:/*#__PURE__*/e.jsxs(t.LabelSmPrimary,{className:"flex items-center gap-x-1",children:["Details"," ",/*#__PURE__*/e.jsx(s.ChevronDownIcon,{style:{width:"0.75rem",marginLeft:"0.25rem",transform:ae?"rotate(180deg)":void 0}})]})}),ae&&G&&/*#__PURE__*/e.jsx(q,{action:g,chain:R,transactionDetails:G,isTokenContractInfoLoading:E,symbol:D})]}),_&&/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsxs(V,{onClick:()=>ee(!0),children:[/*#__PURE__*/e.jsx("span",{className:"text-color-primary",children:"Details"}),/*#__PURE__*/e.jsx(s.ArrowRightIcon,{height:"14px",width:"14px",strokeWidth:"2"})]})})]}),/*#__PURE__*/e.jsx(p.Grow,{}),i?/*#__PURE__*/e.jsx(d.ErrorMessage,{style:{marginTop:"2rem"},children:i.message}):c&&0===J?
|
|
2
2
|
/*#__PURE__*/e.jsx(d.ErrorMessage,{style:{marginTop:"2rem"},children:c.shortMessage??W}):null,/*#__PURE__*/e.jsx($,{variant:Z,preventMaliciousTransaction:se,setPreventMaliciousTransaction:re}),/*#__PURE__*/e.jsx(P,{$useSmallMargins:!(!c&&!i&&"warn"!==Z&&"error"!==Z),address:I,balance:O,errMsg:T||c||i||!k?void 0:`Add funds on ${R?.name??K} to complete transaction.`}),/*#__PURE__*/e.jsx(o.PrimaryButton,{style:{marginTop:"1rem"},loading:A,disabled:C||T,onClick:X,children:L}),le&&/*#__PURE__*/e.jsx(o.EmbeddedButton,{style:{marginTop:"1rem"},onClick:m,isSubmitting:!1,children:"Not now"}),/*#__PURE__*/e.jsx(l.BlobbyFooter,{})]})},exports.TransactionErrorView=({transactionError:s,chainId:n,onClose:i,onRetry:o,chainType:t,transactionHash:a})=>{let{chains:d}=L.usePrivyInternal(),[c,x]=r.useState(!1),{errorCode:h,errorMessage:u}=((e,s)=>{if("ethereum"===s)return{errorCode:e.details??e.message,errorMessage:e.shortMessage};let r=e.txSignature,n=e?.transactionMessage||"Something went wrong.";if(Array.isArray(e.logs)){let s=e.logs.find((e=>/insufficient (lamports|funds)/gi.test(e)));s&&(n=s)}return{transactionHash:r,errorMessage:n}})(s,t),m=(({chains:e,chainId:s,chainType:r,transactionHash:n})=>"ethereum"===r?e.find((e=>e.id===s))?.blockExplorers?.default.url??"https://etherscan.io":function(e,s){return`https://explorer.solana.com/tx/${e}?chain=${s}`}(n||"",s))({chains:d,chainId:n,chainType:t,transactionHash:a});/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(l.ModalHeader,{onClose:i}),/*#__PURE__*/e.jsxs(J,{children:[/*#__PURE__*/e.jsx(G,{}),/*#__PURE__*/e.jsx(Q,{children:h}),/*#__PURE__*/e.jsx(Y,{children:"Please try again."}),/*#__PURE__*/e.jsxs(re,{children:[/*#__PURE__*/e.jsx(se,{children:"Error message"}),/*#__PURE__*/e.jsx(ie,{$clickable:!1,children:u})]}),a&&/*#__PURE__*/e.jsxs(re,{children:[/*#__PURE__*/e.jsx(se,{children:"Transaction hash"}),/*#__PURE__*/e.jsxs(ne,{children:["Copy this hash to view details about the transaction on a"," ",/*#__PURE__*/e.jsx("u",{children:/*#__PURE__*/e.jsx("a",{href:m,children:"block explorer"})}),"."]}),/*#__PURE__*/e.jsxs(ie,{$clickable:!0,onClick:async()=>{await navigator.clipboard.writeText(a),x(!0)},children:[a,/*#__PURE__*/e.jsx(te,{clicked:c})]})]}),/*#__PURE__*/e.jsx(ee,{onClick:()=>o({resetNonce:!!a}),children:"Retry transaction"})]}),/*#__PURE__*/e.jsx(l.ModalFooter,{})]})};
|
package/dist/cjs/{TransferFromWalletScreen-CrOo6G6H.js → TransferFromWalletScreen-DnUQ6O_8.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),n=require("react"),t=require("./ModalHeader-OWSWMCEF.js"),l=require("./ScreenHeader-CyURV6Ti.js"),a=require("./FundWalletMethodHeader-uzk-ixZP.js"),i=require("./Chip-ChrHHazc.js"),o=require("./Subtitle-Dtmrw8l5.js"),r=require("./context-bxRrRk2e.js"),c=require("./useActiveWallet-hSS_Ajap.js"),s=require("./internal-context-NWsAL807.js"),d=require("./get-is-unified-wallet-RpTO1Sce.js"),u=require("./useWallets-_HUqLUqD.js"),p=require("./WalletOverflowButton-CHPYVqpu.js"),y=require("./index-DG6nzSst.js"),h=require("react-device-detect"),w=require("styled-components"),m=require("./InjectedWalletIcon-UY3nMvZo.js"),C=require("./styles-D4VeJNv1.js");require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./LoadingSkeleton-DoCrfGnl.js"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("zustand"),require("./prepareFundingModalData-DSU36mVl.js"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("ofetch"),require("lucide-react"),require("uuid"),require("jose"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("./usePrivy-DX4q_wvG.js"),require("@scure/base"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("js-cookie"),require("./frame-B14fp9oC.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-BcAsQTGF.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js"),require("@heroicons/react/24/outline/WalletIcon");const f=({provider:n,displayName:t,logo:l,connectOnly:a,connector:i})=>{let o,{navigate:r,setModalData:u}=d.usePrivyModal(),{connectWallet:p}=s.usePrivyInternal(),w=c.useRecentlyUsedLogin(),C=c.useExternalWalletListing(n),f="wallet_connect_v2"===i.connectorType?n:i.walletClientType,j=window.matchMedia("(display-mode: standalone)").matches,v=c.getWalletConfigForConnector({connectorType:i.connectorType,walletClientType:f});o=v&&v.chainTypes.includes(i.chainType)?()=>{v.isInstalled||"solana"===i.chainType&&"isInstalled"in i&&i.isInstalled?(p(i,f),r(a?"ConnectOnlyStatusScreen":"ConnectionStatusScreen")):h.isMobile?(u({installWalletModalData:{walletConfig:v,chainType:i.chainType,connectOnly:a}}),r("WalletInterstitialScreen")):(u({installWalletModalData:{walletConfig:v,chainType:i.chainType,connectOnly:a}}),r("InstallWalletScreen"))}:"coinbase_wallet"!==i.connectorType||"eoaOnly"!==i.coinbaseWalletConfig.preference?.options||!h.isMobile||j||c.isCoinbaseWalletInstalled()?()=>{(!y.e(window.navigator.userAgent)||event?.isTrusted)&&(p(i,f),a?"wallet_connect_v2"===i.connectorType?(u((e=>({...e,externalConnectWallet:{...e?.externalConnectWallet,preSelectedWalletId:"wallet_connect_qr"}}))),r("ConnectOnlyLandingScreen")):r("ConnectOnlyStatusScreen"):r("ConnectionStatusScreen"))}:()=>{window.location.href=`https://go.cb-w.com/dapp?cb_url=${encodeURI(window.location.href)}`};let q=t||C?.metadata?.shortName||C?.name||i.walletClientType;/*#__PURE__*/return e.jsxs(g,{onClick:o,children:[/*#__PURE__*/e.jsx(m.InjectedWalletIcon,{icon:l||C?.image_url?.md,name:q}),/*#__PURE__*/e.jsx("span",{children:q}),/*#__PURE__*/e.jsxs(x,{id:"chip-container",children:[w?.walletClientType===f&&w?.chainType===i.chainType?/*#__PURE__*/e.jsx(T,{color:"gray",children:"Recent"}):/*#__PURE__*/e.jsx("span",{id:"connect-text",children:"Connect"}),"solana"===i.chainType&&/*#__PURE__*/e.jsx(T,{color:"gray",children:"Solana"})]})]})};let g=/*#__PURE__*/w.styled(c.LoginMethodButton).withConfig({displayName:"ConnectWalletButton",componentId:"sc-5fe2f19b-0"})(["> span{color:var(--privy-color-foreground);}> #chip-container > #connect-text{font-weight:500;color:var(--privy-color-accent);opacity:0;transition:opacity 0.1s ease-out;}:hover > #chip-container > #connect-text{opacity:1;}@media (max-width:440px){> #chip-container > #connect-text{display:none;}}"]),T=/*#__PURE__*/w.styled(i.Chip).withConfig({displayName:"StyledChip",componentId:"sc-5fe2f19b-1"})(["margin-left:auto;"]),x=/*#__PURE__*/w.styled.div.withConfig({displayName:"ChipContainer",componentId:"sc-5fe2f19b-2"})(["display:flex;flex-wrap:wrap;gap:8px;margin-left:auto;"]);const j=["coinbase_wallet","base_account"];let v=["metamask","okx_wallet","rainbow","uniswap","bybit_wallet","ronin_wallet","haha_wallet","uniswap_extension","zerion","rabby_wallet","cryptocom","binance","kraken_wallet"];const q=["safe"],_=["phantom","backpack","solflare","jupiter","universal_profile"],b={component:()=>{let i,{connectors:h}=s.usePrivyInternal(),{setModalData:w,data:m,navigate:C}=d.usePrivyModal(),g=r.useAppConfig(),{wallets:T}=u.useWallets(),x=h.filter(c.isSolanaWalletConnector).flatMap((e=>e.wallets)),[b,S]=n.useState("default"),I="solana"===m?.funding?.chainType,$=!!m?.funding?.crossChainBridgingEnabled;i="ethereum"===m?.funding?.chainType?m.funding.erc20Address&&!m.funding.isUSDC?"ethereum-only":$&&!m.funding.chain.testnet?"ethereum-and-solana":"ethereum-only":$&&!m.funding?.isUSDC?"ethereum-and-solana":"solana-only";let M=T.filter((e=>"privy"!==e.walletClientType)),O=M.map((e=>e.walletClientType)),k=x.filter((e=>"privy"!==e.walletClientType)),A=k.map((e=>e.walletClientType)),B=[],F={...m.funding};F.usingDefaultFundingMethod&&(F.usingDefaultFundingMethod=!1);let D=({wallet:e,walletChainType:n})=>{w({...m,funding:{...F,connectedWallet:e,onContinueWithExternalWallet:()=>C(L({destChainType:I?"solana":"ethereum",sourceChainType:n}))},solanaFundingData:m?.solanaFundingData?{...m.solanaFundingData,sourceWalletData:{address:e.address,walletClientType:e.walletClientType}}:void 0}),C("FundingAmountEditScreen")};"solana-only"!==i&&B.push(...M.map(((n,t)=>/*#__PURE__*/e.jsx(W,{onClick:()=>D({wallet:n,walletChainType:"ethereum"}),icon:n.meta.icon,name:n.meta.name,chainType:n.type},t)))),"ethereum-only"!==i&&B.push(...k.map(((n,t)=>/*#__PURE__*/e.jsx(W,{onClick:()=>D({wallet:n,walletChainType:"solana"}),icon:n.meta.icon,name:n.meta.name,chainType:n.type},t)))),B.push(...(({walletList:n,walletChainType:t,connectors:l,connectOnly:a,ignore:i,walletConnectEnabled:o,forceWallet:r})=>{let c=[],s=[],d=[],u=l.filter((e=>"ethereum-only"===t?"ethereum"===e.chainType:"solana-only"!==t||"solana"===e.chainType)),p=u.find((e=>"wallet_connect_v2"===e.connectorType));for(let[l,h]of(r?[r.wallet]:n).entries()){if("detected_ethereum_wallets"===h)for(let[n,t]of u.filter((({chainType:e,connectorType:n,walletClientType:t})=>"solana"!==e&&("uniswap_wallet_extension"===t||"uniswap_extension"===t?!i.includes("uniswap"):"crypto.com_wallet_extension"===t||"crypto.com_onchain"===t?!i.includes("cryptocom"):"injected"===n&&!i.includes(t)))).entries()){let{walletClientType:i,walletBranding:o,chainType:r}=t;("unknown"===i?s:c).push(/*#__PURE__*/e.jsx(f,{connectOnly:a,provider:i,logo:o.icon,displayName:o.name,connector:t},`${l}-${h}-${i}-${r}-${n}`))}if("detected_solana_wallets"===h)for(let[n,o]of u.filter((({chainType:e,walletClientType:n})=>{if("solana"===e)return"ethereum-only"!==t&&!i.includes(n)})).entries()){let{walletClientType:t,walletBranding:i,chainType:r}=o;("unknown"===t?s:c).push(/*#__PURE__*/e.jsx(f,{connectOnly:a,provider:t,logo:i.icon,displayName:i.name,connector:o},`${l}-${h}-${t}-${r}-${n}`))}if(_.includes(h)){let n=u.find((e=>"injected"===e.connectorType&&e.walletClientType===h||e.connectorType===h));if(n&&c.push(/*#__PURE__*/e.jsx(f,{connectOnly:a,provider:h,connector:n},`${l}-${h}`)),"solana-only"===t||"ethereum-and-solana"===t){let n=u.find((({chainType:e,walletClientType:n})=>"solana"===e&&n===h));n&&c.push(/*#__PURE__*/e.jsx(f,{connectOnly:a,provider:h,connector:n},`${h}-solana`))}}else if(v.includes(h)){let n=u.find((e=>"uniswap"===h?"uniswap_wallet_extension"===e.walletClientType||"uniswap_extension"===e.walletClientType:"cryptocom"===h?"crypto.com_wallet_extension"===e.walletClientType||"crypto.com_onchain"===e.walletClientType:"injected"===e.connectorType&&e.walletClientType===h));if(o&&!n&&(n=p),n&&c.push(/*#__PURE__*/e.jsx(f,{connectOnly:a,provider:h,connector:n,logo:"injected"===n.connectorType?n.walletBranding.icon:void 0,displayName:"injected"===n.connectorType?n.walletBranding.name:void 0},`${l}-${h}`)),"solana-only"===t||"ethereum-and-solana"===t){let n=u.find((({chainType:e,walletClientType:n})=>"solana"===e&&n===h));n&&c.push(/*#__PURE__*/e.jsx(f,{connectOnly:a,provider:h,connector:n},`${h}-solana`))}}else if(j.includes(h)){let n=u.find((({connectorType:e})=>e===h));n&&c.push(/*#__PURE__*/e.jsx(f,{connectOnly:a,provider:h,connector:n,displayName:"coinbase_wallet"===n.walletClientType?"Coinbase":"Base",logo:"coinbase_wallet"===n.walletClientType?y.COINBASE_WALLET_DATA_URI:y.BASE_ACCOUNT_DATA_URI},`${l}-${h}`))}else if(q.includes(h))p&&d.push(/*#__PURE__*/e.jsx(f,{connectOnly:a,provider:h,connector:p},`${l}-${h}`));else if("wallet_connect"===h)p&&d.push(/*#__PURE__*/e.jsx(f,{connectOnly:a,provider:h,connector:p,logo:p.walletBranding.icon,displayName:"WalletConnect"},`${l}-${h}`));else if(h===r?.wallet){let t="ethereum"===r.chainType&&n.includes("detected_ethereum_wallets"),i="solana"===r.chainType&&n.includes("detected_solana_wallets");if(t||i){let n=u.find((({walletClientType:e})=>e===h));n&&c.push(/*#__PURE__*/e.jsx(f,{connectOnly:a,provider:h,displayName:n.walletBranding?.name,logo:n.walletBranding?.icon,connector:n},`${l}-${h}`))}}}return[...s,...c,...d]})({walletList:g.appearance.walletList.filter((e=>!M.some((n=>n.walletClientType===e))&&!k.some((n=>n.walletClientType===e)))),walletChainType:i,connectors:h,connectOnly:!0,ignore:[...g.appearance.walletList,...O,...A],walletConnectEnabled:g.externalWallets.walletConnect.enabled}));let E=/*#__PURE__*/e.jsx(p.WalletOverflowButton,{text:"More wallets",onClick:()=>S("overflow")}),L=({sourceChainType:e,destChainType:n})=>"ethereum"===e&&"solana"===n?"AwaitingEvmToSolBridgingScreen":"ethereum"===e&&"ethereum"===n?"AwaitingExternalEthereumTransferScreen":"solana"===e&&"ethereum"===n?"AwaitingSolToEvmBridgingScreen":F.externalSolanaFundingScreen;return n.useEffect((()=>{w({...m,externalConnectWallet:{onCompleteNavigateTo:({address:e,walletClientType:n,walletChainType:t})=>{let l=t??"ethereum",a="ethereum"===l?M.find((t=>t.address===e&&t.walletClientType===n)):k.find((t=>t.address===e&&t.walletClientType===n));return w({...m,funding:{...F,connectedWallet:a,onContinueWithExternalWallet:()=>{C(L({destChainType:I?"solana":"ethereum",sourceChainType:l}))}},solanaFundingData:m?.solanaFundingData?{...m.solanaFundingData,sourceWalletData:{address:e||"",walletClientType:n||""}}:void 0}),"FundingAmountEditScreen"}}})}),[]),"overflow"===b?/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(t.ModalHeader,{backFn:()=>S("default")},"header"),/*#__PURE__*/e.jsxs(c.LoginMethodContainer,{children:[/*#__PURE__*/e.jsx(o.Subtitle,{style:{color:"var(--privy-color-foreground-3)",textAlign:"left"},children:"More wallets"}),B]}),/*#__PURE__*/e.jsx(t.BlobbyFooter,{})]}):/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(a.t,{}),/*#__PURE__*/e.jsx(l.CenteredScreenHeader,{title:"Transfer from wallet",description:"Connect a wallet to deposit funds or send funds manually to your wallet address."}),/*#__PURE__*/e.jsxs(c.LoginMethodContainer,{children:[B.length>4?B.slice(0,3):B,B.length>4&&E]}),/*#__PURE__*/e.jsx(t.BlobbyFooter,{})]})}};let W=({onClick:n,icon:t,name:l,chainType:a})=>/*#__PURE__*/e.jsxs(c.LoginMethodButton,{onClick:n,children:[/*#__PURE__*/e.jsx(C.IconContainer,{style:{width:20},children:/*#__PURE__*/e.jsx("img",{src:t})}),l,/*#__PURE__*/e.jsx(i.Chip,{color:"gray",style:{marginLeft:"auto"},children:"Connected"}),"solana"===a&&/*#__PURE__*/e.jsx(i.Chip,{color:"gray",children:"Solana"})]});exports.TransferFromWalletScreen=b,exports.default=b;
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),n=require("react"),t=require("./ModalHeader-n6Aqpos_.js"),l=require("./ScreenHeader-CyURV6Ti.js"),a=require("./FundWalletMethodHeader-CxH_zVnz.js"),i=require("./Chip-ChrHHazc.js"),o=require("./Subtitle-Dtmrw8l5.js"),r=require("./context-BPd2qxKv.js"),c=require("./useActiveWallet-B-Pd49hn.js"),s=require("./internal-context-NWsAL807.js"),d=require("./get-is-unified-wallet-D6pn8A8g.js"),u=require("./useWallets-Bi_kf80t.js"),p=require("./WalletOverflowButton-Tdaiid33.js"),y=require("./index-Dz7affvL.js"),h=require("react-device-detect"),w=require("styled-components"),m=require("./InjectedWalletIcon-UY3nMvZo.js"),C=require("./styles-D4VeJNv1.js");require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./LoadingSkeleton-DoCrfGnl.js"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("zustand"),require("./prepareFundingModalData-Do7d2fgq.js"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("ofetch"),require("lucide-react"),require("uuid"),require("jose"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("./usePrivy-CANb3vg4.js"),require("@scure/base"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("js-cookie"),require("./frame-B14fp9oC.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-BcAsQTGF.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js"),require("@heroicons/react/24/outline/WalletIcon");const f=({provider:n,displayName:t,logo:l,connectOnly:a,connector:i})=>{let o,{navigate:r,setModalData:u}=d.usePrivyModal(),{connectWallet:p}=s.usePrivyInternal(),w=c.useRecentlyUsedLogin(),C=c.useExternalWalletListing(n),f="wallet_connect_v2"===i.connectorType?n:i.walletClientType,j=window.matchMedia("(display-mode: standalone)").matches,v=c.getWalletConfigForConnector({connectorType:i.connectorType,walletClientType:f});o=v&&v.chainTypes.includes(i.chainType)?()=>{v.isInstalled||"solana"===i.chainType&&"isInstalled"in i&&i.isInstalled?(p(i,f),r(a?"ConnectOnlyStatusScreen":"ConnectionStatusScreen")):h.isMobile?(u({installWalletModalData:{walletConfig:v,chainType:i.chainType,connectOnly:a}}),r("WalletInterstitialScreen")):(u({installWalletModalData:{walletConfig:v,chainType:i.chainType,connectOnly:a}}),r("InstallWalletScreen"))}:"coinbase_wallet"!==i.connectorType||"eoaOnly"!==i.coinbaseWalletConfig.preference?.options||!h.isMobile||j||c.isCoinbaseWalletInstalled()?()=>{(!y.e(window.navigator.userAgent)||event?.isTrusted)&&(p(i,f),a?"wallet_connect_v2"===i.connectorType?(u((e=>({...e,externalConnectWallet:{...e?.externalConnectWallet,preSelectedWalletId:"wallet_connect_qr"}}))),r("ConnectOnlyLandingScreen")):r("ConnectOnlyStatusScreen"):r("ConnectionStatusScreen"))}:()=>{window.location.href=`https://go.cb-w.com/dapp?cb_url=${encodeURI(window.location.href)}`};let q=t||C?.metadata?.shortName||C?.name||i.walletClientType;/*#__PURE__*/return e.jsxs(g,{onClick:o,children:[/*#__PURE__*/e.jsx(m.InjectedWalletIcon,{icon:l||C?.image_url?.md,name:q}),/*#__PURE__*/e.jsx("span",{children:q}),/*#__PURE__*/e.jsxs(x,{id:"chip-container",children:[w?.walletClientType===f&&w?.chainType===i.chainType?/*#__PURE__*/e.jsx(T,{color:"gray",children:"Recent"}):/*#__PURE__*/e.jsx("span",{id:"connect-text",children:"Connect"}),"solana"===i.chainType&&/*#__PURE__*/e.jsx(T,{color:"gray",children:"Solana"})]})]})};let g=/*#__PURE__*/w.styled(c.LoginMethodButton).withConfig({displayName:"ConnectWalletButton",componentId:"sc-5fe2f19b-0"})(["> span{color:var(--privy-color-foreground);}> #chip-container > #connect-text{font-weight:500;color:var(--privy-color-accent);opacity:0;transition:opacity 0.1s ease-out;}:hover > #chip-container > #connect-text{opacity:1;}@media (max-width:440px){> #chip-container > #connect-text{display:none;}}"]),T=/*#__PURE__*/w.styled(i.Chip).withConfig({displayName:"StyledChip",componentId:"sc-5fe2f19b-1"})(["margin-left:auto;"]),x=/*#__PURE__*/w.styled.div.withConfig({displayName:"ChipContainer",componentId:"sc-5fe2f19b-2"})(["display:flex;flex-wrap:wrap;gap:8px;margin-left:auto;"]);const j=["coinbase_wallet","base_account"];let v=["metamask","okx_wallet","rainbow","uniswap","bybit_wallet","ronin_wallet","haha_wallet","uniswap_extension","zerion","rabby_wallet","cryptocom","binance","kraken_wallet"];const q=["safe"],_=["phantom","backpack","solflare","jupiter","universal_profile"],b={component:()=>{let i,{connectors:h}=s.usePrivyInternal(),{setModalData:w,data:m,navigate:C}=d.usePrivyModal(),g=r.useAppConfig(),{wallets:T}=u.useWallets(),x=h.filter(c.isSolanaWalletConnector).flatMap((e=>e.wallets)),[b,S]=n.useState("default"),I="solana"===m?.funding?.chainType,$=!!m?.funding?.crossChainBridgingEnabled;i="ethereum"===m?.funding?.chainType?m.funding.erc20Address&&!m.funding.isUSDC?"ethereum-only":$&&!m.funding.chain.testnet?"ethereum-and-solana":"ethereum-only":$&&!m.funding?.isUSDC?"ethereum-and-solana":"solana-only";let M=T.filter((e=>"privy"!==e.walletClientType)),O=M.map((e=>e.walletClientType)),k=x.filter((e=>"privy"!==e.walletClientType)),A=k.map((e=>e.walletClientType)),B=[],F={...m.funding};F.usingDefaultFundingMethod&&(F.usingDefaultFundingMethod=!1);let D=({wallet:e,walletChainType:n})=>{w({...m,funding:{...F,connectedWallet:e,onContinueWithExternalWallet:()=>C(L({destChainType:I?"solana":"ethereum",sourceChainType:n}))},solanaFundingData:m?.solanaFundingData?{...m.solanaFundingData,sourceWalletData:{address:e.address,walletClientType:e.walletClientType}}:void 0}),C("FundingAmountEditScreen")};"solana-only"!==i&&B.push(...M.map(((n,t)=>/*#__PURE__*/e.jsx(W,{onClick:()=>D({wallet:n,walletChainType:"ethereum"}),icon:n.meta.icon,name:n.meta.name,chainType:n.type},t)))),"ethereum-only"!==i&&B.push(...k.map(((n,t)=>/*#__PURE__*/e.jsx(W,{onClick:()=>D({wallet:n,walletChainType:"solana"}),icon:n.meta.icon,name:n.meta.name,chainType:n.type},t)))),B.push(...(({walletList:n,walletChainType:t,connectors:l,connectOnly:a,ignore:i,walletConnectEnabled:o,forceWallet:r})=>{let c=[],s=[],d=[],u=l.filter((e=>"ethereum-only"===t?"ethereum"===e.chainType:"solana-only"!==t||"solana"===e.chainType)),p=u.find((e=>"wallet_connect_v2"===e.connectorType));for(let[l,h]of(r?[r.wallet]:n).entries()){if("detected_ethereum_wallets"===h)for(let[n,t]of u.filter((({chainType:e,connectorType:n,walletClientType:t})=>"solana"!==e&&("uniswap_wallet_extension"===t||"uniswap_extension"===t?!i.includes("uniswap"):"crypto.com_wallet_extension"===t||"crypto.com_onchain"===t?!i.includes("cryptocom"):"injected"===n&&!i.includes(t)))).entries()){let{walletClientType:i,walletBranding:o,chainType:r}=t;("unknown"===i?s:c).push(/*#__PURE__*/e.jsx(f,{connectOnly:a,provider:i,logo:o.icon,displayName:o.name,connector:t},`${l}-${h}-${i}-${r}-${n}`))}if("detected_solana_wallets"===h)for(let[n,o]of u.filter((({chainType:e,walletClientType:n})=>{if("solana"===e)return"ethereum-only"!==t&&!i.includes(n)})).entries()){let{walletClientType:t,walletBranding:i,chainType:r}=o;("unknown"===t?s:c).push(/*#__PURE__*/e.jsx(f,{connectOnly:a,provider:t,logo:i.icon,displayName:i.name,connector:o},`${l}-${h}-${t}-${r}-${n}`))}if(_.includes(h)){let n=u.find((e=>"injected"===e.connectorType&&e.walletClientType===h||e.connectorType===h));if(n&&c.push(/*#__PURE__*/e.jsx(f,{connectOnly:a,provider:h,connector:n},`${l}-${h}`)),"solana-only"===t||"ethereum-and-solana"===t){let n=u.find((({chainType:e,walletClientType:n})=>"solana"===e&&n===h));n&&c.push(/*#__PURE__*/e.jsx(f,{connectOnly:a,provider:h,connector:n},`${h}-solana`))}}else if(v.includes(h)){let n=u.find((e=>"uniswap"===h?"uniswap_wallet_extension"===e.walletClientType||"uniswap_extension"===e.walletClientType:"cryptocom"===h?"crypto.com_wallet_extension"===e.walletClientType||"crypto.com_onchain"===e.walletClientType:"injected"===e.connectorType&&e.walletClientType===h));if(o&&!n&&(n=p),n&&c.push(/*#__PURE__*/e.jsx(f,{connectOnly:a,provider:h,connector:n,logo:"injected"===n.connectorType?n.walletBranding.icon:void 0,displayName:"injected"===n.connectorType?n.walletBranding.name:void 0},`${l}-${h}`)),"solana-only"===t||"ethereum-and-solana"===t){let n=u.find((({chainType:e,walletClientType:n})=>"solana"===e&&n===h));n&&c.push(/*#__PURE__*/e.jsx(f,{connectOnly:a,provider:h,connector:n},`${h}-solana`))}}else if(j.includes(h)){let n=u.find((({connectorType:e})=>e===h));n&&c.push(/*#__PURE__*/e.jsx(f,{connectOnly:a,provider:h,connector:n,displayName:"coinbase_wallet"===n.walletClientType?"Coinbase":"Base",logo:"coinbase_wallet"===n.walletClientType?y.COINBASE_WALLET_DATA_URI:y.BASE_ACCOUNT_DATA_URI},`${l}-${h}`))}else if(q.includes(h))p&&d.push(/*#__PURE__*/e.jsx(f,{connectOnly:a,provider:h,connector:p},`${l}-${h}`));else if("wallet_connect"===h)p&&d.push(/*#__PURE__*/e.jsx(f,{connectOnly:a,provider:h,connector:p,logo:p.walletBranding.icon,displayName:"WalletConnect"},`${l}-${h}`));else if(h===r?.wallet){let t="ethereum"===r.chainType&&n.includes("detected_ethereum_wallets"),i="solana"===r.chainType&&n.includes("detected_solana_wallets");if(t||i){let n=u.find((({walletClientType:e})=>e===h));n&&c.push(/*#__PURE__*/e.jsx(f,{connectOnly:a,provider:h,displayName:n.walletBranding?.name,logo:n.walletBranding?.icon,connector:n},`${l}-${h}`))}}}return[...s,...c,...d]})({walletList:g.appearance.walletList.filter((e=>!M.some((n=>n.walletClientType===e))&&!k.some((n=>n.walletClientType===e)))),walletChainType:i,connectors:h,connectOnly:!0,ignore:[...g.appearance.walletList,...O,...A],walletConnectEnabled:g.externalWallets.walletConnect.enabled}));let E=/*#__PURE__*/e.jsx(p.WalletOverflowButton,{text:"More wallets",onClick:()=>S("overflow")}),L=({sourceChainType:e,destChainType:n})=>"ethereum"===e&&"solana"===n?"AwaitingEvmToSolBridgingScreen":"ethereum"===e&&"ethereum"===n?"AwaitingExternalEthereumTransferScreen":"solana"===e&&"ethereum"===n?"AwaitingSolToEvmBridgingScreen":F.externalSolanaFundingScreen;return n.useEffect((()=>{w({...m,externalConnectWallet:{onCompleteNavigateTo:({address:e,walletClientType:n,walletChainType:t})=>{let l=t??"ethereum",a="ethereum"===l?M.find((t=>t.address===e&&t.walletClientType===n)):k.find((t=>t.address===e&&t.walletClientType===n));return w({...m,funding:{...F,connectedWallet:a,onContinueWithExternalWallet:()=>{C(L({destChainType:I?"solana":"ethereum",sourceChainType:l}))}},solanaFundingData:m?.solanaFundingData?{...m.solanaFundingData,sourceWalletData:{address:e||"",walletClientType:n||""}}:void 0}),"FundingAmountEditScreen"}}})}),[]),"overflow"===b?/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(t.ModalHeader,{backFn:()=>S("default")},"header"),/*#__PURE__*/e.jsxs(c.LoginMethodContainer,{children:[/*#__PURE__*/e.jsx(o.Subtitle,{style:{color:"var(--privy-color-foreground-3)",textAlign:"left"},children:"More wallets"}),B]}),/*#__PURE__*/e.jsx(t.BlobbyFooter,{})]}):/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(a.t,{}),/*#__PURE__*/e.jsx(l.CenteredScreenHeader,{title:"Transfer from wallet",description:"Connect a wallet to deposit funds or send funds manually to your wallet address."}),/*#__PURE__*/e.jsxs(c.LoginMethodContainer,{children:[B.length>4?B.slice(0,3):B,B.length>4&&E]}),/*#__PURE__*/e.jsx(t.BlobbyFooter,{})]})}};let W=({onClick:n,icon:t,name:l,chainType:a})=>/*#__PURE__*/e.jsxs(c.LoginMethodButton,{onClick:n,children:[/*#__PURE__*/e.jsx(C.IconContainer,{style:{width:20},children:/*#__PURE__*/e.jsx("img",{src:t})}),l,/*#__PURE__*/e.jsx(i.Chip,{color:"gray",style:{marginLeft:"auto"},children:"Connected"}),"solana"===a&&/*#__PURE__*/e.jsx(i.Chip,{color:"gray",children:"Solana"})]});exports.TransferFromWalletScreen=b,exports.default=b;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),r=require("styled-components"),i=require("./Layouts-dRL0OSpp.js"),s=require("./ModalHeader-
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),r=require("styled-components"),i=require("./Layouts-dRL0OSpp.js"),s=require("./ModalHeader-n6Aqpos_.js"),n=require("./ScreenHeader-CyURV6Ti.js"),l=require("./FundWalletMethodHeader-CxH_zVnz.js"),t=require("./InjectedWalletIcon-UY3nMvZo.js"),d=require("./index-CRFXS9pP.js"),a=require("./Row-CxDF-VMy.js"),c=require("./Value-C-XtZyFa.js"),o=require("./Address-B_I2EZZe.js"),j=require("./NetworkIcon-BZ9Mj6vV.js"),u=require("./useActiveWallet-B-Pd49hn.js");let x=/*#__PURE__*/r.styled.div.withConfig({displayName:"NetworkColumn",componentId:"sc-5bdbf842-0"})(["display:flex;flex-direction:row;align-items:center;gap:4px;"]);exports.TransferOrBridgeLoadingScreen=({walletClientType:r,displayName:h,addressToFund:m,chainId:g,chainName:w,isBridging:p,isErc20Flow:q,totalPriceInNativeCurrency:I,totalPriceInUsd:y,gasPriceInNativeCurrency:b,gasPriceInUsd:N})=>{let C=u.useExternalWalletListing(r);/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(l.t,{}),/*#__PURE__*/e.jsx(d.NeutralSpinner,{centerIcon:/*#__PURE__*/e.jsx(t.InjectedWalletIcon,{icon:C?.image_url?.md,name:r})}),/*#__PURE__*/e.jsx(n.CenteredScreenHeader,{style:{marginTop:"8px",marginBottom:"12px"},title:`${p?"Bridging":"Confirming"} with ${h}`}),!p&&!q&&/*#__PURE__*/e.jsxs(a.Rows,{children:[/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(c.LabelSm,{children:"Total"}),/*#__PURE__*/e.jsx(c.Value,{children:y||I})]}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(c.LabelSm,{children:"To"}),/*#__PURE__*/e.jsx(c.Value,{children:/*#__PURE__*/e.jsx(o.Address,{address:m,showCopyIcon:!1})})]}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(c.LabelSm,{children:"Network"}),/*#__PURE__*/e.jsx(c.Value,{children:/*#__PURE__*/e.jsxs(x,{children:[/*#__PURE__*/e.jsx(j.NetworkIcon,{chainId:g,height:16,width:16})," ",w]})})]}),b&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(c.LabelSm,{children:"Estimated fee"}),/*#__PURE__*/e.jsx(c.Value,{children:N||b})]})]}),/*#__PURE__*/e.jsx(i.ConfigurableSpacer,{height:24}),/*#__PURE__*/e.jsx(s.BlobbyFooter,{})]})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),r=require("@heroicons/react/24/outline/EnvelopeIcon"),i=require("./Layouts-dRL0OSpp.js"),t=require("lucide-react"),a=require("react"),s=require("./context-
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),r=require("@heroicons/react/24/outline/EnvelopeIcon"),i=require("./Layouts-dRL0OSpp.js"),t=require("lucide-react"),a=require("react"),s=require("./context-BPd2qxKv.js"),u=require("./index-Dz7affvL.js"),o=require("./internal-context-NWsAL807.js"),n=require("./get-is-unified-wallet-D6pn8A8g.js"),l=require("./useActiveWallet-B-Pd49hn.js"),d=require("./Button-BEaVAnh4.js"),c=require("./EmailInputForm-tjrhBacA.js"),q=require("./ErrorMessage-f0cRWc29.js"),m=require("./ScreenLayout-D6r13vU7.js");function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("styled-components"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("uuid"),require("jose"),require("eventemitter3"),require("./useWallets-Bi_kf80t.js"),require("./prepareFundingModalData-Do7d2fgq.js"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("react-device-detect"),require("viem/utils"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("./usePrivy-CANb3vg4.js"),require("./events-context-Di6--rDg.js"),require("@scure/base"),require("zustand"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("viem"),require("./getPublicClient-CGlodIp_.js"),require("ofetch"),require("js-cookie"),require("./frame-B14fp9oC.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-BcAsQTGF.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js"),require("./Screen-J7z62u7O.js"),require("./ModalHeader-n6Aqpos_.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./index-CRFXS9pP.js");var h=/*#__PURE__*/p(r);const j=/*#__PURE__*/a.forwardRef(((r,i)=>{let[c,m]=a.useState(""),[p,h]=a.useState(""),[j,g]=a.useState(!1),{authenticated:x,user:w}=n.usePrivyContext(),{initUpdateEmail:S}=o.usePrivyInternal(),{navigate:f,setModalData:b,currentScreen:E}=n.usePrivyModal(),{enabled:k,token:C}=u.useCaptcha(),A=s.useAppConfig(),M=l.validateEmail(c)&&(A.disablePlusEmails&&c.includes("+")?(p||h("Please enter a valid email address without a '+'."),!1):(p&&h(""),!0)),P=j||!M,I=()=>{!k||C||x?(async e=>{if(!w?.email)throw Error("User is required to have an email address to update it.");g(!0);try{await S({oldAddress:w.email.address,newAddress:c,captchaToken:e}),f("AwaitingPasswordlessCodeScreen")}catch(e){b({errorModalData:{error:e,previousScreen:E||"LandingScreen"}}),f("ErrorScreen")}g(!1)})(C):(b({captchaModalData:{callback:e=>{if(!w?.email)throw Error("User is required to have an email address to update it.");return S({oldAddress:w.email.address,newAddress:c,captchaToken:e})},userIntentRequired:!1,onSuccessNavigateTo:"AwaitingPasswordlessCodeScreen",onErrorNavigateTo:"ErrorScreen"}}),f("CaptchaScreen"))};/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsxs(v,{children:[p&&/*#__PURE__*/e.jsx(q.ErrorMessage,{style:{marginTop:"0.25rem",textAlign:"left"},children:p}),/*#__PURE__*/e.jsxs(y,{$error:!!p,children:[/*#__PURE__*/e.jsx(l.LoginMethodIconWrapper,{children:/*#__PURE__*/e.jsx(t.Mail,{})}),/*#__PURE__*/e.jsx("input",{ref:i,id:"email-input",type:"email",placeholder:"your@email.com",onChange:e=>m(e.target.value),onKeyUp:e=>{"Enter"===e.key&&I()},value:c,autoComplete:"email"}),r.stacked?null:/*#__PURE__*/e.jsx(d.EmbeddedButton,{isSubmitting:j,onClick:I,disabled:P,children:"Submit"})]})]}),r.stacked?/*#__PURE__*/e.jsx(d.PrimaryButton,{loadingText:null,loading:j,disabled:P,onClick:I,style:{width:"100%"},children:"Submit"}):null]})}));let v=c.InputContainerForm,y=c.EmailUpdateForm;const g=({title:r="Update your email",subtitle:t="Add the email address you'd like to use going forward. We'll send you a confirmation code"})=>/*#__PURE__*/e.jsx(m.ScreenLayout,{title:r,subtitle:t,icon:h.default,watermark:!0,children:/*#__PURE__*/e.jsx(i.BottomPusherContainer,{children:/*#__PURE__*/e.jsx(j,{stacked:!0})})}),x={component:()=>/*#__PURE__*/e.jsx(g,{})};exports.UpdateEmailScreen=x,exports.UpdateEmailScreenView=g,exports.default=x;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),r=require("@heroicons/react/24/outline/PhoneIcon"),t=require("react"),i=require("./ConnectPhoneForm-
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),r=require("@heroicons/react/24/outline/PhoneIcon"),t=require("react"),i=require("./ConnectPhoneForm-C0SpJtis.js"),n=require("./internal-context-NWsAL807.js"),o=require("./get-is-unified-wallet-D6pn8A8g.js"),u=require("./ScreenLayout-D6r13vU7.js");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("styled-components"),require("@privy-io/js-sdk-core"),require("./context-BPd2qxKv.js"),require("tinycolor2"),require("./useActiveWallet-B-Pd49hn.js"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-Do7d2fgq.js"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("./useWallets-Bi_kf80t.js"),require("./Button-BEaVAnh4.js"),require("./Chip-ChrHHazc.js"),require("./LoadingSkeleton-DoCrfGnl.js"),require("ofetch"),require("./Screen-J7z62u7O.js"),require("./ModalHeader-n6Aqpos_.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./index-CRFXS9pP.js");var s=/*#__PURE__*/a(r);const c=({title:r="Update your phone number",subtitle:n="Add the phone number you'd like to use going forward. We'll send you a confirmation code",onSubmit:o,isSubmitting:a=!1})=>{let[c,l]=t.useState(null);/*#__PURE__*/return e.jsx(u.ScreenLayout,{title:r,subtitle:n,icon:s.default,primaryCta:{label:a?"Submitting":"Update",onClick:async()=>{c?.qualifiedPhoneNumber&&await o(c)},disabled:!c?.isValid||a},watermark:!0,children:/*#__PURE__*/e.jsx(i.ConnectPhoneNumberForm,{onChange:e=>{l(e)},onSubmit:async()=>{},noIncludeSubmitButton:!0,hideRecent:!0})})},l={component:()=>{let{currentScreen:r,data:i,navigate:u,setModalData:a}=o.usePrivyModal(),{user:s}=o.usePrivyContext(),{initUpdatePhone:l}=n.usePrivyInternal(),[d,q]=t.useState(!1);/*#__PURE__*/return e.jsx(c,{onSubmit:async e=>{q(!0);try{if(!s?.phone?.number)throw Error("User is required to have an phone number to update it.");await l(s?.phone?.number,e.qualifiedPhoneNumber),u("AwaitingPasswordlessCodeScreen")}catch(e){a({errorModalData:{error:e,previousScreen:i?.errorModalData?.previousScreen||r||"LinkPhoneScreen"}}),u("ErrorScreen")}finally{q(!1)}},isSubmitting:d})}};exports.UpdatePhoneScreen=l,exports.UpdatePhoneScreenView=c,exports.default=l;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),r=require("./get-is-unified-wallet-
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),r=require("./get-is-unified-wallet-D6pn8A8g.js"),t=require("./ScreenLayout-D6r13vU7.js");require("viem"),require("react"),require("./context-BPd2qxKv.js"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("./internal-context-NWsAL807.js"),require("ofetch"),require("./Button-BEaVAnh4.js"),require("styled-components"),require("./useActiveWallet-B-Pd49hn.js"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-Do7d2fgq.js"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("./useWallets-Bi_kf80t.js"),require("./Screen-J7z62u7O.js"),require("./ModalHeader-n6Aqpos_.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./index-CRFXS9pP.js");const i=({style:r,...t})=>/*#__PURE__*/e.jsx("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"38px",width:"38px",...r},...t,children:/*#__PURE__*/e.jsx("path",{d:"M20 13.6V20M20 26.4H20.016M36 20C36 28.8365 28.8366 36 20 36C11.1635 36 4.00001 28.8365 4.00001 20C4.00001 11.1634 11.1635 3.99999 20 3.99999C28.8366 3.99999 36 11.1634 36 20Z",stroke:"currentColor",strokeWidth:"3.2",strokeLinecap:"round",strokeLinejoin:"round"})}),o=({title:r="Unable to sign in",subtitle:o="This is a test application that has reached its user limit. To allow more users, this app needs to be upgraded to production.",onGoBack:n})=>/*#__PURE__*/e.jsx(t.ScreenLayout,{title:r,subtitle:o,icon:i,iconVariant:"subtle",primaryCta:{label:"Go back",onClick:n},showBack:!0,onBack:n,watermark:!0}),n={component:()=>{let{navigate:t}=r.usePrivyModal();/*#__PURE__*/return e.jsx(o,{onGoBack:()=>{t("LandingScreen")}})}};exports.UserLimitReachedScreen=n,exports.UserLimitReachedScreenView=o,exports.default=n;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),s=require("lucide-react"),t=require("react"),r=require("styled-components"),i=require("./Button-
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),s=require("lucide-react"),t=require("react"),r=require("styled-components"),i=require("./Button-BEaVAnh4.js"),o=require("./ErrorMessage-f0cRWc29.js"),n=require("./LabelXs-CYMv6rOZ.js"),d=require("./Address-B_I2EZZe.js"),a=require("./shared-BPGwTh8c.js");let l=/*#__PURE__*/r.styled(a.Box).withConfig({displayName:"StyledBox",componentId:"sc-4010d8f3-0"})(["&&{padding:0.75rem;height:56px;}"]),c=/*#__PURE__*/r.styled.div.withConfig({displayName:"WalletContent",componentId:"sc-4010d8f3-1"})(["display:flex;align-items:center;justify-content:space-between;width:100%;"]),p=/*#__PURE__*/r.styled.div.withConfig({displayName:"AddressContainer",componentId:"sc-4010d8f3-2"})(["display:flex;flex-direction:column;gap:0;"]),m=/*#__PURE__*/r.styled.div.withConfig({displayName:"BalanceText",componentId:"sc-4010d8f3-3"})(["font-size:12px;line-height:1rem;color:var(--privy-color-foreground-3);"]),h=/*#__PURE__*/r.styled(n.LabelXs).withConfig({displayName:"TitleLabel",componentId:"sc-4010d8f3-4"})(["text-align:left;margin-bottom:0.5rem;"]),f=/*#__PURE__*/r.styled(o.ErrorMessage).withConfig({displayName:"StyledErrorMessage",componentId:"sc-4010d8f3-5"})(["margin-top:0.25rem;"]),y=/*#__PURE__*/r.styled(i.SecondaryButton).withConfig({displayName:"CopyButton",componentId:"sc-4010d8f3-6"})(["&&{gap:0.375rem;font-size:14px;}"]);exports.WalletInfoCard=({errMsg:r,balance:i,address:o,className:n,title:a,showCopyButton:u=!1})=>{let[x,g]=t.useState(!1);return t.useEffect((()=>{if(x){let e=setTimeout((()=>g(!1)),3e3);return()=>clearTimeout(e)}}),[x]),/*#__PURE__*/e.jsxs("div",{children:[a&&/*#__PURE__*/e.jsx(h,{children:a}),/*#__PURE__*/e.jsx(l,{className:n,$state:r?"error":void 0,children:/*#__PURE__*/e.jsxs(c,{children:[/*#__PURE__*/e.jsxs(p,{children:[/*#__PURE__*/e.jsx(d.Address,{address:o,showCopyIcon:!1}),void 0!==i&&/*#__PURE__*/e.jsx(m,{children:i})]}),u&&/*#__PURE__*/e.jsx(y,{onClick:function(e){e.stopPropagation(),navigator.clipboard.writeText(o).then((()=>g(!0))).catch(console.error)},size:"sm",children:x?/*#__PURE__*/e.jsxs(e.Fragment,{children:["Copied",/*#__PURE__*/e.jsx(s.Check,{size:14})]}):/*#__PURE__*/e.jsxs(e.Fragment,{children:["Copy",/*#__PURE__*/e.jsx(s.Copy,{size:14})]})})]})}),r&&/*#__PURE__*/e.jsx(f,{children:r})]})};
|
package/dist/cjs/{WalletInterstitialScreen-Br5fazrn.js → WalletInterstitialScreen-CsZg29Za.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),t=require("react"),r=require("./get-is-unified-wallet-
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),t=require("react"),r=require("./get-is-unified-wallet-D6pn8A8g.js"),i=require("./ScreenLayout-D6r13vU7.js");require("viem"),require("./context-BPd2qxKv.js"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("./internal-context-NWsAL807.js"),require("ofetch"),require("./Button-BEaVAnh4.js"),require("styled-components"),require("./useActiveWallet-B-Pd49hn.js"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-Do7d2fgq.js"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("./useWallets-Bi_kf80t.js"),require("./Screen-J7z62u7O.js"),require("./ModalHeader-n6Aqpos_.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./index-CRFXS9pP.js");const o=({title:t,subtitle:r,buttonText:o,buttonHref:n,isLoading:l=!1,helpText:a,onButtonClick:u})=>/*#__PURE__*/e.jsx(i.ScreenLayout,{title:t,subtitle:r,primaryCta:{label:o,onClick:()=>{n&&window.open(n,"_self"),u?.()},disabled:l},helpText:a,watermark:!0}),n={component:()=>{let{ready:i}=r.usePrivyContext(),{data:n}=r.usePrivyModal(),[l,a]=t.useState(!1);if(!n?.installWalletModalData)throw Error("Wallet data is missing");let{walletConfig:u,connectOnly:s,chainType:c}=n.installWalletModalData,d=u.getMobileRedirect({useUniversalLink:!l,isSolana:"solana"===c,connectOnly:s}),p=u.name.replace(/ wallet/gi,""),q={title:`Redirecting to ${p} Mobile Wallet`,description:`We'll take you to the ${p} Mobile Wallet app to continue your login experience.`,footnote:""};return i&&(q.description=`For the best experience, we'll automatically log you into the ${p} Mobile Wallet in-app browser.`,q.footnote="You can always return here to login via other methods."),l&&(q.title="Still here?",q.description=`You may need to install the ${u.name} mobile app.`,q.footnote=`Once you're done, you can connect with ${u.name} wallet to complete the login.`),/*#__PURE__*/e.jsx(o,{title:q.title,subtitle:q.description,buttonText:l?"Go to App Store":"Continue",buttonHref:d,isLoading:i&&!d,helpText:q.footnote||void 0,onButtonClick:()=>{setTimeout((()=>a(!0)),1e3)}})}};exports.WalletInterstitialScreen=n,exports.WalletInterstitialScreenView=o,exports.default=n;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),t=require("styled-components"),r=require("viem"),i=require("./ethers-
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),t=require("styled-components"),r=require("viem"),i=require("./ethers-CqH8abGL.js"),s=require("./getFormattedUsdFromLamports-Mu2fqwL2.js"),n=require("./transaction-DjF5X-by.js"),a=require("./useActiveWallet-B-Pd49hn.js");let l=/*#__PURE__*/t.styled.span.withConfig({displayName:"StyledPriceDisplay",componentId:"sc-3cd56c8a-0"})(["font-size:14px;line-height:140%;display:flex;gap:4px;align-items:center;"]),o=/*#__PURE__*/t.styled.span.withConfig({displayName:"StyledPriceUnit",componentId:"sc-3cd56c8a-1"})(["font-size:12px;line-height:12px;color:var(--privy-color-foreground-3);"]),c=/*#__PURE__*/t.styled.span.withConfig({displayName:"TinyLessThan",componentId:"sc-3cd56c8a-2"})(["font-size:10px;"]),d=/*#__PURE__*/t.styled.span.withConfig({displayName:"FlexCenter",componentId:"sc-3cd56c8a-3"})(["display:flex;align-items:center;"]);function m(e,t){return`https://explorer.solana.com/account/${e}?chain=${t}`}let p=/*#__PURE__*/t.styled.a.withConfig({displayName:"StyledLink",componentId:"sc-dd6c0f9f-0"})(["&:hover{text-decoration:underline;}"]);exports.HeaderPriceDisplay=({weiQuantities:t,tokenPrice:r,tokenSymbol:s})=>{let n=i.sumWeiQuantities(t),a=r?i.getDollarsFromWei(n,r):void 0,o=i.getNativeCurrencyFromWei(n,s);/*#__PURE__*/return e.jsx(l,{children:a||o})},exports.PriceDisplay=({weiQuantities:t,tokenPrice:r,tokenSymbol:s})=>{let n=i.sumWeiQuantities(t),a=r?i.getDollarsFromWei(n,r):void 0,m=i.getNativeCurrencyFromWei(n,s);/*#__PURE__*/return e.jsx(l,{children:a?/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(o,{children:"USD"}),"<$0.01"===a?
|
|
2
2
|
/*#__PURE__*/e.jsxs(d,{children:[/*#__PURE__*/e.jsx(c,{children:"<"}),"$0.01"]}):a]}):m})},exports.SolanaPriceDisplay=({quantities:t,tokenPrice:i,tokenSymbol:a="SOL",tokenDecimals:o=9})=>{let m=t.reduce(((e,t)=>e+t),0n),p=i&&"SOL"===a&&9===o?s.getFormattedUsdFromLamports(m,i):void 0,h="SOL"===a&&9===o?n.getNativeCurrencyFromLamports(m):`${r.formatUnits(m,o)} ${a}`;/*#__PURE__*/return e.jsx(l,{children:p?/*#__PURE__*/e.jsx(e.Fragment,{children:"<$0.01"===p?
|
|
3
3
|
/*#__PURE__*/e.jsxs(d,{children:[/*#__PURE__*/e.jsx(c,{children:"<"}),"$0.01"]}):p}):h})},exports.WalletLink=t=>/*#__PURE__*/e.jsx(p,{href:"ethereum"===t.chainType?i.getBlockExplorerUrlForAddress(t.chainId,t.walletAddress):m(t.walletAddress,t.chainId),target:"_blank",children:a.formatWalletAddress(t.walletAddress)});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),r=require("lucide-react"),t=require("./useActiveWallet-
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),r=require("lucide-react"),t=require("./useActiveWallet-B-Pd49hn.js");exports.WalletOverflowButton=({onClick:i,text:l})=>/*#__PURE__*/e.jsxs(t.LoginMethodButton,{onClick:i,children:[/*#__PURE__*/e.jsx(t.LoginMethodIconWrapper,{children:/*#__PURE__*/e.jsx(r.Wallet,{})}),/*#__PURE__*/e.jsx(t.Grow,{children:l})]});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@abstract-foundation/agw-client"),t=require("@abstract-foundation/agw-client/actions"),a=require("viem"),n=require("viem/accounts"),r=require("viem/chains"),s=require("./get-is-unified-wallet-
|
|
1
|
+
"use strict";var e=require("@abstract-foundation/agw-client"),t=require("@abstract-foundation/agw-client/actions"),a=require("viem"),n=require("viem/accounts"),r=require("viem/chains"),s=require("./get-is-unified-wallet-D6pn8A8g.js"),i=require("./context-BPd2qxKv.js"),o=require("./internal-context-NWsAL807.js"),c=require("./useWallets-Bi_kf80t.js"),d=require("./getPublicClient-CGlodIp_.js"),l=require("./getEmbeddedConnectedWallet-6TsVZJkD.js"),u=require("./smart-wallets-DFIScSPs.js");require("react/jsx-runtime"),require("react"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("ofetch"),require("permissionless"),require("permissionless/accounts"),require("permissionless/clients/pimlico"),require("viem/account-abstraction"),exports.useAbstractSmartWallets=function(){let{user:p}=s.usePrivyContext(),{hideWalletUIs:g,openPrivyModal:y,chains:m,appId:h,rpcConfig:T,client:f}=o.usePrivyInternal(),v=i.useAppConfig(),{wallets:I}=c.useWallets(),{setModalData:q}=s.usePrivyModal(),S=s.getPrivyEthereumWallet(p),b=!!S&&s.getIsUnifiedWallet(S),W=async(t=r.abstractTestnet.id)=>{let s=l.getEmbeddedConnectedWallet(I);if(!s)throw Error("No connected wallet found");let i="string"==typeof t?a.hexToNumber(t):t;if(![r.abstractTestnet.id,2741,r.zksync.id].includes(i))throw Error("Error, only Abstract and ZKSync Era chains are supported");let o=m.find((e=>e.id===i));if(!o)throw Error("Chain not configured");await s.switchChain(o.id);let c=await s.getEthereumProvider(),u=a.createWalletClient({account:s.address,transport:a.custom(c)}),p=n.toAccount({address:s.address,signMessage:u.signMessage,signTransaction:u.signTransaction,signTypedData:u.signTypedData});return await e.createAbstractClient({chain:o,transport:a.http(d.getJsonRpcEndpointFromChain(o,T,h)),publicTransport:a.http(d.getJsonRpcEndpointFromChain(o,T,h)),signer:p})};return{signMessage:async({message:e},t)=>{let a=await W(t);return new Promise((async(t,n)=>{let{entropyId:r,entropyIdVerifier:s}=c.getEntropyDetailsForUser(p);g.current=!0,q({connectWallet:{recoveryMethod:S.recoveryMethod,connectingWalletAddress:S.address,isUnifiedWallet:b,entropyId:r,entropyIdVerifier:s,onCompleteNavigateTo:"SignRequestScreen",onFailure:()=>{}},signMessage:{method:"personal_sign",data:e,confirmAndSign:()=>a.signMessage({message:e}),onSuccess:e=>t(e),onFailure:n,uiOptions:{isCancellable:!0}}}),y("EmbeddedWalletConnectingScreen")})).finally((()=>{g.current=!1}))},signTypedData:async(e,t)=>{let a=await W(t);return new Promise((async(t,n)=>{g.current=!0;let{entropyId:r,entropyIdVerifier:s}=c.getEntropyDetailsForUser(p);q({connectWallet:{recoveryMethod:S.recoveryMethod,connectingWalletAddress:S.address,isUnifiedWallet:b,entropyId:r,entropyIdVerifier:s,onCompleteNavigateTo:"SignRequestScreen",onFailure:()=>{}},signMessage:{method:"eth_signTypedData_v4",data:e,confirmAndSign:()=>a.signTypedData(e),onSuccess:e=>t(e),onFailure:n,uiOptions:{isCancellable:!0}}}),y("EmbeddedWalletConnectingScreen")})).finally((()=>{g.current=!1}))},sendTransaction:async e=>{let a=await W(e.chainId),n=[],r="calls"in e&&void 0!==e.calls;return n=r?[...e.calls]:[e],new Promise((async(s,i)=>{g.current=!0;let{entropyId:o,entropyIdVerifier:d}=c.getEntropyDetailsForUser(p);q({connectWallet:{recoveryMethod:S.recoveryMethod,connectingWalletAddress:S.address,isUnifiedWallet:b,entropyId:o,entropyIdVerifier:d,onCompleteNavigateTo:"SendTransactionScreen",onFailure:()=>{}},sendTransaction:{transactionRequests:u.callsToTransactionRequests({calls:n,chain:a.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),entropyId:o,entropyIdVerifier:d,transactingWalletAddress:a.account.address,transactingWalletIndex:void 0,prepareTransactionRequest:async()=>{let n=r?t.getBatchTransactionObject(a.account.address,e):e;return await a.prepareAbstractTransactionRequest(n)},scanTransaction:async()=>{if(!f)throw Error("Privy client not found");let n=r?t.getBatchTransactionObject(a.account.address,e):e,s=await a.prepareAbstractTransactionRequest(n);return await f.scanTransaction({metadata:{domain:v.embeddedWallets.transactionScanning.domain},chain_id:e.chainId.toString(),request:{method:"eth_sendTransaction",params:[{from:s.from,to:s.to,value:s.value?.toString(),gas:s.gas?.toString(),gasPrice:s.gasPrice?.toString(),nonce:s.nonce?.toString(),data:s.data,eip_712_meta:{paymaster_params:{paymaster:s.paymaster,paymaster_input:s.paymasterInput}}}]}})},signOnly:!1,getIsSponsored:async()=>void 0!==e.paymaster&&void 0!==e.paymasterInput,onConfirm:()=>r?a.sendTransactionBatch(e):a.sendTransaction(e),onSuccess:e=>s(e.hash),onFailure:i,uiOptions:{isCancellable:!0}}}),y("EmbeddedWalletConnectingScreen")})).finally((()=>{g.current=!1}))},signTransaction:async e=>{let a=await W(e.chainId),n=[],r="calls"in e&&void 0!==e.calls;return n=r?[...e.calls]:[e],new Promise((async(s,i)=>{g.current=!0;let{entropyId:o,entropyIdVerifier:d}=c.getEntropyDetailsForUser(p);q({connectWallet:{recoveryMethod:S.recoveryMethod,connectingWalletAddress:S.address,isUnifiedWallet:b,entropyId:o,entropyIdVerifier:d,onCompleteNavigateTo:"SendTransactionScreen",onFailure:()=>{}},sendTransaction:{transactionRequests:u.callsToTransactionRequests({calls:n,chain:a.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),entropyId:o,entropyIdVerifier:d,transactingWalletAddress:a.account.address,transactingWalletIndex:void 0,prepareTransactionRequest:async()=>{let n=r?t.getBatchTransactionObject(a.account.address,e):e;return await a.prepareAbstractTransactionRequest(n)},scanTransaction:async()=>{if(!f)throw Error("Privy client not found");let n=r?t.getBatchTransactionObject(a.account.address,e):e,s=await a.prepareAbstractTransactionRequest(n);return await f.scanTransaction({metadata:{domain:v.embeddedWallets.transactionScanning.domain},chain_id:e.chainId.toString(),request:{method:"eth_sendTransaction",params:[{from:s.from,to:s.to,value:s.value?.toString(),gas:s.gas?.toString(),gasPrice:s.gasPrice?.toString(),nonce:s.nonce?.toString(),data:s.data,eip_712_meta:{paymaster_params:{paymaster:s.paymaster,paymaster_input:s.paymasterInput}}}]}})},signOnly:!0,getIsSponsored:async()=>void 0!==e.paymaster&&void 0!==e.paymasterInput,onConfirm:async()=>{let n=r?t.getBatchTransactionObject(a.account.address,e):e,s=await a.prepareAbstractTransactionRequest(n);return a.signTransaction(s)},onSuccess:e=>s(e.hash),onFailure:i,uiOptions:{isCancellable:!0}}}),y("EmbeddedWalletConnectingScreen")})).finally((()=>{g.current=!1}))}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),t=require("react"),n=require("@privy-io/js-sdk-core");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=/*#__PURE__*/a(require("tinycolor2"));const r={appearance:{landingHeader:"Log in or sign up",theme:"light",walletList:["detected_ethereum_wallets","detected_solana_wallets","metamask","coinbase_wallet","rainbow","base_account","wallet_connect","phantom"]},walletConnectCloudProjectId:"34357d3c125c2bcf2ce2bc3309d98715",_render:{standalone:!1},fundingMethodConfig:{moonpay:{useSandbox:!1}}};let l=new Set(["coinbase_wallet","base_account","cryptocom","metamask","okx_wallet","phantom","rainbow","uniswap","zerion","universal_profile","bybit_wallet","ronin_wallet","haha_wallet","wallet_connect","wallet_connect_qr","wallet_connect_qr_solana","detected_solana_wallets","detected_ethereum_wallets","rabby_wallet","safe","solflare","backpack","jupiter","binance","binanceus","bitget_wallet","kraken_wallet"]),i=e=>l.has(e),s=(e,t,n)=>n.indexOf(e)===t;const c=({input:e,overrides:t})=>t?t.primary.concat(t.overflow??[]).filter(i).filter(s):e?e.filter(i).filter(s):r.appearance.walletList;let d=/paymaster\.biconomy\.io\/api/i,u={mode:"SPONSORED",calculateGasLimits:!0,expiryDuration:300,sponsorshipInfo:{webhookData:{},smartAccountInfo:{name:"BICONOMY",version:"2.0.0"}}};const g=(e,t)=>e&&d.test(e)?u:t&&t.policy_id?{policyId:t.policy_id}:void 0;function _(e,t){let n=Math.max(0,Math.min(1,e.toHsl().l+t));return o.default({...e.toHsl(),l:n})}function p(e,t){let n=e.getLuminance(),a=t.getLuminance();return(Math.max(n,a)+.05)/(Math.min(n,a)+.05)}function f(e,t){if(!e){let e=t?b:m;return{accent:o.default(e.background.interactive),accentLight:o.default(e.background.interactive),accentHover:o.default(e.background["interactive-hover"]),accentDark:o.default(e.background["interactive-clicked"]),accentDarkest:o.default(e.background["interactive-disabled"])}}let n=o.default(e);return{accent:n,accentLight:_(n,.15),accentHover:_(n,.3),accentDark:_(n,-.06),accentDarkest:_(n,-.6)}}function h({backgroundTheme:e,accentHex:t}){let n,a;"light"===e?n=!1:"dark"===e?n=!0:(n=.5>=o.default(e).getLuminance(),a=o.default(e).toHslString());let r=n?"dark":"light",l=n?b:m,{accent:i,accentLight:s,accentHover:c,accentDark:d,accentDarkest:u}=f(t,n),g=function(e){let t=o.default(m.text.default),n=o.default(b.text.default),a=p(e,t),r=p(e,n),l=e.toHsl();return l.h>=220&&l.h<=300&&r>=3?b.text.default:a>r?m.text.default:b.text.default}(i),_=o.default(g),h=p(i,o.default(l.background.default))>=3;return{colorScheme:r,background:a||l.background.default,background2:l.background.elevated,background3:l.background.interactive,foreground:l.text.default,foreground2:l.text.muted,foreground3:l.text.placeholder,foreground4:l.border.default,accent:i.toHslString(),accentLight:s.toHslString(),accentHover:c.toHslString(),accentDark:d.toHslString(),accentDarkest:u.toHslString(),foregroundAccent:_.toHslString(),success:l.background.success,successDark:l.text.success,successLight:l.background.success,error:l.text.error,errorLight:l.background.error,warn:l.background.warning,warnLight:l.background.warning,warningDark:l.text.warning,errorDark:l.text.error,successBg:l.background.success,errorBg:l.background.error,errorBgHover:l.background["error-hover"],warnBg:l.background.warning,infoBg:l.background.info,infoBgHover:l.background["info-hover"],borderDefault:l.border.default,borderHover:l.border["default-hover"],borderFocus:l.border.focused,borderError:l.border.error,borderSuccess:l.border.success,borderWarning:l.border.warning,borderInfo:l.border.info,borderInteractive:l.border.interactive,borderInteractiveHover:l.border["interactive-hover"],backgroundHover:l.background["default-hover"],backgroundClicked:l.background["default-clicked"],backgroundDisabled:l.background["default-disabled"],backgroundInteractive:l.background.interactive,backgroundInteractiveHover:l.background["interactive-hover"],backgroundInteractiveClicked:l.background["interactive-clicked"],backgroundInteractiveDisabled:l.background["interactive-disabled"],foregroundHover:l.text.default,foregroundClicked:l.text.default,foregroundDisabled:l.text["default-disabled"],foregroundInteractive:l.text.interactive,foregroundInteractiveHover:l.text["interactive-hover"],accentHasGoodContrast:h?"1":"0",linkNavigationColor:h?i.toHslString():l.text.default,linkNavigationDecoration:h?"none":"underline",iconDefault:l.icon.default,iconMuted:l.icon.muted,iconSubtle:l.icon.subtle,iconInverse:l.icon.inverse,iconSuccess:l.icon.success,iconWarning:l.icon.warning,iconError:l.icon.error,iconInteractive:l.icon.interactive,iconDefaultHover:l.icon["default-hover"],iconMutedHover:l.icon["muted-hover"],iconSubtleHover:l.icon["subtle-hover"],iconDefaultClicked:l.icon["default-clicked"],iconMutedClicked:l.icon["muted-clicked"],iconSubtleClicked:l.icon["subtle-clicked"],iconDefaultDisabled:l.icon["default-disabled"],iconMutedDisabled:l.icon["muted-disabled"],iconSubtleDisabled:l.icon["subtle-disabled"],iconErrorHover:l.icon["error-hover"],iconInteractiveHover:l.icon["interactive-hover"],iconErrorClicked:l.icon["error-clicked"],iconInteractiveClicked:l.icon["interactive-clicked"],iconMutedDisabledAlt:l.icon["muted-disabled"],iconSubtleDisabledAlt:l.icon["subtle-disabled"]}}const b={background:{default:"#020713",elevated:"#1A2230","default-hover":"#101724","default-clicked":"#1A2230","default-disabled":"#020713",success:"#0E3E2D",warning:"#373827",error:"#2E0C18",interactive:"#8B86FF","error-hover":"#441821","interactive-hover":"#7B73E5","interactive-clicked":"#6560CC","interactive-disabled":"#141824",info:"#1F2937","info-hover":"#141824"},icon:{default:"#F8F8F8",muted:"#9BA2AE",subtle:"#7B8491",inverse:"#020713",success:"#88E3B5",warning:"#FDF27B",error:"#EF4444",interactive:"#88B6FF","default-hover":"#F8F8F8","muted-hover":"#AEB3BD","subtle-hover":"#8B939E","default-clicked":"#F8F8F8","muted-clicked":"#9097A5","subtle-clicked":"#78818E","default-disabled":"#404452","muted-disabled":"#404452","subtle-disabled":"#404452","error-hover":"#F05555","interactive-hover":"#7B73E5","error-clicked":"#EF4444","interactive-clicked":"#6560CC"},text:{default:"#F8F8F8",muted:"#9BA2AE",placeholder:"#7B8491",success:"#ACEECB",warning:"#FEF9A0",error:"#FCA5A5",interactive:"#A29EFF","default-disabled":"#404452","interactive-hover":"#8C88E5"},border:{default:"#1F2937",interactive:"#88B0FF",focused:"#F8F8FC",info:"#5B83D3",success:"#317056",warning:"#FBBF24",error:"#F87171","default-hover":"#34304A","interactive-hover":"#88B0FF"}},m={background:{default:"#FFFFFF",elevated:"#F1F2F9","default-hover":"#F8F9FC","default-clicked":"#F1F2F9","default-disabled":"#FFFFFF",success:"#DCFCE7",warning:"#FEF3C7",error:"#FEE2E2",interactive:"#5B4FFF","error-hover":"#FECACA","interactive-hover":"#4F46E5","interactive-clicked":"#4338CA","interactive-disabled":"#F1F2F9",info:"#E0E7FF","info-hover":"#EEF2FF"},icon:{default:"#110F2A",muted:"#64668B",subtle:"#9498B8",inverse:"#FFFFFF",success:"#33B287",warning:"#F59E0B",error:"#EF4444",interactive:"#564FFF","default-hover":"#1D1B35","muted-hover":"#64668B","subtle-hover":"#888AAE","default-clicked":"#060C23","muted-clicked":"#64668B","subtle-clicked":"#788804","default-disabled":"#CBCDE1","muted-disabled":"#CBCDE1","subtle-disabled":"#CBCDE1","error-hover":"#F06060","interactive-hover":"#4F46E5","error-clicked":"#DC3838","interactive-clicked":"#2BA482"},text:{default:"#040217",muted:"#64668B",placeholder:"#9498B8",success:"#135638",warning:"#906218",error:"#991B1B",interactive:"#5B4FFF","default-disabled":"#CBCDE1","interactive-hover":"#5B4FFF"},border:{default:"#E2E3F0",interactive:"#5B4FFF",focused:"#949DF9",info:"#F1F2F9",success:"#87D7B7",warning:"#FACD63",error:"#F69393","default-hover":"#E2E3F0","interactive-hover":"#5B4FFF"}};function v(e,t,a,o,l){let i,s,d,u,_,p,f,b,m,v,C,w,E,k,F,y,A,x=a?console.warn:()=>{},S=[];if(t?.loginMethods)for(let e of(i=t.loginMethods.includes("email"),s=t.loginMethods.includes("sms"),u=t.loginMethods.includes("wallet"),_=t.loginMethods.includes("google"),p=t.loginMethods.includes("twitter"),f=t.loginMethods.includes("discord"),C=t.loginMethods.includes("spotify"),w=t.loginMethods.includes("instagram"),b=t.loginMethods.includes("tiktok"),m=t.loginMethods.includes("line"),v=t.loginMethods.includes("twitch"),k=t.loginMethods.includes("github"),E=t.loginMethods.includes("linkedin"),F=t.loginMethods.includes("apple"),y=t.loginMethods.includes("farcaster"),A=t.loginMethods.includes("telegram"),d=t.loginMethods.includes("passkey"),t.loginMethods))"string"==typeof e&&e.startsWith("privy:")&&S.push(e);else i=e.email_auth,s=e.sms_auth,u=e.wallet_auth||e.solana_wallet_auth,_=e.google_oauth,p=e.twitter_oauth,f=e.discord_oauth,k=e.github_oauth,C=e.spotify_oauth,w=e.instagram_oauth,b=e.tiktok_oauth,m=e.line_oauth,v=e.twitch_oauth,E=e.linkedin_oauth,F=e.apple_oauth,y=e.farcaster_auth,A=e.telegram_auth,d=e.passkey_auth;e.passkey_auth&&(d=!0),"undefined"!=typeof window&&"function"!=typeof window.PublicKeyCredential&&(d=!1);let O=[i,s].filter(Boolean),M=[_,p,f,k,C,w,b,m,E,F,y,A].filter(Boolean),D=[u].filter(Boolean),I=t?.loginMethods?.includes("passkey")??!1,T=e.passkeys_for_signup_enabled??!1,L=[d&&(T||I)].filter(Boolean);if(O.length+M.length+D.length+L.length+S.length===0)throw Error("You must enable at least one login method");let B=void 0!==t?.appearance?.showWalletLoginFirst?t?.appearance?.showWalletLoginFirst:e.show_wallet_login_first;B&&0===D.length?(x("You should only enable `showWalletLoginFirst` when `wallet` logins are also enabled. `showWalletLoginFirst` has been set to false"),B=!1):B||M.length+O.length!==0||(x("You should only disable `showWalletLoginFirst` when `email`, `sms`, or social logins are also enabled. `showWalletLoginFirst` has been set to true"),B=!0);let U=t?.externalWallets?.walletConnect?.enabled??!0;t?.loginMethods&&t.loginMethodsAndOrder&&x("You should only configure one of `loginMethods` or `loginMethodsAndOrder`");let W=c({input:t?.appearance?.walletList,overrides:t?.loginMethodsAndOrder});if((W.includes("wallet_connect_qr")||W.includes("wallet_connect"))&&W.includes("wallet_connect_qr_solana"))throw Error("wallet_connect_qr and wallet_connect_qr_solana cannot both be present in walletList due to WalletConnect session conflicts.");let N=(({input:e})=>{if(!e||!e.primary[0])return;let t=[e.primary[0]],n=[];for(let n of(e.primary.length>4&&console.warn("You should not specify greater than 4 login methods in `loginMethodsAndOrder.primary`"),e.primary.slice(1)))t.includes(n)?console.warn(`Duplicated login method: ${n}`):t.push(n);for(let a of e.overflow??[])t.includes(a)||n.includes(a)?console.warn(`Duplicated login method: ${a}`):n.push(a);return{primary:t,overflow:n}})({input:t?.loginMethodsAndOrder}),H=t?.intl?.defaultCountry??"US",{chains:R,defaultChain:P}=function({supportedChains:e,defaultChainFromConfig:t}){let a;if(e){if(0===e.length)throw Error("`supportedChains` must contain at least one chain");a=n.dedupeSupportedChains(e)}else a=[...n.DEFAULT_SUPPORTED_CHAINS];let o=e?a[0]:n.mainnet,r=t??o;if(!a.find((e=>e.id===r.id)))throw Error("`defaultChain` must be included in `supportedChains`");return{chains:a,defaultChain:r}}({supportedChains:t?.supportedChains,defaultChainFromConfig:t?.defaultChain}),K=!!t?.defaultChain,Y=t?.customAuth?.getCustomAccessToken&&!1!==t?.customAuth?.enabled,q=Y?"all-users":e.embedded_wallet_config.ethereum.create_on_login,j=e.embedded_wallet_config.solana.create_on_login;e.solana_wallet_auth&&!t?.externalWallets?.solana?.connectors&&console.warn("App configuration has Solana wallet login enabled, but no Solana wallet connectors have been passed to Privy. Make sure to pass Solana connectors to the `config.externalWallets.solana.connectors` field of the `PrivyProvider`");let G=e.telegram_auth_config?{botId:e.telegram_auth_config.bot_id,botName:e.telegram_auth_config.bot_name,linkEnabled:e.telegram_auth_config.link_enabled,seamlessAuthEnabled:e.telegram_auth_config.seamless_auth_enabled}:void 0,$=e.funding_config?{methods:e.funding_config.methods,options:e.funding_config.options,defaultRecommendedAmount:e.funding_config.default_recommended_amount,defaultRecommendedCurrency:e.funding_config.default_recommended_currency,promptFundingOnWalletCreation:e.funding_config.prompt_funding_on_wallet_creation,crossChainBridgingEnabled:e.funding_config.cross_chain_bridging_enabled}:void 0,z=e.smart_wallet_config;return{id:e.id,appClientId:l,name:e.name,allowlistConfig:{errorTitle:e.allowlist_config.error_title,errorDetail:e.allowlist_config.error_detail,errorCtaText:e.allowlist_config.cta_text,errorCtaLink:e.allowlist_config.cta_link},legacyWalletUiConfig:e.legacy_wallet_ui_config,appearance:{logo:t?.appearance?.logo??e.logo_url??void 0,landingHeader:t?.appearance?.landingHeader??r.appearance.landingHeader,loginMessage:"string"==typeof t?.appearance?.loginMessage?t?.appearance?.loginMessage.slice(0,100):t?.appearance?.loginMessage,footerLogo:t?.appearance?.footerLogo,palette:h({backgroundTheme:t?.appearance?.theme??r.appearance.theme,accentHex:t?.appearance?.accentColor??e.accent_color}),loginGroupPriority:B?"web3-first":"web2-first",hideDirectWeb2Inputs:!!t?.appearance?.hideDirectWeb2Inputs,walletList:W,walletChainType:t?.appearance?.walletChainType??(({evmWalletAuth:e,solanaWalletAuth:t})=>e&&t?"ethereum-and-solana":e?"ethereum-only":t?"solana-only":"ethereum-only")({evmWalletAuth:e.wallet_auth??!1,solanaWalletAuth:e.solana_wallet_auth??!1})},loginMethods:{wallet:u,email:i,sms:s,passkey:d,google:_,twitter:p,discord:f,github:k,spotify:C,instagram:w,tiktok:b,line:m,twitch:v,linkedin:E,apple:F,farcaster:y,telegram:A},customOAuthProviders:(e.custom_oauth_providers??[]).filter((e=>!1!==e.enabled)),crossAppProviders:S,disablePlusEmails:e.disable_plus_emails,loginMethodsAndOrder:N,legal:{termsAndConditionsUrl:t?.legal?.termsAndConditionsUrl??e.terms_and_conditions_url,privacyPolicyUrl:t?.legal?.privacyPolicyUrl??e.privacy_policy_url,requireUsersAcceptTerms:e.require_users_accept_terms??!1},walletConnectCloudProjectId:t?.walletConnectCloudProjectId??e.wallet_connect_cloud_project_id??r.walletConnectCloudProjectId,rpcConfig:{rpcUrls:{},rpcTimeouts:t?.externalWallets?.signatureRequestTimeouts??{}},chains:R,defaultChain:P,intl:{defaultCountry:H,textLocalization:t?.intl?.textLocalization},shouldEnforceDefaultChainOnConnect:K,captcha:{enabledProvider:e.enabled_captcha_provider??null,siteKey:e.captcha_site_key},externalWallets:{coinbaseWallet:{config:{appName:e.name,appLogoUrl:e.logo_url,preference:{options:"all",...t?.externalWallets?.coinbaseWallet?.config?.preference},...t?.externalWallets?.coinbaseWallet?.config}},baseAccount:{config:{appName:e.name,appLogoUrl:e.logo_url,...t?.externalWallets?.baseAccount?.config,preference:{...t?.externalWallets?.baseAccount?.config?.preference,telemetry:!1}}},walletConnect:{enabled:U},solana:{connectors:t?.externalWallets?.solana?.connectors},disableAllExternalWallets:t?.externalWallets?.disableAllExternalWallets??!1},embeddedWallets:{requireUserOwnedRecoveryOnCreate:!Y&&(e.embedded_wallet_config.require_user_owned_recovery_on_create??!1),userOwnedRecoveryOptions:Y?["user-passcode"]:e.embedded_wallet_config.user_owned_recovery_options,priceDisplay:t?.embeddedWallets?.priceDisplay??{primary:"fiat-currency",secondary:"native-token"},ethereum:{createOnLogin:t?.embeddedWallets?.ethereum?.createOnLogin??q},solana:{createOnLogin:t?.embeddedWallets?.solana?.createOnLogin??j},disableAutomaticMigration:t?.embeddedWallets?.disableAutomaticMigration??!1,mode:e.embedded_wallet_config.mode,showWalletUIs:t?.embeddedWallets?.showWalletUIs??e.enforce_wallet_uis??!0,extendedCalldataDecoding:t?.embeddedWallets?.extendedCalldataDecoding??!1,transactionScanning:{enabled:t?.embeddedWallets?.transactionScanning?.enabled??!1,domain:t?.embeddedWallets?.transactionScanning?.domain??o??"https://auth.privy.io"}},mfa:{methods:e.mfa_methods??[],noPromptOnMfaRequired:t?.mfa?.noPromptOnMfaRequired??!1},passkeys:{shouldUnlinkOnUnenrollMfa:t?.passkeys?.shouldUnlinkOnUnenrollMfa,shouldUnenrollMfaOnUnlink:t?.passkeys?.shouldUnenrollMfaOnUnlink,registration:t?.passkeys?.registration},customAuth:Y?{enabled:!0,...t.customAuth}:void 0,loginConfig:{telegramAuthConfiguration:G,passkeysForSignupEnabled:e.passkeys_for_signup_enabled},headless:!!t?.headless,render:{standalone:t?._render?.standalone??r._render.standalone},fundingConfig:$,fundingMethodConfig:{...t?.fundingMethodConfig??r.fundingMethodConfig,moonpay:{...t?.fundingMethodConfig?.moonpay??r.fundingMethodConfig.moonpay,useSandbox:t?.fundingMethodConfig?.moonpay.useSandbox??r.fundingMethodConfig.moonpay.useSandbox}},whatsAppEnabled:!!e.whatsapp_enabled,customOAuthRedirectUrl:t?.customOAuthRedirectUrl,allowOAuthInEmbeddedBrowsers:t?.allowOAuthInEmbeddedBrowsers??!1,solanaRpcs:{"solana:mainnet":t?.solana?.rpcs?.["solana:mainnet"]??null,"solana:devnet":t?.solana?.rpcs?.["solana:devnet"]??null,"solana:testnet":t?.solana?.rpcs?.["solana:testnet"]??null},smartWallets:z?.enabled?{enabled:z.enabled,smartWalletVersion:z.smart_wallet_version,smartWalletType:z.smart_wallet_type,configuredNetworks:z.configured_networks.map((e=>({chainId:e.chain_id,bundlerUrl:e.bundler_url,paymasterUrl:e.paymaster_url,paymasterContext:g(e.paymaster_url,e.paymaster_context)})))}:{enabled:z?.enabled??!1}}}const C={show_wallet_login_first:!0,allowlist_config:{error_title:null,error_detail:null,cta_text:null,cta_link:null},wallet_auth:!0,email_auth:!0,sms_auth:!1,google_oauth:!1,twitter_oauth:!1,discord_oauth:!1,github_oauth:!1,linkedin_oauth:!1,apple_oauth:!1,disable_plus_emails:!1,terms_and_conditions_url:null,privacy_policy_url:null,embedded_wallet_config:{create_on_login:"off",ethereum:{create_on_login:"off"},solana:{create_on_login:"off"},require_user_owned_recovery_on_create:!1,user_owned_recovery_options:["user-passcode"],mode:"user-controlled-server-wallets-only"},captcha_site_key:"",enforce_wallet_uis:!1,legacy_wallet_ui_config:!1,id:"",name:"",passkeys_for_signup_enabled:!1,whatsapp_enabled:!1},w=v(C,void 0,!1);let E=/*#__PURE__*/t.createContext({appConfig:w,isServerConfigLoaded:!1});exports.CHAIN_ID_MAINNET=1,exports.CLIENT_ANALYTICS_ID_KEY="privy:caid",exports.CODE_VERIFIER_KEY="privy:code_verifier",exports.CONNECTIONS_HISTORY_KEY="privy:connections",exports.CUSTOMER_ACCESS_TOKEN_COOKIE_KEY="privy-token",exports.CUSTOMER_ACCESS_TOKEN_STORAGE_KEY="privy:token",exports.DEFAULT_API_TIMEOUT_MS=2e4,exports.DEFAULT_NETWORK="0x1",exports.DEFAULT_PRIVY_API_URL="https://auth.privy.io",exports.DEFAULT_RPC_TIMEOUT=12e4,exports.DEFAULT_SUCCESS_SCREEN_DURATION_MS=1400,exports.DEFAULT_SUCCESS_SCREEN_EXTRA_LONG_DURATION_MS=4e3,exports.DEFAULT_SUCCESS_SCREEN_LONG_DURATION_MS=2500,exports.DEPRECATED_REFRESH_TOKEN="deprecated",exports.HEADLESS_OAUTH_KEY="privy:headless_oauth",exports.IDENTITY_TOKEN_COOKIE_KEY="privy-id-token",exports.IDENTITY_TOKEN_STORAGE_KEY="privy:id_token",exports.MOONPAY_API_URL="https://api.moonpay.com/v1",exports.MOONPAY_API_URL_SANDBOX="https://api.moonpay.com/v1",exports.MOONPAY_PUBLIC_KEY="pk_live_hirbpu0cVcLHrjktC9l7fbc9ctjv0SL",exports.MOONPAY_PUBLIC_KEY_SANDBOX="pk_test_fqWjXZMSFwloh7orvJsRfjiUHXJqFzI",exports.OAUTH_DISABLE_SIGNUP_KEY="privy:oauth_disable_signup",exports.PRIVY_ACCESS_TOKEN_STORAGE_KEY="privy:pat",exports.PrivyAppConfigProvider=({children:n,client:a,legacyClient:o,clientConfig:r,appClientId:l})=>{let[i,s]=t.useState(null),c=t.useMemo((()=>v(i??C,r,!!i,"undefined"!=typeof window?window.location.origin:void 0,l)),[i,r,l]);return t.useEffect((()=>{if(!i)return;let e=function(e){if(!e)return{};let{appearance:t,supportedChains:n,defaultChain:a,externalWallets:o,...r}=e;return{...r,...n?{supportedChains:n.map((e=>e.id))}:void 0,...a?{defaultChain:a.id}:void 0,...o?{walletConnect:o.walletConnect?{enabled:o.walletConnect.enabled}:void 0,coinbaseWallet:o.coinbaseWallet,solana:{connectors:o.solana?.connectors?.get().map((e=>e.walletClientType))}}:void 0}}(r),t=function(e,t=0){let n=3735928559^t,a=1103547991^t;for(let t,o=0;o<e.length;o++)n=Math.imul(n^(t=e.charCodeAt(o)),2654435761),a=Math.imul(a^t,1597334677);return n=Math.imul(n^n>>>16,2246822507)^Math.imul(a^a>>>13,3266489909),4294967296*(2097151&(a=Math.imul(a^a>>>16,2246822507)^Math.imul(n^n>>>13,3266489909)))+(n>>>0)}(JSON.stringify(e)).toString(),n=`privy:sent:${i.id}:${t}`;localStorage.getItem(n)||(o.createAnalyticsEvent({eventName:"sdk_initialize",payload:e}),localStorage.setItem(n,"t"))}),[r,i]),t.useEffect((()=>{i||(async()=>{try{await a.initialize();let e=a.app.getConfig();e.custom_api_url&&o.updateApiUrl(e.custom_api_url),s(e)}catch(e){console.warn("Error generating app config: ",e)}})()}),[]),/*#__PURE__*/e.jsx(E.Provider,{value:{appConfig:c,isServerConfigLoaded:!!i},children:n})},exports.REFRESH_TOKEN_COOKIE_KEY="privy-refresh-token",exports.REFRESH_TOKEN_STORAGE_KEY="privy:refresh_token",exports.SESSION_COOKIE_KEY="privy-session",exports.STATE_CODE_KEY="privy:state_code",exports.VERSION="3.10.0-beta-20251223041507",exports.WALLET_PROXY_TIMEOUT=3e4,exports.getGuestCredentialStorageKey=e=>`privy:guest:${e}`,exports.getPrivyWalletKey=e=>`privy:wallet:${e}`,exports.getProviderAccessTokenStorageKey=e=>`privy:cross-app:${e}`,exports.useAppConfig=()=>{let{appConfig:e}=t.useContext(E);return e},exports.useIsServerConfigLoaded=()=>{let{isServerConfigLoaded:e}=t.useContext(E);return e};
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),t=require("react"),n=require("@privy-io/js-sdk-core");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=/*#__PURE__*/a(require("tinycolor2"));const r={appearance:{landingHeader:"Log in or sign up",theme:"light",walletList:["detected_ethereum_wallets","detected_solana_wallets","metamask","coinbase_wallet","rainbow","base_account","wallet_connect","phantom"]},walletConnectCloudProjectId:"34357d3c125c2bcf2ce2bc3309d98715",_render:{standalone:!1},fundingMethodConfig:{moonpay:{useSandbox:!1}}};let l=new Set(["coinbase_wallet","base_account","cryptocom","metamask","okx_wallet","phantom","rainbow","uniswap","zerion","universal_profile","bybit_wallet","ronin_wallet","haha_wallet","wallet_connect","wallet_connect_qr","wallet_connect_qr_solana","detected_solana_wallets","detected_ethereum_wallets","rabby_wallet","safe","solflare","backpack","jupiter","binance","binanceus","bitget_wallet","kraken_wallet"]),i=e=>l.has(e),s=(e,t,n)=>n.indexOf(e)===t;const c=({input:e,overrides:t})=>t?t.primary.concat(t.overflow??[]).filter(i).filter(s):e?e.filter(i).filter(s):r.appearance.walletList;let d=/paymaster\.biconomy\.io\/api/i,u={mode:"SPONSORED",calculateGasLimits:!0,expiryDuration:300,sponsorshipInfo:{webhookData:{},smartAccountInfo:{name:"BICONOMY",version:"2.0.0"}}};const g=(e,t)=>e&&d.test(e)?u:t&&t.policy_id?{policyId:t.policy_id}:void 0;function _(e,t){let n=Math.max(0,Math.min(1,e.toHsl().l+t));return o.default({...e.toHsl(),l:n})}function p(e,t){let n=e.getLuminance(),a=t.getLuminance();return(Math.max(n,a)+.05)/(Math.min(n,a)+.05)}function f(e,t){if(!e){let e=t?b:m;return{accent:o.default(e.background.interactive),accentLight:o.default(e.background.interactive),accentHover:o.default(e.background["interactive-hover"]),accentDark:o.default(e.background["interactive-clicked"]),accentDarkest:o.default(e.background["interactive-disabled"])}}let n=o.default(e);return{accent:n,accentLight:_(n,.15),accentHover:_(n,.3),accentDark:_(n,-.06),accentDarkest:_(n,-.6)}}function h({backgroundTheme:e,accentHex:t}){let n,a;"light"===e?n=!1:"dark"===e?n=!0:(n=.5>=o.default(e).getLuminance(),a=o.default(e).toHslString());let r=n?"dark":"light",l=n?b:m,{accent:i,accentLight:s,accentHover:c,accentDark:d,accentDarkest:u}=f(t,n),g=function(e){let t=o.default(m.text.default),n=o.default(b.text.default),a=p(e,t),r=p(e,n),l=e.toHsl();return l.h>=220&&l.h<=300&&r>=3?b.text.default:a>r?m.text.default:b.text.default}(i),_=o.default(g),h=p(i,o.default(l.background.default))>=3;return{colorScheme:r,background:a||l.background.default,background2:l.background.elevated,background3:l.background.interactive,foreground:l.text.default,foreground2:l.text.muted,foreground3:l.text.placeholder,foreground4:l.border.default,accent:i.toHslString(),accentLight:s.toHslString(),accentHover:c.toHslString(),accentDark:d.toHslString(),accentDarkest:u.toHslString(),foregroundAccent:_.toHslString(),success:l.background.success,successDark:l.text.success,successLight:l.background.success,error:l.text.error,errorLight:l.background.error,warn:l.background.warning,warnLight:l.background.warning,warningDark:l.text.warning,errorDark:l.text.error,successBg:l.background.success,errorBg:l.background.error,errorBgHover:l.background["error-hover"],warnBg:l.background.warning,infoBg:l.background.info,infoBgHover:l.background["info-hover"],borderDefault:l.border.default,borderHover:l.border["default-hover"],borderFocus:l.border.focused,borderError:l.border.error,borderSuccess:l.border.success,borderWarning:l.border.warning,borderInfo:l.border.info,borderInteractive:l.border.interactive,borderInteractiveHover:l.border["interactive-hover"],backgroundHover:l.background["default-hover"],backgroundClicked:l.background["default-clicked"],backgroundDisabled:l.background["default-disabled"],backgroundInteractive:l.background.interactive,backgroundInteractiveHover:l.background["interactive-hover"],backgroundInteractiveClicked:l.background["interactive-clicked"],backgroundInteractiveDisabled:l.background["interactive-disabled"],foregroundHover:l.text.default,foregroundClicked:l.text.default,foregroundDisabled:l.text["default-disabled"],foregroundInteractive:l.text.interactive,foregroundInteractiveHover:l.text["interactive-hover"],accentHasGoodContrast:h?"1":"0",linkNavigationColor:h?i.toHslString():l.text.default,linkNavigationDecoration:h?"none":"underline",iconDefault:l.icon.default,iconMuted:l.icon.muted,iconSubtle:l.icon.subtle,iconInverse:l.icon.inverse,iconSuccess:l.icon.success,iconWarning:l.icon.warning,iconError:l.icon.error,iconInteractive:l.icon.interactive,iconDefaultHover:l.icon["default-hover"],iconMutedHover:l.icon["muted-hover"],iconSubtleHover:l.icon["subtle-hover"],iconDefaultClicked:l.icon["default-clicked"],iconMutedClicked:l.icon["muted-clicked"],iconSubtleClicked:l.icon["subtle-clicked"],iconDefaultDisabled:l.icon["default-disabled"],iconMutedDisabled:l.icon["muted-disabled"],iconSubtleDisabled:l.icon["subtle-disabled"],iconErrorHover:l.icon["error-hover"],iconInteractiveHover:l.icon["interactive-hover"],iconErrorClicked:l.icon["error-clicked"],iconInteractiveClicked:l.icon["interactive-clicked"],iconMutedDisabledAlt:l.icon["muted-disabled"],iconSubtleDisabledAlt:l.icon["subtle-disabled"]}}const b={background:{default:"#020713",elevated:"#1A2230","default-hover":"#101724","default-clicked":"#1A2230","default-disabled":"#020713",success:"#0E3E2D",warning:"#373827",error:"#2E0C18",interactive:"#8B86FF","error-hover":"#441821","interactive-hover":"#7B73E5","interactive-clicked":"#6560CC","interactive-disabled":"#141824",info:"#1F2937","info-hover":"#141824"},icon:{default:"#F8F8F8",muted:"#9BA2AE",subtle:"#7B8491",inverse:"#020713",success:"#88E3B5",warning:"#FDF27B",error:"#EF4444",interactive:"#88B6FF","default-hover":"#F8F8F8","muted-hover":"#AEB3BD","subtle-hover":"#8B939E","default-clicked":"#F8F8F8","muted-clicked":"#9097A5","subtle-clicked":"#78818E","default-disabled":"#404452","muted-disabled":"#404452","subtle-disabled":"#404452","error-hover":"#F05555","interactive-hover":"#7B73E5","error-clicked":"#EF4444","interactive-clicked":"#6560CC"},text:{default:"#F8F8F8",muted:"#9BA2AE",placeholder:"#7B8491",success:"#ACEECB",warning:"#FEF9A0",error:"#FCA5A5",interactive:"#A29EFF","default-disabled":"#404452","interactive-hover":"#8C88E5"},border:{default:"#1F2937",interactive:"#88B0FF",focused:"#F8F8FC",info:"#5B83D3",success:"#317056",warning:"#FBBF24",error:"#F87171","default-hover":"#34304A","interactive-hover":"#88B0FF"}},m={background:{default:"#FFFFFF",elevated:"#F1F2F9","default-hover":"#F8F9FC","default-clicked":"#F1F2F9","default-disabled":"#FFFFFF",success:"#DCFCE7",warning:"#FEF3C7",error:"#FEE2E2",interactive:"#5B4FFF","error-hover":"#FECACA","interactive-hover":"#4F46E5","interactive-clicked":"#4338CA","interactive-disabled":"#F1F2F9",info:"#E0E7FF","info-hover":"#EEF2FF"},icon:{default:"#110F2A",muted:"#64668B",subtle:"#9498B8",inverse:"#FFFFFF",success:"#33B287",warning:"#F59E0B",error:"#EF4444",interactive:"#564FFF","default-hover":"#1D1B35","muted-hover":"#64668B","subtle-hover":"#888AAE","default-clicked":"#060C23","muted-clicked":"#64668B","subtle-clicked":"#788804","default-disabled":"#CBCDE1","muted-disabled":"#CBCDE1","subtle-disabled":"#CBCDE1","error-hover":"#F06060","interactive-hover":"#4F46E5","error-clicked":"#DC3838","interactive-clicked":"#2BA482"},text:{default:"#040217",muted:"#64668B",placeholder:"#9498B8",success:"#135638",warning:"#906218",error:"#991B1B",interactive:"#5B4FFF","default-disabled":"#CBCDE1","interactive-hover":"#5B4FFF"},border:{default:"#E2E3F0",interactive:"#5B4FFF",focused:"#949DF9",info:"#F1F2F9",success:"#87D7B7",warning:"#FACD63",error:"#F69393","default-hover":"#E2E3F0","interactive-hover":"#5B4FFF"}};function v(e,t,a,o,l){let i,s,d,u,_,p,f,b,m,v,C,w,E,k,F,y,A,x=a?console.warn:()=>{},S=[];if(t?.loginMethods)for(let e of(i=t.loginMethods.includes("email"),s=t.loginMethods.includes("sms"),u=t.loginMethods.includes("wallet"),_=t.loginMethods.includes("google"),p=t.loginMethods.includes("twitter"),f=t.loginMethods.includes("discord"),C=t.loginMethods.includes("spotify"),w=t.loginMethods.includes("instagram"),b=t.loginMethods.includes("tiktok"),m=t.loginMethods.includes("line"),v=t.loginMethods.includes("twitch"),k=t.loginMethods.includes("github"),E=t.loginMethods.includes("linkedin"),F=t.loginMethods.includes("apple"),y=t.loginMethods.includes("farcaster"),A=t.loginMethods.includes("telegram"),d=t.loginMethods.includes("passkey"),t.loginMethods))"string"==typeof e&&e.startsWith("privy:")&&S.push(e);else i=e.email_auth,s=e.sms_auth,u=e.wallet_auth||e.solana_wallet_auth,_=e.google_oauth,p=e.twitter_oauth,f=e.discord_oauth,k=e.github_oauth,C=e.spotify_oauth,w=e.instagram_oauth,b=e.tiktok_oauth,m=e.line_oauth,v=e.twitch_oauth,E=e.linkedin_oauth,F=e.apple_oauth,y=e.farcaster_auth,A=e.telegram_auth,d=e.passkey_auth;e.passkey_auth&&(d=!0),"undefined"!=typeof window&&"function"!=typeof window.PublicKeyCredential&&(d=!1);let O=[i,s].filter(Boolean),M=[_,p,f,k,C,w,b,m,E,F,y,A].filter(Boolean),D=[u].filter(Boolean),I=t?.loginMethods?.includes("passkey")??!1,T=e.passkeys_for_signup_enabled??!1,L=[d&&(T||I)].filter(Boolean);if(O.length+M.length+D.length+L.length+S.length===0)throw Error("You must enable at least one login method");let B=void 0!==t?.appearance?.showWalletLoginFirst?t?.appearance?.showWalletLoginFirst:e.show_wallet_login_first;B&&0===D.length?(x("You should only enable `showWalletLoginFirst` when `wallet` logins are also enabled. `showWalletLoginFirst` has been set to false"),B=!1):B||M.length+O.length!==0||(x("You should only disable `showWalletLoginFirst` when `email`, `sms`, or social logins are also enabled. `showWalletLoginFirst` has been set to true"),B=!0);let U=t?.externalWallets?.walletConnect?.enabled??!0;t?.loginMethods&&t.loginMethodsAndOrder&&x("You should only configure one of `loginMethods` or `loginMethodsAndOrder`");let W=c({input:t?.appearance?.walletList,overrides:t?.loginMethodsAndOrder});if((W.includes("wallet_connect_qr")||W.includes("wallet_connect"))&&W.includes("wallet_connect_qr_solana"))throw Error("wallet_connect_qr and wallet_connect_qr_solana cannot both be present in walletList due to WalletConnect session conflicts.");let N=(({input:e})=>{if(!e||!e.primary[0])return;let t=[e.primary[0]],n=[];for(let n of(e.primary.length>4&&console.warn("You should not specify greater than 4 login methods in `loginMethodsAndOrder.primary`"),e.primary.slice(1)))t.includes(n)?console.warn(`Duplicated login method: ${n}`):t.push(n);for(let a of e.overflow??[])t.includes(a)||n.includes(a)?console.warn(`Duplicated login method: ${a}`):n.push(a);return{primary:t,overflow:n}})({input:t?.loginMethodsAndOrder}),H=t?.intl?.defaultCountry??"US",{chains:R,defaultChain:P}=function({supportedChains:e,defaultChainFromConfig:t}){let a;if(e){if(0===e.length)throw Error("`supportedChains` must contain at least one chain");a=n.dedupeSupportedChains(e)}else a=[...n.DEFAULT_SUPPORTED_CHAINS];let o=e?a[0]:n.mainnet,r=t??o;if(!a.find((e=>e.id===r.id)))throw Error("`defaultChain` must be included in `supportedChains`");return{chains:a,defaultChain:r}}({supportedChains:t?.supportedChains,defaultChainFromConfig:t?.defaultChain}),K=!!t?.defaultChain,Y=t?.customAuth?.getCustomAccessToken&&!1!==t?.customAuth?.enabled,q=Y?"all-users":e.embedded_wallet_config.ethereum.create_on_login,j=e.embedded_wallet_config.solana.create_on_login;e.solana_wallet_auth&&!t?.externalWallets?.solana?.connectors&&console.warn("App configuration has Solana wallet login enabled, but no Solana wallet connectors have been passed to Privy. Make sure to pass Solana connectors to the `config.externalWallets.solana.connectors` field of the `PrivyProvider`");let G=e.telegram_auth_config?{botId:e.telegram_auth_config.bot_id,botName:e.telegram_auth_config.bot_name,linkEnabled:e.telegram_auth_config.link_enabled,seamlessAuthEnabled:e.telegram_auth_config.seamless_auth_enabled}:void 0,$=e.funding_config?{methods:e.funding_config.methods,options:e.funding_config.options,defaultRecommendedAmount:e.funding_config.default_recommended_amount,defaultRecommendedCurrency:e.funding_config.default_recommended_currency,promptFundingOnWalletCreation:e.funding_config.prompt_funding_on_wallet_creation,crossChainBridgingEnabled:e.funding_config.cross_chain_bridging_enabled}:void 0,z=e.smart_wallet_config;return{id:e.id,appClientId:l,name:e.name,allowlistConfig:{errorTitle:e.allowlist_config.error_title,errorDetail:e.allowlist_config.error_detail,errorCtaText:e.allowlist_config.cta_text,errorCtaLink:e.allowlist_config.cta_link},legacyWalletUiConfig:e.legacy_wallet_ui_config,appearance:{logo:t?.appearance?.logo??e.logo_url??void 0,landingHeader:t?.appearance?.landingHeader??r.appearance.landingHeader,loginMessage:"string"==typeof t?.appearance?.loginMessage?t?.appearance?.loginMessage.slice(0,100):t?.appearance?.loginMessage,footerLogo:t?.appearance?.footerLogo,palette:h({backgroundTheme:t?.appearance?.theme??r.appearance.theme,accentHex:t?.appearance?.accentColor??e.accent_color}),loginGroupPriority:B?"web3-first":"web2-first",hideDirectWeb2Inputs:!!t?.appearance?.hideDirectWeb2Inputs,walletList:W,walletChainType:t?.appearance?.walletChainType??(({evmWalletAuth:e,solanaWalletAuth:t})=>e&&t?"ethereum-and-solana":e?"ethereum-only":t?"solana-only":"ethereum-only")({evmWalletAuth:e.wallet_auth??!1,solanaWalletAuth:e.solana_wallet_auth??!1})},loginMethods:{wallet:u,email:i,sms:s,passkey:d,google:_,twitter:p,discord:f,github:k,spotify:C,instagram:w,tiktok:b,line:m,twitch:v,linkedin:E,apple:F,farcaster:y,telegram:A},customOAuthProviders:(e.custom_oauth_providers??[]).filter((e=>!1!==e.enabled)),crossAppProviders:S,disablePlusEmails:e.disable_plus_emails,loginMethodsAndOrder:N,legal:{termsAndConditionsUrl:t?.legal?.termsAndConditionsUrl??e.terms_and_conditions_url,privacyPolicyUrl:t?.legal?.privacyPolicyUrl??e.privacy_policy_url,requireUsersAcceptTerms:e.require_users_accept_terms??!1},walletConnectCloudProjectId:t?.walletConnectCloudProjectId??e.wallet_connect_cloud_project_id??r.walletConnectCloudProjectId,rpcConfig:{rpcUrls:{},rpcTimeouts:t?.externalWallets?.signatureRequestTimeouts??{}},chains:R,defaultChain:P,intl:{defaultCountry:H,textLocalization:t?.intl?.textLocalization},shouldEnforceDefaultChainOnConnect:K,captcha:{enabledProvider:e.enabled_captcha_provider??null,siteKey:e.captcha_site_key},externalWallets:{coinbaseWallet:{config:{appName:e.name,appLogoUrl:e.logo_url,preference:{options:"all",...t?.externalWallets?.coinbaseWallet?.config?.preference},...t?.externalWallets?.coinbaseWallet?.config}},baseAccount:{config:{appName:e.name,appLogoUrl:e.logo_url,...t?.externalWallets?.baseAccount?.config,preference:{...t?.externalWallets?.baseAccount?.config?.preference,telemetry:!1}}},walletConnect:{enabled:U},solana:{connectors:t?.externalWallets?.solana?.connectors},disableAllExternalWallets:t?.externalWallets?.disableAllExternalWallets??!1},embeddedWallets:{requireUserOwnedRecoveryOnCreate:!Y&&(e.embedded_wallet_config.require_user_owned_recovery_on_create??!1),userOwnedRecoveryOptions:Y?["user-passcode"]:e.embedded_wallet_config.user_owned_recovery_options,priceDisplay:t?.embeddedWallets?.priceDisplay??{primary:"fiat-currency",secondary:"native-token"},ethereum:{createOnLogin:t?.embeddedWallets?.ethereum?.createOnLogin??q},solana:{createOnLogin:t?.embeddedWallets?.solana?.createOnLogin??j},disableAutomaticMigration:t?.embeddedWallets?.disableAutomaticMigration??!1,mode:e.embedded_wallet_config.mode,showWalletUIs:t?.embeddedWallets?.showWalletUIs??e.enforce_wallet_uis??!0,extendedCalldataDecoding:t?.embeddedWallets?.extendedCalldataDecoding??!1,transactionScanning:{enabled:t?.embeddedWallets?.transactionScanning?.enabled??!1,domain:t?.embeddedWallets?.transactionScanning?.domain??o??"https://auth.privy.io"}},mfa:{methods:e.mfa_methods??[],noPromptOnMfaRequired:t?.mfa?.noPromptOnMfaRequired??!1},passkeys:{shouldUnlinkOnUnenrollMfa:t?.passkeys?.shouldUnlinkOnUnenrollMfa,shouldUnenrollMfaOnUnlink:t?.passkeys?.shouldUnenrollMfaOnUnlink,registration:t?.passkeys?.registration},customAuth:Y?{enabled:!0,...t.customAuth}:void 0,loginConfig:{telegramAuthConfiguration:G,passkeysForSignupEnabled:e.passkeys_for_signup_enabled},headless:!!t?.headless,render:{standalone:t?._render?.standalone??r._render.standalone},fundingConfig:$,fundingMethodConfig:{...t?.fundingMethodConfig??r.fundingMethodConfig,moonpay:{...t?.fundingMethodConfig?.moonpay??r.fundingMethodConfig.moonpay,useSandbox:t?.fundingMethodConfig?.moonpay.useSandbox??r.fundingMethodConfig.moonpay.useSandbox}},whatsAppEnabled:!!e.whatsapp_enabled,customOAuthRedirectUrl:t?.customOAuthRedirectUrl,allowOAuthInEmbeddedBrowsers:t?.allowOAuthInEmbeddedBrowsers??!1,solanaRpcs:{"solana:mainnet":t?.solana?.rpcs?.["solana:mainnet"]??null,"solana:devnet":t?.solana?.rpcs?.["solana:devnet"]??null,"solana:testnet":t?.solana?.rpcs?.["solana:testnet"]??null},smartWallets:z?.enabled?{enabled:z.enabled,smartWalletVersion:z.smart_wallet_version,smartWalletType:z.smart_wallet_type,configuredNetworks:z.configured_networks.map((e=>({chainId:e.chain_id,bundlerUrl:e.bundler_url,paymasterUrl:e.paymaster_url,paymasterContext:g(e.paymaster_url,e.paymaster_context)})))}:{enabled:z?.enabled??!1}}}const C={show_wallet_login_first:!0,allowlist_config:{error_title:null,error_detail:null,cta_text:null,cta_link:null},wallet_auth:!0,email_auth:!0,sms_auth:!1,google_oauth:!1,twitter_oauth:!1,discord_oauth:!1,github_oauth:!1,linkedin_oauth:!1,apple_oauth:!1,disable_plus_emails:!1,terms_and_conditions_url:null,privacy_policy_url:null,embedded_wallet_config:{create_on_login:"off",ethereum:{create_on_login:"off"},solana:{create_on_login:"off"},require_user_owned_recovery_on_create:!1,user_owned_recovery_options:["user-passcode"],mode:"user-controlled-server-wallets-only"},captcha_site_key:"",enforce_wallet_uis:!1,legacy_wallet_ui_config:!1,id:"",name:"",passkeys_for_signup_enabled:!1,whatsapp_enabled:!1},w=v(C,void 0,!1);let E=/*#__PURE__*/t.createContext({appConfig:w,isServerConfigLoaded:!1});exports.CHAIN_ID_MAINNET=1,exports.CLIENT_ANALYTICS_ID_KEY="privy:caid",exports.CODE_VERIFIER_KEY="privy:code_verifier",exports.CONNECTIONS_HISTORY_KEY="privy:connections",exports.CUSTOMER_ACCESS_TOKEN_COOKIE_KEY="privy-token",exports.CUSTOMER_ACCESS_TOKEN_STORAGE_KEY="privy:token",exports.DEFAULT_API_TIMEOUT_MS=2e4,exports.DEFAULT_NETWORK="0x1",exports.DEFAULT_PRIVY_API_URL="https://auth.privy.io",exports.DEFAULT_RPC_TIMEOUT=12e4,exports.DEFAULT_SUCCESS_SCREEN_DURATION_MS=1400,exports.DEFAULT_SUCCESS_SCREEN_EXTRA_LONG_DURATION_MS=4e3,exports.DEFAULT_SUCCESS_SCREEN_LONG_DURATION_MS=2500,exports.DEPRECATED_REFRESH_TOKEN="deprecated",exports.HEADLESS_OAUTH_KEY="privy:headless_oauth",exports.IDENTITY_TOKEN_COOKIE_KEY="privy-id-token",exports.IDENTITY_TOKEN_STORAGE_KEY="privy:id_token",exports.MOONPAY_API_URL="https://api.moonpay.com/v1",exports.MOONPAY_API_URL_SANDBOX="https://api.moonpay.com/v1",exports.MOONPAY_PUBLIC_KEY="pk_live_hirbpu0cVcLHrjktC9l7fbc9ctjv0SL",exports.MOONPAY_PUBLIC_KEY_SANDBOX="pk_test_fqWjXZMSFwloh7orvJsRfjiUHXJqFzI",exports.OAUTH_DISABLE_SIGNUP_KEY="privy:oauth_disable_signup",exports.PRIVY_ACCESS_TOKEN_STORAGE_KEY="privy:pat",exports.PrivyAppConfigProvider=({children:n,client:a,legacyClient:o,clientConfig:r,appClientId:l})=>{let[i,s]=t.useState(null),c=t.useMemo((()=>v(i??C,r,!!i,"undefined"!=typeof window?window.location.origin:void 0,l)),[i,r,l]);return t.useEffect((()=>{if(!i)return;let e=function(e){if(!e)return{};let{appearance:t,supportedChains:n,defaultChain:a,externalWallets:o,...r}=e;return{...r,...n?{supportedChains:n.map((e=>e.id))}:void 0,...a?{defaultChain:a.id}:void 0,...o?{walletConnect:o.walletConnect?{enabled:o.walletConnect.enabled}:void 0,coinbaseWallet:o.coinbaseWallet,solana:{connectors:o.solana?.connectors?.get().map((e=>e.walletClientType))}}:void 0}}(r),t=function(e,t=0){let n=3735928559^t,a=1103547991^t;for(let t,o=0;o<e.length;o++)n=Math.imul(n^(t=e.charCodeAt(o)),2654435761),a=Math.imul(a^t,1597334677);return n=Math.imul(n^n>>>16,2246822507)^Math.imul(a^a>>>13,3266489909),4294967296*(2097151&(a=Math.imul(a^a>>>16,2246822507)^Math.imul(n^n>>>13,3266489909)))+(n>>>0)}(JSON.stringify(e)).toString(),n=`privy:sent:${i.id}:${t}`;localStorage.getItem(n)||(o.createAnalyticsEvent({eventName:"sdk_initialize",payload:e}),localStorage.setItem(n,"t"))}),[r,i]),t.useEffect((()=>{i||(async()=>{try{await a.initialize();let e=a.app.getConfig();e.custom_api_url&&o.updateApiUrl(e.custom_api_url),s(e)}catch(e){console.warn("Error generating app config: ",e)}})()}),[]),/*#__PURE__*/e.jsx(E.Provider,{value:{appConfig:c,isServerConfigLoaded:!!i},children:n})},exports.REFRESH_TOKEN_COOKIE_KEY="privy-refresh-token",exports.REFRESH_TOKEN_STORAGE_KEY="privy:refresh_token",exports.SESSION_COOKIE_KEY="privy-session",exports.STATE_CODE_KEY="privy:state_code",exports.VERSION="3.10.1",exports.WALLET_PROXY_TIMEOUT=3e4,exports.getGuestCredentialStorageKey=e=>`privy:guest:${e}`,exports.getPrivyWalletKey=e=>`privy:wallet:${e}`,exports.getProviderAccessTokenStorageKey=e=>`privy:cross-app:${e}`,exports.useAppConfig=()=>{let{appConfig:e}=t.useContext(E);return e},exports.useIsServerConfigLoaded=()=>{let{isServerConfigLoaded:e}=t.useContext(E);return e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("viem"),r=require("./internal-context-NWsAL807.js"),t=require("./useActiveWallet-
|
|
1
|
+
"use strict";var e=require("viem"),r=require("./internal-context-NWsAL807.js"),t=require("./useActiveWallet-B-Pd49hn.js");let s=new Intl.NumberFormat(void 0,{style:"currency",currency:"USD",maximumFractionDigits:2}),o=e=>s.format(e);const a=(r,t=6,s=!1)=>{let o=parseFloat(e.formatEther(r)).toFixed(t).replace(/0+$/,"").replace(/\.$/,"");return s?o:`${"0"===o?"<0.001":o}`};exports.getBlockExplorerUrlForAddress=(e,s)=>{let{chains:o}=r.usePrivyInternal(),a=`https://etherscan.io/address/${s}`,i=`${t.getBlockExplorer(e,o)}/address/${s}`;if(!i)return a;try{new URL(i)}catch{return a}return i},exports.getDollarsFromStringFloat=(e,r)=>{let t=o(r*parseFloat(e));return"$0.00"!==t?t:"<$0.01"},exports.getDollarsFromWei=(r,t)=>{let s=o(t*parseFloat(e.formatEther(r)));return"$0.00"===s?"<$0.01":s},exports.getNativeCurrencyFromWei=(e,r,t=6,s=!1)=>`${a(e,t,s)} ${r}`,exports.parseNativeCurrencyFromWei=a,exports.sumWeiQuantities=e=>e.reduce(((e,r)=>e+r),0n);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react"),r=require("@privy-io/js-sdk-core"),t=require("./internal-context-NWsAL807.js"),i=require("./get-is-unified-wallet-
|
|
1
|
+
"use strict";var e=require("react"),r=require("@privy-io/js-sdk-core"),t=require("./internal-context-NWsAL807.js"),i=require("./get-is-unified-wallet-D6pn8A8g.js"),a=require("./context-BPd2qxKv.js"),n=require("./use-sign-with-user-signer-BcAsQTGF.js");require("ofetch"),require("viem"),require("react/jsx-runtime"),require("tinycolor2");exports.useCreateWallet=()=>{let{refreshSessionAndUser:i,privy:a}=t.usePrivyInternal();return e.useMemo((()=>({async createWallet(e){let t=await r.create(a,{request:{chain_type:e.chainType}}),n=await i();if(!n)throw Error("User must be authenticated before creating a Privy wallet");return{user:n,wallet:t}}})),[i,a])},exports.useExportWallet=function(){let{user:r,getAccessToken:n}=i.usePrivyContext(),{walletProxy:s,openModal:l,client:o}=t.usePrivyInternal(),{setModalData:d}=i.usePrivyModal(),u=a.useAppConfig();return e.useMemo((()=>({exportWallet:e=>new Promise((async(a,c)=>{if(!r)return void c(new t.PrivyClientError("User must be authenticated before exporting their Privy wallet"));let p=i.getPrivyWalletWithAddress(r,e.address);p?"spark"===p.chainType&&i.getIsUnifiedWallet(p)?await n()?s?(d({connectWallet:{recoveryMethod:p.recoveryMethod,connectingWalletAddress:p.address,isUnifiedWallet:!0,onCompleteNavigateTo:"EmbeddedWalletKeyExportScreen",onFailure:c,shouldForceMFA:!0},keyExport:{appId:u.id,appClientId:u.appClientId,origin:o.apiUrl,address:p.address,hdWalletIndex:p.walletIndex,chainType:p.chainType,walletId:p.id,isUnifiedWallet:!0,imported:p.imported,onSuccess:a,onFailure:c}}),l("EmbeddedWalletConnectingScreen")):c(new t.PrivyClientError("Wallet not ready for export")):c(new t.PrivyClientError("Must have valid access token.")):c(Error("Export via extended-chains is only supported for unified stack wallets")):c(new t.PrivyClientError("User must have an embedded wallet."))}))})),[r,n,s,l,o,d,u])},exports.useSignRawHash=()=>{let{user:a}=i.usePrivyContext(),{privy:s}=t.usePrivyInternal(),{signWithUserSigner:l}=n.useSignWithUserSigner();return e.useMemo((()=>({async signRawHash({address:e,chainType:t,hash:n}){if(!a)throw Error("User must be authenticated before signing");let o=i.getAllPrivyWalletsForChainType(a,t).filter((e=>i.getIsUnifiedWallet(e))).find((r=>r.address===e));if(!o)throw Error("Wallet not found");let d=await r.rawSign(s,l,{wallet_id:o.id,params:{hash:n}});if(d.data&&"signature"in d.data&&"hex"===d.data.encoding)return{signature:d.data.signature};throw Error("Failed to sign")}})),[s,l,a])};
|