@privy-io/react-auth 3.16.0 → 3.17.0

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.
Files changed (375) hide show
  1. package/dist/cjs/AccountNotFoundScreen-B_Ii7HuZ.js +1 -0
  2. package/dist/cjs/{Address-DTfphH3Q.js → Address-DVa7_frc.js} +1 -1
  3. package/dist/cjs/AffirmativeConsentScreen-B7KmE68B.js +6 -0
  4. package/dist/cjs/AllowlistRejectionScreen-O8KznddG.js +1 -0
  5. package/dist/cjs/AuthenticateWithWalletScreen-C8K-iZIK.js +1 -0
  6. package/dist/cjs/AwaitingEvmToSolBridgingScreen-cOTXpUAv.js +2 -0
  7. package/dist/cjs/AwaitingExternalEthereumTransferScreen-yMOq8AmY.js +2 -0
  8. package/dist/cjs/AwaitingPasswordlessCodeScreen-lFFqycAd.js +103 -0
  9. package/dist/cjs/AwaitingSolToEvmBridgingScreen-DmvP14kc.js +2 -0
  10. package/dist/cjs/{BridgeNetworkSelectionView-xdYr4mxx.js → BridgeNetworkSelectionView-pkX-b3EU.js} +3 -3
  11. package/dist/cjs/CaptchaScreen-C0GEjNbh.js +1 -0
  12. package/dist/cjs/CoinbaseOnrampStatusScreen-yT0aNgm6.js +16 -0
  13. package/dist/cjs/ConnectEmailForm-BBb0J8Qw.js +3 -0
  14. package/dist/cjs/ConnectLedgerScreen-DUt1xIAQ.js +9 -0
  15. package/dist/cjs/ConnectOnlyLandingScreen-DsDH4IPK.js +1 -0
  16. package/dist/cjs/ConnectOnlyStatusScreen-DHifzxdh.js +1 -0
  17. package/dist/cjs/ConnectOrCreateScreen-BUgdLxoo.js +1 -0
  18. package/dist/cjs/{ConnectPhoneForm-BYX8kgCj.js → ConnectPhoneForm-Cz02aWfj.js} +1 -1
  19. package/dist/cjs/{ConnectWalletView-QyJORAZG.js → ConnectWalletView-CWInrfMx.js} +1 -1
  20. package/dist/cjs/ConnectionStatusScreen-BVrAip_u.js +7 -0
  21. package/dist/cjs/CrossAppAuthScreen-BlSprwdt.js +1 -0
  22. package/dist/cjs/{CustomLandingScreenView-Cx9QR2CX.js → CustomLandingScreenView-FFU4u8kB.js} +6 -6
  23. package/dist/cjs/DelegatedActionsConsentScreen-2K48Ywrm.js +1 -0
  24. package/dist/cjs/DelegatedActionsRevokeScreen-AuQpKTzg.js +1 -0
  25. package/dist/cjs/EmbeddedWalletConnectingScreen-C4LTqs6h.js +1 -0
  26. package/dist/cjs/EmbeddedWalletCreatedScreen-C32Uofc9.js +1 -0
  27. package/dist/cjs/{EmbeddedWalletKeyExportScreen-wfa1ho1-.js → EmbeddedWalletKeyExportScreen-SnvHNrgu.js} +4 -4
  28. package/dist/cjs/EmbeddedWalletOnAccountCreateScreen-osK2tW68.js +1 -0
  29. package/dist/cjs/EmbeddedWalletPasswordUpdateScreen-DKWmdrJ6.js +1 -0
  30. package/dist/cjs/EmbeddedWalletPasswordUpdateSplashScreen-DqSEVO7w.js +1 -0
  31. package/dist/cjs/{EnrollTotp-BzmjXzYC.js → EnrollTotp-CXMhvYqd.js} +8 -8
  32. package/dist/cjs/ErrorScreen-CPJ98NuU.js +4 -0
  33. package/dist/cjs/{FarcasterConnectStatusScreen-s3pS-ZH-.js → FarcasterConnectStatusScreen-D13iXt7h.js} +5 -5
  34. package/dist/cjs/FarcasterSignerStatusScreen-Bf_kP9J_.js +29 -0
  35. package/dist/cjs/FiatOnrampScreen-BV4GPQv0.js +97 -0
  36. package/dist/cjs/FundSolWalletWithExternalSolanaWallet-85QbPj5Z.js +2 -0
  37. package/dist/cjs/FundWalletMethodHeader-CcRikV5C.js +1 -0
  38. package/dist/cjs/FundWithBankDepositScreen-CETUOydb.js +58 -0
  39. package/dist/cjs/FundingEditAmountScreen-ro3pfZTg.js +1 -0
  40. package/dist/cjs/FundingMethodSelectionScreen-ecxVf53z.js +1 -0
  41. package/dist/cjs/InAppBrowserLoginNotPossible-BaL0j2oh.js +1 -0
  42. package/dist/cjs/InstallWalletScreen-D8WdMq8Y.js +1 -0
  43. package/dist/cjs/LandingScreen-D3EKQEkC.js +1 -0
  44. package/dist/cjs/{LinkConflictScreen-DnHf7IMX.js → LinkConflictScreen-Ch0YDBOh.js} +3 -3
  45. package/dist/cjs/LinkEmailScreen-BiHRv43F.js +1 -0
  46. package/dist/cjs/{LinkPasskeyScreen-CTN6f7yX.js → LinkPasskeyScreen-BkAhVm_K.js} +12 -12
  47. package/dist/cjs/LinkPhoneScreen-SMbGlFFp.js +1 -0
  48. package/dist/cjs/LoginFailedScreen-gThOR4ql.js +1 -0
  49. package/dist/cjs/ManualTransferScreen-C6_MKYQa.js +1 -0
  50. package/dist/cjs/MfaAuthEnrollmentFlowScreen-BGwEDhYM.js +1 -0
  51. package/dist/cjs/MfaAuthVerifyFlowScreen-FkpTmQLM.js +1 -0
  52. package/dist/cjs/MfaEnrollmentFlowScreen-D68k3d6k.js +1 -0
  53. package/dist/cjs/MfaVerifyFlowScreen-DPiE_Oju.js +1 -0
  54. package/dist/cjs/{ModalHeader-CakS8Dcu.js → ModalHeader-DGIBNq1A.js} +1 -1
  55. package/dist/cjs/MoonpayStatusScreen-Bwey-ZFS.js +16 -0
  56. package/dist/cjs/OAuthStatusScreen-DCIvmlua.js +1 -0
  57. package/dist/cjs/PasskeySelectSignupOrLogin-BrsgZDWY.js +1 -0
  58. package/dist/cjs/PasskeyStatusScreen-CRdrwEDq.js +3 -0
  59. package/dist/cjs/PasswordRecoveryScreen-nT66Ca8q.js +20 -0
  60. package/dist/cjs/{QrCode-C-Mk5-26.js → QrCode-Di8xGbem.js} +1 -1
  61. package/dist/cjs/RecoveryOAuthStatusScreen-BC6heUn-.js +1 -0
  62. package/dist/cjs/RecoveryPasswordCreateScreen-D6M_6kN8.js +1 -0
  63. package/dist/cjs/{RecoverySelectionScreen-BAJ1nLeO.js → RecoverySelectionScreen-BDCnVnE6.js} +2 -2
  64. package/dist/cjs/{Screen-Dp9-H_S8.js → Screen-B1vrS1Ly.js} +1 -1
  65. package/dist/cjs/{ScreenLayout-DANQ0V5E.js → ScreenLayout-yf03MRVf.js} +1 -1
  66. package/dist/cjs/SelectSourceAsset-BzCWfa5L.js +112 -0
  67. package/dist/cjs/SetAutomaticRecoveryScreen-CVn23TKd.js +14 -0
  68. package/dist/cjs/{SetWalletPasswordForm-B7bBDQ8N.js → SetWalletPasswordForm-0S2ymSzL.js} +4 -4
  69. package/dist/cjs/{SignRequestScreen-BUvgSx9X.js → SignRequestScreen-CPgU7Wo3.js} +4 -4
  70. package/dist/cjs/{StandardSignAndSendTransactionScreen-CzfhyIDP.js → StandardSignAndSendTransactionScreen-C-E3j4dP.js} +2 -2
  71. package/dist/cjs/TelegramAuthScreen-DiYpzHoT.js +1 -0
  72. package/dist/cjs/{TransactionDetails-BlPOqfEn.js → TransactionDetails-CHdkf5Rb.js} +1 -1
  73. package/dist/cjs/{TransactionErrorView-BpXI1X_G.js → TransactionErrorView-D1Nh7N_d.js} +4 -4
  74. package/dist/cjs/{TransferFromWalletScreen-Ds1sknGn.js → TransferFromWalletScreen-h9tRPXBH.js} +2 -2
  75. package/dist/cjs/{TransferOrBridgeLoadingScreen-CAYUlR4u.js → TransferOrBridgeLoadingScreen-DQZIn6hw.js} +2 -2
  76. package/dist/cjs/UpdateEmailScreen-BY3xMHK8.js +1 -0
  77. package/dist/cjs/UpdatePhoneScreen-ChbBiqBC.js +1 -0
  78. package/dist/cjs/UserLimitReachedScreen-AJZpREqN.js +1 -0
  79. package/dist/cjs/{WalletInfoCard-CRZt0t3t.js → WalletInfoCard-BfZ3_ji-.js} +6 -6
  80. package/dist/cjs/WalletInterstitialScreen-DRz63LSO.js +1 -0
  81. package/dist/cjs/{WalletLink-Cx_Zda0m.js → WalletLink--xpsJ0_X.js} +5 -5
  82. package/dist/cjs/{WalletOverflowButton-cnlzyqcK.js → WalletOverflowButton-B81EzN7L.js} +1 -1
  83. package/dist/cjs/{WarningBanner-COl_Q0K3.js → WarningBanner-DUcGaIpZ.js} +1 -1
  84. package/dist/cjs/abstract-smart-wallets.js +1 -1
  85. package/dist/cjs/{context-BAmjgwZ7.js → context-DTLyrNSs.js} +1 -1
  86. package/dist/cjs/{ethers-D8g2mvSK.js → ethers-DkYZ2n_L.js} +1 -1
  87. package/dist/cjs/extended-chains.js +1 -1
  88. package/dist/cjs/{getErc20Balance-C6ZUC_1B.js → getErc20Balance-CZkdpSqJ.js} +1 -1
  89. package/dist/cjs/{getErc20TokenInfo-DprFN1Dj.js → getErc20TokenInfo-B7OUw6ca.js} +1 -1
  90. package/dist/cjs/{index-BohqOluI.js → index-BbTBzvbB.js} +5 -5
  91. package/dist/cjs/{index-DIKBRogK.js → index-DLnQPdlD.js} +2 -2
  92. package/dist/cjs/index-DVVwP01f.js +1 -0
  93. package/dist/cjs/index.js +1 -1
  94. package/dist/cjs/internal.js +1 -1
  95. package/dist/cjs/privy-context-CqCBaHHR.js +1 -0
  96. package/dist/cjs/{shared-C-w7sNT2.js → shared-BrHBD7Qj.js} +1 -1
  97. package/dist/cjs/{shouldProceedtoEmbeddedWalletCreationFlow-DAiUXgPZ.js → shouldProceedtoEmbeddedWalletCreationFlow-By7HZi5X.js} +1 -1
  98. package/dist/cjs/smart-wallets-CXiwZqOu.js +1 -0
  99. package/dist/cjs/smart-wallets.js +1 -1
  100. package/dist/cjs/solana.js +1 -1
  101. package/dist/cjs/{styles-s2f3dL_6.js → styles-BU6XkGeI.js} +4 -4
  102. package/dist/cjs/{to-ui-error-CqnwRcKJ.js → to-ui-error-Bxoctv93.js} +1 -1
  103. package/dist/cjs/ui.js +1 -1
  104. package/dist/cjs/use-export-wallet-B4aMG55I.js +1 -0
  105. package/dist/cjs/use-export-wallet-CJFX3PX0.js +1 -0
  106. package/dist/cjs/{useActiveWallet-CYUR_x0A.js → useActiveWallet-DEJxYDtx.js} +1 -1
  107. package/dist/cjs/{useGetTokenPrice-X3dW0I3y.js → useGetTokenPrice-zMimik1y.js} +1 -1
  108. package/dist/cjs/{useI18n-BsableMs.js → useI18n-CttJorXw.js} +1 -1
  109. package/dist/cjs/usePrivy-B61TDDeF.js +1 -0
  110. package/dist/cjs/{useSolanaRpcClient-BhX1Bzre.js → useSolanaRpcClient-B5g3sWrW.js} +1 -1
  111. package/dist/cjs/{useWalletBalance-CcicA-jd.js → useWalletBalance-BD5uRFtG.js} +1 -1
  112. package/dist/cjs/useWallets-BsO73htS.js +1 -0
  113. package/dist/cjs/useWallets-CAFhVWLf.js +1 -0
  114. package/dist/dts/{events-context-DJ7XN_9I.d.mts → events-context-BXis4NRh.d.mts} +1 -1
  115. package/dist/dts/{events-context-DJ7XN_9I.d.ts → events-context-BXis4NRh.d.ts} +1 -1
  116. package/dist/dts/extended-chains.d.mts +1 -1
  117. package/dist/dts/extended-chains.d.ts +1 -1
  118. package/dist/dts/farcaster.d.mts +1 -1
  119. package/dist/dts/farcaster.d.ts +1 -1
  120. package/dist/dts/index.d.mts +41 -8
  121. package/dist/dts/index.d.ts +41 -8
  122. package/dist/dts/internal.d.mts +1 -1
  123. package/dist/dts/internal.d.ts +1 -1
  124. package/dist/dts/smart-wallets.d.mts +1 -1
  125. package/dist/dts/smart-wallets.d.ts +1 -1
  126. package/dist/dts/solana.d.mts +3 -3
  127. package/dist/dts/solana.d.ts +3 -3
  128. package/dist/dts/{types-CrwMc83t.d.mts → types-Bc9w_mgT.d.mts} +3 -2
  129. package/dist/dts/{types-CrwMc83t.d.ts → types-Bc9w_mgT.d.ts} +3 -2
  130. package/dist/dts/ui.d.mts +1 -1
  131. package/dist/dts/ui.d.ts +1 -1
  132. package/dist/esm/AccountNotFoundScreen-qafr9ivT.mjs +1 -0
  133. package/dist/esm/{Address-Cbulz6Wu.mjs → Address-B99EaiMb.mjs} +1 -1
  134. package/dist/esm/AffirmativeConsentScreen-CIqvK8m6.mjs +6 -0
  135. package/dist/esm/AllowlistRejectionScreen-DU4DWBPE.mjs +1 -0
  136. package/dist/esm/AuthenticateWithWalletScreen-XPD7DrVO.mjs +1 -0
  137. package/dist/esm/AwaitingEvmToSolBridgingScreen-DD0jtqOa.mjs +2 -0
  138. package/dist/esm/AwaitingExternalEthereumTransferScreen-DzTmic9m.mjs +2 -0
  139. package/dist/esm/AwaitingPasswordlessCodeScreen-7QOTS6b-.mjs +103 -0
  140. package/dist/esm/AwaitingSolToEvmBridgingScreen-DYZZooDp.mjs +2 -0
  141. package/dist/esm/{BridgeNetworkSelectionView-nrYQOGZA.mjs → BridgeNetworkSelectionView-CmMVzAX5.mjs} +5 -5
  142. package/dist/esm/CaptchaScreen-DhwS3FJh.mjs +1 -0
  143. package/dist/esm/CoinbaseOnrampStatusScreen-CTrA4xKy.mjs +16 -0
  144. package/dist/esm/ConnectEmailForm-yaDsKJmn.mjs +3 -0
  145. package/dist/esm/ConnectLedgerScreen-O8ZnkCDn.mjs +9 -0
  146. package/dist/esm/ConnectOnlyLandingScreen-BUO28erJ.mjs +1 -0
  147. package/dist/esm/ConnectOnlyStatusScreen-Dy6oAk17.mjs +1 -0
  148. package/dist/esm/ConnectOrCreateScreen-H52RmK3k.mjs +1 -0
  149. package/dist/esm/{ConnectPhoneForm-D8SHd_ge.mjs → ConnectPhoneForm-SXho-ZCl.mjs} +1 -1
  150. package/dist/esm/{ConnectWalletView-By6eXfKl.mjs → ConnectWalletView-mm5nV3qj.mjs} +1 -1
  151. package/dist/esm/ConnectionStatusScreen-XXeNlflJ.mjs +7 -0
  152. package/dist/esm/CrossAppAuthScreen-bAev2vFm.mjs +1 -0
  153. package/dist/esm/{CustomLandingScreenView-Co0nHKPw.mjs → CustomLandingScreenView-e-NPZniC.mjs} +4 -4
  154. package/dist/esm/DelegatedActionsConsentScreen-C2uGvUf3.mjs +1 -0
  155. package/dist/esm/DelegatedActionsRevokeScreen-DIURa5L6.mjs +1 -0
  156. package/dist/esm/EmbeddedWalletConnectingScreen-CznyXfNg.mjs +1 -0
  157. package/dist/esm/EmbeddedWalletCreatedScreen-Vch95Jje.mjs +1 -0
  158. package/dist/esm/EmbeddedWalletKeyExportScreen-kW2-IWjW.mjs +40 -0
  159. package/dist/esm/EmbeddedWalletOnAccountCreateScreen-DtrWxrnI.mjs +1 -0
  160. package/dist/esm/EmbeddedWalletPasswordUpdateScreen-QLodnJ1t.mjs +1 -0
  161. package/dist/esm/EmbeddedWalletPasswordUpdateSplashScreen-B0gtNXG6.mjs +1 -0
  162. package/dist/esm/{EnrollTotp-nZPSS3Ux.mjs → EnrollTotp-Du2Tjgrx.mjs} +5 -5
  163. package/dist/esm/ErrorScreen-P5oZf9cz.mjs +4 -0
  164. package/dist/esm/{FarcasterConnectStatusScreen-BdwUuSkv.mjs → FarcasterConnectStatusScreen-dpPMJ4I7.mjs} +8 -8
  165. package/dist/esm/FarcasterSignerStatusScreen-COkxl1bH.mjs +28 -0
  166. package/dist/esm/FiatOnrampScreen-Ci0mAJY4.mjs +97 -0
  167. package/dist/esm/FundSolWalletWithExternalSolanaWallet-DW0tS4tS.mjs +1 -0
  168. package/dist/esm/FundWalletMethodHeader-D38FBVVM.mjs +1 -0
  169. package/dist/esm/FundWithBankDepositScreen-Dk_IouhM.mjs +58 -0
  170. package/dist/esm/FundingEditAmountScreen-BLsQoL4e.mjs +1 -0
  171. package/dist/esm/FundingMethodSelectionScreen-OlDe5HS2.mjs +1 -0
  172. package/dist/esm/InAppBrowserLoginNotPossible-BV3tTire.mjs +1 -0
  173. package/dist/esm/InstallWalletScreen-BMmSUe34.mjs +1 -0
  174. package/dist/esm/LandingScreen-B83IEgoc.mjs +1 -0
  175. package/dist/esm/{LinkConflictScreen-DNGVg8dW.mjs → LinkConflictScreen-DNiusVkA.mjs} +3 -3
  176. package/dist/esm/LinkEmailScreen-1OEkvtrp.mjs +1 -0
  177. package/dist/esm/{LinkPasskeyScreen-CTYGeo1r.mjs → LinkPasskeyScreen-CHPataTs.mjs} +5 -5
  178. package/dist/esm/LinkPhoneScreen-DiwKH2Mt.mjs +1 -0
  179. package/dist/esm/LoginFailedScreen-CDmqpAN2.mjs +1 -0
  180. package/dist/esm/ManualTransferScreen-DyN3_kBX.mjs +1 -0
  181. package/dist/esm/MfaAuthEnrollmentFlowScreen-BNV7WReW.mjs +1 -0
  182. package/dist/esm/MfaAuthVerifyFlowScreen-B-ukVyrA.mjs +1 -0
  183. package/dist/esm/MfaEnrollmentFlowScreen-COe5FpFP.mjs +1 -0
  184. package/dist/esm/MfaVerifyFlowScreen-DCIPle0Z.mjs +1 -0
  185. package/dist/esm/{ModalHeader-DfHxv9fE.mjs → ModalHeader-DpkEBdQv.mjs} +1 -1
  186. package/dist/esm/MoonpayStatusScreen-_owltgjZ.mjs +16 -0
  187. package/dist/esm/OAuthStatusScreen-KZmCHc_b.mjs +1 -0
  188. package/dist/esm/PasskeySelectSignupOrLogin-CQ_DHbaT.mjs +1 -0
  189. package/dist/esm/PasskeyStatusScreen-eu3lPB6M.mjs +3 -0
  190. package/dist/esm/PasswordRecoveryScreen-DndhFHx6.mjs +20 -0
  191. package/dist/esm/{QrCode-D4XZQrgi.mjs → QrCode-D-J14re9.mjs} +1 -1
  192. package/dist/esm/RecoveryOAuthStatusScreen-CwCRvxCX.mjs +1 -0
  193. package/dist/esm/RecoveryPasswordCreateScreen-DrRcz4CY.mjs +1 -0
  194. package/dist/esm/{RecoverySelectionScreen-DVBTi436.mjs → RecoverySelectionScreen-CPHkQlGF.mjs} +2 -2
  195. package/dist/esm/{Screen-CDEd4p2a.mjs → Screen-B0u1eY7p.mjs} +3 -3
  196. package/dist/esm/{ScreenLayout-BdRrZJd_.mjs → ScreenLayout-CyK-vOMq.mjs} +1 -1
  197. package/dist/esm/SelectSourceAsset-ac3FApgI.mjs +112 -0
  198. package/dist/esm/{SetAutomaticRecoveryScreen-DBcSNU6R.mjs → SetAutomaticRecoveryScreen-DLY7WHVZ.mjs} +2 -2
  199. package/dist/esm/{SetWalletPasswordForm-DdWjdu2s.mjs → SetWalletPasswordForm-CQWh647N.mjs} +4 -4
  200. package/dist/esm/SignRequestScreen-BYHN19dO.mjs +26 -0
  201. package/dist/esm/{StandardSignAndSendTransactionScreen-DIJRS8NR.mjs → StandardSignAndSendTransactionScreen-5sT-AMvv.mjs} +2 -2
  202. package/dist/esm/TelegramAuthScreen-DATrHQkr.mjs +1 -0
  203. package/dist/esm/{TransactionDetails-Ce_Cnzo2.mjs → TransactionDetails-D9GBw9C3.mjs} +4 -4
  204. package/dist/esm/{TransactionErrorView-JiZmO7NJ.mjs → TransactionErrorView-3qTJ_97m.mjs} +5 -5
  205. package/dist/esm/{TransferFromWalletScreen-ad5b7GV7.mjs → TransferFromWalletScreen-w3c3g8ys.mjs} +2 -2
  206. package/dist/esm/{TransferOrBridgeLoadingScreen-Cwzefd9j.mjs → TransferOrBridgeLoadingScreen-koaJdk-2.mjs} +1 -1
  207. package/dist/esm/UpdateEmailScreen-BKTgKvoR.mjs +1 -0
  208. package/dist/esm/UpdatePhoneScreen-z7-7NbIO.mjs +1 -0
  209. package/dist/esm/UserLimitReachedScreen-BK77vZJo.mjs +1 -0
  210. package/dist/esm/{WalletInfoCard-D2dCT7_H.mjs → WalletInfoCard-hC5PhrNs.mjs} +1 -1
  211. package/dist/esm/WalletInterstitialScreen-DzDGk-y-.mjs +1 -0
  212. package/dist/esm/{WalletLink-DNraFqEC.mjs → WalletLink-sGQdBvAh.mjs} +1 -1
  213. package/dist/esm/{WalletOverflowButton-Cn_nKCBf.mjs → WalletOverflowButton-BrrkHpeZ.mjs} +1 -1
  214. package/dist/esm/{WarningBanner-c8L53pJ2.mjs → WarningBanner-D5LqDt95.mjs} +2 -2
  215. package/dist/esm/abstract-smart-wallets.mjs +1 -1
  216. package/dist/esm/{context-Cw2-86-G.mjs → context-Bj4czVEP.mjs} +1 -1
  217. package/dist/esm/{ethers-5oa3ZKLD.mjs → ethers-BozrzoVi.mjs} +1 -1
  218. package/dist/esm/extended-chains.mjs +1 -1
  219. package/dist/esm/{getErc20Balance-sCX8nL1s.mjs → getErc20Balance-NThD2gHO.mjs} +1 -1
  220. package/dist/esm/{getErc20TokenInfo-CwiO-mOs.mjs → getErc20TokenInfo-BtdscGyJ.mjs} +1 -1
  221. package/dist/esm/index-CuKtz_xL.mjs +12 -0
  222. package/dist/esm/index-DQp_5KKJ.mjs +174 -0
  223. package/dist/esm/index-Ds8yBPhi.mjs +1 -0
  224. package/dist/esm/index.mjs +1 -1
  225. package/dist/esm/internal.mjs +1 -1
  226. package/dist/esm/privy-context-DICqtyyT.mjs +1 -0
  227. package/dist/esm/{shared-Bw0pXSOO.mjs → shared-zCv-_9Pa.mjs} +1 -1
  228. package/dist/esm/{shouldProceedtoEmbeddedWalletCreationFlow-BkTDxfME.mjs → shouldProceedtoEmbeddedWalletCreationFlow-DLpCU-0h.mjs} +1 -1
  229. package/dist/esm/smart-wallets-B8GvSECb.mjs +1 -0
  230. package/dist/esm/smart-wallets.mjs +1 -1
  231. package/dist/esm/solana.mjs +1 -1
  232. package/dist/esm/{styles-D5Jf27-u.mjs → styles-pSKfqjN3.mjs} +15 -15
  233. package/dist/esm/{to-ui-error-DnDY_33E.mjs → to-ui-error-KRq5_d4z.mjs} +2 -2
  234. package/dist/esm/ui.mjs +1 -1
  235. package/dist/esm/use-export-wallet-D1P_g8O0.mjs +1 -0
  236. package/dist/esm/use-export-wallet-DVyBljMT.mjs +1 -0
  237. package/dist/esm/{useActiveWallet-CwS7ik68.mjs → useActiveWallet-DMrO7evY.mjs} +1 -1
  238. package/dist/esm/useGetTokenPrice-N5ZX6Yun.mjs +1 -0
  239. package/dist/esm/{useI18n-bIQlZhkW.mjs → useI18n-BiiKgmqw.mjs} +1 -1
  240. package/dist/esm/usePrivy-DDB15S8o.mjs +1 -0
  241. package/dist/esm/{useSolanaRpcClient-C2WlA-Ah.mjs → useSolanaRpcClient-B--BKNG3.mjs} +1 -1
  242. package/dist/esm/{useWalletBalance-DopZXXwh.mjs → useWalletBalance-C0WFIwSX.mjs} +1 -1
  243. package/dist/esm/useWallets-CJvLEQqE.mjs +1 -0
  244. package/dist/esm/useWallets-CS_W9ciB.mjs +1 -0
  245. package/package.json +5 -5
  246. package/dist/cjs/AccountNotFoundScreen-Bqh-CYrp.js +0 -1
  247. package/dist/cjs/AffirmativeConsentScreen-uogZ44HQ.js +0 -6
  248. package/dist/cjs/AllowlistRejectionScreen-3OKwgh23.js +0 -1
  249. package/dist/cjs/AuthenticateWithWalletScreen-DXy5TnZj.js +0 -1
  250. package/dist/cjs/AwaitingEvmToSolBridgingScreen-DR1RiU-S.js +0 -2
  251. package/dist/cjs/AwaitingExternalEthereumTransferScreen-DgQ9z_ck.js +0 -2
  252. package/dist/cjs/AwaitingPasswordlessCodeScreen-Bah7kXAV.js +0 -103
  253. package/dist/cjs/AwaitingSolToEvmBridgingScreen-HSwPZmzZ.js +0 -2
  254. package/dist/cjs/CaptchaScreen-BLoD3u63.js +0 -1
  255. package/dist/cjs/CoinbaseOnrampStatusScreen-CoSS2KfY.js +0 -16
  256. package/dist/cjs/ConnectEmailForm-BjXzo_T8.js +0 -3
  257. package/dist/cjs/ConnectLedgerScreen-Brfd_c8H.js +0 -9
  258. package/dist/cjs/ConnectOnlyLandingScreen-C41qgoJf.js +0 -1
  259. package/dist/cjs/ConnectOnlyStatusScreen-DPsh3aXI.js +0 -1
  260. package/dist/cjs/ConnectOrCreateScreen-Dpv9J_eC.js +0 -1
  261. package/dist/cjs/ConnectionStatusScreen-DfKCyYnE.js +0 -7
  262. package/dist/cjs/CrossAppAuthScreen-CAmbPQb0.js +0 -1
  263. package/dist/cjs/DelegatedActionsConsentScreen-DOvRMKf-.js +0 -1
  264. package/dist/cjs/DelegatedActionsRevokeScreen-5ecaxQ0D.js +0 -1
  265. package/dist/cjs/EmbeddedWalletConnectingScreen-B31DzW7n.js +0 -1
  266. package/dist/cjs/EmbeddedWalletCreatedScreen-BXEozrA_.js +0 -1
  267. package/dist/cjs/EmbeddedWalletOnAccountCreateScreen-DSrn-F5R.js +0 -1
  268. package/dist/cjs/EmbeddedWalletPasswordUpdateScreen-DGlv7LlS.js +0 -1
  269. package/dist/cjs/EmbeddedWalletPasswordUpdateSplashScreen-Byr5dLg5.js +0 -1
  270. package/dist/cjs/ErrorScreen-DJwJwrGn.js +0 -4
  271. package/dist/cjs/FarcasterSignerStatusScreen--CVrZRE9.js +0 -29
  272. package/dist/cjs/FundSolWalletWithExternalSolanaWallet-3Fn4CnSA.js +0 -2
  273. package/dist/cjs/FundWalletMethodHeader-D2fapeXN.js +0 -1
  274. package/dist/cjs/FundWithBankDepositScreen-DUQAuyf5.js +0 -176
  275. package/dist/cjs/FundingEditAmountScreen-B3wEw9xm.js +0 -1
  276. package/dist/cjs/FundingMethodSelectionScreen-ChQNeyi6.js +0 -1
  277. package/dist/cjs/InAppBrowserLoginNotPossible-XFkxHwKR.js +0 -1
  278. package/dist/cjs/InstallWalletScreen-Cp3ZRRYf.js +0 -1
  279. package/dist/cjs/LandingScreen-DwFs0lRf.js +0 -1
  280. package/dist/cjs/LinkEmailScreen-_sfK6ECC.js +0 -1
  281. package/dist/cjs/LinkPhoneScreen-BjMfF3Kz.js +0 -1
  282. package/dist/cjs/LoginFailedScreen-BUnuwN-5.js +0 -1
  283. package/dist/cjs/ManualTransferScreen-D2hHGf6p.js +0 -1
  284. package/dist/cjs/MfaAuthEnrollmentFlowScreen-VFaXkogp.js +0 -1
  285. package/dist/cjs/MfaAuthVerifyFlowScreen-CVBdW4Cw.js +0 -1
  286. package/dist/cjs/MfaEnrollmentFlowScreen-DxkzCr5s.js +0 -1
  287. package/dist/cjs/MfaVerifyFlowScreen-AFZc7liT.js +0 -1
  288. package/dist/cjs/MoonpayStatusScreen-C66Eq4G4.js +0 -16
  289. package/dist/cjs/OAuthStatusScreen-NKl6SLvR.js +0 -1
  290. package/dist/cjs/PasskeySelectSignupOrLogin-D9VfPofR.js +0 -1
  291. package/dist/cjs/PasskeyStatusScreen-CBC-60D2.js +0 -3
  292. package/dist/cjs/PasswordRecoveryScreen-BSUhAJ63.js +0 -20
  293. package/dist/cjs/RecoveryOAuthStatusScreen-y2Z3cphT.js +0 -1
  294. package/dist/cjs/RecoveryPasswordCreateScreen-CoDYHaJk.js +0 -1
  295. package/dist/cjs/SetAutomaticRecoveryScreen-BLiDEmlE.js +0 -14
  296. package/dist/cjs/TelegramAuthScreen-BGB40HSe.js +0 -1
  297. package/dist/cjs/UpdateEmailScreen-Bgn5JxGJ.js +0 -1
  298. package/dist/cjs/UpdatePhoneScreen-DPAxfLv5.js +0 -1
  299. package/dist/cjs/UserLimitReachedScreen-BG8gj4ah.js +0 -1
  300. package/dist/cjs/WalletInterstitialScreen-CBH05HpE.js +0 -1
  301. package/dist/cjs/get-is-unified-wallet-DitrQ4hx.js +0 -1
  302. package/dist/cjs/index-CCY3tkwt.js +0 -1
  303. package/dist/cjs/smart-wallets-BtILJe_K.js +0 -1
  304. package/dist/cjs/use-export-wallet-C6DaLOxp.js +0 -1
  305. package/dist/cjs/use-export-wallet-eDTOzHRt.js +0 -1
  306. package/dist/cjs/usePrivy-CHcu9hX8.js +0 -1
  307. package/dist/cjs/useWallets-CbvzYOqg.js +0 -1
  308. package/dist/cjs/useWallets-Cy6axcvW.js +0 -1
  309. package/dist/esm/AccountNotFoundScreen-BSYd-8_2.mjs +0 -1
  310. package/dist/esm/AffirmativeConsentScreen-C_uGmdSa.mjs +0 -6
  311. package/dist/esm/AllowlistRejectionScreen-DBdNYwS-.mjs +0 -1
  312. package/dist/esm/AuthenticateWithWalletScreen-D-Aw0iYo.mjs +0 -1
  313. package/dist/esm/AwaitingEvmToSolBridgingScreen-BMr5CXgX.mjs +0 -2
  314. package/dist/esm/AwaitingExternalEthereumTransferScreen-aOEMTW-b.mjs +0 -2
  315. package/dist/esm/AwaitingPasswordlessCodeScreen-CjPJ7IMM.mjs +0 -103
  316. package/dist/esm/AwaitingSolToEvmBridgingScreen-xrFngED1.mjs +0 -2
  317. package/dist/esm/CaptchaScreen-BOKElE1r.mjs +0 -1
  318. package/dist/esm/CoinbaseOnrampStatusScreen-CTV5uUn3.mjs +0 -16
  319. package/dist/esm/ConnectEmailForm-Dp85JvZj.mjs +0 -3
  320. package/dist/esm/ConnectLedgerScreen-rxzesP5N.mjs +0 -9
  321. package/dist/esm/ConnectOnlyLandingScreen-CmImF7oZ.mjs +0 -1
  322. package/dist/esm/ConnectOnlyStatusScreen-Bo90w6P9.mjs +0 -1
  323. package/dist/esm/ConnectOrCreateScreen-Dc2VQF-B.mjs +0 -1
  324. package/dist/esm/ConnectionStatusScreen-C_fxSXJ2.mjs +0 -7
  325. package/dist/esm/CrossAppAuthScreen-DU0FD2ep.mjs +0 -1
  326. package/dist/esm/DelegatedActionsConsentScreen-Dr-DeIXC.mjs +0 -1
  327. package/dist/esm/DelegatedActionsRevokeScreen-kXOJxXu-.mjs +0 -1
  328. package/dist/esm/EmbeddedWalletConnectingScreen-tFedaOj3.mjs +0 -1
  329. package/dist/esm/EmbeddedWalletCreatedScreen-DCx4NdAp.mjs +0 -1
  330. package/dist/esm/EmbeddedWalletKeyExportScreen-CVflSsvz.mjs +0 -40
  331. package/dist/esm/EmbeddedWalletOnAccountCreateScreen-vSzXa62f.mjs +0 -1
  332. package/dist/esm/EmbeddedWalletPasswordUpdateScreen-B4szV9Hg.mjs +0 -1
  333. package/dist/esm/EmbeddedWalletPasswordUpdateSplashScreen-BOBLnE_O.mjs +0 -1
  334. package/dist/esm/ErrorScreen-BGE6wldq.mjs +0 -4
  335. package/dist/esm/FarcasterSignerStatusScreen-C-crikPv.mjs +0 -28
  336. package/dist/esm/FundSolWalletWithExternalSolanaWallet-BX4gYmzv.mjs +0 -1
  337. package/dist/esm/FundWalletMethodHeader-CdXWChwL.mjs +0 -1
  338. package/dist/esm/FundWithBankDepositScreen-HyqTUpLq.mjs +0 -176
  339. package/dist/esm/FundingEditAmountScreen--ffFSUmf.mjs +0 -1
  340. package/dist/esm/FundingMethodSelectionScreen-Djr0jY03.mjs +0 -1
  341. package/dist/esm/InAppBrowserLoginNotPossible-D6wMCuzD.mjs +0 -1
  342. package/dist/esm/InstallWalletScreen-B6VSXUWR.mjs +0 -1
  343. package/dist/esm/LandingScreen-BV0xq-oc.mjs +0 -1
  344. package/dist/esm/LinkEmailScreen-CtMuCZvp.mjs +0 -1
  345. package/dist/esm/LinkPhoneScreen-2nnXZB2B.mjs +0 -1
  346. package/dist/esm/LoginFailedScreen-hHvIsH81.mjs +0 -1
  347. package/dist/esm/ManualTransferScreen-C0xJ3si8.mjs +0 -1
  348. package/dist/esm/MfaAuthEnrollmentFlowScreen-CznUpkq5.mjs +0 -1
  349. package/dist/esm/MfaAuthVerifyFlowScreen-DUmOZHGX.mjs +0 -1
  350. package/dist/esm/MfaEnrollmentFlowScreen-DeoSfYAS.mjs +0 -1
  351. package/dist/esm/MfaVerifyFlowScreen-JJ1crW_8.mjs +0 -1
  352. package/dist/esm/MoonpayStatusScreen-BIzQZK9f.mjs +0 -16
  353. package/dist/esm/OAuthStatusScreen-DhmaZBTY.mjs +0 -1
  354. package/dist/esm/PasskeySelectSignupOrLogin-BmiJnukl.mjs +0 -1
  355. package/dist/esm/PasskeyStatusScreen-BStwA1_J.mjs +0 -3
  356. package/dist/esm/PasswordRecoveryScreen-DyBDQADG.mjs +0 -20
  357. package/dist/esm/RecoveryOAuthStatusScreen-BfcxgkUL.mjs +0 -1
  358. package/dist/esm/RecoveryPasswordCreateScreen-CBfvjxht.mjs +0 -1
  359. package/dist/esm/SignRequestScreen-CxAuntSd.mjs +0 -26
  360. package/dist/esm/TelegramAuthScreen-BRDG8b6x.mjs +0 -1
  361. package/dist/esm/UpdateEmailScreen-C5lQJUiA.mjs +0 -1
  362. package/dist/esm/UpdatePhoneScreen-BwkzWVHl.mjs +0 -1
  363. package/dist/esm/UserLimitReachedScreen-ComDV9kj.mjs +0 -1
  364. package/dist/esm/WalletInterstitialScreen-riBB51NH.mjs +0 -1
  365. package/dist/esm/get-is-unified-wallet-CQc-E5dS.mjs +0 -1
  366. package/dist/esm/index-B5B9f4U9.mjs +0 -12
  367. package/dist/esm/index-Bvw5OxHl.mjs +0 -174
  368. package/dist/esm/index-yxF2V6XY.mjs +0 -1
  369. package/dist/esm/smart-wallets-Dl42tBUP.mjs +0 -1
  370. package/dist/esm/use-export-wallet-Bd5Sg5V-.mjs +0 -1
  371. package/dist/esm/use-export-wallet-NF9h_lS_.mjs +0 -1
  372. package/dist/esm/useGetTokenPrice-oI6b3gPZ.mjs +0 -1
  373. package/dist/esm/usePrivy-DAnfSvB5.mjs +0 -1
  374. package/dist/esm/useWallets-2_uCkhA8.mjs +0 -1
  375. package/dist/esm/useWallets-DpbBw4Vl.mjs +0 -1
