@privy-io/react-auth 3.10.2 → 3.10.3-beta-20260114184632
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/README.md +1 -1
- package/dist/cjs/AccountNotFoundScreen-CFp_LDgN.js +1 -0
- package/dist/cjs/Address-sGCGyhkc.js +17 -0
- package/dist/cjs/AffirmativeConsentScreen-WzFDmVhJ.js +6 -0
- package/dist/cjs/AllowlistRejectionScreen-DTKtO-DD.js +1 -0
- package/dist/cjs/AuthenticateWithWalletScreen-BKk7VLE8.js +1 -0
- package/dist/cjs/AwaitingEvmToSolBridgingScreen-CnJTu8WP.js +2 -0
- package/dist/cjs/AwaitingExternalEthereumTransferScreen-DfjEgNNE.js +2 -0
- package/dist/cjs/AwaitingPasswordlessCodeScreen-ByCcwgc9.js +103 -0
- package/dist/cjs/AwaitingSolToEvmBridgingScreen-lwZMPiPt.js +2 -0
- package/dist/cjs/BridgeNetworkSelectionView-Cv4a7tlS.js +69 -0
- package/dist/cjs/CaptchaScreen-Coy9y9Dt.js +1 -0
- package/dist/cjs/Checkbox-DzxHC5tk.js +53 -0
- package/dist/cjs/Chip-C6r7fZiR.js +26 -0
- package/dist/cjs/CoinbaseOnrampStatusScreen-Dd23d12D.js +16 -0
- package/dist/cjs/Column-D8_5wTPp.js +4 -0
- package/dist/cjs/ConnectEmailForm-QFaLejon.js +3 -0
- package/dist/cjs/ConnectLedgerScreen-Df04b1cC.js +9 -0
- package/dist/cjs/ConnectOnlyLandingScreen-B6VLIXOS.js +1 -0
- package/dist/cjs/ConnectOnlyStatusScreen-D7XLtsG_.js +1 -0
- package/dist/cjs/ConnectOrCreateScreen-CrIE1Bpd.js +1 -0
- package/dist/cjs/ConnectPhoneForm-BiNLsYIe.js +97 -0
- package/dist/cjs/ConnectWalletView-Drxnos9P.js +171 -0
- package/dist/cjs/ConnectionStatusScreen-Bp_FB60P.js +7 -0
- package/dist/cjs/CopyToClipboard-BCe_l6_D.js +39 -0
- package/dist/cjs/CrossAppAuthScreen-Dt_QlqkI.js +1 -0
- package/dist/cjs/CustomLandingScreenView-Bn-rZ9OM.js +23 -0
- package/dist/cjs/DelegatedActionsConsentScreen-CueCcRF0.js +1 -0
- package/dist/cjs/DelegatedActionsRevokeScreen-BDxwAgma.js +1 -0
- package/dist/cjs/EmailInputForm-Y-nHsEtF.js +134 -0
- package/dist/cjs/EmbeddedWalletConnectingScreen-S_YmMgw1.js +1 -0
- package/dist/cjs/EmbeddedWalletCreatedScreen-CUuXPumZ.js +1 -0
- package/dist/cjs/EmbeddedWalletKeyExportScreen-Chajx_gR.js +40 -0
- package/dist/cjs/EmbeddedWalletOnAccountCreateScreen-BrnInKZg.js +1 -0
- package/dist/cjs/EmbeddedWalletPasswordUpdateScreen-CHgt4Cpz.js +1 -0
- package/dist/cjs/EmbeddedWalletPasswordUpdateSplashScreen-BSDqsF9I.js +1 -0
- package/dist/cjs/EnrollTotp-BiLiah9_.js +65 -0
- package/dist/cjs/ErrorBanner-dOLclNms.js +15 -0
- package/dist/cjs/ErrorMessage-BfTVyue9.js +8 -0
- package/dist/cjs/ErrorScreen-CLDc3zkk.js +4 -0
- package/dist/cjs/FarcasterConnectStatusScreen-OT6U4jSS.js +76 -0
- package/dist/cjs/FarcasterSignerStatusScreen-DrghyPCY.js +29 -0
- package/dist/cjs/FundSolWalletWithExternalSolanaWallet-PDN3mJLi.js +2 -0
- package/dist/cjs/{FundWalletMethodHeader-D2b7Summ.js → FundWalletMethodHeader-nCgaeKCp.js} +1 -1
- package/dist/cjs/FundingEditAmountScreen-BCTWQKaE.js +1 -0
- package/dist/cjs/FundingMethodSelectionScreen-CX6rDvdn.js +1 -0
- package/dist/cjs/InAppBrowserLoginNotPossible-IQczeHQ0.js +1 -0
- package/dist/cjs/InfoBanner-C15hE_sj.js +15 -0
- package/dist/cjs/InstallWalletScreen-BES1BH6i.js +1 -0
- package/dist/cjs/JsonTree-C28xtYM0.js +34 -0
- package/dist/cjs/LabelXs-C8rLnCfU.js +6 -0
- package/dist/cjs/LandingScreen-C4x5M7lY.js +1 -0
- package/dist/cjs/Layouts-D3TOcPhm.js +77 -0
- package/dist/cjs/Link-BdtTp2J4.js +36 -0
- package/dist/cjs/LinkConflictScreen-D_GbnHgP.js +79 -0
- package/dist/cjs/LinkEmailScreen-eVzagPdn.js +1 -0
- package/dist/cjs/LinkPasskeyScreen-4PiBXcP4.js +105 -0
- package/dist/cjs/LinkPhoneScreen-BLWYYGG4.js +1 -0
- package/dist/cjs/LoadingSkeleton-BoyADunQ.js +17 -0
- package/dist/cjs/LoginFailedScreen-Kk3ld4XL.js +1 -0
- package/dist/cjs/ManualTransferScreen-CyGojdRz.js +1 -0
- package/dist/cjs/MfaAuthEnrollmentFlowScreen-CvkqxKaE.js +1 -0
- package/dist/cjs/MfaAuthVerifyFlowScreen-CWe6Me8c.js +1 -0
- package/dist/cjs/MfaEnrollmentFlowScreen-C2g7fKjW.js +1 -0
- package/dist/cjs/MfaVerifyFlowScreen-DYRcGxSQ.js +1 -0
- package/dist/cjs/ModalHeader-B7uEyMtS.js +375 -0
- package/dist/cjs/MoonpayStatusScreen-BQQdwCjd.js +16 -0
- package/dist/cjs/OAuthStatusScreen-DQ5ZG6VD.js +1 -0
- package/dist/cjs/OpenLink-L5LZ-pEm.js +39 -0
- package/dist/cjs/PasskeySelectSignupOrLogin-pyaTzFWE.js +1 -0
- package/dist/cjs/PasskeyStatusScreen-DkCMSG59.js +3 -0
- package/dist/cjs/PasswordRecoveryScreen-7d0Isy2l.js +20 -0
- package/dist/cjs/PinInput-BYcL69BS.js +245 -0
- package/dist/cjs/{QrCode-DWvu0AHR.js → QrCode-DaOFittB.js} +16 -2
- package/dist/cjs/RecoveryOAuthStatusScreen-2pW1Vred.js +1 -0
- package/dist/cjs/RecoveryPasswordCreateScreen-Bxev2B0N.js +1 -0
- package/dist/cjs/RecoverySelectionScreen-CMdGL6rt.js +7 -0
- package/dist/cjs/Row-CMqYn75Q.js +11 -0
- package/dist/cjs/Screen-BzR4Wvob.js +174 -0
- package/dist/cjs/ScreenHeader-CgYJ5Fmg.js +32 -0
- package/dist/cjs/ScreenLayout-CqDx0NVp.js +1 -0
- package/dist/cjs/SetAutomaticRecoveryScreen-BmI7e3-r.js +14 -0
- package/dist/cjs/SetWalletPasswordForm-CS7qpcRD.js +12 -0
- package/dist/cjs/SignRequestScreen-DFNg5Ubk.js +26 -0
- package/dist/cjs/StackedContainer-CM36po_U.js +24 -0
- package/dist/cjs/StandardSignAndSendTransactionScreen-DS2t3G9i.js +20 -0
- package/dist/cjs/Subtitle-CR8zM7ZJ.js +13 -0
- package/dist/cjs/TelegramAuthScreen-BOwb89AD.js +1 -0
- package/dist/cjs/Title-ifTy35V5.js +7 -0
- package/dist/cjs/TodoList-Cii_KrAk.js +37 -0
- package/dist/cjs/TransactionDetails-BWKvUwzE.js +111 -0
- package/dist/cjs/TransactionErrorView-BoTvqhAE.js +166 -0
- package/dist/cjs/TransferFromWalletScreen-AKqXh55F.js +31 -0
- package/dist/cjs/TransferOrBridgeLoadingScreen-D7kfL2vk.js +6 -0
- package/dist/cjs/UpdateEmailScreen-sNJfh2nB.js +1 -0
- package/dist/cjs/UpdatePhoneScreen-CHU1YpeA.js +1 -0
- package/dist/cjs/UserLimitReachedScreen-fVTJvmXH.js +1 -0
- package/dist/cjs/Value-mhPsfsxe.js +17 -0
- package/dist/cjs/WalletInfoCard-BzIfwvCP.js +29 -0
- package/dist/cjs/WalletInterstitialScreen-y7edCI6T.js +1 -0
- package/dist/cjs/WalletLink-BmpkvKv0.js +22 -0
- package/dist/cjs/{WalletOverflowButton-4OUSs2qQ.js → WalletOverflowButton-DmC5CdZd.js} +1 -1
- package/dist/cjs/WarningBanner-COl_Q0K3.js +15 -0
- package/dist/cjs/abstract-smart-wallets.js +1 -1
- package/dist/cjs/{context-B6zndZbE.js → context-IqzniXAq.js} +1 -1
- package/dist/cjs/{ethers-BrWeKm_S.js → ethers-CZuQlBPr.js} +1 -1
- package/dist/cjs/extended-chains.js +1 -1
- package/dist/cjs/{get-is-unified-wallet-CYQvifpN.js → get-is-unified-wallet-BwlWPkHl.js} +1 -1
- package/dist/cjs/{index-DBN8rlPN.js → index-B-S6swyb.js} +1 -1
- package/dist/cjs/index-BrxKEbvC.js +12 -0
- package/dist/cjs/index-ByFhjjzH.js +70 -0
- package/dist/cjs/{index-xKFTBD9J.js → index-CBTLa0i6.js} +173 -4
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/internal.js +1 -1
- package/dist/cjs/{prepareFundingModalData-DKaL1Oqz.js → prepareFundingModalData-DKREog6-.js} +1 -1
- package/dist/cjs/shared-DBm7PUrg.js +18 -0
- package/dist/cjs/shared-DjGfeMmp.js +180 -0
- package/dist/cjs/{shouldProceedtoEmbeddedWalletCreationFlow-Brj0fZpr.js → shouldProceedtoEmbeddedWalletCreationFlow-D0wAi2Kl.js} +1 -1
- package/dist/cjs/{smart-wallets-DSBosnGS.js → smart-wallets-D6QLSwQH.js} +1 -1
- package/dist/cjs/smart-wallets.js +1 -1
- package/dist/cjs/solana.js +1 -1
- package/dist/cjs/styles-CQnB5gHS.js +9 -0
- package/dist/cjs/styles-DCbBiowW.js +93 -0
- package/dist/cjs/to-ui-error-g4VEWWOJ.js +4 -0
- package/dist/cjs/ui.js +294 -2
- package/dist/cjs/{use-create-wallet-without-fallback-DOZsyElA.js → use-create-wallet-without-fallback-Dk8cTWSK.js} +1 -1
- package/dist/cjs/{use-export-wallet-DYcsnUD8.js → use-export-wallet-KPO6Pr-R.js} +1 -1
- package/dist/cjs/useActiveWallet-BHhh9pvE.js +185 -0
- package/dist/cjs/{useGetTokenPrice-tWpOVbJz.js → useGetTokenPrice-WJc324FY.js} +1 -1
- package/dist/cjs/{useI18n-5bG-Cpbl.js → useI18n-BIjz-pYW.js} +1 -1
- package/dist/cjs/{usePrivy-DZJwQPwT.js → usePrivy-MrglhP1w.js} +1 -1
- package/dist/cjs/{useSolanaRpcClient-CEhNB-sj.js → useSolanaRpcClient-CL9O6_Il.js} +1 -1
- package/dist/cjs/{useWallets-DXi6lmEg.js → useWallets-BHfhVm7f.js} +1 -1
- package/dist/cjs/{useWallets-CMRZ0IEw.js → useWallets-S5iEGa0B.js} +1 -1
- package/dist/dts/index.d.mts +6793 -23
- package/dist/dts/index.d.ts +6793 -23
- package/dist/esm/AccountNotFoundScreen-C0Rx-x3k.mjs +1 -0
- package/dist/esm/Address-Ukdn-U5q.mjs +17 -0
- package/dist/esm/AffirmativeConsentScreen-CWkLX3F4.mjs +6 -0
- package/dist/esm/AllowlistRejectionScreen-B07JVw1T.mjs +1 -0
- package/dist/esm/AuthenticateWithWalletScreen-CjMr1_EL.mjs +1 -0
- package/dist/esm/AwaitingEvmToSolBridgingScreen-CpZuZHeq.mjs +2 -0
- package/dist/esm/AwaitingExternalEthereumTransferScreen-BGHke7Rs.mjs +2 -0
- package/dist/esm/AwaitingPasswordlessCodeScreen-DCie9Zju.mjs +103 -0
- package/dist/esm/AwaitingSolToEvmBridgingScreen-D-DkpNdi.mjs +2 -0
- package/dist/esm/BridgeNetworkSelectionView-BFuh4jVb.mjs +69 -0
- package/dist/esm/CaptchaScreen-DxR0pfN_.mjs +1 -0
- package/dist/esm/Checkbox-BhNoOKjX.mjs +53 -0
- package/dist/esm/Chip-D2-wZOHJ.mjs +26 -0
- package/dist/esm/CoinbaseOnrampStatusScreen-DN_jB5lq.mjs +16 -0
- package/dist/esm/Column-C2X2MHYX.mjs +4 -0
- package/dist/esm/ConnectEmailForm-C57bKwLw.mjs +3 -0
- package/dist/esm/ConnectLedgerScreen-BIsP34Nn.mjs +9 -0
- package/dist/esm/ConnectOnlyLandingScreen-CYtkD_n9.mjs +1 -0
- package/dist/esm/ConnectOnlyStatusScreen-Cc7BBeil.mjs +1 -0
- package/dist/esm/ConnectOrCreateScreen-BIFcMCKI.mjs +1 -0
- package/dist/esm/ConnectPhoneForm-C_9S31Oj.mjs +97 -0
- package/dist/esm/ConnectWalletView-Ch99Ykg_.mjs +171 -0
- package/dist/esm/ConnectionStatusScreen-DeMJtCKm.mjs +7 -0
- package/dist/esm/CopyToClipboard-BGTSFnT3.mjs +39 -0
- package/dist/esm/CrossAppAuthScreen-C2zdngLm.mjs +1 -0
- package/dist/esm/CustomLandingScreenView-BHs7UaPi.mjs +23 -0
- package/dist/esm/DelegatedActionsConsentScreen-CNSeblHO.mjs +1 -0
- package/dist/esm/DelegatedActionsRevokeScreen-DjEdarFM.mjs +1 -0
- package/dist/esm/EmailInputForm-Dgoii4vf.mjs +134 -0
- package/dist/esm/EmbeddedWalletConnectingScreen-DInOqtGM.mjs +1 -0
- package/dist/esm/EmbeddedWalletCreatedScreen-BqE555jo.mjs +1 -0
- package/dist/esm/EmbeddedWalletKeyExportScreen-C8ztzWA_.mjs +40 -0
- package/dist/esm/EmbeddedWalletOnAccountCreateScreen-DfzT7-uX.mjs +1 -0
- package/dist/esm/EmbeddedWalletPasswordUpdateScreen-D-PyW0ed.mjs +1 -0
- package/dist/esm/EmbeddedWalletPasswordUpdateSplashScreen-r3HbYE56.mjs +1 -0
- package/dist/esm/EnrollTotp-D_6CsH1-.mjs +65 -0
- package/dist/esm/ErrorBanner-CQERa7bL.mjs +15 -0
- package/dist/esm/ErrorMessage-D8VaAP5m.mjs +8 -0
- package/dist/esm/ErrorScreen-CQAqxIDK.mjs +4 -0
- package/dist/esm/FarcasterConnectStatusScreen-NvnfgAYs.mjs +75 -0
- package/dist/esm/FarcasterSignerStatusScreen-D_B8rwSC.mjs +28 -0
- package/dist/esm/FundSolWalletWithExternalSolanaWallet-CttQ83lN.mjs +1 -0
- package/dist/esm/{FundWalletMethodHeader-C0uPKdYw.mjs → FundWalletMethodHeader-BrnPYIin.mjs} +1 -1
- package/dist/esm/FundingEditAmountScreen-BAwYITGR.mjs +1 -0
- package/dist/esm/FundingMethodSelectionScreen-qm7OXA_Z.mjs +1 -0
- package/dist/esm/InAppBrowserLoginNotPossible-SdfDBhdN.mjs +1 -0
- package/dist/esm/InfoBanner-Dk1KghcK.mjs +15 -0
- package/dist/esm/InstallWalletScreen-8PCok8M6.mjs +1 -0
- package/dist/esm/JsonTree-aPaJmPx7.mjs +34 -0
- package/dist/esm/LabelXs-oqZNqbm_.mjs +6 -0
- package/dist/esm/LandingScreen-BygnOMOS.mjs +1 -0
- package/dist/esm/Layouts-BlFm53ED.mjs +77 -0
- package/dist/esm/Link-DJ5gq9Di.mjs +36 -0
- package/dist/esm/LinkConflictScreen-D2O-xjNh.mjs +79 -0
- package/dist/esm/LinkEmailScreen-OuDZOnOc.mjs +1 -0
- package/dist/esm/LinkPasskeyScreen-CgKBoENR.mjs +105 -0
- package/dist/esm/LinkPhoneScreen-CfMG1kdw.mjs +1 -0
- package/dist/esm/LoadingSkeleton-U6-3yFwI.mjs +17 -0
- package/dist/esm/LoginFailedScreen-CzmGwWPk.mjs +1 -0
- package/dist/esm/ManualTransferScreen-BWKuqVE_.mjs +1 -0
- package/dist/esm/MfaAuthEnrollmentFlowScreen-KjdBU7D3.mjs +1 -0
- package/dist/esm/MfaAuthVerifyFlowScreen-DqlDmjDi.mjs +1 -0
- package/dist/esm/MfaEnrollmentFlowScreen-B9zhamSa.mjs +1 -0
- package/dist/esm/MfaVerifyFlowScreen-CehrulL_.mjs +1 -0
- package/dist/esm/ModalHeader-DS6bUzfI.mjs +375 -0
- package/dist/esm/MoonpayStatusScreen-3k04Iocn.mjs +16 -0
- package/dist/esm/OAuthStatusScreen-BTDsQCc7.mjs +1 -0
- package/dist/esm/OpenLink-DZHy38vr.mjs +39 -0
- package/dist/esm/PasskeySelectSignupOrLogin-zvXjQsxM.mjs +1 -0
- package/dist/esm/PasskeyStatusScreen-5zeTchG-.mjs +3 -0
- package/dist/esm/PasswordRecoveryScreen-D_TaaklH.mjs +20 -0
- package/dist/esm/PinInput-COuxKnJl.mjs +245 -0
- package/dist/esm/QrCode-C6yHVlNC.mjs +16 -0
- package/dist/esm/RecoveryOAuthStatusScreen-BwNNAyPZ.mjs +1 -0
- package/dist/esm/RecoveryPasswordCreateScreen-B9D-e4gt.mjs +1 -0
- package/dist/esm/RecoverySelectionScreen-c1fwzgsI.mjs +7 -0
- package/dist/esm/Row-C9vrS4Zi.mjs +11 -0
- package/dist/esm/Screen-Ced2RY7C.mjs +173 -0
- package/dist/esm/ScreenHeader-CHmc4-Lu.mjs +32 -0
- package/dist/esm/ScreenLayout-MTddPyq4.mjs +1 -0
- package/dist/esm/SetAutomaticRecoveryScreen-CBD9xS5x.mjs +14 -0
- package/dist/esm/SetWalletPasswordForm-DlDCk11R.mjs +12 -0
- package/dist/esm/SignRequestScreen-CEff6Ns6.mjs +26 -0
- package/dist/esm/StackedContainer-B2vaEl56.mjs +24 -0
- package/dist/esm/StandardSignAndSendTransactionScreen-CYuWadqn.mjs +20 -0
- package/dist/esm/Subtitle-CV-2yKE4.mjs +13 -0
- package/dist/esm/TelegramAuthScreen-B1AooM9Z.mjs +1 -0
- package/dist/esm/Title-BnzYV3Is.mjs +7 -0
- package/dist/esm/TodoList-CgrU7uwu.mjs +37 -0
- package/dist/esm/TransactionDetails-B2SQo46t.mjs +111 -0
- package/dist/esm/TransactionErrorView-DzJQsuCT.mjs +166 -0
- package/dist/esm/TransferFromWalletScreen-DndP_6_2.mjs +31 -0
- package/dist/esm/TransferOrBridgeLoadingScreen-fkZOAyag.mjs +6 -0
- package/dist/esm/UpdateEmailScreen-DGfWLp_f.mjs +1 -0
- package/dist/esm/UpdatePhoneScreen-Bs4txbhY.mjs +1 -0
- package/dist/esm/UserLimitReachedScreen-DyQ-_jbj.mjs +1 -0
- package/dist/esm/Value-tcJV9e0L.mjs +17 -0
- package/dist/esm/WalletInfoCard-e3HUZrJD.mjs +29 -0
- package/dist/esm/WalletInterstitialScreen-C28lOP45.mjs +1 -0
- package/dist/esm/WalletLink-ByKKJVxX.mjs +22 -0
- package/dist/esm/{WalletOverflowButton-yerFFdMA.mjs → WalletOverflowButton-yQpq7u7H.mjs} +1 -1
- package/dist/esm/WarningBanner-c8L53pJ2.mjs +15 -0
- package/dist/esm/abstract-smart-wallets.mjs +1 -1
- package/dist/esm/context-B2_ynXJ0.mjs +1 -0
- package/dist/esm/{ethers-CUqPIRrW.mjs → ethers-DhF11eoU.mjs} +1 -1
- package/dist/esm/extended-chains.mjs +1 -1
- package/dist/esm/{get-is-unified-wallet-GLvRyJlT.mjs → get-is-unified-wallet-BGYgYz7O.mjs} +1 -1
- package/dist/esm/{index-B24hEnAn.mjs → index-Bn7dGnWc.mjs} +174 -5
- package/dist/esm/index-BxPRrtPN.mjs +12 -0
- package/dist/esm/{index-DT54fwyL.mjs → index-C2EmpV_Y.mjs} +1 -1
- package/dist/esm/index-Dq_xe9dz.mjs +70 -0
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/internal.mjs +1 -1
- package/dist/esm/{prepareFundingModalData-lYYA8ZfI.mjs → prepareFundingModalData-D3TrJtDq.mjs} +1 -1
- package/dist/esm/shared-CLyIdiQR.mjs +180 -0
- package/dist/esm/shared-FM0rljBt.mjs +18 -0
- package/dist/esm/{shouldProceedtoEmbeddedWalletCreationFlow-F4FtZ8gq.mjs → shouldProceedtoEmbeddedWalletCreationFlow-m8h36rvg.mjs} +1 -1
- package/dist/esm/{smart-wallets-Bk5LCXUu.mjs → smart-wallets-D-LwyhUx.mjs} +1 -1
- package/dist/esm/smart-wallets.mjs +1 -1
- package/dist/esm/solana.mjs +1 -1
- package/dist/esm/styles-BsotlekN.mjs +9 -0
- package/dist/esm/styles-Y2DUk2QG.mjs +93 -0
- package/dist/esm/to-ui-error-BpLGZ-Fa.mjs +4 -0
- package/dist/esm/ui.mjs +294 -2
- package/dist/esm/{use-create-wallet-without-fallback-DCFiaOUd.mjs → use-create-wallet-without-fallback-Buo4pfnh.mjs} +1 -1
- package/dist/esm/{use-export-wallet-BSyJ6wXH.mjs → use-export-wallet-DDHzLkCv.mjs} +1 -1
- package/dist/esm/useActiveWallet-C7hnsvNI.mjs +185 -0
- package/dist/esm/{useGetTokenPrice-DOgFQ9vL.mjs → useGetTokenPrice-CHFvCH9a.mjs} +1 -1
- package/dist/esm/{useI18n-BotQj3s2.mjs → useI18n-KQ8uDgHJ.mjs} +1 -1
- package/dist/esm/{usePrivy-C5z76Qhs.mjs → usePrivy-C9lIPcEH.mjs} +1 -1
- package/dist/esm/{useSolanaRpcClient-BMkY8W80.mjs → useSolanaRpcClient-BrExUDbp.mjs} +1 -1
- package/dist/esm/{useWallets-CHDUUIx3.mjs → useWallets-BR9wOB7Y.mjs} +1 -1
- package/dist/esm/{useWallets-Aw21dxK9.mjs → useWallets-Djv8Lbsf.mjs} +1 -1
- package/package.json +31 -31
- package/dist/cjs/AccountNotFoundScreen-CccXh5Ow.js +0 -1
- package/dist/cjs/Address-szbhr3eZ.js +0 -1
- package/dist/cjs/AffirmativeConsentScreen-DmfPpl2i.js +0 -1
- package/dist/cjs/AllowlistRejectionScreen-B75b3HjF.js +0 -1
- package/dist/cjs/AuthenticateWithWalletScreen-CMdBkn5P.js +0 -1
- package/dist/cjs/AwaitingEvmToSolBridgingScreen-zqMa3M-c.js +0 -2
- package/dist/cjs/AwaitingExternalEthereumTransferScreen-Tm1ncf9g.js +0 -2
- package/dist/cjs/AwaitingPasswordlessCodeScreen-DSJA4ZJF.js +0 -1
- package/dist/cjs/AwaitingSolToEvmBridgingScreen-Wrz0ccTo.js +0 -2
- package/dist/cjs/BridgeNetworkSelectionView-CfUjmKJ-.js +0 -1
- package/dist/cjs/Button-CyX7JNsa.js +0 -2
- package/dist/cjs/CaptchaScreen-MhvzUgNQ.js +0 -1
- package/dist/cjs/Checkbox-DXPQZFlQ.js +0 -1
- package/dist/cjs/Chip-ChrHHazc.js +0 -1
- package/dist/cjs/CoinbaseOnrampStatusScreen-BhR230ZS.js +0 -1
- package/dist/cjs/Column-C2bAbJE0.js +0 -1
- package/dist/cjs/ConnectEmailForm-BSkD5EKc.js +0 -1
- package/dist/cjs/ConnectLedgerScreen-BvlmHoA3.js +0 -1
- package/dist/cjs/ConnectOnlyLandingScreen-nbPM7web.js +0 -1
- package/dist/cjs/ConnectOnlyStatusScreen-C2Wl0jxa.js +0 -1
- package/dist/cjs/ConnectOrCreateScreen-CtzSeQ-J.js +0 -1
- package/dist/cjs/ConnectPhoneForm-BYlpF5oC.js +0 -1
- package/dist/cjs/ConnectWalletView-O70yBQFu.js +0 -1
- package/dist/cjs/ConnectionStatusScreen-DML_ZDfW.js +0 -1
- package/dist/cjs/CopyToClipboard-fd8Z3kQX.js +0 -1
- package/dist/cjs/CrossAppAuthScreen-Dz6PZNOw.js +0 -1
- package/dist/cjs/CustomLandingScreenView-CBW3Yr3o.js +0 -2
- package/dist/cjs/DelegatedActionsConsentScreen-CN5Y30M4.js +0 -1
- package/dist/cjs/DelegatedActionsRevokeScreen-CMkHii4b.js +0 -1
- package/dist/cjs/EmailInputForm-tjrhBacA.js +0 -1
- package/dist/cjs/EmbeddedWalletConnectingScreen-SBfyKPRv.js +0 -1
- package/dist/cjs/EmbeddedWalletCreatedScreen-sMHJGzfv.js +0 -1
- package/dist/cjs/EmbeddedWalletKeyExportScreen-C5uNOzfr.js +0 -2
- package/dist/cjs/EmbeddedWalletOnAccountCreateScreen-B84q1xGE.js +0 -1
- package/dist/cjs/EmbeddedWalletPasswordUpdateScreen-CxeydwO6.js +0 -1
- package/dist/cjs/EmbeddedWalletPasswordUpdateSplashScreen-BVc-qFqk.js +0 -1
- package/dist/cjs/EnrollTotp-DQKYLdAQ.js +0 -1
- package/dist/cjs/ErrorBanner-CMjaobRI.js +0 -1
- package/dist/cjs/ErrorMessage-f0cRWc29.js +0 -1
- package/dist/cjs/ErrorScreen-MrSIGio_.js +0 -1
- package/dist/cjs/FarcasterConnectStatusScreen-BYDqDWAC.js +0 -2
- package/dist/cjs/FarcasterSignerStatusScreen-Bik8wrMR.js +0 -2
- package/dist/cjs/FundSolWalletWithExternalSolanaWallet-CUYnW9m7.js +0 -2
- package/dist/cjs/FundingEditAmountScreen-BNL_9NSc.js +0 -1
- package/dist/cjs/FundingMethodSelectionScreen-pjtPGWB4.js +0 -1
- package/dist/cjs/InAppBrowserLoginNotPossible-BDP_0K6U.js +0 -1
- package/dist/cjs/InfoBanner-CTx1eRnV.js +0 -1
- package/dist/cjs/InstallWalletScreen-DatnwQ5S.js +0 -1
- package/dist/cjs/JsonTree-xaeo0q6z.js +0 -1
- package/dist/cjs/LabelXs-CYMv6rOZ.js +0 -1
- package/dist/cjs/LandingScreen-PhSFsQAW.js +0 -1
- package/dist/cjs/Layouts-dRL0OSpp.js +0 -1
- package/dist/cjs/Link-DmzPZ_M7.js +0 -1
- package/dist/cjs/LinkConflictScreen-DhG3p7sJ.js +0 -1
- package/dist/cjs/LinkEmailScreen-nUhaHOKN.js +0 -1
- package/dist/cjs/LinkPasskeyScreen-n7IJuNlF.js +0 -1
- package/dist/cjs/LinkPhoneScreen-Dek16_Y5.js +0 -1
- package/dist/cjs/LoadingSkeleton-DoCrfGnl.js +0 -1
- package/dist/cjs/LoginFailedScreen-Du15IoL5.js +0 -1
- package/dist/cjs/ManualTransferScreen-CBWn4JvN.js +0 -1
- package/dist/cjs/MfaAuthEnrollmentFlowScreen-BT0TbVv2.js +0 -1
- package/dist/cjs/MfaAuthVerifyFlowScreen-CRQ4FiuC.js +0 -1
- package/dist/cjs/MfaEnrollmentFlowScreen-CqRzU9XV.js +0 -1
- package/dist/cjs/MfaVerifyFlowScreen-BDOehbLb.js +0 -1
- package/dist/cjs/ModalHeader-D9UKo-3h.js +0 -3
- package/dist/cjs/MoonpayStatusScreen-CdZgJRrM.js +0 -1
- package/dist/cjs/OAuthStatusScreen-CIma0mu9.js +0 -1
- package/dist/cjs/OpenLink-BpCUf9iR.js +0 -1
- package/dist/cjs/PasskeySelectSignupOrLogin-D1NqVZW7.js +0 -1
- package/dist/cjs/PasskeyStatusScreen-Q0ehEMbT.js +0 -1
- package/dist/cjs/PasswordRecoveryScreen-C3g17CVW.js +0 -1
- package/dist/cjs/PinInput-DSI6rjOn.js +0 -1
- package/dist/cjs/RecoveryOAuthStatusScreen-DN0I--HN.js +0 -1
- package/dist/cjs/RecoveryPasswordCreateScreen-BAAoBkhn.js +0 -1
- package/dist/cjs/RecoverySelectionScreen-Chnml1GU.js +0 -1
- package/dist/cjs/Row-CxDF-VMy.js +0 -1
- package/dist/cjs/Screen-Cjd8kgCg.js +0 -9
- package/dist/cjs/ScreenHeader-CyURV6Ti.js +0 -2
- package/dist/cjs/ScreenLayout-0BeoRza6.js +0 -1
- package/dist/cjs/SetAutomaticRecoveryScreen-C82NF48g.js +0 -1
- package/dist/cjs/SetWalletPasswordForm-CwwM_HsZ.js +0 -2
- package/dist/cjs/SignRequestScreen-CN-YxEIW.js +0 -1
- package/dist/cjs/StackedContainer-ByB6Mdu0.js +0 -1
- package/dist/cjs/StandardSignAndSendTransactionScreen-BWqXsnZ-.js +0 -1
- package/dist/cjs/Subtitle-Dtmrw8l5.js +0 -1
- package/dist/cjs/TelegramAuthScreen-JINnIb1q.js +0 -1
- package/dist/cjs/Title-C-tHJvrb.js +0 -1
- package/dist/cjs/TodoList-Cm_a93ef.js +0 -2
- package/dist/cjs/TransactionDetails-DHxuRDQm.js +0 -3
- package/dist/cjs/TransactionErrorView-DV1Rbaza.js +0 -2
- package/dist/cjs/TransferFromWalletScreen-D1RGQm-9.js +0 -1
- package/dist/cjs/TransferOrBridgeLoadingScreen-0auJk1V_.js +0 -1
- package/dist/cjs/UpdateEmailScreen-CjEQsyJ6.js +0 -1
- package/dist/cjs/UpdatePhoneScreen-66qCevzc.js +0 -1
- package/dist/cjs/UserLimitReachedScreen-OwK_WZiy.js +0 -1
- package/dist/cjs/Value-C-XtZyFa.js +0 -1
- package/dist/cjs/WalletInfoCard-BgUUNBb1.js +0 -1
- package/dist/cjs/WalletInterstitialScreen-BMQau9a_.js +0 -1
- package/dist/cjs/WalletLink-B8qg2sNq.js +0 -3
- package/dist/cjs/WarningBanner-B_Gs_15p.js +0 -1
- package/dist/cjs/index-CRFXS9pP.js +0 -1
- package/dist/cjs/index-JLbo6ZA0.js +0 -1
- package/dist/cjs/shared-BPGwTh8c.js +0 -1
- package/dist/cjs/shared-DAxDIdOV.js +0 -1
- package/dist/cjs/styles-Ca_DS00a.js +0 -1
- package/dist/cjs/styles-D4VeJNv1.js +0 -1
- package/dist/cjs/to-ui-error-3msE736K.js +0 -1
- package/dist/cjs/useActiveWallet-uEEQi70o.js +0 -1
- package/dist/esm/AccountNotFoundScreen-BANDQZGv.mjs +0 -1
- package/dist/esm/Address-C2aXxM2N.mjs +0 -1
- package/dist/esm/AffirmativeConsentScreen-CFZO2H5q.mjs +0 -1
- package/dist/esm/AllowlistRejectionScreen-DBeGUmgt.mjs +0 -1
- package/dist/esm/AuthenticateWithWalletScreen-ZM6DZFh1.mjs +0 -1
- package/dist/esm/AwaitingEvmToSolBridgingScreen-8IBtNu5_.mjs +0 -2
- package/dist/esm/AwaitingExternalEthereumTransferScreen-BN4n273Y.mjs +0 -2
- package/dist/esm/AwaitingPasswordlessCodeScreen-BquZxC7l.mjs +0 -1
- package/dist/esm/AwaitingSolToEvmBridgingScreen-B0I6wDuo.mjs +0 -2
- package/dist/esm/BridgeNetworkSelectionView-BZmf7ayB.mjs +0 -1
- package/dist/esm/Button-3JMVXKiE.mjs +0 -2
- package/dist/esm/CaptchaScreen-Bnh-Gpgm.mjs +0 -1
- package/dist/esm/Checkbox-NmGCZeKL.mjs +0 -1
- package/dist/esm/Chip-Bsgj4Yc-.mjs +0 -1
- package/dist/esm/CoinbaseOnrampStatusScreen-_W6kQCwE.mjs +0 -1
- package/dist/esm/Column-DQ5Vw9t1.mjs +0 -1
- package/dist/esm/ConnectEmailForm-o04NTrIc.mjs +0 -1
- package/dist/esm/ConnectLedgerScreen-CQUW_48V.mjs +0 -1
- package/dist/esm/ConnectOnlyLandingScreen-BtemYXlu.mjs +0 -1
- package/dist/esm/ConnectOnlyStatusScreen-CN2kWiW2.mjs +0 -1
- package/dist/esm/ConnectOrCreateScreen-BC1JYHYR.mjs +0 -1
- package/dist/esm/ConnectPhoneForm-CK2ZaLcy.mjs +0 -1
- package/dist/esm/ConnectWalletView-D3ZQBnjF.mjs +0 -1
- package/dist/esm/ConnectionStatusScreen-BHg6K1gF.mjs +0 -1
- package/dist/esm/CopyToClipboard-DatKc59_.mjs +0 -1
- package/dist/esm/CrossAppAuthScreen-D1gqy4CI.mjs +0 -1
- package/dist/esm/CustomLandingScreenView-DOwh2oce.mjs +0 -2
- package/dist/esm/DelegatedActionsConsentScreen-C2p3P6bN.mjs +0 -1
- package/dist/esm/DelegatedActionsRevokeScreen-C4XKaajw.mjs +0 -1
- package/dist/esm/EmailInputForm-B4hjCxRU.mjs +0 -1
- package/dist/esm/EmbeddedWalletConnectingScreen-k-UW2In7.mjs +0 -1
- package/dist/esm/EmbeddedWalletCreatedScreen-D-5pbs0R.mjs +0 -1
- package/dist/esm/EmbeddedWalletKeyExportScreen-C35WVhPC.mjs +0 -2
- package/dist/esm/EmbeddedWalletOnAccountCreateScreen-BbhGfibt.mjs +0 -1
- package/dist/esm/EmbeddedWalletPasswordUpdateScreen-B3eyAAfe.mjs +0 -1
- package/dist/esm/EmbeddedWalletPasswordUpdateSplashScreen-D7wjWeB8.mjs +0 -1
- package/dist/esm/EnrollTotp-BE-JDa07.mjs +0 -1
- package/dist/esm/ErrorBanner-BdiArMwu.mjs +0 -1
- package/dist/esm/ErrorMessage-Cx8GKGhL.mjs +0 -1
- package/dist/esm/ErrorScreen-CR_0-6OL.mjs +0 -1
- package/dist/esm/FarcasterConnectStatusScreen-DcwiNT96.mjs +0 -1
- package/dist/esm/FarcasterSignerStatusScreen-DmELTB-0.mjs +0 -1
- package/dist/esm/FundSolWalletWithExternalSolanaWallet-BDy0ldlm.mjs +0 -1
- package/dist/esm/FundingEditAmountScreen-aSBCTHvs.mjs +0 -1
- package/dist/esm/FundingMethodSelectionScreen-BF0zdnRp.mjs +0 -1
- package/dist/esm/InAppBrowserLoginNotPossible-MMzbXP1G.mjs +0 -1
- package/dist/esm/InfoBanner-D6C6Bt8L.mjs +0 -1
- package/dist/esm/InstallWalletScreen-CrnAF_wK.mjs +0 -1
- package/dist/esm/JsonTree-Bvd2C29R.mjs +0 -1
- package/dist/esm/LabelXs-BOisBtqT.mjs +0 -1
- package/dist/esm/LandingScreen-DvQZRxAA.mjs +0 -1
- package/dist/esm/Layouts-Bmf8DxNP.mjs +0 -1
- package/dist/esm/Link-DwjLfHwW.mjs +0 -1
- package/dist/esm/LinkConflictScreen-CyCVN1lq.mjs +0 -1
- package/dist/esm/LinkEmailScreen-D5s-Ggjy.mjs +0 -1
- package/dist/esm/LinkPasskeyScreen-Br7W1Zmq.mjs +0 -1
- package/dist/esm/LinkPhoneScreen-DbRDyzwM.mjs +0 -1
- package/dist/esm/LoadingSkeleton-CHdaq3pb.mjs +0 -1
- package/dist/esm/LoginFailedScreen-B1tnBE4h.mjs +0 -1
- package/dist/esm/ManualTransferScreen-pFyGqOCu.mjs +0 -1
- package/dist/esm/MfaAuthEnrollmentFlowScreen-C8Pvz5fy.mjs +0 -1
- package/dist/esm/MfaAuthVerifyFlowScreen-CJEESJMU.mjs +0 -1
- package/dist/esm/MfaEnrollmentFlowScreen-DNMYRR9X.mjs +0 -1
- package/dist/esm/MfaVerifyFlowScreen-CzhmszLp.mjs +0 -1
- package/dist/esm/ModalHeader-B27O6soE.mjs +0 -3
- package/dist/esm/MoonpayStatusScreen-CzQ-mLP5.mjs +0 -1
- package/dist/esm/OAuthStatusScreen-D1IVqsCW.mjs +0 -1
- package/dist/esm/OpenLink-BpeNYBKs.mjs +0 -1
- package/dist/esm/PasskeySelectSignupOrLogin-CQUv5kpw.mjs +0 -1
- package/dist/esm/PasskeyStatusScreen-Co_LVG4x.mjs +0 -1
- package/dist/esm/PasswordRecoveryScreen-CKc7ZSJe.mjs +0 -1
- package/dist/esm/PinInput-C3_MNxMt.mjs +0 -1
- package/dist/esm/QrCode-CGBH7ZqU.mjs +0 -2
- package/dist/esm/RecoveryOAuthStatusScreen-Co_qik6B.mjs +0 -1
- package/dist/esm/RecoveryPasswordCreateScreen-DeZGEgr1.mjs +0 -1
- package/dist/esm/RecoverySelectionScreen-BOUh-dCZ.mjs +0 -1
- package/dist/esm/Row-CG0lSY5Z.mjs +0 -1
- package/dist/esm/Screen-Bj-1pwMI.mjs +0 -8
- package/dist/esm/ScreenHeader-Biz1wq02.mjs +0 -2
- package/dist/esm/ScreenLayout-Dp0ezg8Q.mjs +0 -1
- package/dist/esm/SetAutomaticRecoveryScreen-DqeQkzbI.mjs +0 -1
- package/dist/esm/SetWalletPasswordForm-D9WKtYos.mjs +0 -2
- package/dist/esm/SignRequestScreen-ClKQEiLC.mjs +0 -1
- package/dist/esm/StackedContainer-BrIQsdas.mjs +0 -1
- package/dist/esm/StandardSignAndSendTransactionScreen-COscrw9p.mjs +0 -1
- package/dist/esm/Subtitle-DkvfP2Ev.mjs +0 -1
- package/dist/esm/TelegramAuthScreen-DC1ppGbz.mjs +0 -1
- package/dist/esm/Title-D0pfZff-.mjs +0 -1
- package/dist/esm/TodoList-Dn0Qu-vv.mjs +0 -2
- package/dist/esm/TransactionDetails-BBNigCES.mjs +0 -3
- package/dist/esm/TransactionErrorView-DKnANlpi.mjs +0 -2
- package/dist/esm/TransferFromWalletScreen-DW25GKHH.mjs +0 -1
- package/dist/esm/TransferOrBridgeLoadingScreen-R7No-8Yr.mjs +0 -1
- package/dist/esm/UpdateEmailScreen-CXd8_t7z.mjs +0 -1
- package/dist/esm/UpdatePhoneScreen-B9pfgcCa.mjs +0 -1
- package/dist/esm/UserLimitReachedScreen-pxpwGSM-.mjs +0 -1
- package/dist/esm/Value-B4M62ove.mjs +0 -1
- package/dist/esm/WalletInfoCard-DFrqmXTc.mjs +0 -1
- package/dist/esm/WalletInterstitialScreen-BduifiaN.mjs +0 -1
- package/dist/esm/WalletLink-D5DTXYny.mjs +0 -3
- package/dist/esm/WarningBanner-BDp-QC9i.mjs +0 -1
- package/dist/esm/context-BqHnoxK5.mjs +0 -1
- package/dist/esm/index-5iW2YlYC.mjs +0 -1
- package/dist/esm/index-CJMgUOnw.mjs +0 -1
- package/dist/esm/shared-CtYf3O54.mjs +0 -1
- package/dist/esm/shared-RdgpdEMG.mjs +0 -1
- package/dist/esm/styles-BxA7nKxI.mjs +0 -1
- package/dist/esm/styles-DY17fuAX.mjs +0 -1
- package/dist/esm/to-ui-error-ySeuG-hJ.mjs +0 -1
- package/dist/esm/useActiveWallet-CBIiGG1k.mjs +0 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import{styled as t}from"styled-components";let i=t.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
justify-content: center;
|
|
5
|
+
align-items: center;
|
|
6
|
+
width: 100%;
|
|
7
|
+
height: 82px;
|
|
8
|
+
|
|
9
|
+
> div {
|
|
10
|
+
position: relative;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
> div > span {
|
|
14
|
+
position: absolute;
|
|
15
|
+
left: -41px;
|
|
16
|
+
top: -41px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
> div > :last-child {
|
|
20
|
+
position: absolute;
|
|
21
|
+
left: -19px;
|
|
22
|
+
top: -19px;
|
|
23
|
+
}
|
|
24
|
+
`;export{i as e};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import{jsxs as t,jsx as n,Fragment as e}from"react/jsx-runtime";import{useState as a,useMemo as r,useEffect as o}from"react";import{formatTokenAmount as i}from"@privy-io/js-sdk-core";import{a as s,u as c,j as l,g as d}from"./get-is-unified-wallet-BGYgYz7O.mjs";import{u}from"./context-B2_ynXJ0.mjs";import{u as m}from"./internal-context-e-Eni5bG.mjs";import{u as p}from"./useGetSolPrice-Cfm8o9C5.mjs";import{ErrorScreenView as f}from"./ErrorScreen-CQAqxIDK.mjs";import g from"@heroicons/react/24/outline/CheckCircleIcon";import{styled as h}from"styled-components";import{M as y,B as w,P as k}from"./ModalHeader-DS6bUzfI.mjs";import{R as b}from"./Layouts-BlFm53ED.mjs";import{C as v}from"./ScreenHeader-CHmc4-Lu.mjs";import{a as A,R as I}from"./Row-C9vrS4Zi.mjs";import{L as S,V as j}from"./Value-tcJV9e0L.mjs";import{S as C,W as T}from"./WalletLink-ByKKJVxX.mjs";import{e as O}from"./StackedContainer-B2vaEl56.mjs";import{Y as x}from"./useActiveWallet-C7hnsvNI.mjs";import{T as $,a as L}from"./TransactionErrorView-DzJQsuCT.mjs";import{g as E}from"./transaction-CnfuREWo.mjs";import{pipe as F,getCompiledTransactionMessageDecoder as _,decompileTransactionMessage as P,setTransactionMessageLifetimeUsingBlockhash as B,compileTransaction as J,getTransactionEncoder as W,getBase58Decoder as D,fetchAddressesForLookupTables as M}from"@solana/kit";import{a as R,f as q,s as U,b as H,u as V}from"./useSolanaRpcClient-BrExUDbp.mjs";import{D as z,T as Q,a as X,S as Y,A as G,R as K,J as N,g as Z}from"./getFormattedUsdFromLamports-B6EqSEho.mjs";import"viem";import"tinycolor2";import"ofetch";import"lucide-react";import"./index-Bn7dGnWc.mjs";import"uuid";import"jose";import"eventemitter3";import"./useWallets-Djv8Lbsf.mjs";import"./prepareFundingModalData-D3TrJtDq.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"react-device-detect";import"viem/utils";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-C9lIPcEH.mjs";import"./events-context-CI0iqAXA.mjs";import"@scure/base";import"zustand";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./getPublicClient-A9RSftUZ.mjs";import"js-cookie";import"./frame-CwE9r3cT.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-eEm9Olt_.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./reservoir-kvLjIrEo.mjs";import"./ScreenLayout-MTddPyq4.mjs";import"./Screen-Ced2RY7C.mjs";import"./index-Dq_xe9dz.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./LoadingSkeleton-U6-3yFwI.mjs";import"./ethers-DhF11eoU.mjs";import"@heroicons/react/24/outline";import"./ErrorMessage-D8VaAP5m.mjs";import"./LabelXs-oqZNqbm_.mjs";import"./Subtitle-CV-2yKE4.mjs";import"./Title-BnzYV3Is.mjs";import"./Address-Ukdn-U5q.mjs";import"./WalletInfoCard-e3HUZrJD.mjs";import"./shared-FM0rljBt.mjs";import"./Checkbox-BhNoOKjX.mjs";import"./ErrorBanner-CQERa7bL.mjs";import"@heroicons/react/24/outline/ExclamationCircleIcon";import"./WarningBanner-c8L53pJ2.mjs";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"@heroicons/react/24/outline/ClipboardDocumentCheckIcon";import"@heroicons/react/24/outline/ClipboardDocumentIcon";const tt=h.span`
|
|
2
|
+
&& {
|
|
3
|
+
width: 82px;
|
|
4
|
+
height: 82px;
|
|
5
|
+
border-width: 4px;
|
|
6
|
+
border-style: solid;
|
|
7
|
+
border-color: ${t=>t.color??"var(--privy-color-accent)"};
|
|
8
|
+
background-color: ${t=>t.color??"var(--privy-color-accent)"};
|
|
9
|
+
border-radius: 50%;
|
|
10
|
+
display: inline-block;
|
|
11
|
+
box-sizing: border-box;
|
|
12
|
+
}
|
|
13
|
+
`,nt=({instruction:e,fees:a,transactionInfo:r,solPrice:o,chain:i})=>/*#__PURE__*/t(A,{children:[r?.action&&/*#__PURE__*/t(I,{children:[/*#__PURE__*/n(S,{children:"Action"}),/*#__PURE__*/n(j,{children:r.action})]}),null!=e?.total&&/*#__PURE__*/t(I,{children:[/*#__PURE__*/n(S,{children:"Total"}),/*#__PURE__*/n(j,{children:e.total})]}),!e?.total&&null!=e?.amount&&/*#__PURE__*/t(I,{children:[/*#__PURE__*/n(S,{children:"Total"}),/*#__PURE__*/n(j,{children:/*#__PURE__*/n(C,{quantities:[e.amount,a],tokenPrice:o})})]}),/*#__PURE__*/t(I,{children:[/*#__PURE__*/n(S,{children:"Fees"}),/*#__PURE__*/n(j,{children:/*#__PURE__*/n(C,{quantities:[a],tokenPrice:o})})]}),e?.to&&/*#__PURE__*/t(I,{children:[/*#__PURE__*/n(S,{children:"To"}),/*#__PURE__*/n(j,{children:/*#__PURE__*/n(T,{walletAddress:e.to,chainId:i,chainType:"solana"})})]})]}),et=({fees:a,onClose:r,receiptHeader:o,receiptDescription:i,transactionInfo:s,solPrice:c,signOnly:l,instruction:d,chain:u})=>/*#__PURE__*/t(e,{children:[/*#__PURE__*/n(y,{onClose:r}),/*#__PURE__*/n(O,{style:{marginBottom:"16px"},children:/*#__PURE__*/t("div",{children:[/*#__PURE__*/n(tt,{color:"var(--privy-color-success-light)"}),/*#__PURE__*/n(g,{height:38,width:38,strokeWidth:2,stroke:"var(--privy-color-success)"})]})}),/*#__PURE__*/n(v,{title:o??`Transaction ${l?"signed":"complete"}!`,description:i??"You're all set."}),/*#__PURE__*/n(nt,{solPrice:c,instruction:d,fees:a,transactionInfo:s,chain:u}),/*#__PURE__*/n(x,{}),/*#__PURE__*/n(at,{loading:!1,onClick:r,children:"Close"}),/*#__PURE__*/n(b,{}),/*#__PURE__*/n(w,{})]});let at=h(k)`
|
|
14
|
+
&& {
|
|
15
|
+
margin-top: 24px;
|
|
16
|
+
}
|
|
17
|
+
transition:
|
|
18
|
+
color 350ms ease,
|
|
19
|
+
background-color 350ms ease;
|
|
20
|
+
`;async function rt(t,n){try{return await t}catch{return n}}function ot(t){switch(t){case"solana:mainnet":return"mainnet-beta";case"solana:devnet":return"devnet";case"solana:testnet":return"testnet"}}async function it({privyClient:t,chain:n,mint:e}){let a=z[n];if(!a[e]){let r=await t.getSplTokenMetadata({mintAddress:e,cluster:ot(n)});r&&(a[e]={address:e,symbol:r.symbol,decimals:r.decimals})}return a[e]}async function st({tx:t,solanaClient:n,privyClient:e,checkFunds:a}){let r=_().decode(R(t)),o=r.staticAccounts[0]??"",i=await q({solanaClient:n,tx:t}),s=a?await rt(U({solanaClient:n,tx:t})):void 0,c=s?.hasFunds??!0,l={},d=[],u=await async function({solanaClient:t,message:n}){if(!("addressTableLookups"in n)||!n.addressTableLookups)return[...n.staticAccounts];let e=n.addressTableLookups.map((t=>t.lookupTableAddress)),a=await M(e,t.rpc),r=e.map(((t,e)=>[...n.addressTableLookups[e]?.writableIndexes.map((n=>{let r=a[t]?.[n];if(r)return{key:r,isWritable:!0,altIdx:e}}))??[],...n.addressTableLookups[e]?.readonlyIndexes.map((n=>{let r=a[t]?.[n];if(r)return{key:r,isWritable:!1,altIdx:e}}))??[]])).flat().filter((t=>!!t)).sort(((t,n)=>t.isWritable!==n.isWritable?t.isWritable?-1:1:t.altIdx-n.altIdx)).map((({key:t})=>t));return[...n.staticAccounts,...r]}({solanaClient:n,message:r});for(let t of r.instructions){let a=r.staticAccounts[t.programAddressIndex]||"";if(a!==Q&&a!==X)if(a!==Y){if(a===G){let n=await rt(function(t,n,e){let[a,r,o,i]=t.accountIndices?.map((t=>n[t]))??[];return{type:"ata-creation",program:e,payer:a,ata:r,owner:o,mint:i}}(t,u,a));if(!n){d.push({type:"unknown",program:a,discriminator:t.data?.[0]});continue}if(d.push(n),n.ata&&n.owner&&n.mint){l[n.ata]={owner:n.owner,mint:n.mint};continue}}if(K.includes(a)){let r=await rt(ut(t,u,n,e,a));if(!r){d.push({type:"unknown",program:a,discriminator:t.data?.[0]});continue}d.push(r)}else if(N.includes(a)){let r=await rt(mt(t,u,n,e,a));if(!r){d.push({type:"unknown",program:a,discriminator:t.data?.[0]});continue}d.push(r)}else d.push({type:"unknown",program:a,discriminator:t.data?.[0]})}else{let n=await rt(dt(t,u));if(!n){d.push({type:"unknown",program:a,discriminator:t.data?.[0]});continue}d.push(n)}else{let r=await rt(lt(t,u,n,e,l,a));if(!r){d.push({type:"unknown",program:a,discriminator:t.data?.[0]});continue}d.push(r),"spl-transfer"===r.type&&(r.fromAta&&r.fromAccount&&r.token.address&&(l[r.fromAta]??={owner:r.fromAccount,mint:r.token.address}),r.toAta&&r.toAccount&&r.token.address&&(l[r.toAta]??={owner:r.toAccount,mint:r.token.address}))}}return{spender:o,fee:i,instructions:d,hasFunds:!!c}}function ct(t,n=0){try{return function(t,n=0){let e=0n;for(let a=0;a<8;a++)e|=BigInt(t[n+a])<<BigInt(8*a);return e}(t,n)}catch{}try{return t.readBigInt64LE(n)}catch{}let e=H(t);try{return((t,n=0)=>{let e=t[n],a=t[n+7];if(!e||!a)throw Error(`Buffer offset out of range: first: ${e}, last: ${a}.`);return(BigInt(t[n+4]+256*t[n+5]+65536*t[n+6]+(a<<24))<<32n)+BigInt(e+256*t[++n]+65536*t[++n]+16777216*t[++n])})(e)}catch{}try{return e.subarray(n).readBigInt64LE()}catch{}try{return e.readBigInt64LE(n)}catch{}return 0n}async function lt(t,n,e,a,r,o){let i=t.data?.[0],s=t.accountIndices?.map((t=>n[t]))??[];if(1===i){let[t,n,e]=s;return{type:"spl-init-account",program:o,account:t,mint:n,owner:e}}if(3===i){let n,i,[c,l,d]=s,u="",m=l?r[l]:void 0;if(m)n=m.owner,u=m.mint;else if(l){let t=await e.rpc.getAccountInfo(l,{commitment:"confirmed",encoding:"jsonParsed"}).send(),a=t.value?.data;n=a?.parsed?.info?.owner,u=a?.parsed?.info?.mint??"",i=a?.parsed?.info?.tokenAmount?.decimals}if(!u&&c){let t=await e.rpc.getAccountInfo(c,{commitment:"confirmed",encoding:"jsonParsed"}).send(),n=t.value?.data;u=n?.parsed?.info?.mint??""}let p=await it({privyClient:a,chain:e.chain,mint:u}),f=p?.symbol??"";return i??=p?.decimals??9,{type:"spl-transfer",program:o,fromAta:c,fromAccount:d,toAta:l,toAccount:n,value:ct(t.data,1),token:{symbol:f,decimals:i,address:u}}}if(9===i){let[t,n,e]=s;return{type:"spl-close-account",program:o,source:t,destination:n,owner:e}}if(17===i)return{type:"spl-sync-native",program:o};throw Error(`Token program instruction type ${i} not supported`)}async function dt(t,n){let e=t.data?.[0],a=t.accountIndices?.map((t=>n[t]))??[];if(0===e){let[,n]=a;return{type:"create-account",program:Y,account:n?.toString(),value:ct(t.data,4),withSeed:!1}}if(2===e){let[n,e]=a;return{type:"sol-transfer",program:Y,fromAccount:n,toAccount:e,token:{symbol:"SOL",decimals:9},value:ct(t.data,4),withSeed:!1}}if(3===e){let[,n]=a;return{type:"create-account",program:Y,account:n,withSeed:!0,value:ct(t.data.slice(t.data.length-32-8-8))}}if(11===e){let[n,e]=a;return{type:"sol-transfer",program:Y,fromAccount:n,toAccount:e,value:ct(t.data,4),token:{symbol:"SOL",decimals:9},withSeed:!0}}throw Error(`System program instruction type ${e} not supported`)}async function ut(t,n,e,a,r){let o=t.accountIndices?.map((t=>n[t]))??[],i=t.data?.[0];if(143===i){let n=o[10],i=o[11];return{type:"raydium-swap-base-input",program:r,mintIn:n,mintOut:i,tokenIn:n?await it({privyClient:a,chain:e.chain,mint:n}):void 0,tokenOut:i?await it({privyClient:a,chain:e.chain,mint:i}):void 0,amountIn:ct(t.data,8),minimumAmountOut:ct(t.data,16)}}if(55===i){let n=o[10],i=o[11];return{type:"raydium-swap-base-output",program:r,mintIn:n,mintOut:i,tokenIn:n?await it({privyClient:a,chain:e.chain,mint:n}):void 0,tokenOut:i?await it({privyClient:a,chain:e.chain,mint:i}):void 0,maxAmountIn:ct(t.data,8),amountOut:ct(t.data,16)}}throw Error(`Raydium swap program instruction type ${i} not supported`)}async function mt(t,n,e,a,r){let o=t.data?.[0],i=t.accountIndices?.map((t=>n[t]))??[];if([208,51,239,151,123,43,237,92].includes(o)){let n=i[5],o=i[6];return{type:"jupiter-swap-exact-out-route",program:r,mintIn:n,mintOut:o,tokenIn:n?await it({privyClient:a,chain:e.chain,mint:n}):void 0,tokenOut:o?await it({privyClient:a,chain:e.chain,mint:o}):void 0,outAmount:ct(t.data,t.data.length-1-2-8-8),quotedInAmount:ct(t.data,t.data.length-1-2-8)}}if([176,209,105,168,154,125,69,62].includes(o)){let n=i[7],o=i[8];return{type:"jupiter-swap-exact-out-route",program:r,mintIn:n,mintOut:o,tokenIn:n?await it({privyClient:a,chain:e.chain,mint:n}):void 0,tokenOut:o?await it({privyClient:a,chain:e.chain,mint:o}):void 0,outAmount:ct(t.data,t.data.length-1-2-8-8),quotedInAmount:ct(t.data,t.data.length-1-2-8)}}if([193,32,155,51,65,214,156,129].includes(o)){let n=i[7],o=i[8];return{type:"jupiter-swap-shared-accounts-route",program:r,mintIn:n,mintOut:o,tokenIn:n?await it({privyClient:a,chain:e.chain,mint:n}):void 0,tokenOut:o?await it({privyClient:a,chain:e.chain,mint:o}):void 0,inAmount:ct(t.data,t.data.length-1-2-8-8),quotedOutAmount:ct(t.data,t.data.length-1-2-8)}}throw[62,198,214,193,213,159,108,210].includes(o)&&console.warn("Jupiter swap program instruction 'claim' not implemented"),[116,206,27,191,166,19,0,73].includes(o)&&console.warn("Jupiter swap program instruction 'claim_token' not implemented"),[26,74,236,151,104,64,183,249].includes(o)&&console.warn("Jupiter swap program instruction 'close_token' not implemented"),[229,194,212,172,8,10,134,147].includes(o)&&console.warn("Jupiter swap program instruction 'create_open_orders' not implemented"),[28,226,32,148,188,136,113,171].includes(o)&&console.warn("Jupiter swap program instruction 'create_program_open_orders' not implemented"),[232,242,197,253,240,143,129,52].includes(o)&&console.warn("Jupiter swap program instruction 'create_token_ledger' not implemented"),[147,241,123,100,244,132,174,118].includes(o)&&console.warn("Jupiter swap program instruction 'create_token_account' not implemented"),[229,23,203,151,122,227,173,42].includes(o)&&console.warn("Jupiter swap program instruction 'route' not implemented"),[150,86,71,116,167,93,14,104].includes(o)&&console.warn("Jupiter swap program instruction 'route_with_token_ledger' not implemented"),[228,85,185,112,78,79,77,2].includes(o)&&console.warn("Jupiter swap program instruction 'set_token_ledger' not implemented"),[230,121,143,80,119,159,106,170].includes(o)&&console.warn("Jupiter swap program instruction 'shared_accounts_route_with_token_ledger' not implemented"),Error(`Jupiter swap program instruction type ${o} not supported`)}const pt={component:()=>{let{data:t,onUserCloseViaDialogOrKeybindRef:e,setModalData:g,navigate:h}=s(),{client:y,closePrivyModal:w,walletProxy:k,showFiatPrices:b}=m(),v=u(),{user:A}=c(),I=V()(t?.standardSignAndSendTransaction?.chain??"solana:mainnet"),[S,j]=a(t?.standardSignAndSendTransaction?.transaction),[C,T]=a(),[O,x]=a(),[M,q]=a({value:0n,isLoading:!1}),[U,H]=a(!1),[z,Q]=a({}),[X,Y]=a(),G=t?.standardSignAndSendTransaction?.account,K=!!t?.standardSignAndSendTransaction?.signOnly,N=G?.imported?l(A).find((t=>t.address===G.address)):d(A),{solPrice:tt,isSolPriceLoading:nt}=p({enabled:b}),at=r((()=>{if(!C)return;let t=C.spender,n=E(C.fee),e=E(M.value,3,!0),a=C.instructions.filter((t=>["sol-transfer","spl-transfer","raydium-swap-base-input","raydium-swap-base-output","jupiter-swap-shared-accounts-route","jupiter-swap-exact-out-route"].includes(t.type))),r=a.at(0);if(!r||a.length>1)return{fee:n,spender:t,balance:e};if("sol-transfer"===r.type)return{fee:n,spender:t,balance:e,total:E(r.value)};if("spl-transfer"===r.type)return{fee:n,spender:t,balance:e,total:`${i({amount:r.value,decimals:r.token.decimals})} ${r.token.symbol}`};if("raydium-swap-base-input"===r.type&&r.tokenIn&&r.tokenOut){return{fee:n,spender:t,balance:e,swap:`${`${i({amount:r.amountIn,decimals:r.tokenIn.decimals})} ${r.tokenIn.symbol}`} → ${`${i({amount:r.minimumAmountOut,decimals:r.tokenOut.decimals})} ${r.tokenOut.symbol}`}`}}if("raydium-swap-base-output"===r.type&&r.tokenIn&&r.tokenOut){return{fee:n,spender:t,balance:e,swap:`${`${i({amount:r.maxAmountIn,decimals:r.tokenIn.decimals})} ${r.tokenIn.symbol}`} → ${`${i({amount:r.amountOut,decimals:r.tokenOut.decimals})} ${r.tokenOut.symbol}`}`}}if("jupiter-swap-shared-accounts-route"===r.type&&r.tokenIn&&r.tokenOut){return{fee:n,spender:t,balance:e,swap:`${`${i({amount:r.inAmount,decimals:r.tokenIn.decimals})} ${r.tokenIn.symbol}`} → ${`${i({amount:r.quotedOutAmount,decimals:r.tokenOut.decimals})} ${r.tokenOut.symbol}`}`}}if("jupiter-swap-exact-out-route"===r.type&&r.tokenIn&&r.tokenOut){return{fee:n,spender:t,balance:e,swap:`${`${i({amount:r.quotedInAmount,decimals:r.tokenIn.decimals})} ${r.tokenIn.symbol}`} → ${`${i({amount:r.outAmount,decimals:r.tokenOut.decimals})} ${r.tokenOut.symbol}`}`}}return{fee:n,spender:t,balance:e}}),[C,G?.address,M]),rt=r((()=>{let t;if(!C||!b||!tt||nt)return;function n(...t){return Z(t.reduce(((t,n)=>t+n),0n),tt??0)}G?.address===C.spender&&(t=n(C.fee));let e=n(M.value),a=C.instructions.filter((t=>"sol-transfer"===t.type||"spl-transfer"===t.type)).at(0);return!a||C.instructions.length>1?{fee:t,balance:e}:"sol-transfer"===a.type?{fee:t,balance:e,total:n(a.value,G?.address===C.spender?C.fee:0n)}:"spl-transfer"===a.type?{fee:t,balance:e,total:`${i({amount:a.value,decimals:a.token.decimals})} ${a.token.symbol}`}:{fee:t,balance:e}}),[C,b,tt,nt,G?.address,M]);if(o((()=>{!async function(){if(S&&y)try{x(void 0);let t=await st({tx:S,solanaClient:I,privyClient:y,checkFunds:!K});T(t)}catch(t){console.error("Failed to prepare transaction",t),x(t)}}()}),[S,I,y,K]),o((()=>{(async function(){if(!G)return;q({value:M.value,isLoading:!0});let{value:t}=await I.rpc.getBalance(G.address,{commitment:"confirmed"}).send();q({value:t??0n,isLoading:!1})})().catch(console.error)}),[C]),!S||!t?.standardSignAndSendTransaction||!G){let e=Error("Invalid transaction request");/*#__PURE__*/return n(f,{error:e,allowlistConfig:v.allowlistConfig,onRetry:()=>{t?.standardSignAndSendTransaction?.onFailure(e),w({shouldCallAuthOnSuccess:!1})}})}let ot=()=>{if(!U)return z.signature||z.signedTransaction?t?.standardSignAndSendTransaction?.onSuccess({signature:z.signature,signedTransaction:z.signedTransaction}):t?.standardSignAndSendTransaction?.onFailure(X??O??Error("User exited the modal before submitting the transaction")),w({shouldCallAuthOnSuccess:!1})};e.current=ot;let it=t.standardSignAndSendTransaction?.uiOptions?.transactionInfo?.contractInfo?.imgUrl?/*#__PURE__*/n("img",{src:t.standardSignAndSendTransaction.uiOptions.transactionInfo.contractInfo.imgUrl,alt:t.standardSignAndSendTransaction.uiOptions.transactionInfo.contractInfo.imgAltText}):null,ct=!!(t.funding&&t.funding.supportedOptions.length>0),lt=!C?.hasFunds&&ct;if(z.signature||z.signedTransaction){let e=C?.instructions.filter((t=>"sol-transfer"===t.type||"spl-transfer"===t.type)),a=1===e?.length?e?.at(0):void 0;/*#__PURE__*/return n(et,{fees:z.fees??0n,onClose:ot,transactionInfo:t.standardSignAndSendTransaction?.uiOptions.transactionInfo,solPrice:tt,receiptHeader:t.standardSignAndSendTransaction?.uiOptions.successHeader,receiptDescription:t.standardSignAndSendTransaction?.uiOptions.successDescription,chain:I.chain,signOnly:K,instruction:"sol-transfer"===a?.type?{to:a.toAccount,amount:a.value}:{to:a?.toAccount||a?.toAta,total:at?.total}})}return X?/*#__PURE__*/n($,{transactionError:X,chainId:I.chain,onClose:ot,chainType:"solana",onRetry:async()=>{Y(void 0);let{value:t}=await I.rpc.getLatestBlockhash().send();var n,e;j((n=S,e=t,F(_().decode(R(n)),(t=>P(t)),(t=>B(e,t)),(t=>J(t)),(t=>new Uint8Array(W().encode(t))))))}}):/*#__PURE__*/n(L,{img:it,title:t.standardSignAndSendTransaction?.uiOptions?.transactionInfo?.title||"Confirm transaction",subtitle:t.standardSignAndSendTransaction?.uiOptions?.description||`${v.name} wants your permission to approve the following transaction.`,cta:lt?"Add funds":t.standardSignAndSendTransaction?.uiOptions?.buttonText||"Approve",instructions:C?.instructions??[],network:"solana:mainnet"==I.chain?"Solana":I.chain.replace("solana:",""),blockExplorerUrl:I.blockExplorerUrl,total:b?rt?.total:at?.total,fee:b?rt?.fee:at?.fee,balance:b?rt?.balance:at?.balance,swap:at?.swap,transactingWalletAddress:G.address,disabled:!C?.hasFunds&&!ct,isSubmitting:U,isPreparing:!C||M.isLoading,isTokenPriceLoading:b&&nt,isMissingFunds:!C?.hasFunds,submitError:X??void 0,isSponsored:!!t.standardSignAndSendTransaction?.isSponsored,parseError:O,onClick:lt?async()=>{if(!G)return;if(!ct)throw Error("Funding wallet is not enabled");let n="FundingMethodSelectionScreen";g({...t,funding:{...t.funding,methodScreen:n},solanaFundingData:t?.solanaFundingData}),h(n)}:async()=>{try{if(H(!0),U||!G||!k||!A||!N)return;let n=await t.standardSignAndSendTransaction.onConfirm(S);if("signature"in n){let t=await async function({solanaClient:t,signature:n}){let e=D().decode(n),a=await t.rpc.getTransaction(e,{maxSupportedTransactionVersion:0,commitment:"confirmed",encoding:"base64"}).send().catch((()=>null));return a?{fee:a.meta?.fee??0n}:null}({solanaClient:I,signature:n.signature});return void Q({...n,fees:t?.fee})}Q(n)}catch(t){console.warn({transaction:S,error:t}),Y(t)}finally{H(!1)}},onClose:ot})}};export{pt as StandardSignAndSendTransactionScreen,pt as default};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import{styled as o}from"styled-components";const r=o.span`
|
|
2
|
+
margin-top: 4px;
|
|
3
|
+
color: var(--privy-color-foreground);
|
|
4
|
+
text-align: center;
|
|
5
|
+
|
|
6
|
+
font-size: 0.875rem;
|
|
7
|
+
font-weight: 400;
|
|
8
|
+
line-height: 1.375rem; /* 157.143% */
|
|
9
|
+
|
|
10
|
+
&& a {
|
|
11
|
+
color: var(--privy-color-accent);
|
|
12
|
+
}
|
|
13
|
+
`;export{r as S};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{useState as t,useEffect as r}from"react";import{a as o,m as i,C as a}from"./index-Bn7dGnWc.mjs";import{u as s,q as n}from"./context-B2_ynXJ0.mjs";import{u as l,b as m,k as c}from"./internal-context-e-Eni5bG.mjs";import{u as d,a as u}from"./get-is-unified-wallet-BGYgYz7O.mjs";import{s as p}from"./shouldProceedtoEmbeddedWalletCreationFlow-m8h36rvg.mjs";import{S as g}from"./ScreenLayout-MTddPyq4.mjs";import{T as v}from"./telegram-B-JqnkqZ.mjs";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-C7hnsvNI.mjs";import"zustand";import"styled-components";import"react-device-detect";import"./prepareFundingModalData-D3TrJtDq.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-Djv8Lbsf.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-C9lIPcEH.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"ofetch";import"js-cookie";import"./frame-CwE9r3cT.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-eEm9Olt_.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"tinycolor2";import"./ModalHeader-DS6bUzfI.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-Ced2RY7C.mjs";import"./index-Dq_xe9dz.mjs";const y=({success:t,errorMessage:r,onRetry:o})=>{let i=t?"Successfully connected with Telegram":r?r.message:"Verifying connection to Telegram";/*#__PURE__*/return e(g,{title:i,subtitle:t?"You're good to go!":r?r.detail:"Just a few moments more",icon:v,iconVariant:"loading",iconLoadingStatus:{success:t,fail:!!r},secondaryCta:r?.retryable&&o?{label:"Retry",onClick:o}:void 0,watermark:!0})},h={component:()=>{let{authenticated:g,logout:v,ready:h,user:f}=d(),{setModalData:A,navigate:b,resetNavigation:T,data:j}=u(),S=s(),{initLoginWithTelegram:C,loginWithTelegram:w,updateWallets:E,setReadyToTrue:R,closePrivyModal:W,createAnalyticsEvent:_,getAuthMeta:M}=l(),[k,L]=t(!1),[I,x]=t(void 0),D=o();async function N(){try{let e=await async function(){let e;if(!g){if(D.enabled&&"error"===D.status)throw new a(D.error,null,m.CAPTCHA_FAILURE);return D.enabled&&"success"!==D.status&&(D.execute(),e=await D.waitForResult()),e}}();await w({captchaToken:e}),L(!0),R(!0)}catch(e){if(e?.privyErrorCode===m.ALLOWLIST_REJECTED)return x(void 0),T(),void b("AllowlistRejectionScreen");if(e?.privyErrorCode===m.USER_LIMIT_REACHED)return console.error(new c(e).toString()),x(void 0),T(),void b("UserLimitReachedScreen");if(e?.privyErrorCode===m.USER_DOES_NOT_EXIST)return x(void 0),T(),void b("AccountNotFoundScreen");if(e?.privyErrorCode===m.ACCOUNT_TRANSFER_REQUIRED&&e.data?.data?.nonce)return x(void 0),T(),A({accountTransfer:{nonce:e.data?.data?.nonce,account:e.data?.data?.subject,telegramAuthResult:M()?.telegramAuthResult,telegramWebAppData:M()?.telegramWebAppData,displayName:e.data?.data?.account?.displayName,linkMethod:"telegram",embeddedWalletAddress:e.data?.data?.otherUser?.embeddedWalletAddress}}),void b("LinkConflictScreen");let{retryable:t,detail:r}=i(e);x({retryable:t,detail:r,message:"Authentication failed"})}}r((()=>{N()}),[]),r((()=>{if(!(h&&g&&k&&f))return;if(S?.legal.requireUsersAcceptTerms&&!f.hasAcceptedTerms){let e=setTimeout((()=>{b("AffirmativeConsentScreen")}),n);return()=>clearTimeout(e)}if(p(f,S.embeddedWallets)){let e=setTimeout((()=>{A({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),_({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,provider:"telegram",screen:"TelegramAuthScreen"}}),v()},callAuthOnSuccessOnClose:!0}}),b("EmbeddedWalletOnAccountCreateScreen")}),n);return()=>clearTimeout(e)}E();let e=setTimeout((()=>W({shouldCallAuthOnSuccess:!0,isSuccess:!0})),n);return()=>clearTimeout(e)}),[h,g,k,f]);/*#__PURE__*/return e(y,{success:k,errorMessage:I,onRetry:I?.retryable?async()=>{try{x(void 0),j?.telegramAuthModalData?.seamlessAuth||await C(void 0,j?.login?.disableSignup),await N()}catch(e){let{retryable:t,detail:r}=i(e);x({retryable:t,detail:r,message:"Authentication failed"})}}:void 0})},isCaptchaRequired:!0,isShownBeforeReady:!0};export{h as TelegramAuthScreen,y as TelegramAuthScreenView,h as default};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import{jsxs as r,jsx as e}from"react/jsx-runtime";import{X as t,Check as i}from"lucide-react";import o from"react";import{styled as n}from"styled-components";const a=n.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
justify-content: flex-start;
|
|
5
|
+
gap: 10px; /* 10px gap between items */
|
|
6
|
+
padding-left: 8px; /* 8px indentation container */
|
|
7
|
+
`;n.div`
|
|
8
|
+
&&& {
|
|
9
|
+
margin-left: 6px; /* Center the line under the checkbox (12px/2) */
|
|
10
|
+
border-left: 2px solid var(--privy-color-foreground-4);
|
|
11
|
+
height: 10px; /* 10px H padding between paragraphs */
|
|
12
|
+
margin-top: 0;
|
|
13
|
+
margin-bottom: 0;
|
|
14
|
+
}
|
|
15
|
+
`;const c=({children:n,variant:a="default",icon:c})=>{let p=()=>{switch(a){case"success":return"var(--privy-color-icon-success)";case"error":return"var(--privy-color-icon-error)";default:return"var(--privy-color-icon-muted)"}};/*#__PURE__*/return r(l,{children:[/*#__PURE__*/e(s,{$variant:a,"data-variant":a,children:(()=>{if(c)
|
|
16
|
+
/*#__PURE__*/return o.isValidElement(c)?/*#__PURE__*/o.cloneElement(c,{stroke:p(),strokeWidth:2}):c;switch(a){case"success":default:/*#__PURE__*/return e(i,{size:12,stroke:p(),strokeWidth:3});case"error":/*#__PURE__*/return e(t,{size:12,stroke:p(),strokeWidth:3})}})()}),n]})};let s=n.div`
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
width: 20px;
|
|
21
|
+
height: 20px;
|
|
22
|
+
border-radius: 50%;
|
|
23
|
+
background-color: ${({$variant:r})=>{switch(r){case"success":return"var(--privy-color-success-bg, #EAFCEF)";case"error":return"var(--privy-color-error-bg, #FEE2E2)";default:return"var(--privy-color-background-2)"}}};
|
|
24
|
+
flex-shrink: 0;
|
|
25
|
+
`,l=n.div`
|
|
26
|
+
display: flex;
|
|
27
|
+
justify-content: flex-start;
|
|
28
|
+
align-items: flex-start; /* Align all elements to the top */
|
|
29
|
+
text-align: left;
|
|
30
|
+
gap: 8px;
|
|
31
|
+
|
|
32
|
+
&& {
|
|
33
|
+
a {
|
|
34
|
+
color: var(--privy-color-accent);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
`;export{a as T,c as a};
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import{jsxs as e,jsx as i,Fragment as t}from"react/jsx-runtime";import{styled as n}from"styled-components";import{P as r,H as l,W as o}from"./WalletLink-ByKKJVxX.mjs";import{g as d}from"./ethers-DhF11eoU.mjs";import{F as a}from"./Layouts-BlFm53ED.mjs";import c from"@heroicons/react/24/outline/ChevronDownIcon";import{createContext as s,useState as h,useContext as p}from"react";import{s as v,u}from"./context-B2_ynXJ0.mjs";const g=({label:t,children:n,valueStyles:r})=>/*#__PURE__*/e(f,{children:[/*#__PURE__*/i("div",{children:t}),/*#__PURE__*/i(x,{style:{...r},children:n})]});let f=n.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: space-between;
|
|
5
|
+
width: 100%;
|
|
6
|
+
|
|
7
|
+
> :first-child {
|
|
8
|
+
color: var(--privy-color-foreground-3);
|
|
9
|
+
text-align: left;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
> :last-child {
|
|
13
|
+
color: var(--privy-color-foreground-2);
|
|
14
|
+
text-align: right;
|
|
15
|
+
}
|
|
16
|
+
`,x=n.div`
|
|
17
|
+
font-size: 14px;
|
|
18
|
+
line-height: 100%;
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
border-radius: var(--privy-border-radius-full);
|
|
23
|
+
background-color: var(--privy-color-background-2);
|
|
24
|
+
padding: 4px 8px;
|
|
25
|
+
`;const m=({gas:t,tokenPrice:n,tokenSymbol:l})=>/*#__PURE__*/e(a,{style:{paddingBottom:"12px"},children:[/*#__PURE__*/e(b,{children:[/*#__PURE__*/i(k,{children:"Est. Fees"}),/*#__PURE__*/i("div",{children:/*#__PURE__*/i(r,{weiQuantities:[BigInt(t)],tokenPrice:n,tokenSymbol:l})})]}),n&&/*#__PURE__*/i(w,{children:`${d(BigInt(t),l)}`})]}),y=({value:t,gas:n,tokenPrice:l,tokenSymbol:o})=>{let c=BigInt(t??0)+BigInt(n);/*#__PURE__*/return e(a,{children:[/*#__PURE__*/e(b,{children:[/*#__PURE__*/i(k,{children:"Total (including fees)"}),/*#__PURE__*/i("div",{children:/*#__PURE__*/i(r,{weiQuantities:[BigInt(t||0),BigInt(n)],tokenPrice:l,tokenSymbol:o})})]}),l&&/*#__PURE__*/i(w,{children:d(c,o)})]})};let b=n.div`
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-direction: row;
|
|
28
|
+
justify-content: space-between;
|
|
29
|
+
align-items: center;
|
|
30
|
+
padding-top: 4px;
|
|
31
|
+
`,w=n.div`
|
|
32
|
+
display: flex;
|
|
33
|
+
flex-direction: row;
|
|
34
|
+
height: 12px;
|
|
35
|
+
|
|
36
|
+
font-size: 12px;
|
|
37
|
+
line-height: 12px;
|
|
38
|
+
color: var(--privy-color-foreground-3);
|
|
39
|
+
font-weight: 400;
|
|
40
|
+
`,k=n.div`
|
|
41
|
+
font-size: 14px;
|
|
42
|
+
line-height: 22.4px;
|
|
43
|
+
font-weight: 400;
|
|
44
|
+
`;const P=/*#__PURE__*/s(void 0),I=/*#__PURE__*/s(void 0),S=({defaultValue:e,children:t})=>{let[n,r]=h(e||null);/*#__PURE__*/return i(P.Provider,{value:{activePanel:n,togglePanel:e=>{r(n===e?null:e)}},children:/*#__PURE__*/i(z,{children:t})})},j=({value:e,children:t})=>{let{activePanel:n,togglePanel:r}=p(P),l=n===e;/*#__PURE__*/return i(I.Provider,{value:{onToggle:()=>r(e),value:e},children:/*#__PURE__*/i(C,{isActive:l?"true":"false","data-open":String(l),children:t})})},B=({children:n})=>{let{activePanel:r}=p(P),{onToggle:l,value:o}=p(I),d=r===o;/*#__PURE__*/
|
|
45
|
+
return e(t,{children:[/*#__PURE__*/e(F,{onClick:l,"data-open":String(d),children:[/*#__PURE__*/i(W,{children:n}),/*#__PURE__*/i(V,{isactive:d?"true":"false",children:/*#__PURE__*/i(c,{height:"16px",width:"16px",strokeWidth:"2"})})]}),/*#__PURE__*/i(Q,{})]})},T=({children:e})=>{let{activePanel:t}=p(P),{value:n}=p(I);/*#__PURE__*/return i(D,{"data-open":String(t===n),children:/*#__PURE__*/i(L,{children:e})})},A=({children:e})=>{let{activePanel:t}=p(P),{value:n}=p(I);/*#__PURE__*/return i(L,{children:"function"==typeof e?e({isActive:t===n}):e})};let z=n.div`
|
|
46
|
+
display: flex;
|
|
47
|
+
flex-direction: column;
|
|
48
|
+
width: 100%;
|
|
49
|
+
gap: 8px;
|
|
50
|
+
`,F=n.div`
|
|
51
|
+
display: flex;
|
|
52
|
+
justify-content: space-between;
|
|
53
|
+
align-items: center;
|
|
54
|
+
width: 100%;
|
|
55
|
+
cursor: pointer;
|
|
56
|
+
padding-bottom: 8px;
|
|
57
|
+
`,Q=n.div`
|
|
58
|
+
width: 100%;
|
|
59
|
+
|
|
60
|
+
&& {
|
|
61
|
+
border-top: 1px solid;
|
|
62
|
+
border-color: var(--privy-color-foreground-4);
|
|
63
|
+
}
|
|
64
|
+
padding-bottom: 12px;
|
|
65
|
+
`,W=n.div`
|
|
66
|
+
font-size: 14px;
|
|
67
|
+
font-weight: 500;
|
|
68
|
+
line-height: 19.6px;
|
|
69
|
+
width: 100%;
|
|
70
|
+
padding-right: 8px;
|
|
71
|
+
`,C=n.div`
|
|
72
|
+
display: flex;
|
|
73
|
+
flex-direction: column;
|
|
74
|
+
width: 100%;
|
|
75
|
+
overflow: hidden;
|
|
76
|
+
padding: 12px;
|
|
77
|
+
|
|
78
|
+
&& {
|
|
79
|
+
border: 1px solid;
|
|
80
|
+
border-color: var(--privy-color-foreground-4);
|
|
81
|
+
border-radius: var(--privy-border-radius-md);
|
|
82
|
+
}
|
|
83
|
+
`,D=n.div`
|
|
84
|
+
position: relative;
|
|
85
|
+
overflow: hidden;
|
|
86
|
+
transition: max-height 25ms ease-out;
|
|
87
|
+
|
|
88
|
+
&[data-open='true'] {
|
|
89
|
+
max-height: 700px;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
&[data-open='false'] {
|
|
93
|
+
max-height: 0;
|
|
94
|
+
}
|
|
95
|
+
`,L=n.div`
|
|
96
|
+
display: flex;
|
|
97
|
+
flex-direction: column;
|
|
98
|
+
gap: 12px;
|
|
99
|
+
flex: 1 1 auto;
|
|
100
|
+
min-height: 1px;
|
|
101
|
+
`,V=n.div`
|
|
102
|
+
transform: ${e=>"true"===e.isactive?"rotate(180deg)":"rotate(0deg)"};
|
|
103
|
+
`;const $=({from:t,to:n,txn:r,transactionInfo:d,tokenPrice:a,gas:c,tokenSymbol:s})=>{let h=BigInt(r?.value||0);/*#__PURE__*/
|
|
104
|
+
return i(S,{...u().render.standalone?{defaultValue:"details"}:{},children:/*#__PURE__*/e(j,{value:"details",children:[/*#__PURE__*/i(B,{children:/*#__PURE__*/e(E,{children:[/*#__PURE__*/i("div",{children:d?.title||"Details"}),/*#__PURE__*/i(H,{children:/*#__PURE__*/i(l,{weiQuantities:[h],tokenPrice:a,tokenSymbol:s})})]})}),/*#__PURE__*/e(T,{children:[/*#__PURE__*/i(g,{label:"From",children:/*#__PURE__*/i(o,{walletAddress:t,chainId:r.chainId||v,chainType:"ethereum"})}),/*#__PURE__*/i(g,{label:"To",children:/*#__PURE__*/i(o,{walletAddress:n,chainId:r.chainId||v,chainType:"ethereum"})}),d&&d.action&&/*#__PURE__*/i(g,{label:"Action",children:d.action}),c&&/*#__PURE__*/i(m,{value:r.value,gas:c,tokenPrice:a,tokenSymbol:s})]}),/*#__PURE__*/i(A,{children:({isActive:e})=>/*#__PURE__*/i(y,{value:r.value,displayFee:e,gas:c||"0x0",tokenPrice:a,tokenSymbol:s})})]})})};let E=n.div`
|
|
105
|
+
display: flex;
|
|
106
|
+
flex-direction: row;
|
|
107
|
+
justify-content: space-between;
|
|
108
|
+
`,H=n.div`
|
|
109
|
+
flex-shrink: 0;
|
|
110
|
+
padding-left: 8px;
|
|
111
|
+
`;export{$ as T};
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import{jsx as e,jsxs as r,Fragment as n}from"react/jsx-runtime";import{BoltIcon as i,ArrowRightIcon as o,ChevronDownIcon as t}from"@heroicons/react/24/outline";import{useState as l}from"react";import{styled as a}from"styled-components";import{formatTokenAmount as s}from"@privy-io/js-sdk-core";import{M as c,P as d,E as h,B as m,b as u}from"./ModalHeader-DS6bUzfI.mjs";import{L as p,V as g,a as f}from"./Value-tcJV9e0L.mjs";import{a as y,R as x}from"./Row-C9vrS4Zi.mjs";import{E as k}from"./ErrorMessage-D8VaAP5m.mjs";import{L as v}from"./LabelXs-oqZNqbm_.mjs";import{S as b}from"./Subtitle-CV-2yKE4.mjs";import{T as w}from"./Title-BnzYV3Is.mjs";import{A as T}from"./Address-Ukdn-U5q.mjs";import{W as I}from"./WalletInfoCard-e3HUZrJD.mjs";import{u as A}from"./context-B2_ynXJ0.mjs";import{Y as S}from"./useActiveWallet-C7hnsvNI.mjs";import{L as C}from"./LoadingSkeleton-U6-3yFwI.mjs";import{isAddress as $}from"viem";import{B as j}from"./shared-FM0rljBt.mjs";import{C as M}from"./Checkbox-BhNoOKjX.mjs";import{E}from"./ErrorBanner-CQERa7bL.mjs";import{W as O}from"./WarningBanner-c8L53pJ2.mjs";import D from"@heroicons/react/24/outline/ClipboardDocumentCheckIcon";import N from"@heroicons/react/24/outline/ClipboardDocumentIcon";import F from"@heroicons/react/24/outline/ExclamationCircleIcon";import{u as L}from"./internal-context-e-Eni5bG.mjs";const P=a(p)`
|
|
2
|
+
cursor: pointer;
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
gap: 8px;
|
|
5
|
+
align-items: center;
|
|
6
|
+
color: var(--privy-color-accent);
|
|
7
|
+
svg {
|
|
8
|
+
fill: var(--privy-color-accent);
|
|
9
|
+
}
|
|
10
|
+
`;var z=({iconUrl:n,value:i,symbol:o,usdValue:t,nftName:l,nftCount:a,decimals:s,$isLoading:c})=>{if(c)/*#__PURE__*/return e(B,{$isLoading:c});let d=i&&t&&s?function(e,r,n){let i=parseFloat(e),o=parseFloat(n);if(0===i||0===o||Number.isNaN(i)||Number.isNaN(o))return e;let t=Math.ceil(-Math.log10(.01/(o/i))),l=Math.pow(10,t=Math.max(t=Math.min(t,r),1)),a=+(Math.floor(i*l)/l).toFixed(t).replace(/\.?0+$/,"");return Intl.NumberFormat(void 0,{maximumFractionDigits:r}).format(a)}(i,s,t):i;/*#__PURE__*/return r("div",{children:[/*#__PURE__*/r(B,{$isLoading:c,children:[n&&/*#__PURE__*/e(R,{src:n,alt:"Token icon"}),a&&a>1?a+"x":void 0," ",l,d," ",o]}),t&&/*#__PURE__*/r(W,{$isLoading:c,children:["$",t]})]})};let B=a.span`
|
|
11
|
+
color: var(--privy-color-foreground);
|
|
12
|
+
font-size: 0.875rem;
|
|
13
|
+
font-weight: 500;
|
|
14
|
+
line-height: 1.375rem;
|
|
15
|
+
word-break: break-all;
|
|
16
|
+
text-align: right;
|
|
17
|
+
display: flex;
|
|
18
|
+
justify-content: flex-end;
|
|
19
|
+
|
|
20
|
+
${C}
|
|
21
|
+
`;const W=a.span`
|
|
22
|
+
color: var(--privy-color-foreground-2);
|
|
23
|
+
font-size: 12px;
|
|
24
|
+
font-weight: 400;
|
|
25
|
+
line-height: 18px;
|
|
26
|
+
word-break: break-all;
|
|
27
|
+
text-align: right;
|
|
28
|
+
display: flex;
|
|
29
|
+
justify-content: flex-end;
|
|
30
|
+
|
|
31
|
+
${C}
|
|
32
|
+
`;let R=a.img`
|
|
33
|
+
height: 14px;
|
|
34
|
+
width: 14px;
|
|
35
|
+
margin-right: 4px;
|
|
36
|
+
object-fit: contain;
|
|
37
|
+
`;const U=i=>{let{chain:o,transactionDetails:t,isTokenContractInfoLoading:l,symbol:a}=i,{action:s,functionName:c}=t;/*#__PURE__*/return e(j,{children:/*#__PURE__*/r(y,{children:["transaction"!==s&&/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Action"}),/*#__PURE__*/e(g,{children:c})]}),"mint"===c&&"args"in t&&t.args.filter((e=>e)).map(((n,i)=>/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:`Param ${i}`}),/*#__PURE__*/e(g,{children:"string"==typeof n&&$(n)?/*#__PURE__*/e(T,{address:n,url:o?.blockExplorers?.default?.url,showCopyIcon:!1}):n?.toString()})]},i))),"setApprovalForAll"===c&&t.operator&&/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Operator"}),/*#__PURE__*/e(g,{children:/*#__PURE__*/e(T,{address:t.operator,url:o?.blockExplorers?.default?.url,showCopyIcon:!1})})]}),"setApprovalForAll"===c&&void 0!==t.approved&&/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Set approval to"}),/*#__PURE__*/e(g,{children:t.approved?"true":"false"})]}),"transfer"===c||"transferFrom"===c||"safeTransferFrom"===c||"approve"===c?/*#__PURE__*/r(n,{children:["formattedAmount"in t&&t.formattedAmount&&/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Amount"}),/*#__PURE__*/r(g,{$isLoading:l,children:[t.formattedAmount," ",a]})]}),"tokenId"in t&&t.tokenId&&/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Token ID"}),/*#__PURE__*/e(g,{children:t.tokenId.toString()})]})]}):null,"safeBatchTransferFrom"===c&&/*#__PURE__*/r(n,{children:["amounts"in t&&t.amounts&&/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Amounts"}),/*#__PURE__*/e(g,{children:t.amounts.join(", ")})]}),"tokenIds"in t&&t.tokenIds&&/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Token IDs"}),/*#__PURE__*/e(g,{children:t.tokenIds.join(", ")})]})]}),"approve"===c&&t.spender&&/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Spender"}),/*#__PURE__*/e(g,{children:/*#__PURE__*/e(T,{address:t.spender,url:o?.blockExplorers?.default?.url,showCopyIcon:!1})})]}),("transferFrom"===c||"safeTransferFrom"===c||"safeBatchTransferFrom"===c)&&t.transferFrom&&/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Transferring from"}),/*#__PURE__*/e(g,{children:/*#__PURE__*/e(T,{address:t.transferFrom,url:o?.blockExplorers?.default?.url,showCopyIcon:!1})})]}),("transferFrom"===c||"safeTransferFrom"===c||"safeBatchTransferFrom"===c)&&t.transferTo&&/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Transferring to"}),/*#__PURE__*/e(g,{children:/*#__PURE__*/e(T,{address:t.transferTo,url:o?.blockExplorers?.default?.url,showCopyIcon:!1})})]})]})})},V=({variant:i,setPreventMaliciousTransaction:o,colorScheme:t="light",preventMaliciousTransaction:l})=>"warn"===i?/*#__PURE__*/e(q,{children:/*#__PURE__*/r(O,{theme:t,children:[/*#__PURE__*/e("span",{style:{fontWeight:"500"},children:"Warning: Suspicious transaction"}),/*#__PURE__*/e("br",{}),"This has been flagged as a potentially deceptive request. Approving could put your assets or funds at risk."]})}):"error"===i?/*#__PURE__*/e(n,{children:/*#__PURE__*/r(q,{children:[/*#__PURE__*/e(E,{theme:t,children:/*#__PURE__*/r("div",{children:[/*#__PURE__*/e("strong",{children:"This is a malicious transaction"}),/*#__PURE__*/e("br",{}),"This transaction transfers tokens to a known malicious address. Proceeding may result in the loss of valuable assets."]})}),/*#__PURE__*/r(H,{children:[/*#__PURE__*/e(M,{color:"var(--privy-color-error)",checked:!l,readOnly:!0,onClick:()=>o(!l)}),/*#__PURE__*/e("span",{children:"I understand and want to proceed anyways."})]})]})}):null;let q=a.div`
|
|
38
|
+
margin-top: 1.5rem;
|
|
39
|
+
`,H=a.div`
|
|
40
|
+
display: flex;
|
|
41
|
+
align-items: center;
|
|
42
|
+
gap: 0.5rem;
|
|
43
|
+
margin-top: 0.75rem;
|
|
44
|
+
`;const J=({transactionIndex:e,maxIndex:r})=>"number"!=typeof e||0===r?"":` (${e+1} / ${r+1})`,Q=({img:a,submitError:s,prepareError:u,onClose:v,action:I,title:C,subtitle:$,to:j,tokenAddress:M,network:E,missingFunds:O,fee:D,from:N,cta:F,disabled:L,chain:B,isSubmitting:W,isPreparing:R,isTokenPriceLoading:q,isTokenContractInfoLoading:H,isSponsored:Q,symbol:Y,balance:G,onClick:re,transactionDetails:ne,transactionIndex:ie,maxIndex:oe,onBack:te,chainName:le,validation:ae,hasScanDetails:se,setIsScanDetailsOpen:ce,preventMaliciousTransaction:de,setPreventMaliciousTransaction:he,tokensSent:me,tokensReceived:ue,isScanning:pe,isCancellable:ge,functionName:fe})=>{let{showTransactionDetails:ye,setShowTransactionDetails:xe,hasMoreDetails:ke,isErc20Ish:ve}=(e=>{let[r,n]=l(!1),i=!0,o=!1;return(!e||e.isErc20Ish||"transaction"===e.action)&&(i=!1),i&&(o=Object.entries(e||{}).some((([e,r])=>r&&!["action","isErc20Ish","isNFTIsh"].includes(e)))),{showTransactionDetails:r,setShowTransactionDetails:n,hasMoreDetails:i&&o,isErc20Ish:e?.isErc20Ish}})(ne),be=A(),we=ve&&H||R||q||pe;/*#__PURE__*/return r(n,{children:[/*#__PURE__*/e(c,{onClose:v,backFn:te}),a&&/*#__PURE__*/e(Z,{children:a}),/*#__PURE__*/r(w,{style:{marginTop:a?"1.5rem":0},children:[C,/*#__PURE__*/e(J,{maxIndex:oe,transactionIndex:ie})]}),/*#__PURE__*/e(b,{children:$}),/*#__PURE__*/r(y,{style:{marginTop:"2rem"},children:[(!!me[0]||we)&&/*#__PURE__*/r(x,{children:[ue.length>0?/*#__PURE__*/e(p,{children:"Send"}):/*#__PURE__*/e(p,{children:"approve"===I?"Approval amount":"Amount"}),/*#__PURE__*/e("div",{className:"flex flex-col",children:me.map(((r,n)=>/*#__PURE__*/e(z,{iconUrl:r.iconUrl,value:"setApprovalForAll"===fe?"All":r.value,usdValue:r.usdValue,symbol:r.symbol,nftName:r.nftName,nftCount:r.nftCount,decimals:r.decimals},n)))})]}),ue.length>0&&/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Receive"}),/*#__PURE__*/e("div",{className:"flex flex-col",children:ue.map(((r,n)=>/*#__PURE__*/e(z,{iconUrl:r.iconUrl,value:r.value,usdValue:r.usdValue,symbol:r.symbol,nftName:r.nftName,nftCount:r.nftCount,decimals:r.decimals},n)))})]}),ne&&"spender"in ne&&ne?.spender?/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Spender"}),/*#__PURE__*/e(g,{children:/*#__PURE__*/e(T,{address:ne.spender,url:B?.blockExplorers?.default?.url})})]}):null,j&&/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"To"}),/*#__PURE__*/e(g,{children:/*#__PURE__*/e(T,{address:j,url:B?.blockExplorers?.default?.url,showCopyIcon:!0})})]}),M&&/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Token address"}),/*#__PURE__*/e(g,{children:/*#__PURE__*/e(T,{address:M,url:B?.blockExplorers?.default?.url})})]}),/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Network"}),/*#__PURE__*/e(g,{children:E})]}),/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Estimated fee"}),/*#__PURE__*/e(g,{$isLoading:R||q||void 0===Q,children:Q?/*#__PURE__*/r(_,{children:[/*#__PURE__*/r(ee,{children:["Sponsored by ",be.name]}),/*#__PURE__*/e(i,{height:16,width:16})]}):D})]}),ke&&!se&&/*#__PURE__*/r(n,{children:[/*#__PURE__*/e(x,{className:"cursor-pointer",onClick:()=>xe(!ye),children:/*#__PURE__*/r(f,{className:"flex items-center gap-x-1",children:["Details"," ",/*#__PURE__*/e(t,{style:{width:"0.75rem",marginLeft:"0.25rem",transform:ye?"rotate(180deg)":void 0}})]})}),ye&&ne&&/*#__PURE__*/e(U,{action:I,chain:B,transactionDetails:ne,isTokenContractInfoLoading:H,symbol:Y})]}),se&&/*#__PURE__*/e(x,{children:/*#__PURE__*/r(P,{onClick:()=>ce(!0),children:[/*#__PURE__*/e("span",{className:"text-color-primary",children:"Details"}),/*#__PURE__*/e(o,{height:"14px",width:"14px",strokeWidth:"2"})]})})]}),/*#__PURE__*/e(S,{}),s?/*#__PURE__*/e(k,{style:{marginTop:"2rem"},children:s.message}):u&&0===ie?
|
|
45
|
+
/*#__PURE__*/e(k,{style:{marginTop:"2rem"},children:u.shortMessage??K}):null,/*#__PURE__*/e(V,{variant:ae,preventMaliciousTransaction:de,setPreventMaliciousTransaction:he}),/*#__PURE__*/e(X,{$useSmallMargins:!(!u&&!s&&"warn"!==ae&&"error"!==ae),address:N,balance:G,errMsg:R||u||s||!O?void 0:`Add funds on ${B?.name??le} to complete transaction.`}),/*#__PURE__*/e(d,{style:{marginTop:"1rem"},loading:W,disabled:L||R,onClick:re,children:F}),ge&&/*#__PURE__*/e(h,{style:{marginTop:"1rem"},onClick:v,isSubmitting:!1,children:"Not now"}),/*#__PURE__*/e(m,{})]})},Y=({img:o,title:a,subtitle:h,cta:u,instructions:f,network:I,blockExplorerUrl:C,isMissingFunds:$,submitError:j,parseError:M,total:E,swap:O,transactingWalletAddress:D,fee:N,balance:F,disabled:L,isSubmitting:z,isPreparing:B,isTokenPriceLoading:W,onClick:R,onClose:U,onBack:V,isSponsored:q})=>{let H=B||W,[J,Q]=l(!1),Y=A();/*#__PURE__*/return r(n,{children:[/*#__PURE__*/e(c,{onClose:U,backFn:V}),o&&/*#__PURE__*/e(Z,{children:o}),/*#__PURE__*/e(w,{style:{marginTop:o?"1.5rem":0},children:a}),/*#__PURE__*/e(b,{children:h}),/*#__PURE__*/r(y,{style:{marginTop:"2rem",marginBottom:".5rem"},children:[(E||H)&&/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Amount"}),/*#__PURE__*/e(g,{$isLoading:H,children:E})]}),O&&/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Swap"}),/*#__PURE__*/e(g,{children:O})]}),I&&/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Network"}),/*#__PURE__*/e(g,{children:I})]}),(N||H||void 0!==q)&&/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Estimated fee"}),/*#__PURE__*/e(g,{$isLoading:H,children:q&&!H?/*#__PURE__*/r(_,{children:[/*#__PURE__*/r(ee,{children:["Sponsored by ",Y.name]}),/*#__PURE__*/e(i,{height:16,width:16})]}):N})]})]}),/*#__PURE__*/e(x,{children:/*#__PURE__*/r(P,{onClick:()=>Q((e=>!e)),children:[/*#__PURE__*/e("span",{children:"Advanced"}),/*#__PURE__*/e(t,{height:"16px",width:"16px",strokeWidth:"2",style:{transition:"all 300ms",transform:J?"rotate(180deg)":void 0}})]})}),J&&/*#__PURE__*/e(n,{children:f.map(((n,i)=>"sol-transfer"===n.type?/*#__PURE__*/r(G,{children:[/*#__PURE__*/e(x,{children:/*#__PURE__*/r(v,{children:["Transfer ",n.withSeed?"with seed":""]})}),/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Amount"}),/*#__PURE__*/r(g,{children:[s({amount:n.value,decimals:n.token.decimals})," ",n.token.symbol]})]}),!!n.toAccount&&/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Destination"}),/*#__PURE__*/e(g,{children:/*#__PURE__*/e(T,{address:n.toAccount,url:C})})]})]},i):"spl-transfer"===n.type?/*#__PURE__*/r(G,{children:[/*#__PURE__*/e(x,{children:/*#__PURE__*/r(v,{children:["Transfer ",n.token.symbol]})}),/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Amount"}),/*#__PURE__*/e(g,{children:n.value.toString()})]}),!!n.fromAta&&/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Source"}),/*#__PURE__*/e(g,{children:/*#__PURE__*/e(T,{address:n.fromAta,url:C})})]}),!!n.toAta&&/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Destination"}),/*#__PURE__*/e(g,{children:/*#__PURE__*/e(T,{address:n.toAta,url:C})})]}),!!n.token.address&&/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Token"}),/*#__PURE__*/e(g,{children:/*#__PURE__*/e(T,{address:n.token.address,url:C})})]})]},i):"ata-creation"===n.type?/*#__PURE__*/r(G,{children:[/*#__PURE__*/e(x,{children:/*#__PURE__*/e(v,{children:"Create token account"})}),/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Program ID"}),/*#__PURE__*/e(g,{children:/*#__PURE__*/e(T,{address:n.program,url:C})})]}),!!n.owner&&/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Owner"}),/*#__PURE__*/e(g,{children:/*#__PURE__*/e(T,{address:n.owner,url:C})})]})]},i):"create-account"===n.type?/*#__PURE__*/r(G,{children:[/*#__PURE__*/e(x,{children:/*#__PURE__*/r(v,{children:["Create account ",n.withSeed?"with seed":""]})}),!!n.account&&/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Account"}),/*#__PURE__*/e(g,{children:/*#__PURE__*/e(T,{address:n.account,url:C})})]}),/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Amount"}),/*#__PURE__*/r(g,{children:[s({amount:n.value,decimals:9})," SOL"]})]})]},i):"spl-init-account"===n.type?/*#__PURE__*/r(G,{children:[/*#__PURE__*/e(x,{children:/*#__PURE__*/e(v,{children:"Initialize token account"})}),!!n.account&&/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Account"}),/*#__PURE__*/e(g,{children:/*#__PURE__*/e(T,{address:n.account,url:C})})]}),!!n.mint&&/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Mint"}),/*#__PURE__*/e(g,{children:/*#__PURE__*/e(T,{address:n.mint,url:C})})]}),!!n.owner&&/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Owner"}),/*#__PURE__*/e(g,{children:/*#__PURE__*/e(T,{address:n.owner,url:C})})]})]},i):"spl-close-account"===n.type?/*#__PURE__*/r(G,{children:[/*#__PURE__*/e(x,{children:/*#__PURE__*/e(v,{children:"Close token account"})}),!!n.source&&/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Source"}),/*#__PURE__*/e(g,{children:/*#__PURE__*/e(T,{address:n.source,url:C})})]}),!!n.destination&&/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Destination"}),/*#__PURE__*/e(g,{children:/*#__PURE__*/e(T,{address:n.destination,url:C})})]}),!!n.owner&&/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Owner"}),/*#__PURE__*/e(g,{children:/*#__PURE__*/e(T,{address:n.owner,url:C})})]})]},i):"spl-sync-native"===n.type?/*#__PURE__*/r(G,{children:[/*#__PURE__*/e(x,{children:/*#__PURE__*/e(v,{children:"Sync native"})}),/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Program ID"}),/*#__PURE__*/e(g,{children:/*#__PURE__*/e(T,{address:n.program,url:C})})]})]},i):"raydium-swap-base-input"===n.type?/*#__PURE__*/r(G,{children:[/*#__PURE__*/e(x,{children:/*#__PURE__*/r(v,{children:["Raydium swap"," ",n.tokenIn&&n.tokenOut?`${n.tokenIn.symbol} → ${n.tokenOut.symbol}`:""]})}),/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Amount in"}),/*#__PURE__*/e(g,{children:n.amountIn.toString()})]}),/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Minimum amount out"}),/*#__PURE__*/e(g,{children:n.minimumAmountOut.toString()})]}),n.mintIn&&/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Token in"}),/*#__PURE__*/e(g,{children:/*#__PURE__*/e(T,{address:n.mintIn,url:C})})]}),n.mintOut&&/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Token out"}),/*#__PURE__*/e(g,{children:/*#__PURE__*/e(T,{address:n.mintOut,url:C})})]})]},i):"raydium-swap-base-output"===n.type?/*#__PURE__*/r(G,{children:[/*#__PURE__*/e(x,{children:/*#__PURE__*/r(v,{children:["Raydium swap"," ",n.tokenIn&&n.tokenOut?`${n.tokenIn.symbol} → ${n.tokenOut.symbol}`:""]})}),/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Max amount in"}),/*#__PURE__*/e(g,{children:n.maxAmountIn.toString()})]}),/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Amount out"}),/*#__PURE__*/e(g,{children:n.amountOut.toString()})]}),n.mintIn&&/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Token in"}),/*#__PURE__*/e(g,{children:/*#__PURE__*/e(T,{address:n.mintIn,url:C})})]}),n.mintOut&&/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Token out"}),/*#__PURE__*/e(g,{children:/*#__PURE__*/e(T,{address:n.mintOut,url:C})})]})]},i):"jupiter-swap-shared-accounts-route"===n.type?/*#__PURE__*/r(G,{children:[/*#__PURE__*/e(x,{children:/*#__PURE__*/r(v,{children:["Jupiter swap"," ",n.tokenIn&&n.tokenOut?`${n.tokenIn.symbol} → ${n.tokenOut.symbol}`:""]})}),/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"In amount"}),/*#__PURE__*/e(g,{children:n.inAmount.toString()})]}),/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Quoted out amount"}),/*#__PURE__*/e(g,{children:n.quotedOutAmount.toString()})]}),n.mintIn&&/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Token in"}),/*#__PURE__*/e(g,{children:/*#__PURE__*/e(T,{address:n.mintIn,url:C})})]}),n.mintOut&&/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Token out"}),/*#__PURE__*/e(g,{children:/*#__PURE__*/e(T,{address:n.mintOut,url:C})})]})]},i):"jupiter-swap-exact-out-route"===n.type?/*#__PURE__*/r(G,{children:[/*#__PURE__*/e(x,{children:/*#__PURE__*/r(v,{children:["Jupiter swap"," ",n.tokenIn&&n.tokenOut?`${n.tokenIn.symbol} → ${n.tokenOut.symbol}`:""]})}),/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Quoted in amount"}),/*#__PURE__*/e(g,{children:n.quotedInAmount.toString()})]}),/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Amount out"}),/*#__PURE__*/e(g,{children:n.outAmount.toString()})]}),n.mintIn&&/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Token in"}),/*#__PURE__*/e(g,{children:/*#__PURE__*/e(T,{address:n.mintIn,url:C})})]}),n.mintOut&&/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Token out"}),/*#__PURE__*/e(g,{children:/*#__PURE__*/e(T,{address:n.mintOut,url:C})})]})]},i):/*#__PURE__*/r(G,{children:[/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Program ID"}),/*#__PURE__*/e(g,{children:/*#__PURE__*/e(T,{address:n.program,url:C})})]}),/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"Data"}),/*#__PURE__*/e(g,{children:n.discriminator})]})]},i)))}),/*#__PURE__*/e(S,{}),j?/*#__PURE__*/e(k,{style:{marginTop:"2rem"},children:j.message}):M?/*#__PURE__*/e(k,{style:{marginTop:"2rem"},children:K}):null,/*#__PURE__*/e(X,{$useSmallMargins:!(!M&&!j),title:"",address:D,balance:F,errMsg:B||M||j||!$?void 0:"Add funds on Solana to complete transaction."}),/*#__PURE__*/e(d,{style:{marginTop:"1rem"},loading:z,disabled:L||B,onClick:R,children:u}),/*#__PURE__*/e(m,{})]})};let X=a(I)`
|
|
46
|
+
${e=>e.$useSmallMargins?"margin-top: 0.5rem;":"margin-top: 2rem;"}
|
|
47
|
+
`,G=a(y)`
|
|
48
|
+
margin-top: 0.5rem;
|
|
49
|
+
border: 1px solid var(--privy-color-foreground-4);
|
|
50
|
+
border-radius: var(--privy-border-radius-sm);
|
|
51
|
+
padding: 0.5rem;
|
|
52
|
+
`,K="There was an error preparing your transaction. Your transaction request will likely fail.",Z=a.div`
|
|
53
|
+
display: flex;
|
|
54
|
+
width: 100%;
|
|
55
|
+
justify-content: center;
|
|
56
|
+
max-height: 40px;
|
|
57
|
+
|
|
58
|
+
> img {
|
|
59
|
+
object-fit: contain;
|
|
60
|
+
border-radius: var(--privy-border-radius-sm);
|
|
61
|
+
}
|
|
62
|
+
`,_=a.span`
|
|
63
|
+
display: inline-flex;
|
|
64
|
+
align-items: center;
|
|
65
|
+
gap: 0.3rem;
|
|
66
|
+
`,ee=a.span`
|
|
67
|
+
font-size: 14px;
|
|
68
|
+
font-weight: 500;
|
|
69
|
+
color: var(--privy-color-foreground);
|
|
70
|
+
`;let re=()=>/*#__PURE__*/r(le,{children:[/*#__PURE__*/e(se,{}),/*#__PURE__*/e(ae,{})]});const ne=({transactionError:i,chainId:o,onClose:t,onRetry:a,chainType:s,transactionHash:d})=>{let{chains:h}=L(),[m,p]=l(!1),{errorCode:g,errorMessage:f}=((e,r)=>{if("ethereum"===r)return{errorCode:e.details??e.message,errorMessage:e.shortMessage};let n=e.txSignature,i=e?.transactionMessage||"Something went wrong.";if(Array.isArray(e.logs)){let r=e.logs.find((e=>/insufficient (lamports|funds)/gi.test(e)));r&&(i=r)}return{transactionHash:n,errorMessage:i}})(i,s),y=(({chains:e,chainId:r,chainType:n,transactionHash:i})=>"ethereum"===n?e.find((e=>e.id===r))?.blockExplorers?.default.url??"https://etherscan.io":function(e,r){return`https://explorer.solana.com/tx/${e}?chain=${r}`}(i||"",r))({chains:h,chainId:o,chainType:s,transactionHash:d});/*#__PURE__*/return r(n,{children:[/*#__PURE__*/e(c,{onClose:t}),/*#__PURE__*/r(ie,{children:[/*#__PURE__*/e(re,{}),/*#__PURE__*/e(oe,{children:g}),/*#__PURE__*/e(te,{children:"Please try again."}),/*#__PURE__*/r(he,{children:[/*#__PURE__*/e(de,{children:"Error message"}),/*#__PURE__*/e(ue,{$clickable:!1,children:f})]}),d&&/*#__PURE__*/r(he,{children:[/*#__PURE__*/e(de,{children:"Transaction hash"}),/*#__PURE__*/r(me,{children:["Copy this hash to view details about the transaction on a"," ",/*#__PURE__*/e("u",{children:/*#__PURE__*/e("a",{href:y,children:"block explorer"})}),"."]}),/*#__PURE__*/r(ue,{$clickable:!0,onClick:async()=>{await navigator.clipboard.writeText(d),p(!0)},children:[d,/*#__PURE__*/e(fe,{clicked:m})]})]}),/*#__PURE__*/e(ce,{onClick:()=>a({resetNonce:!!d}),children:"Retry transaction"})]}),/*#__PURE__*/e(u,{})]})};let ie=a.div`
|
|
71
|
+
display: flex;
|
|
72
|
+
flex-direction: column;
|
|
73
|
+
align-items: center;
|
|
74
|
+
justify-content: center;
|
|
75
|
+
`,oe=a.span`
|
|
76
|
+
color: var(--privy-color-foreground);
|
|
77
|
+
text-align: center;
|
|
78
|
+
font-size: 1.125rem;
|
|
79
|
+
font-weight: 500;
|
|
80
|
+
line-height: 1.25rem; /* 111.111% */
|
|
81
|
+
text-align: center;
|
|
82
|
+
margin: 10px;
|
|
83
|
+
`,te=a.span`
|
|
84
|
+
margin-top: 4px;
|
|
85
|
+
margin-bottom: 10px;
|
|
86
|
+
color: var(--privy-color-foreground-3);
|
|
87
|
+
text-align: center;
|
|
88
|
+
|
|
89
|
+
font-size: 0.875rem;
|
|
90
|
+
font-style: normal;
|
|
91
|
+
font-weight: 400;
|
|
92
|
+
line-height: 20px; /* 142.857% */
|
|
93
|
+
letter-spacing: -0.008px;
|
|
94
|
+
`,le=a.div`
|
|
95
|
+
position: relative;
|
|
96
|
+
width: 60px;
|
|
97
|
+
height: 60px;
|
|
98
|
+
margin: 10px;
|
|
99
|
+
display: flex;
|
|
100
|
+
justify-content: center;
|
|
101
|
+
align-items: center;
|
|
102
|
+
`,ae=a(F)`
|
|
103
|
+
position: absolute;
|
|
104
|
+
width: 35px;
|
|
105
|
+
height: 35px;
|
|
106
|
+
color: var(--privy-color-error);
|
|
107
|
+
`,se=a.div`
|
|
108
|
+
position: absolute;
|
|
109
|
+
width: 60px;
|
|
110
|
+
height: 60px;
|
|
111
|
+
border-radius: 50%;
|
|
112
|
+
background-color: var(--privy-color-error);
|
|
113
|
+
opacity: 0.1;
|
|
114
|
+
`,ce=a(d)`
|
|
115
|
+
&& {
|
|
116
|
+
margin-top: 24px;
|
|
117
|
+
}
|
|
118
|
+
transition:
|
|
119
|
+
color 350ms ease,
|
|
120
|
+
background-color 350ms ease;
|
|
121
|
+
`,de=a.span`
|
|
122
|
+
width: 100%;
|
|
123
|
+
text-align: left;
|
|
124
|
+
font-size: 0.825rem;
|
|
125
|
+
color: var(--privy-color-foreground);
|
|
126
|
+
padding: 4px;
|
|
127
|
+
`,he=a.div`
|
|
128
|
+
width: 100%;
|
|
129
|
+
margin: 5px;
|
|
130
|
+
display: flex;
|
|
131
|
+
flex-direction: column;
|
|
132
|
+
justify-content: center;
|
|
133
|
+
align-items: center;
|
|
134
|
+
`,me=a.text`
|
|
135
|
+
position: relative;
|
|
136
|
+
width: 100%;
|
|
137
|
+
padding: 5px;
|
|
138
|
+
font-size: 0.8rem;
|
|
139
|
+
color: var(--privy-color-foreground-3);
|
|
140
|
+
text-align: left;
|
|
141
|
+
word-wrap: break-word;
|
|
142
|
+
`,ue=a.span`
|
|
143
|
+
position: relative;
|
|
144
|
+
width: 100%;
|
|
145
|
+
background-color: var(--privy-color-background-2);
|
|
146
|
+
padding: 8px 12px;
|
|
147
|
+
border-radius: 10px;
|
|
148
|
+
margin-top: 5px;
|
|
149
|
+
font-size: 14px;
|
|
150
|
+
color: var(--privy-color-foreground-3);
|
|
151
|
+
text-align: left;
|
|
152
|
+
word-wrap: break-word;
|
|
153
|
+
${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 }"}
|
|
154
|
+
`,pe=a(N)`
|
|
155
|
+
position: absolute;
|
|
156
|
+
top: 13px;
|
|
157
|
+
right: 13px;
|
|
158
|
+
width: 24px;
|
|
159
|
+
height: 24px;
|
|
160
|
+
`,ge=a(D)`
|
|
161
|
+
position: absolute;
|
|
162
|
+
top: 13px;
|
|
163
|
+
right: 13px;
|
|
164
|
+
width: 24px;
|
|
165
|
+
height: 24px;
|
|
166
|
+
`,fe=({clicked:r})=>/*#__PURE__*/e(r?ge:pe,{});export{Q as S,ne as T,Y as a};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import{jsxs as e,jsx as n,Fragment as t}from"react/jsx-runtime";import{useState as l,useEffect as a}from"react";import{M as o,B as i}from"./ModalHeader-DS6bUzfI.mjs";import{C as r}from"./ScreenHeader-CHmc4-Lu.mjs";import{t as c}from"./FundWalletMethodHeader-BrnPYIin.mjs";import{C as s}from"./Chip-D2-wZOHJ.mjs";import{S as p}from"./Subtitle-CV-2yKE4.mjs";import{u as d}from"./context-B2_ynXJ0.mjs";import{F as m,Q as y,n as u,T as h,U as w,v as f,a8 as T}from"./useActiveWallet-C7hnsvNI.mjs";import{u as g}from"./internal-context-e-Eni5bG.mjs";import{a as C}from"./get-is-unified-wallet-BGYgYz7O.mjs";import{u as v}from"./useWallets-Djv8Lbsf.mjs";import{W as _}from"./WalletOverflowButton-yQpq7u7H.mjs";import{z as j,A as x,D as S}from"./index-Bn7dGnWc.mjs";import{isMobile as W}from"react-device-detect";import{styled as b}from"styled-components";import{I as $}from"./InjectedWalletIcon-DLcYOGDj.mjs";import{I as k}from"./styles-Y2DUk2QG.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./LoadingSkeleton-U6-3yFwI.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"zustand";import"./prepareFundingModalData-D3TrJtDq.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"ofetch";import"lucide-react";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-C9lIPcEH.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-CwE9r3cT.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-eEm9Olt_.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"@heroicons/react/24/outline/WalletIcon";import"./LinkPasskeyScreen-CgKBoENR.mjs";import"./TodoList-CgrU7uwu.mjs";import"./ScreenLayout-MTddPyq4.mjs";import"./Screen-Ced2RY7C.mjs";import"./index-Dq_xe9dz.mjs";const O=({provider:t,displayName:l,logo:a,connectOnly:o,connector:i})=>{let r,{navigate:c,setModalData:s}=C(),{connectWallet:p}=g(),d=m(),w=y(t),f="wallet_connect_v2"===i.connectorType?t:i.walletClientType,T=window.matchMedia("(display-mode: standalone)").matches,v=u({connectorType:i.connectorType,walletClientType:f});r=v&&v.chainTypes.includes(i.chainType)?()=>{v.isInstalled||"solana"===i.chainType&&"isInstalled"in i&&i.isInstalled?(p(i,f),c(o?"ConnectOnlyStatusScreen":"ConnectionStatusScreen")):W?(s({installWalletModalData:{walletConfig:v,chainType:i.chainType,connectOnly:o}}),c("WalletInterstitialScreen")):(s({installWalletModalData:{walletConfig:v,chainType:i.chainType,connectOnly:o}}),c("InstallWalletScreen"))}:"coinbase_wallet"!==i.connectorType||"eoaOnly"!==i.coinbaseWalletConfig.preference?.options||!W||T||h()?()=>{(!j(window.navigator.userAgent)||event?.isTrusted)&&(p(i,f),o?"wallet_connect_v2"===i.connectorType?(s((e=>({...e,externalConnectWallet:{...e?.externalConnectWallet,preSelectedWalletId:"wallet_connect_qr"}}))),c("ConnectOnlyLandingScreen")):c("ConnectOnlyStatusScreen"):c("ConnectionStatusScreen"))}:()=>{window.location.href=`https://go.cb-w.com/dapp?cb_url=${encodeURI(window.location.href)}`};let _=l||w?.metadata?.shortName||w?.name||i.walletClientType;/*#__PURE__*/return e(D,{onClick:r,children:[/*#__PURE__*/n($,{icon:a||w?.image_url?.md,name:_}),/*#__PURE__*/n("span",{children:_}),/*#__PURE__*/e(M,{id:"chip-container",children:[d?.walletClientType===f&&d?.chainType===i.chainType?/*#__PURE__*/n(I,{color:"gray",children:"Recent"}):/*#__PURE__*/n("span",{id:"connect-text",children:"Connect"}),"solana"===i.chainType&&/*#__PURE__*/n(I,{color:"gray",children:"Solana"})]})]})};let D=b(w)`
|
|
2
|
+
/* Wallet name text color */
|
|
3
|
+
> span {
|
|
4
|
+
color: var(--privy-color-foreground);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
/* Show "Connect" on hover */
|
|
8
|
+
> #chip-container > #connect-text {
|
|
9
|
+
font-weight: 500;
|
|
10
|
+
color: var(--privy-color-accent);
|
|
11
|
+
opacity: 0;
|
|
12
|
+
transition: opacity 0.1s ease-out;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:hover > #chip-container > #connect-text {
|
|
16
|
+
opacity: 1;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@media (max-width: 440px) {
|
|
20
|
+
> #chip-container > #connect-text {
|
|
21
|
+
display: none;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
`,I=b(s)`
|
|
25
|
+
margin-left: auto;
|
|
26
|
+
`,M=b.div`
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-wrap: wrap;
|
|
29
|
+
gap: 8px;
|
|
30
|
+
margin-left: auto;
|
|
31
|
+
`;const F=["coinbase_wallet","base_account"];let B=["metamask","okx_wallet","rainbow","uniswap","bybit_wallet","ronin_wallet","haha_wallet","uniswap_extension","zerion","rabby_wallet","cryptocom","binance","kraken_wallet"];const A=["safe"],E=["phantom","backpack","solflare","jupiter","universal_profile"],L={component:()=>{let s,{connectors:m}=g(),{setModalData:y,data:u,navigate:h}=C(),w=d(),{wallets:j}=v(),W=m.filter(f).flatMap((e=>e.wallets)),[b,$]=l("default"),k="solana"===u?.funding?.chainType,D=!!u?.funding?.crossChainBridgingEnabled;s="ethereum"===u?.funding?.chainType?u.funding.erc20Address&&!u.funding.isUSDC?"ethereum-only":D&&!u.funding.chain.testnet?"ethereum-and-solana":"ethereum-only":D&&!u.funding?.isUSDC?"ethereum-and-solana":"solana-only";let I=j.filter((e=>"privy"!==e.walletClientType)),M=I.map((e=>e.walletClientType)),L=W.filter((e=>"privy"!==e.walletClientType)),U=L.map((e=>e.walletClientType)),z=[],H={...u.funding};H.usingDefaultFundingMethod&&(H.usingDefaultFundingMethod=!1);let P=({wallet:e,walletChainType:n})=>{y({...u,funding:{...H,connectedWallet:e,onContinueWithExternalWallet:()=>h(Q({destChainType:k?"solana":"ethereum",sourceChainType:n}))},solanaFundingData:u?.solanaFundingData?{...u.solanaFundingData,sourceWalletData:{address:e.address,walletClientType:e.walletClientType}}:void 0}),h("FundingAmountEditScreen")};"solana-only"!==s&&z.push(...I.map(((e,t)=>/*#__PURE__*/n(N,{onClick:()=>P({wallet:e,walletChainType:"ethereum"}),icon:e.meta.icon,name:e.meta.name,chainType:e.type},t)))),"ethereum-only"!==s&&z.push(...L.map(((e,t)=>/*#__PURE__*/n(N,{onClick:()=>P({wallet:e,walletChainType:"solana"}),icon:e.meta.icon,name:e.meta.name,chainType:e.type},t)))),z.push(...(({walletList:e,walletChainType:t,connectors:l,connectOnly:a,ignore:o,walletConnectEnabled:i,forceWallet:r})=>{let c=[],s=[],p=[],d=l.filter((e=>"ethereum-only"===t?"ethereum"===e.chainType:"solana-only"!==t||"solana"===e.chainType)),m=d.find((e=>"wallet_connect_v2"===e.connectorType));for(let[l,y]of(r?[r.wallet]:e).entries()){if("detected_ethereum_wallets"===y)for(let[e,t]of d.filter((({chainType:e,connectorType:n,walletClientType:t})=>"solana"!==e&&("uniswap_wallet_extension"===t||"uniswap_extension"===t?!o.includes("uniswap"):"crypto.com_wallet_extension"===t||"crypto.com_onchain"===t?!o.includes("cryptocom"):"injected"===n&&!o.includes(t)))).entries()){let{walletClientType:o,walletBranding:i,chainType:r}=t;("unknown"===o?s:c).push(/*#__PURE__*/n(O,{connectOnly:a,provider:o,logo:i.icon,displayName:i.name,connector:t},`${l}-${y}-${o}-${r}-${e}`))}if("detected_solana_wallets"===y)for(let[e,i]of d.filter((({chainType:e,walletClientType:n})=>{if("solana"===e)return"ethereum-only"!==t&&!o.includes(n)})).entries()){let{walletClientType:t,walletBranding:o,chainType:r}=i;("unknown"===t?s:c).push(/*#__PURE__*/n(O,{connectOnly:a,provider:t,logo:o.icon,displayName:o.name,connector:i},`${l}-${y}-${t}-${r}-${e}`))}if(E.includes(y)){let e=d.find((e=>"injected"===e.connectorType&&e.walletClientType===y||e.connectorType===y));if(e&&c.push(/*#__PURE__*/n(O,{connectOnly:a,provider:y,connector:e},`${l}-${y}`)),"solana-only"===t||"ethereum-and-solana"===t){let e=d.find((({chainType:e,walletClientType:n})=>"solana"===e&&n===y));e&&c.push(/*#__PURE__*/n(O,{connectOnly:a,provider:y,connector:e},`${y}-solana`))}}else if(B.includes(y)){let e=d.find((e=>"uniswap"===y?"uniswap_wallet_extension"===e.walletClientType||"uniswap_extension"===e.walletClientType:"cryptocom"===y?"crypto.com_wallet_extension"===e.walletClientType||"crypto.com_onchain"===e.walletClientType:"injected"===e.connectorType&&e.walletClientType===y));if(i&&!e&&(e=m),e&&c.push(/*#__PURE__*/n(O,{connectOnly:a,provider:y,connector:e,logo:"injected"===e.connectorType?e.walletBranding.icon:void 0,displayName:"injected"===e.connectorType?e.walletBranding.name:void 0},`${l}-${y}`)),"solana-only"===t||"ethereum-and-solana"===t){let e=d.find((({chainType:e,walletClientType:n})=>"solana"===e&&n===y));e&&c.push(/*#__PURE__*/n(O,{connectOnly:a,provider:y,connector:e},`${y}-solana`))}}else if(F.includes(y)){let e=d.find((({connectorType:e})=>e===y));e&&c.push(/*#__PURE__*/n(O,{connectOnly:a,provider:y,connector:e,displayName:"coinbase_wallet"===e.walletClientType?"Coinbase":"Base",logo:"coinbase_wallet"===e.walletClientType?x:S},`${l}-${y}`))}else if(A.includes(y))m&&p.push(/*#__PURE__*/n(O,{connectOnly:a,provider:y,connector:m},`${l}-${y}`));else if("wallet_connect"===y)m&&p.push(/*#__PURE__*/n(O,{connectOnly:a,provider:y,connector:m,logo:m.walletBranding.icon,displayName:"WalletConnect"},`${l}-${y}`));else if(y===r?.wallet){let t="ethereum"===r.chainType&&e.includes("detected_ethereum_wallets"),o="solana"===r.chainType&&e.includes("detected_solana_wallets");if(t||o){let e=d.find((({walletClientType:e})=>e===y));e&&c.push(/*#__PURE__*/n(O,{connectOnly:a,provider:y,displayName:e.walletBranding?.name,logo:e.walletBranding?.icon,connector:e},`${l}-${y}`))}}}return[...s,...c,...p]})({walletList:w.appearance.walletList.filter((e=>!I.some((n=>n.walletClientType===e))&&!L.some((n=>n.walletClientType===e)))),walletChainType:s,connectors:m,connectOnly:!0,ignore:[...w.appearance.walletList,...M,...U],walletConnectEnabled:w.externalWallets.walletConnect.enabled}));let R=/*#__PURE__*/n(_,{text:"More wallets",onClick:()=>$("overflow")}),Q=({sourceChainType:e,destChainType:n})=>"ethereum"===e&&"solana"===n?"AwaitingEvmToSolBridgingScreen":"ethereum"===e&&"ethereum"===n?"AwaitingExternalEthereumTransferScreen":"solana"===e&&"ethereum"===n?"AwaitingSolToEvmBridgingScreen":H.externalSolanaFundingScreen;return a((()=>{y({...u,externalConnectWallet:{onCompleteNavigateTo:({address:e,walletClientType:n,walletChainType:t})=>{let l=t??"ethereum",a="ethereum"===l?I.find((t=>t.address===e&&t.walletClientType===n)):L.find((t=>t.address===e&&t.walletClientType===n));return y({...u,funding:{...H,connectedWallet:a,onContinueWithExternalWallet:()=>{h(Q({destChainType:k?"solana":"ethereum",sourceChainType:l}))}},solanaFundingData:u?.solanaFundingData?{...u.solanaFundingData,sourceWalletData:{address:e||"",walletClientType:n||""}}:void 0}),"FundingAmountEditScreen"}}})}),[]),/*#__PURE__*/e(t,"overflow"===b?{children:[/*#__PURE__*/n(o,{backFn:()=>$("default")},"header"),/*#__PURE__*/e(T,{children:[/*#__PURE__*/n(p,{style:{color:"var(--privy-color-foreground-3)",textAlign:"left"},children:"More wallets"}),z]}),/*#__PURE__*/n(i,{})]}:{children:[/*#__PURE__*/n(c,{}),/*#__PURE__*/n(r,{title:"Transfer from wallet",description:"Connect a wallet to deposit funds or send funds manually to your wallet address."}),/*#__PURE__*/e(T,{children:[z.length>4?z.slice(0,3):z,z.length>4&&R]}),/*#__PURE__*/n(i,{})]})}};let N=({onClick:t,icon:l,name:a,chainType:o})=>/*#__PURE__*/e(w,{onClick:t,children:[/*#__PURE__*/n(k,{style:{width:20},children:/*#__PURE__*/n("img",{src:l})}),a,/*#__PURE__*/n(s,{color:"gray",style:{marginLeft:"auto"},children:"Connected"}),"solana"===o&&/*#__PURE__*/n(s,{color:"gray",children:"Solana"})]});export{L as TransferFromWalletScreen,L as default};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{jsxs as e,Fragment as r,jsx as i}from"react/jsx-runtime";import{styled as o}from"styled-components";import{d as t}from"./Layouts-BlFm53ED.mjs";import{B as n}from"./ModalHeader-DS6bUzfI.mjs";import{C as m}from"./ScreenHeader-CHmc4-Lu.mjs";import{t as a}from"./FundWalletMethodHeader-BrnPYIin.mjs";import{I as s}from"./InjectedWalletIcon-DLcYOGDj.mjs";import{N as d}from"./index-Dq_xe9dz.mjs";import{a as l,R as c}from"./Row-C9vrS4Zi.mjs";import{L as h,V as p}from"./Value-tcJV9e0L.mjs";import{A as f}from"./Address-Ukdn-U5q.mjs";import{N as g}from"./NetworkIcon-B48ilzF8.mjs";import{Q as j}from"./useActiveWallet-C7hnsvNI.mjs";const I=({walletClientType:o,displayName:I,addressToFund:w,chainId:y,chainName:x,isBridging:N,isErc20Flow:C,totalPriceInNativeCurrency:T,totalPriceInUsd:v,gasPriceInNativeCurrency:B,gasPriceInUsd:P})=>{let A=j(o);/*#__PURE__*/return e(r,{children:[/*#__PURE__*/i(a,{}),/*#__PURE__*/i(d,{centerIcon:/*#__PURE__*/i(s,{icon:A?.image_url?.md,name:o})}),/*#__PURE__*/i(m,{style:{marginTop:"8px",marginBottom:"12px"},title:`${N?"Bridging":"Confirming"} with ${I}`}),!N&&!C&&/*#__PURE__*/e(l,{children:[/*#__PURE__*/e(c,{children:[/*#__PURE__*/i(h,{children:"Total"}),/*#__PURE__*/i(p,{children:v||T})]}),/*#__PURE__*/e(c,{children:[/*#__PURE__*/i(h,{children:"To"}),/*#__PURE__*/i(p,{children:/*#__PURE__*/i(f,{address:w,showCopyIcon:!1})})]}),/*#__PURE__*/e(c,{children:[/*#__PURE__*/i(h,{children:"Network"}),/*#__PURE__*/i(p,{children:/*#__PURE__*/e(u,{children:[/*#__PURE__*/i(g,{chainId:y,height:16,width:16})," ",x]})})]}),B&&/*#__PURE__*/e(c,{children:[/*#__PURE__*/i(h,{children:"Estimated fee"}),/*#__PURE__*/i(p,{children:P||B})]})]}),/*#__PURE__*/i(t,{height:24}),/*#__PURE__*/i(n,{})]})};let u=o.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: row;
|
|
4
|
+
align-items: center;
|
|
5
|
+
gap: 4px;
|
|
6
|
+
`;export{I as T};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsxs as e,Fragment as r,jsx as t}from"react/jsx-runtime";import i from"@heroicons/react/24/outline/EnvelopeIcon";import{B as o}from"./Layouts-BlFm53ED.mjs";import{Mail as a}from"lucide-react";import{forwardRef as s,useState as m}from"react";import{u as n}from"./context-B2_ynXJ0.mjs";import{a as l}from"./index-Bn7dGnWc.mjs";import{u as d}from"./internal-context-e-Eni5bG.mjs";import{u as c,a as p}from"./get-is-unified-wallet-BGYgYz7O.mjs";import{a1 as u,V as h}from"./useActiveWallet-C7hnsvNI.mjs";import{E as f,P as j}from"./ModalHeader-DS6bUzfI.mjs";import{I as v,E as g}from"./EmailInputForm-Dgoii4vf.mjs";import{E as y}from"./ErrorMessage-D8VaAP5m.mjs";import{S as w}from"./ScreenLayout-MTddPyq4.mjs";import"styled-components";import"@privy-io/js-sdk-core";import"tinycolor2";import"uuid";import"jose";import"eventemitter3";import"./useWallets-Djv8Lbsf.mjs";import"./prepareFundingModalData-D3TrJtDq.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"react-device-detect";import"viem/utils";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-C9lIPcEH.mjs";import"./events-context-CI0iqAXA.mjs";import"@scure/base";import"zustand";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"viem";import"./getPublicClient-A9RSftUZ.mjs";import"ofetch";import"js-cookie";import"./frame-CwE9r3cT.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-eEm9Olt_.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-Ced2RY7C.mjs";import"./index-Dq_xe9dz.mjs";const k=/*#__PURE__*/s(((i,o)=>{let[s,v]=m(""),[g,w]=m(""),[k,E]=m(!1),{authenticated:A,user:C}=c(),{initUpdateEmail:x}=d(),{navigate:I,setModalData:M,currentScreen:P}=p(),{enabled:T,token:U}=l(),D=n(),L=u(s)&&(D.disablePlusEmails&&s.includes("+")?(g||w("Please enter a valid email address without a '+'."),!1):(g&&w(""),!0)),W=k||!L,q=()=>{!T||U||A?(async e=>{if(!C?.email)throw Error("User is required to have an email address to update it.");E(!0);try{await x({oldAddress:C.email.address,newAddress:s,captchaToken:e}),I("AwaitingPasswordlessCodeScreen")}catch(e){M({errorModalData:{error:e,previousScreen:P||"LandingScreen"}}),I("ErrorScreen")}E(!1)})(U):(M({captchaModalData:{callback:e=>{if(!C?.email)throw Error("User is required to have an email address to update it.");return x({oldAddress:C.email.address,newAddress:s,captchaToken:e})},userIntentRequired:!1,onSuccessNavigateTo:"AwaitingPasswordlessCodeScreen",onErrorNavigateTo:"ErrorScreen"}}),I("CaptchaScreen"))};/*#__PURE__*/return e(r,{children:[/*#__PURE__*/e(b,{children:[g&&/*#__PURE__*/t(y,{style:{marginTop:"0.25rem",textAlign:"left"},children:g}),/*#__PURE__*/e(S,{$error:!!g,children:[/*#__PURE__*/t(h,{children:/*#__PURE__*/t(a,{})}),/*#__PURE__*/t("input",{ref:o,id:"email-input",type:"email",placeholder:"your@email.com",onChange:e=>v(e.target.value),onKeyUp:e=>{"Enter"===e.key&&q()},value:s,autoComplete:"email"}),i.stacked?null:/*#__PURE__*/t(f,{isSubmitting:k,onClick:q,disabled:W,children:"Submit"})]})]}),i.stacked?/*#__PURE__*/t(j,{loadingText:null,loading:k,disabled:W,onClick:q,style:{width:"100%"},children:"Submit"}):null]})}));let b=v,S=g;const E=({title:e="Update your email",subtitle:r="Add the email address you'd like to use going forward. We'll send you a confirmation code"})=>/*#__PURE__*/t(w,{title:e,subtitle:r,icon:i,watermark:!0,children:/*#__PURE__*/t(o,{children:/*#__PURE__*/t(k,{stacked:!0})})}),A={component:()=>/*#__PURE__*/t(E,{})};export{A as UpdateEmailScreen,E as UpdateEmailScreenView,A as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import t from"@heroicons/react/24/outline/PhoneIcon";import{useState as o}from"react";import{C as r}from"./ConnectPhoneForm-C_9S31Oj.mjs";import{u as i}from"./internal-context-e-Eni5bG.mjs";import{a as n,u as m}from"./get-is-unified-wallet-BGYgYz7O.mjs";import{S as a}from"./ScreenLayout-MTddPyq4.mjs";import"styled-components";import"@privy-io/js-sdk-core";import"./context-B2_ynXJ0.mjs";import"tinycolor2";import"./useActiveWallet-C7hnsvNI.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-D3TrJtDq.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-Djv8Lbsf.mjs";import"./ModalHeader-DS6bUzfI.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Chip-D2-wZOHJ.mjs";import"./LoadingSkeleton-U6-3yFwI.mjs";import"ofetch";import"./Screen-Ced2RY7C.mjs";import"./index-Dq_xe9dz.mjs";const s=({title:i="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:m,isSubmitting:s=!1})=>{let[c,u]=o(null);/*#__PURE__*/return e(a,{title:i,subtitle:n,icon:t,primaryCta:{label:s?"Submitting":"Update",onClick:async()=>{c?.qualifiedPhoneNumber&&await m(c)},disabled:!c?.isValid||s},watermark:!0,children:/*#__PURE__*/e(r,{onChange:e=>{u(e)},onSubmit:async()=>{},noIncludeSubmitButton:!0,hideRecent:!0})})},c={component:()=>{let{currentScreen:t,data:r,navigate:a,setModalData:c}=n(),{user:u}=m(),{initUpdatePhone:p}=i(),[l,d]=o(!1);/*#__PURE__*/return e(s,{onSubmit:async e=>{d(!0);try{if(!u?.phone?.number)throw Error("User is required to have an phone number to update it.");await p(u?.phone?.number,e.qualifiedPhoneNumber),a("AwaitingPasswordlessCodeScreen")}catch(e){c({errorModalData:{error:e,previousScreen:r?.errorModalData?.previousScreen||t||"LinkPhoneScreen"}}),a("ErrorScreen")}finally{d(!1)}},isSubmitting:l})}};export{c as UpdatePhoneScreen,s as UpdatePhoneScreenView,c as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{a as e}from"./get-is-unified-wallet-BGYgYz7O.mjs";import{S as o}from"./ScreenLayout-MTddPyq4.mjs";import"viem";import"react";import"./context-B2_ynXJ0.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./internal-context-e-Eni5bG.mjs";import"ofetch";import"./ModalHeader-DS6bUzfI.mjs";import"styled-components";import"./useActiveWallet-C7hnsvNI.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-D3TrJtDq.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-Djv8Lbsf.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-Ced2RY7C.mjs";import"./index-Dq_xe9dz.mjs";const i=({style:e,...o})=>/*#__PURE__*/t("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"38px",width:"38px",...e},...o,children:/*#__PURE__*/t("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"})}),r=({title:e="Unable to sign in",subtitle:r="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__*/t(o,{title:e,subtitle:r,icon:i,iconVariant:"subtle",primaryCta:{label:"Go back",onClick:n},showBack:!0,onBack:n,watermark:!0}),n={component:()=>{let{navigate:o}=e();/*#__PURE__*/return t(r,{onGoBack:()=>{o("LandingScreen")}})}};export{n as UserLimitReachedScreen,r as UserLimitReachedScreenView,n as default};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import{styled as o}from"styled-components";import{L as r}from"./LoadingSkeleton-U6-3yFwI.mjs";const e=o.span`
|
|
2
|
+
color: var(--privy-color-foreground-3);
|
|
3
|
+
font-size: 0.875rem;
|
|
4
|
+
font-weight: 400;
|
|
5
|
+
line-height: 1.375rem; /* 157.143% */
|
|
6
|
+
`,t=o(e)`
|
|
7
|
+
color: var(--privy-color-accent);
|
|
8
|
+
`,n=o.span`
|
|
9
|
+
color: var(--privy-color-foreground);
|
|
10
|
+
font-size: 0.875rem;
|
|
11
|
+
font-weight: 500;
|
|
12
|
+
line-height: 1.375rem; /* 157.143% */
|
|
13
|
+
word-break: break-all;
|
|
14
|
+
text-align: right;
|
|
15
|
+
|
|
16
|
+
${r}
|
|
17
|
+
`;export{e as L,n as V,t as a};
|