@@ -1 +0,0 @@
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-Bvw5OxHl.mjs";import{u as s,q as n}from"./context-Cw2-86-G.mjs";import{u as l,b as m,k as c}from"./internal-context-Z-fyxadS.mjs";import{u as d,a as u}from"./get-is-unified-wallet-CQc-E5dS.mjs";import{s as p}from"./shouldProceedtoEmbeddedWalletCreationFlow-BkTDxfME.mjs";import{S as v}from"./ScreenLayout-BdRrZJd_.mjs";import{T as y}from"./telegram-B-JqnkqZ.mjs";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-CwS7ik68.mjs";import"zustand";import"styled-components";import"react-device-detect";import"./use-export-wallet-Bd5Sg5V-.mjs";import"./useWallets-2_uCkhA8.mjs";import"viem";import"viem/utils";import"./events-context-CI0iqAXA.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-DAnfSvB5.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"ofetch";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"@privy-io/are-addresses-equal";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"tinycolor2";import"./ModalHeader-DfHxv9fE.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-CDEd4p2a.mjs";import"./index-Dq_xe9dz.mjs";const g=({success:t,errorMessage:r,onRetry:o})=>{let i=t?"Successfully connected with Telegram":r?r.message:"Verifying connection to Telegram";/*#__PURE__*/return e(v,{title:i,subtitle:t?"You're good to go!":r?r.detail:"Just a few moments more",icon:y,iconVariant:"loading",iconLoadingStatus:{success:t,fail:!!r},secondaryCta:r?.retryable&&o?{label:"Retry",onClick:o}:void 0,watermark:!0})},f={component:()=>{let{authenticated:v,logout:y,ready:f,user:h}=d(),{setModalData:A,navigate:b,resetNavigation:j,data:T}=u(),S=s(),{initLoginWithTelegram:w,loginWithTelegram:C,updateWallets:E,setReadyToTrue:R,closePrivyModal:W,createAnalyticsEvent:_,getAuthMeta:k}=l(),[x,L]=t(!1),[M,I]=t(void 0),U=o();async function D(){try{let e=await async function(){let e;if(!v){if(U.enabled&&"error"===U.status)throw new a(U.error,null,m.CAPTCHA_FAILURE);return U.enabled&&"success"!==U.status&&(U.execute(),e=await U.waitForResult()),e}}();await C({captchaToken:e}),L(!0),R(!0)}catch(e){if(e?.privyErrorCode===m.ALLOWLIST_REJECTED)return I(void 0),j(),void b("AllowlistRejectionScreen");if(e?.privyErrorCode===m.USER_LIMIT_REACHED)return console.error(new c(e).toString()),I(void 0),j(),void b("UserLimitReachedScreen");if(e?.privyErrorCode===m.USER_DOES_NOT_EXIST)return I(void 0),j(),void b("AccountNotFoundScreen");if(e?.privyErrorCode===m.ACCOUNT_TRANSFER_REQUIRED&&e.data?.data?.nonce)return I(void 0),j(),A({accountTransfer:{nonce:e.data?.data?.nonce,account:e.data?.data?.subject,telegramAuthResult:k()?.telegramAuthResult,telegramWebAppData:k()?.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);I({retryable:t,detail:r,message:"Authentication failed"})}}r((()=>{D()}),[]),r((()=>{if(!(f&&v&&x&&h))return;if(S?.legal.requireUsersAcceptTerms&&!h.hasAcceptedTerms){let e=setTimeout((()=>{b("AffirmativeConsentScreen")}),n);return()=>clearTimeout(e)}if(p(h,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"}}),y()},callAuthOnSuccessOnClose:!0}}),b("EmbeddedWalletOnAccountCreateScreen")}),n);return()=>clearTimeout(e)}E();let e=setTimeout((()=>W({shouldCallAuthOnSuccess:!0,isSuccess:!0})),n);return()=>clearTimeout(e)}),[f,v,x,h]);/*#__PURE__*/return e(g,{success:x,errorMessage:M,onRetry:M?.retryable?async()=>{try{I(void 0),T?.telegramAuthModalData?.seamlessAuth||await w(void 0,T?.login?.disableSignup),await D()}catch(e){let{retryable:t,detail:r}=i(e);I({retryable:t,detail:r,message:"Authentication failed"})}}:void 0})},isCaptchaRequired:!0,isShownBeforeReady:!0};export{f as TelegramAuthScreen,g as TelegramAuthScreenView,f as default};
@@ -1 +0,0 @@
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-Cw2-86-G.mjs";import{a as l}from"./index-Bvw5OxHl.mjs";import{u as d}from"./internal-context-Z-fyxadS.mjs";import{u as c,a as p}from"./get-is-unified-wallet-CQc-E5dS.mjs";import{C as u}from"./useActiveWallet-CwS7ik68.mjs";import{B as h}from"./use-export-wallet-Bd5Sg5V-.mjs";import{E as v,P as f}from"./ModalHeader-DfHxv9fE.mjs";import{I as j,E as y}from"./EmailInputForm-Dgoii4vf.mjs";import{E as g}from"./ErrorMessage-D8VaAP5m.mjs";import{S as w}from"./ScreenLayout-BdRrZJd_.mjs";import"styled-components";import"@privy-io/js-sdk-core";import"tinycolor2";import"uuid";import"jose";import"eventemitter3";import"./useWallets-2_uCkhA8.mjs";import"viem";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-DAnfSvB5.mjs";import"./events-context-CI0iqAXA.mjs";import"@scure/base";import"zustand";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"ofetch";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"@privy-io/are-addresses-equal";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.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-CDEd4p2a.mjs";import"./index-Dq_xe9dz.mjs";const k=/*#__PURE__*/s(((i,o)=>{let[s,j]=m(""),[y,w]=m(""),[k,S]=m(!1),{authenticated:x,user:C}=c(),{initUpdateEmail:A}=d(),{navigate:I,setModalData:P,currentScreen:M}=p(),{enabled:T,token:U}=l(),q=n(),L=h(s)&&(q.disablePlusEmails&&s.includes("+")?(y||w("Please enter a valid email address without a '+'."),!1):(y&&w(""),!0)),W=k||!L,D=()=>{!T||U||x?(async e=>{if(!C?.email)throw Error("User is required to have an email address to update it.");S(!0);try{await A({oldAddress:C.email.address,newAddress:s,captchaToken:e}),I("AwaitingPasswordlessCodeScreen")}catch(e){P({errorModalData:{error:e,previousScreen:M||"LandingScreen"}}),I("ErrorScreen")}S(!1)})(U):(P({captchaModalData:{callback:e=>{if(!C?.email)throw Error("User is required to have an email address to update it.");return A({oldAddress:C.email.address,newAddress:s,captchaToken:e})},userIntentRequired:!1,onSuccessNavigateTo:"AwaitingPasswordlessCodeScreen",onErrorNavigateTo:"ErrorScreen"}}),I("CaptchaScreen"))};/*#__PURE__*/return e(r,{children:[/*#__PURE__*/e(E,{children:[y&&/*#__PURE__*/t(g,{style:{marginTop:"0.25rem",textAlign:"left"},children:y}),/*#__PURE__*/e(b,{$error:!!y,children:[/*#__PURE__*/t(u,{children:/*#__PURE__*/t(a,{})}),/*#__PURE__*/t("input",{ref:o,id:"email-input",type:"email",placeholder:"your@email.com",onChange:e=>j(e.target.value),onKeyUp:e=>{"Enter"===e.key&&D()},value:s,autoComplete:"email"}),i.stacked?null:/*#__PURE__*/t(v,{isSubmitting:k,onClick:D,disabled:W,children:"Submit"})]})]}),i.stacked?/*#__PURE__*/t(f,{loadingText:null,loading:k,disabled:W,onClick:D,style:{width:"100%"},children:"Submit"}):null]})}));let E=j,b=y;const S=({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})})}),x={component:()=>/*#__PURE__*/t(S,{})};export{x as UpdateEmailScreen,S as UpdateEmailScreenView,x as default};
@@ -1 +0,0 @@
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-D8SHd_ge.mjs";import{u as i}from"./internal-context-Z-fyxadS.mjs";import{a as n,u as m}from"./get-is-unified-wallet-CQc-E5dS.mjs";import{S as a}from"./ScreenLayout-BdRrZJd_.mjs";import"styled-components";import"@privy-io/js-sdk-core";import"./context-Cw2-86-G.mjs";import"tinycolor2";import"./useActiveWallet-CwS7ik68.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-Bd5Sg5V-.mjs";import"./useWallets-2_uCkhA8.mjs";import"viem";import"eventemitter3";import"viem/utils";import"./events-context-CI0iqAXA.mjs";import"./ModalHeader-DfHxv9fE.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"@privy-io/are-addresses-equal";import"./Screen-CDEd4p2a.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};
@@ -1 +0,0 @@
1
- import{jsx as t}from"react/jsx-runtime";import{a as e}from"./get-is-unified-wallet-CQc-E5dS.mjs";import{S as o}from"./ScreenLayout-BdRrZJd_.mjs";import"@privy-io/are-addresses-equal";import"react";import"./context-Cw2-86-G.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./internal-context-Z-fyxadS.mjs";import"ofetch";import"./ModalHeader-DfHxv9fE.mjs";import"styled-components";import"./useActiveWallet-CwS7ik68.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-Bd5Sg5V-.mjs";import"./useWallets-2_uCkhA8.mjs";import"viem";import"eventemitter3";import"viem/utils";import"./events-context-CI0iqAXA.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-CDEd4p2a.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};
@@ -1 +0,0 @@
1
- import{jsx as t}from"react/jsx-runtime";import{useState as e}from"react";import{u as o,a as i}from"./get-is-unified-wallet-CQc-E5dS.mjs";import{S as r}from"./ScreenLayout-BdRrZJd_.mjs";import"@privy-io/are-addresses-equal";import"./context-Cw2-86-G.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./internal-context-Z-fyxadS.mjs";import"ofetch";import"./ModalHeader-DfHxv9fE.mjs";import"styled-components";import"./useActiveWallet-CwS7ik68.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-Bd5Sg5V-.mjs";import"./useWallets-2_uCkhA8.mjs";import"viem";import"eventemitter3";import"viem/utils";import"./events-context-CI0iqAXA.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-CDEd4p2a.mjs";import"./index-Dq_xe9dz.mjs";const n=({title:e,subtitle:o,buttonText:i,buttonHref:n,isLoading:l=!1,helpText:a,onButtonClick:s})=>/*#__PURE__*/t(r,{title:e,subtitle:o,primaryCta:{label:i,onClick:()=>{n&&window.open(n,"_self"),s?.()},disabled:l},helpText:a,watermark:!0}),l={component:()=>{let{ready:r}=o(),{data:l}=i(),[a,s]=e(!1);if(!l?.installWalletModalData)throw Error("Wallet data is missing");let{walletConfig:m,connectOnly:c,chainType:p}=l.installWalletModalData,u=m.getMobileRedirect({useUniversalLink:!a,isSolana:"solana"===p,connectOnly:c}),d=m.name.replace(/ wallet/gi,""),h={title:`Redirecting to ${d} Mobile Wallet`,description:`We'll take you to the ${d} Mobile Wallet app to continue your login experience.`,footnote:""};return r&&(h.description=`For the best experience, we'll automatically log you into the ${d} Mobile Wallet in-app browser.`,h.footnote="You can always return here to login via other methods."),a&&(h.title="Still here?",h.description=`You may need to install the ${m.name} mobile app.`,h.footnote=`Once you're done, you can connect with ${m.name} wallet to complete the login.`),/*#__PURE__*/t(n,{title:h.title,subtitle:h.description,buttonText:a?"Go to App Store":"Continue",buttonHref:u,isLoading:r&&!u,helpText:h.footnote||void 0,onButtonClick:()=>{setTimeout((()=>s(!0)),1e3)}})}};export{l as WalletInterstitialScreen,n as WalletInterstitialScreenView,l as default};
@@ -1 +0,0 @@
1
- import{areAddressesEqual as e}from"@privy-io/are-addresses-equal";import{jsx as t,jsxs as i}from"react/jsx-runtime";import{useContext as a,createContext as r,useState as s,useRef as l,useEffect as n}from"react";import{u}from"./context-Cw2-86-G.mjs";import{n as d}from"./internal-context-Z-fyxadS.mjs";function o(e){return"string"==typeof e&&/^custom:[a-zA-Z0-9_-]+$/i.test(e)}function c(e){return e?new Date(1e3*e):null}function p(e,t){return e.slice().sort(((e,t)=>(e.firstVerifiedAt?.getTime()??0)-(t.firstVerifiedAt?.getTime()??0))).find((e=>e.type===t))}const m=e=>e?f(e).find((e=>0===e.walletIndex))??null:null,f=e=>e?_(e,"ethereum"):[],_=(e,t)=>e.linkedAccounts.filter((e=>"wallet"===e.type&&"privy"===e.walletClientType&&!e.imported&&e.chainType===t)),y=e=>e?_(e,"solana"):[],h=e=>e?y(e).find((e=>0===e.walletIndex))??null:null,b=e=>(e?.linkedAccounts??[]).filter((e=>"wallet"===e.type&&"privy"===e.walletClientType&&e.imported&&"ethereum"===e.chainType)),k=e=>(e?.linkedAccounts??[]).filter((e=>"wallet"===e.type&&e.imported&&"privy"===e.walletClientType&&"solana"===e.chainType)),g=(t,i)=>t?.linkedAccounts.find((t=>"wallet"===t.type&&"privy"===t.walletClientType&&e(t.address,i)))||null,v=(t,i)=>t.find((t=>e(t.address,i)))||null,A=e=>m(e)??h(e);function j(e){if(!e)return null;let t=function(e){let t=[];for(let i of e){let e=i.type;switch(i.type){case"wallet":let a={id:i.id,address:i.address,type:i.type,imported:i.imported,delegated:i.delegated,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at),chainType:i.chain_type,walletClientType:i.wallet_client_type,connectorType:i.connector_type,recoveryMethod:i.recovery_method,walletIndex:i.wallet_index,publicKey:i.public_key};t.push(a);break;case"smart_wallet":let r={address:i.address,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at),smartWalletType:i.smart_wallet_type,smartWalletVersion:i.smart_wallet_version};t.push(r);break;case"cross_app":let s={type:i.type,subject:i.subject,embeddedWallets:i.embedded_wallets,smartWallets:i.smart_wallets,providerApp:{id:i.provider_app_id},firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(s);break;case"email":let l={address:i.address,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(l);break;case"phone":let n={number:i.phoneNumber,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(n);break;case"google_oauth":let u={subject:i.subject,email:i.email,name:i.name,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(u);break;case"spotify_oauth":let d={subject:i.subject,email:i.email,name:i.name,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(d);break;case"instagram_oauth":let p={subject:i.subject,username:i.username,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(p);break;case"twitter_oauth":let m={subject:i.subject,username:i.username,name:i.name,type:i.type,profilePictureUrl:i.profile_picture_url,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(m);break;case"discord_oauth":let f={subject:i.subject,username:i.username,email:i.email,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(f);break;case"github_oauth":let _={subject:i.subject,username:i.username,name:i.name,email:i.email,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(_);break;case"tiktok_oauth":let y={subject:i.subject,username:i.username,name:i.name,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(y);break;case"line_oauth":let h={subject:i.subject,name:i.name,email:i.email,profilePictureUrl:i.profile_picture_url,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(h);break;case"twitch_oauth":let b={subject:i.subject,username:i.username,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(b);break;case"linkedin_oauth":let k={subject:i.subject,name:i.name,email:i.email,vanityName:i.vanity_name,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(k);break;case"apple_oauth":let g={subject:i.subject,email:i.email,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(g);break;case"custom_auth":t.push({type:i.type,customUserId:i.custom_user_id,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)});break;case"farcaster":let v={type:i.type,fid:i.fid,ownerAddress:i.owner_address,displayName:i.display_name,username:i.username,bio:i.bio,pfp:i.profile_picture_url,url:i.homepage_url,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at),signerPublicKey:i.signer_public_key};t.push(v);break;case"passkey":let A={type:i.type,enrolledInMfa:i.enrolled_in_mfa,credentialId:i.credential_id,publicKey:i.public_key,authenticatorName:i.authenticator_name,createdWithDevice:i.created_with_device,createdWithOs:i.created_with_os,createdWithBrowser:i.created_with_browser,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(A);break;case"telegram":let j={type:i.type,telegramUserId:i.telegram_user_id,firstName:i.first_name,lastName:i.last_name,username:i.username,photoUrl:i.photo_url,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(j);break;default:if(o(i.type)){let e={type:i.type,subject:i.subject,name:i.name,username:i.username,email:i.email,profilePictureUrl:i.profile_picture_url,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(e);break}console.warn(`Unrecognized account type: ${e}. Please consider upgrading the Privy SDK.`)}}return t}(e.linked_accounts),i=p(t,"wallet"),a=p(t,"smart_wallet"),r=p(t,"email"),s=p(t,"phone"),l=p(t,"google_oauth"),n=p(t,"twitter_oauth"),u=p(t,"discord_oauth"),d=p(t,"github_oauth"),m=p(t,"spotify_oauth"),f=p(t,"instagram_oauth"),_=p(t,"tiktok_oauth"),y=p(t,"line_oauth"),h=p(t,"twitch_oauth"),b=p(t,"linkedin_oauth"),k=p(t,"apple_oauth"),g=p(t,"farcaster"),v=p(t,"telegram"),A=e.mfa_methods.map((({type:e,verified_at:t})=>({type:e,verifiedAt:c(t)})));return{id:e.id,createdAt:c(e.created_at),linkedAccounts:t,email:r&&{address:r?.address},phone:s&&{number:s?.number},wallet:i&&{id:i.id,address:i.address,chainType:i.chainType,walletClientType:i.walletClientType,connectorType:i.connectorType,recoveryMethod:i.recoveryMethod,imported:i.imported,delegated:i.delegated,walletIndex:i.walletIndex,publicKey:i.publicKey},smartWallet:a&&{address:a.address,smartWalletType:a.smartWalletType,smartWalletVersion:a.smartWalletVersion},google:l&&{subject:l.subject,email:l.email,name:l.name},twitter:n&&{subject:n.subject,username:n.username,name:n.name,profilePictureUrl:n.profilePictureUrl},discord:u&&{subject:u.subject,username:u.username,email:u.email},github:d&&{subject:d.subject,username:d.username,name:d.name,email:d.email},spotify:m&&{subject:m.subject,email:m.email,name:m.name},instagram:f&&{subject:f.subject,username:f.username},tiktok:_&&{subject:_.subject,username:_.username,name:_.name},line:y&&{subject:y.subject,name:y.name,email:y.email,profilePictureUrl:y.profilePictureUrl},twitch:h&&{subject:h.subject,username:h.username},linkedin:b&&{subject:b.subject,name:b.name,email:b.email,vanityName:b.vanityName},apple:k&&{subject:k.subject,email:k.email},farcaster:g&&{fid:g.fid,ownerAddress:g.ownerAddress,displayName:g.displayName,username:g.username,bio:g.bio,pfp:g.pfp,url:g.url,signerPublicKey:g.signerPublicKey},telegram:v&&{telegramUserId:v.telegramUserId,firstName:v.firstName,lastName:v.lastName,username:v.username,photoUrl:v.photoUrl},delegatedWallets:[],mfaMethods:A.map((e=>e.type)),hasAcceptedTerms:e.has_accepted_terms??!1,isGuest:e.is_guest,customMetadata:e.custom_metadata}}function w({src:e,...i}){/*#__PURE__*/return t("img",{src:e,...i,style:{display:"none"}})}const V=/*#__PURE__*/r({currentScreen:null,lastScreen:null,navigate:d,navigateBack:d,resetNavigation:d,setModalData:d,onUserCloseViaDialogOrKeybindRef:void 0}),T=e=>{let a=u(),[r,d]=s(e.initialScreen),o=l(null);n((()=>{e.open||(o.current=null)}),[e.open]),n((()=>{o.current=null}),[e.initialScreen]);let c={data:e.data,setModalData:e.setModalData,currentScreen:e.initialScreen,lastScreen:r,navigate:(t,i=!0)=>{e.setInitialScreen(t),i&&d(e.initialScreen)},navigateBack:()=>{e.setInitialScreen(r)},resetNavigation:()=>{e.setInitialScreen(null),d(null)},onUserCloseViaDialogOrKeybindRef:o};/*#__PURE__*/return i(V.Provider,{value:c,children:[("string"==typeof a.appearance.logo||"img"===a.appearance.logo?.type)&&/*#__PURE__*/t(w,{src:"string"==typeof a.appearance.logo?a.appearance.logo:a.appearance.logo.props.src}),e.children]})},W=()=>a(V),P=/*#__PURE__*/r({ready:!1,authenticated:!1,user:null,walletConnectors:null,connectWallet:d,login:d,connectOrCreateWallet:d,linkEmail:d,linkPhone:d,linkFarcaster:d,linkWallet:d,startCrossAppAuthFlow:d,linkGoogle:d,linkTwitter:d,linkTwitch:d,linkDiscord:d,linkGithub:d,linkSpotify:d,linkInstagram:d,linkTelegram:d,linkTiktok:d,linkLine:d,linkLinkedIn:d,linkApple:d,linkPasskey:d,updateEmail:d,updatePhone:d,logout:d,getAccessToken:d,unlinkEmail:d,unlinkPhone:d,unlinkWallet:d,unlinkGoogle:d,unlinkTwitter:d,unlinkTwitch:d,unlinkDiscord:d,unlinkGithub:d,unlinkSpotify:d,unlinkInstagram:d,unlinkTiktok:d,unlinkLine:d,unlinkLinkedIn:d,unlinkApple:d,unlinkCrossAppAccount:d,unlinkFarcaster:d,unlinkTelegram:d,unlinkPasskey:d,signMessage:d,signTypedData:d,enrollInMfa:d,initEnrollmentWithSms:d,initEnrollmentWithTotp:d,initEnrollmentWithPasskey:d,promptMfa:d,init:d,submitEnrollmentWithSms:d,submitEnrollmentWithTotp:d,submitEnrollmentWithPasskey:d,unenroll:d,submit:d,cancel:d,sendTransaction:d,signTransaction:d,setWalletPassword:d,setWalletRecovery:d,requestFarcasterSignerFromWarpcast:d,getFarcasterSignerPublicKey:d,signFarcasterMessage:d,signMessageWithCrossAppWallet:d,signTypedDataWithCrossAppWallet:d,sendTransactionWithCrossAppWallet:d,signTransactionWithCrossAppWallet:d,isModalOpen:!1,mfaMethods:[]}),I=()=>a(P),M=e=>!!e.id&&"privy-v2"===e.recoveryMethod;export{T as M,P,W as a,M as b,m as c,b as d,h as e,k as f,A as g,f as h,o as i,g as j,v as k,j as l,_ as m,y as n,I as u};
@@ -1,12 +0,0 @@
1
- import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import{useState as a,useMemo as s,useCallback as i,useEffect as o}from"react";import{createPublicClient as r,http as p,toHex as l,decodeFunctionData as u,decodeAbiParameters as m,formatEther as c}from"viem";import{getJsonRpcEndpointFromChain as d,formatTokenAmount as y,ProviderErrors as f}from"@privy-io/js-sdk-core";import{A as b}from"./Address-Cbulz6Wu.mjs";import{u as T,q as h}from"./context-Cw2-86-G.mjs";import{P as g,v,G as I}from"./use-export-wallet-Bd5Sg5V-.mjs";import{u as k}from"./internal-context-Z-fyxadS.mjs";import{a as E,u as j}from"./get-is-unified-wallet-CQc-E5dS.mjs";import{u as M}from"./useGetTokenPrice-oI6b3gPZ.mjs";import{u as C}from"./useWalletBalance-DopZXXwh.mjs";import{g as F}from"./getErc20TokenInfo-CwiO-mOs.mjs";import{f as _}from"./formatErc20TokenAmount-BuPk9xcy.mjs";import{g as w,a as x,p as N}from"./ethers-5oa3ZKLD.mjs";import{a as S}from"./useWallets-2_uCkhA8.mjs";import{ErrorScreenView as A}from"./ErrorScreen-BGE6wldq.mjs";import{styled as O}from"styled-components";import{M as R,B as D,P}from"./ModalHeader-DfHxv9fE.mjs";import{D as $}from"./JsonTree-aPaJmPx7.mjs";import{T as B,S as q}from"./TransactionErrorView-JiZmO7NJ.mjs";import{R as L}from"./Layouts-BlFm53ED.mjs";import{S as W}from"./ScreenHeader-CHmc4-Lu.mjs";import{G as U}from"./useActiveWallet-CwS7ik68.mjs";import{T as G}from"./TransactionDetails-Ce_Cnzo2.mjs";import{E as V}from"./transfer-6YztDh-t.mjs";import{p as H}from"./index-Bvw5OxHl.mjs";import"lucide-react";import"tinycolor2";import"eventemitter3";import"viem/utils";import"ofetch";import"@privy-io/are-addresses-equal";import"./useGetSolPrice-DwwjjGbd.mjs";import"./reservoir-0wfhnc0j.mjs";import"./ScreenLayout-BdRrZJd_.mjs";import"./Screen-CDEd4p2a.mjs";import"./index-Dq_xe9dz.mjs";import"uuid";import"jose";import"zustand";import"react-device-detect";import"./events-context-CI0iqAXA.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-DAnfSvB5.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"@heroicons/react/24/outline";import"./Value-tcJV9e0L.mjs";import"./LoadingSkeleton-U6-3yFwI.mjs";import"./Row-C9vrS4Zi.mjs";import"./ErrorMessage-D8VaAP5m.mjs";import"./LabelXs-oqZNqbm_.mjs";import"./Subtitle-CV-2yKE4.mjs";import"./Title-BnzYV3Is.mjs";import"./WalletInfoCard-D2dCT7_H.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";import"./WalletLink-DNraFqEC.mjs";import"./getFormattedUsdFromLamports-B6EqSEho.mjs";import"./transaction-CnfuREWo.mjs";import"@heroicons/react/24/outline/ChevronDownIcon";let z=[{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"}],Q=O.div`
2
- display: flex;
3
- flex-direction: column;
4
- min-height: 72px;
5
- `;var J=({onBack:n,details:a})=>/*#__PURE__*/e(Q,{children:[/*#__PURE__*/t(R,{backFn:n}),/*#__PURE__*/t($,{data:a}),/*#__PURE__*/t(D,{})]});let K=({gasUsed:e,effectiveGasPrice:t})=>{if(e&&t)try{return l(e*t)}catch(e){return}};const X=({txn:a,receipt:s,transactionInfo:i,onClose:o,tokenPrice:r,tokenSymbol:p,receiptHeader:l,receiptDescription:u})=>/*#__PURE__*/e(n,{children:[/*#__PURE__*/t(R,{onClose:o}),/*#__PURE__*/t(W,{title:l??"Transaction complete!",description:u??"You're all set."}),/*#__PURE__*/t(G,{tokenPrice:r,from:s.from,to:s.to,gas:K(s),txn:a,transactionInfo:i,tokenSymbol:p}),/*#__PURE__*/t(U,{}),/*#__PURE__*/t(Y,{loading:!1,onClick:o,children:"All Done"}),/*#__PURE__*/t(L,{}),/*#__PURE__*/t(D,{})]});let Y=O(P)`
6
- && {
7
- margin-top: 24px;
8
- }
9
- transition:
10
- color 350ms ease,
11
- background-color 350ms ease;
12
- `;const Z=[{constant:!1,inputs:[{name:"_salt",type:"bytes32"},{name:"_initializer",type:"bytes"}],name:"deployAccount",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}],ee=[{name:"from",type:"address"},{name:"param2",type:"address"},{name:"param3",type:"bytes"},{name:"param4",type:"tuple",components:[]},{type:"tuple",components:[{name:"param5",type:"address"},{name:"param6",type:"uint256"},{name:"param7",type:"uint256"},{name:"encodedInitData",type:"bytes"}]}],te=[{constant:!1,inputs:[{name:"spender",type:"address"},{name:"value",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}],ne=[{inputs:[{name:"to",type:"address"},{name:"amount",type:"uint256"},{name:"memo",type:"bytes32"}],name:"transferWithMemo",outputs:[{name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"}],ae=[{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"mint",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"}],name:"mint",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"uint256",name:"quantity",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"mint",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"uint256",name:"quantity",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"mint",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256[]",name:"tokenIds",type:"uint256[]"},{internalType:"uint256[]",name:"quantities",type:"uint256[]"},{internalType:"bytes",name:"data",type:"bytes"}],name:"mintBatch",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256[]",name:"tokenIds",type:"uint256[]"},{internalType:"uint256[]",name:"quantities",type:"uint256[]"},{internalType:"bytes",name:"data",type:"bytes"}],name:"mintBatch",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"quantity",type:"uint256"}],name:"mint",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"quantity",type:"uint256"}],name:"mint",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"}],name:"safeMint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"}],name:"safeMint",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"string",name:"uri",type:"string"}],name:"safeMint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"string",name:"uri",type:"string"}],name:"safeMint",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeMint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeMint",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"string",name:"uri",type:"string"}],name:"safeMint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"string",name:"uri",type:"string"}],name:"safeMint",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"batchMint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"batchMint",outputs:[],stateMutability:"payable",type:"function"}],se=[{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}],ie=[{constant:!1,inputs:[{name:"_operator",type:"address"},{name:"_approved",type:"bool"}],name:"setApprovalForAll",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}],oe=[{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_tokenId",type:"uint256"}],name:"transferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}],re=[{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_tokenIds",type:"uint256[]"},{name:"_amounts",type:"uint256[]"},{name:"_data",type:"bytes"}],name:"safeBatchTransferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}],pe=[{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_tokenId",type:"uint256"},{name:"_amount",type:"uint256"},{name:"_data",type:"bytes"}],name:"safeTransferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}],le=(e,t)=>{let n=ue(te,e);if(n)return{action:"approve",functionName:"approve",isErc20Ish:!0,isNFTIsh:!1,spender:n.args[0],amount:n.args[1]};let a=ue(V,e);if(a)return{action:"transfer",functionName:"transfer",isErc20Ish:!0,isNFTIsh:!1,transferTo:a.args[0],amount:a.args[1]};let s=ue(ne,e);if(s)return{action:"transfer",functionName:"transferWithMemo",isErc20Ish:!0,isNFTIsh:!1,transferTo:s.args[0],amount:s.args[1]};if(!t)return{action:"transaction",functionName:"",isErc20Ish:!1,isNFTIsh:!1};let i=ue(Z,e);if(i&&"string"==typeof i.args[1]){let e=me(i.args[1]);if(e&&e[4].encodedInitData)return le(e[4].encodedInitData,t)}let o=ue(ie,e);if(o)return{action:"approve",functionName:"setApprovalForAll",isNFTIsh:!0,isErc20Ish:!1,operator:o.args[0],approved:o.args[1]};let r=ue(oe,e);if(r)return{action:"transfer",functionName:"transferFrom",isNFTIsh:!0,isErc20Ish:!1,transferFrom:r.args[0],transferTo:r.args[1],tokenId:r.args[2]};let p=ue(se,e);if(p)return{action:"transfer",functionName:"safeTransferFrom",isNFTIsh:!0,isErc20Ish:!1,transferFrom:p.args[0],transferTo:p.args[1],tokenId:p.args[2]};let l=ue(pe,e);if(l)return{action:"transfer",functionName:"safeTransferFrom",isNFTIsh:!0,isErc20Ish:!1,transferFrom:l.args[0],transferTo:l.args[1],tokenId:l.args[2],amount:l.args[3]};let u=ue(re,e);if(u)return{action:"batch transfer",functionName:"safeBatchTransferFrom",isNFTIsh:!0,isErc20Ish:!1,transferFrom:u.args[0],transferTo:u.args[1],tokenIds:u.args[2],amounts:u.args[3]};let m=ue(ae,e);return m?{action:"mint",functionName:m.functionName,isNFTIsh:!0,isErc20Ish:!1,args:m.args}:{action:"transaction",isErc20Ish:!1,isNFTIsh:!1}};let ue=(e,t)=>{try{let n=u({abi:e,data:t});return{functionName:n.functionName,args:n.args||[]}}catch(e){return null}},me=e=>{try{if("string"==typeof e)return m(ee,`0x${e.slice(10)}`)}catch(e){return null}},ce=e=>`${parseFloat(e).toFixed(2)}`;function de(e,t){let n=[],a=new Map;if(e)for(let t of e)if(t.in[0]){let e;e="ERC721"===t.asset.type||"approve_for_all"===t.in[0].value?{id:`nft:${t.asset.name}`,nftName:t.asset.name,nftCount:t.in.length}:{id:`token:${t.asset.type}:${t.asset.symbol}:${t.asset.name}`,iconUrl:t.asset.logo_url,value:t.in[0].value,symbol:t.asset.symbol,usdValue:t.in[0].usd_price?ce(t.in[0].usd_price):void 0,decimals:t.asset.decimals},n.push(e)}else if(t.out[0]?.value){let e;e="ERC721"===t.asset.type||"approve_for_all"===t.out[0].value?{id:`nft:${t.asset.name}`,nftName:t.asset.name}:{id:`token:${t.asset.type}:${t.asset.symbol}:${t.asset.name}`,iconUrl:t.asset.logo_url,value:t.out[0].value,symbol:t.asset.symbol,usdValue:t.out[0].usd_price?ce(t.out[0].usd_price):void 0,decimals:t.asset.decimals},a.has(e.id)||a.set(e.id,e)}for(let e of t)for(let t of Object.keys(e.spenders)){let n;n="ERC721"===e.asset.type||"approve_for_all"===e.spenders[t]?.value?{id:`nft:${e.asset.name}`,nftName:e.asset.name}:{id:`token:${e.asset.type}:${e.asset.symbol}:${e.asset.name}`,iconUrl:e.asset.logo_url,value:e.spenders[t]?.value,symbol:e.asset.symbol,usdValue:e.spenders[t]?.usd_price?ce(e.spenders[t]?.usd_price):void 0,decimals:e.asset.decimals},a.has(n.id)||a.set(n.id,n)}return{assetsIn:n,assetsOut:Array.from(a.values())}}const ye=(e,t,n,s)=>{let[i,r]=a(null),{walletProxy:p}=k();return o((()=>{i&&r(null),(async()=>{if(!p||!t)return null;let a=[],i=!0,o=await H(e,n,t,s).catch((t=>(t.message&&t.message.includes("Insufficient balance for transaction")||t.message&&t.message.includes("Insufficient funds for gas * price + value")||t.details&&t.details.includes("insufficient funds")?i=!1:a.push(t),e)));return{tx:o,totalGasEstimate:o.gas,hasFunds:i,errors:a}})().then(r)}),[e]),i};let fe=new g(new I("There was an issue preparing your transaction",f.E32603_DEFAULT_INTERNAL_ERROR.eipCode)),be=(e,t)=>e?.sendTransaction?"transactionRequest"in e.sendTransaction?e.sendTransaction.transactionRequest:e.sendTransaction.transactionRequests[t]:void 0;const Te={component:()=>{let{data:l,onUserCloseViaDialogOrKeybindRef:u,setModalData:m,navigate:O}=E(),{client:R,rpcConfig:D,chains:P,closePrivyModal:$,walletProxy:L,showFiatPrices:W}=k(),{user:U}=j(),G=T(),[V,H]=a(0),[Q,K]=a(0),[Y,Z]=a(be(l,V)),[ee,te]=a(null),[ne,ae]=a(),[se,ie]=a(!1),[oe,re]=a(null),[pe,ue]=a(null),[me,ce]=a(null),[Te,he]=a(void 0),[ge,ve]=a(void 0),[Ie,ke]=a(!1),[Ee,je]=a(!1),[Me,Ce]=a([]),[Fe,_e]=a([]),[we,xe]=a("uninitiated"),[Ne,Se]=a(void 0);if(!Y||!l?.sendTransaction||!l?.sendTransaction)/*#__PURE__*/return t(A,{error:Error("Invalid transaction request"),allowlistConfig:G.allowlistConfig,onRetry:()=>{l?.sendTransaction?.onFailure(fe),$({shouldCallAuthOnSuccess:!1})}});let{transactingWalletAddress:Ae}=l.sendTransaction,Oe=s((()=>P.find((e=>Number(e.id)===Number(Y.chainId)))),[Y.chainId]),Re=Oe?.nativeCurrency.symbol??"ETH",De=s((()=>le(Y.data,!!G.embeddedWallets.extendedCalldataDecoding)),[Y.data]),{action:Pe,isErc20Ish:$e,isNFTIsh:Be,functionName:qe}=De,{toAddress:Le,tokenAddress:We}=s((()=>({toAddress:De.isErc20Ish?De.transferTo:Y.to??void 0,tokenAddress:De.isErc20Ish?Y.to:void 0})),[De]);o((()=>{Y.to&&Oe&&$e&&F({address:Y.to,chain:Oe,rpcConfig:G.rpcConfig,privyAppId:G.id}).then(te).catch(console.error)}),[Y.to,Oe]);let{tokenPrice:Ue,isTokenPriceLoading:Ge}=M(Y.chainId),{balance:Ve}=C({rpcConfig:G.rpcConfig,appId:G.id,address:Ae,chain:Oe}),He=function({rpcConfig:e,appId:t,address:n,chain:l,tokenInfo:u}){let{chains:m}=k(),[c,f]=a(null),[b,T]=a(!1),h=s((()=>{let n=l||m[0];if(n)return r({chain:l,transport:p(d(n,e,t))})}),[l,e,t]),g=i((async()=>{if(n&&h&&u.address)try{return T(!0),await h.readContract({address:u.address,abi:z,functionName:"balanceOf",args:[n]})}catch(e){console.error(e)}finally{T(!1)}}),[h,n,u?.address,l]);return o((()=>{g().then((e=>null!=e&&f(e)))}),[g]),{balance:c,isLoading:b&&null==c,formattedBalance:y({amount:c??BigInt(0),decimals:u.decimals})}}({rpcConfig:G.rpcConfig,appId:G.id,address:Ae,tokenInfo:{address:We||"",decimals:ee?.decimals??18},chain:Oe}),ze=s((()=>S(Number(Y.chainId),P,D,{appId:G.id})),[Y.chainId,D]),Qe=ye(Y,Ae,ze,l?.sendTransaction?.prepareTransactionRequest);o((()=>{Z(be(l,V))}),[V]),o((()=>{l.sendTransaction?.getIsSponsored?l.sendTransaction.getIsSponsored().then(ae).catch(console.error):ae(!1)}),[l.sendTransaction.getIsSponsored]);let Je=()=>{if(!se)return oe?l?.sendTransaction?.onSuccess({hash:oe}):me||Qe?.errors[0]?l?.sendTransaction?.onFailure(me??Qe?.errors[0]??fe):l?.sendTransaction?.onFailure(new g(new I("The user rejected the request",f.E4001_USER_REJECTED_REQUEST.eipCode))),$({shouldCallAuthOnSuccess:!1})};u.current=Je;let Ke=!!(l.funding&&l.funding.supportedOptions.length>0),Xe=w(BigInt(Qe?.totalGasEstimate??0n),Re),Ye=W&&Ue?x(BigInt(Qe?.totalGasEstimate??0n),Ue):void 0,Ze=w(Ve??0n,Re,void 0,!0),et=W&&Ue?x(Ve??0n,Ue):void 0,tt=ee&&!He.isLoading&&$e&&"approve"!==Pe?`${He.formattedBalance} ${ee.symbol}`:void 0,nt=l.sendTransaction?.uiOptions?.transactionInfo?.title;nt||(nt="approve"===Pe?$e?"Confirm address":"Confirm action":`Approve ${Pe}`);let at=s((()=>{if(l.sendTransaction?.uiOptions?.description)return l.sendTransaction?.uiOptions?.description;if("approve"===Pe&&"setApprovalForAll"===qe&&De.approved){let a=/*#__PURE__*/t(b,{address:De.operator||"",url:Oe?.blockExplorers?.default?.url});/*#__PURE__*/return e(n,{children:[G.name," would like your permission for ",a," to transfer tokens on your behalf."]})}if("approve"===Pe&&"setApprovalForAll"===qe&&!De.approved){let a=/*#__PURE__*/t(b,{address:De.operator||"",url:Oe?.blockExplorers?.default?.url});/*#__PURE__*/return e(n,{children:[G.name," would like your permission to revoke permissions of ",a," from transferring tokens on your behalf."]})}return $e&&"approve"===Pe||$e&&"approve"===Pe?`${G.name} would like your permission for ${v(De.spender)} to spend tokens on your behalf.`:`${G.name} wants your permission to approve the following transaction.`}),[G.name,$e,De,l.sendTransaction?.uiOptions.description,qe]),st=l.sendTransaction?.uiOptions?.transactionInfo?.contractInfo?.imgUrl?/*#__PURE__*/t("img",{src:l.sendTransaction.uiOptions.transactionInfo.contractInfo.imgUrl,alt:l.sendTransaction.uiOptions.transactionInfo.contractInfo.imgAltText}):null,it=!(!Qe||Qe.errors[0]||Qe.hasFunds||!1!==ne),ot=it&&Ke,rt=ot?"Add funds":l.sendTransaction?.uiOptions?.buttonText||(V<Q?"Continue":"Approve"),pt=e=>{if(!e)throw Error("Transaction scan failed");if("Success"===e.validation.status&&("Benign"===e.validation.result_type?ve("safe"):"Warning"===e.validation.result_type?ve("warn"):"Malicious"===e.validation.result_type&&(ve("error"),je(!0))),"Success"!==e.simulation.status)throw Error("Simulation failed");{he(e.simulation.params);let{assetsIn:t,assetsOut:n}=de(e.simulation.assets_diffs,e.simulation.exposures);if(0===n.length&&0===t.length)throw Error("No tokens found");Ce(n),_e(t)}};if(o((()=>{l.sendTransaction?.scanTransaction&&G.embeddedWallets.transactionScanning.enabled&&"uninitiated"===we&&(xe("in progress"),l.sendTransaction.scanTransaction().then((e=>{pt(e),xe("completed")})).catch((()=>xe("failed"))))}),[!!l.sendTransaction?.scanTransaction]),o((()=>{l.sendTransaction?.scanTransaction&&"failed"!==we||((e,t,n)=>{if(K((e=>e?.sendTransaction?"transactionRequest"in e.sendTransaction?0:e.sendTransaction.transactionRequests.length-1:0)(l)),t.isErc20Ish&&t.amount&&n){let e=_({amount:t.amount,decimals:n.decimals});Se(e),Ce([{value:e,symbol:n?.symbol,decimals:n?.decimals}])}else if(e.value){let t=BigInt(e.value),n=Ue?x(t,Ue):void 0;Ce(W&&n?[{value:n}]:[{value:N(t),symbol:Re,decimals:18,usdValue:n}])}else Ce(W?[{value:"$0"}]:[{value:"0",symbol:Re,decimals:18}])})(Qe?.tx??Y,De,ee)}),[Y,Qe?.tx,De,ee,we]),pe/*#__PURE__*/)return t(X,{txn:Qe?.tx??Y,onClose:Je,receipt:pe,transactionInfo:l.sendTransaction?.uiOptions.transactionInfo,tokenPrice:Ue,tokenSymbol:Re,receiptHeader:l.sendTransaction?.uiOptions.successHeader,receiptDescription:l.sendTransaction?.uiOptions.successDescription});if(me)/*#__PURE__*/return t(B,{transactionError:me,transactionHash:oe??void 0,chainType:"ethereum",chainId:Qe?.tx.chainId??Y.chainId,onClose:Je,onRetry:({resetNonce:e})=>{ce(null);let t={...Qe?.tx??Y};e&&(t.nonce=void 0),Z(t)}});let lt=0!==Q&&"number"==typeof V&&0!==V?()=>{H(V-1)}:void 0;return Ie&&Te?/*#__PURE__*/t(J,{details:Te,onBack:()=>ke(!1)}):/*#__PURE__*/t(q,{transactionIndex:V,onBack:lt,maxIndex:Q,disabled:it&&!Ke||Ee,isSubmitting:se,submitError:me,isPreparing:!Qe,isTokenPriceLoading:Ge,isTokenContractInfoLoading:!Be&&!ee,prepareError:Qe?.errors[0],symbol:ee?.symbol,chain:Oe,img:st,title:nt,subtitle:at,txValue:Y.value,fee:Ye??Xe,isSponsored:ne,from:Ae??"",to:Le,tokenAddress:We??void 0,network:G.chains.find((e=>e.id===Y.chainId))?.name??"",transactionDetails:{...De,formattedAmount:Ne},cta:rt,missingFunds:it,action:Pe,balance:tt??et??Ze,onClose:Je,onClick:ot?async()=>{if(!Ae)return;if(!Ke)throw Error("Funding wallet is not enabled");let e="FundingMethodSelectionScreen";m({...l,funding:{...l.funding,methodScreen:e,chainType:"ethereum",amount:c(BigInt(Qe?.tx.value??0)+BigInt(Qe?.totalGasEstimate?.toString()??0)),chain:Oe},solanaFundingData:l?.solanaFundingData}),O(e)}:async()=>{if(V<Q)H(V+1);else{ie(!0);try{let e=await R.getAccessToken();if(se||!e||!L||!U)return;let t=await l.sendTransaction.onConfirm({transactionRequest:Qe?.tx??Y});if(re(t),l.sendTransaction?.signOnly)return await new Promise((e=>setTimeout(e,h))),l?.sendTransaction?.onSuccess({hash:t}),$({shouldCallAuthOnSuccess:!1});let n=await ze.waitForTransactionReceipt({hash:t});if("reverted"===n.status)throw Error("Transaction failed");ue(n)}catch(e){console.warn({transaction:Qe?.tx??Y,error:e}),ce(e)}finally{ie(!1)}}},validation:ge,hasScanDetails:!!Te,setIsScanDetailsOpen:ke,preventMaliciousTransaction:Ee,setPreventMaliciousTransaction:je,tokensSent:Me,tokensReceived:Fe,isScanning:"in progress"===we,isCancellable:l.sendTransaction?.uiOptions?.isCancellable??!1,functionName:qe})}};export{Te as SendTransactionScreen,Te as default};