@privy-io/react-auth 3.13.1 → 3.14.0-snapshot-20260210202919

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (246) hide show
  1. package/dist/cjs/{AccountNotFoundScreen-iNQ-eJ82.js → AccountNotFoundScreen-DNUMjwCF.js} +1 -1
  2. package/dist/cjs/{Address-BAzd87pQ.js → Address-B-WU8e3D.js} +1 -1
  3. package/dist/cjs/{AffirmativeConsentScreen-Ba1XAxqh.js → AffirmativeConsentScreen-B8lK52OI.js} +1 -1
  4. package/dist/cjs/{AllowlistRejectionScreen-CMZahkkw.js → AllowlistRejectionScreen-AsvVSyDR.js} +1 -1
  5. package/dist/cjs/AuthenticateWithWalletScreen-CqGImE25.js +1 -0
  6. package/dist/cjs/{AwaitingEvmToSolBridgingScreen-BWaBsau9.js → AwaitingEvmToSolBridgingScreen-Dsadt2Fv.js} +1 -1
  7. package/dist/cjs/{AwaitingExternalEthereumTransferScreen-DN7h9ETe.js → AwaitingExternalEthereumTransferScreen-BppL--7R.js} +1 -1
  8. package/dist/cjs/{AwaitingPasswordlessCodeScreen-D2KbYvKF.js → AwaitingPasswordlessCodeScreen-CJlNgLf2.js} +1 -1
  9. package/dist/cjs/{AwaitingSolToEvmBridgingScreen-C06q4jjQ.js → AwaitingSolToEvmBridgingScreen-CuUOuMHh.js} +2 -2
  10. package/dist/cjs/{BridgeNetworkSelectionView-BBifxbuQ.js → BridgeNetworkSelectionView-eDn7j1Dc.js} +6 -6
  11. package/dist/cjs/{CaptchaScreen-Bj5yik5Q.js → CaptchaScreen-CdrpNbYC.js} +1 -1
  12. package/dist/cjs/{CoinbaseOnrampStatusScreen-CP5PYZBV.js → CoinbaseOnrampStatusScreen-Cf5cbx9G.js} +1 -1
  13. package/dist/cjs/{ConnectEmailForm-DSB_ECav.js → ConnectEmailForm-7YVNWl4y.js} +1 -1
  14. package/dist/cjs/{ConnectLedgerScreen-BazfRtiX.js → ConnectLedgerScreen-BHkUM6T3.js} +1 -1
  15. package/dist/cjs/ConnectOnlyLandingScreen-DBKDoCfI.js +1 -0
  16. package/dist/cjs/{ConnectOnlyStatusScreen-5aAg7ONz.js → ConnectOnlyStatusScreen-BLvvvYgL.js} +1 -1
  17. package/dist/cjs/ConnectOrCreateScreen-DGsOVOri.js +1 -0
  18. package/dist/cjs/{ConnectPhoneForm-lBXP5nI1.js → ConnectPhoneForm-BmVjUjmG.js} +1 -1
  19. package/dist/cjs/ConnectWalletView-Cb01591v.js +169 -0
  20. package/dist/cjs/{ConnectionStatusScreen-BL6n6Ct-.js → ConnectionStatusScreen-DRu3wPUZ.js} +1 -1
  21. package/dist/cjs/CopyToClipboard-CC0DCGEH.js +39 -0
  22. package/dist/cjs/{CrossAppAuthScreen-fjiTzpoh.js → CrossAppAuthScreen-DLj1proN.js} +1 -1
  23. package/dist/cjs/{CustomLandingScreenView-CQqBEerN.js → CustomLandingScreenView-CGoiE-Ww.js} +3 -3
  24. package/dist/cjs/{DelegatedActionsConsentScreen-C2DG4aoM.js → DelegatedActionsConsentScreen-GLpwcyY9.js} +1 -1
  25. package/dist/cjs/{DelegatedActionsRevokeScreen-CCr2Kw57.js → DelegatedActionsRevokeScreen-N30KSLfw.js} +1 -1
  26. package/dist/cjs/{EmbeddedWalletConnectingScreen-BW3TLACZ.js → EmbeddedWalletConnectingScreen-B4g6iH9a.js} +1 -1
  27. package/dist/cjs/{EmbeddedWalletCreatedScreen-yTh0CETA.js → EmbeddedWalletCreatedScreen-D8KIpojM.js} +1 -1
  28. package/dist/cjs/{EmbeddedWalletKeyExportScreen-CLwKZG9l.js → EmbeddedWalletKeyExportScreen-D5EgSIZG.js} +2 -2
  29. package/dist/cjs/{EmbeddedWalletOnAccountCreateScreen-BJ9tuKSI.js → EmbeddedWalletOnAccountCreateScreen-B4oS64WM.js} +1 -1
  30. package/dist/cjs/{EmbeddedWalletPasswordUpdateScreen-C3Pu2FvV.js → EmbeddedWalletPasswordUpdateScreen-cAYWzHIk.js} +1 -1
  31. package/dist/cjs/{EmbeddedWalletPasswordUpdateSplashScreen-Dzvq3GAs.js → EmbeddedWalletPasswordUpdateSplashScreen-BoeyN0tp.js} +1 -1
  32. package/dist/cjs/{EnrollTotp-Dzazx21f.js → EnrollTotp-B-9Eye0m.js} +7 -7
  33. package/dist/cjs/{ErrorScreen-Dbie0wkk.js → ErrorScreen-bMmc5gQ_.js} +1 -1
  34. package/dist/cjs/{FarcasterConnectStatusScreen-B7w0TBzB.js → FarcasterConnectStatusScreen-CIpqMvyl.js} +1 -1
  35. package/dist/cjs/FarcasterSignerStatusScreen-MFR4tCkV.js +29 -0
  36. package/dist/cjs/{FundSolWalletWithExternalSolanaWallet-Czi1l_qS.js → FundSolWalletWithExternalSolanaWallet-l8jBZLaN.js} +2 -2
  37. package/dist/cjs/{FundWalletMethodHeader-2kXHTrGK.js → FundWalletMethodHeader-DEG0gSQr.js} +1 -1
  38. package/dist/cjs/FundingEditAmountScreen-2ktIPVYi.js +1 -0
  39. package/dist/cjs/{FundingMethodSelectionScreen-CwORHNKY.js → FundingMethodSelectionScreen-r7iV7Ftb.js} +1 -1
  40. package/dist/cjs/{InAppBrowserLoginNotPossible-D9m4nJvR.js → InAppBrowserLoginNotPossible-C2VduxXy.js} +1 -1
  41. package/dist/cjs/{InstallWalletScreen-D2iE62NY.js → InstallWalletScreen-DPx7SL-z.js} +1 -1
  42. package/dist/cjs/LandingScreen-B-eNMi9V.js +1 -0
  43. package/dist/cjs/{LinkConflictScreen-CQiPRZsR.js → LinkConflictScreen-Cnh05aRC.js} +2 -2
  44. package/dist/cjs/{LinkEmailScreen-DaTzx7Fk.js → LinkEmailScreen-BY2X5Iqy.js} +1 -1
  45. package/dist/cjs/{LinkPasskeyScreen-DR1inEW4.js → LinkPasskeyScreen-CQYKVLhX.js} +1 -1
  46. package/dist/cjs/{LinkPhoneScreen-Den2l7u5.js → LinkPhoneScreen-DzLe9Fiy.js} +1 -1
  47. package/dist/cjs/{LoginFailedScreen-CG5VpqB1.js → LoginFailedScreen--rjnALVH.js} +1 -1
  48. package/dist/cjs/{ManualTransferScreen-QVz0bbM4.js → ManualTransferScreen-C8jSM6eb.js} +1 -1
  49. package/dist/cjs/MfaAuthEnrollmentFlowScreen-CRdqzHSW.js +1 -0
  50. package/dist/cjs/{MfaAuthVerifyFlowScreen-BmhIWVUg.js → MfaAuthVerifyFlowScreen-BD0AuWXf.js} +1 -1
  51. package/dist/cjs/MfaEnrollmentFlowScreen-B5ycifV_.js +1 -0
  52. package/dist/cjs/{MfaVerifyFlowScreen-NBi3M6EX.js → MfaVerifyFlowScreen-D7k62uSo.js} +1 -1
  53. package/dist/cjs/{ModalHeader-CabvEpAG.js → ModalHeader-CtKHzKGg.js} +17 -11
  54. package/dist/cjs/{MoonpayStatusScreen-DQCYOZ0M.js → MoonpayStatusScreen-CqqNZbjM.js} +1 -1
  55. package/dist/cjs/{OAuthStatusScreen-Dzo0z0tK.js → OAuthStatusScreen-Be_T97BL.js} +1 -1
  56. package/dist/cjs/{PasskeySelectSignupOrLogin-D6KxIann.js → PasskeySelectSignupOrLogin-BtC_DSMa.js} +1 -1
  57. package/dist/cjs/{PasskeyStatusScreen-DfcsZHZm.js → PasskeyStatusScreen-Bep_MVh0.js} +1 -1
  58. package/dist/cjs/{PasswordRecoveryScreen-DfpNr526.js → PasswordRecoveryScreen-BLjiikK6.js} +1 -1
  59. package/dist/cjs/{QrCode-B5K0VLPw.js → QrCode-jC-CR_0T.js} +1 -1
  60. package/dist/cjs/{RecoveryOAuthStatusScreen-CaoYW19J.js → RecoveryOAuthStatusScreen-DsFB_aGc.js} +1 -1
  61. package/dist/cjs/{RecoveryPasswordCreateScreen-BEEpGGv7.js → RecoveryPasswordCreateScreen-CNF0356T.js} +1 -1
  62. package/dist/cjs/{RecoverySelectionScreen-C2tuntn9.js → RecoverySelectionScreen-CXPcbLC4.js} +1 -1
  63. package/dist/cjs/{Screen-BXzBiTIN.js → Screen-BZt4LJMK.js} +6 -6
  64. package/dist/cjs/{ScreenLayout-SSjax2iq.js → ScreenLayout-B07q0ZPf.js} +1 -1
  65. package/dist/cjs/{SetAutomaticRecoveryScreen-DDVOX064.js → SetAutomaticRecoveryScreen-DI1qB2po.js} +1 -1
  66. package/dist/cjs/{SetWalletPasswordForm-CjifRxS3.js → SetWalletPasswordForm-BHF_A7Dk.js} +3 -3
  67. package/dist/cjs/{SignRequestScreen-B6fS5qTS.js → SignRequestScreen-CO86eseO.js} +4 -4
  68. package/dist/cjs/{StandardSignAndSendTransactionScreen-B5BX6LFZ.js → StandardSignAndSendTransactionScreen-CwpWBYar.js} +3 -3
  69. package/dist/cjs/{TelegramAuthScreen-CrpOhr2m.js → TelegramAuthScreen-DLqow-_l.js} +1 -1
  70. package/dist/cjs/{TransactionDetails-CGZ0hDXd.js → TransactionDetails-Bg5jCOCx.js} +1 -1
  71. package/dist/cjs/{TransactionErrorView-C5-4kCDL.js → TransactionErrorView-6tseFNpm.js} +7 -7
  72. package/dist/cjs/{TransferFromWalletScreen-Be_N5MeO.js → TransferFromWalletScreen-Ci0tFxZH.js} +2 -2
  73. package/dist/cjs/{TransferOrBridgeLoadingScreen-BGp5x3h8.js → TransferOrBridgeLoadingScreen-DXT4zz90.js} +2 -2
  74. package/dist/cjs/{UpdateEmailScreen-GKUeQDLE.js → UpdateEmailScreen-CVta1e7f.js} +1 -1
  75. package/dist/cjs/{UpdatePhoneScreen-BUA9FZ9k.js → UpdatePhoneScreen-CjJZkCNB.js} +1 -1
  76. package/dist/cjs/{UserLimitReachedScreen-ByQxJS_K.js → UserLimitReachedScreen-CXIbd9RI.js} +1 -1
  77. package/dist/cjs/{WalletInfoCard-BYZGsWwj.js → WalletInfoCard-DBa62siD.js} +1 -1
  78. package/dist/cjs/{WalletInterstitialScreen-t0tp0uiQ.js → WalletInterstitialScreen-CsL8VHXz.js} +1 -1
  79. package/dist/cjs/{WalletLink-Bj02lEf9.js → WalletLink-BOiDSVfa.js} +1 -1
  80. package/dist/cjs/{WalletOverflowButton-p3vpo0QR.js → WalletOverflowButton-DRG7e1fY.js} +1 -1
  81. package/dist/cjs/abstract-smart-wallets.js +1 -1
  82. package/dist/cjs/{context-CuNnvCIL.js → context-BC-5kj78.js} +1 -1
  83. package/dist/cjs/{ethers-C_dhPYcC.js → ethers-KrqK37LW.js} +1 -1
  84. package/dist/cjs/extended-chains.js +1 -1
  85. package/dist/cjs/{get-is-unified-wallet-C2yi08Zy.js → get-is-unified-wallet-BzEUbDK3.js} +1 -1
  86. package/dist/cjs/index-B6OzAz9u.js +174 -0
  87. package/dist/cjs/{index-TUET0BYX.js → index-Bk3J-obQ.js} +2 -2
  88. package/dist/cjs/{index-CKUeuhfu.js → index-CHVwKo_g.js} +1 -1
  89. package/dist/cjs/index.js +1 -1
  90. package/dist/cjs/internal.js +1 -1
  91. package/dist/cjs/{shared-AII0g-d1.js → shared-BNxRpOKo.js} +1 -1
  92. package/dist/cjs/{shouldProceedtoEmbeddedWalletCreationFlow-DE4oGpYl.js → shouldProceedtoEmbeddedWalletCreationFlow-Cnc_Wnd5.js} +1 -1
  93. package/dist/cjs/{smart-wallets-BypZdOsC.js → smart-wallets-Brk6mOXb.js} +1 -1
  94. package/dist/cjs/smart-wallets.js +1 -1
  95. package/dist/cjs/solana.js +1 -1
  96. package/dist/cjs/{styles-D7QQZERY.js → styles-CcKJSwKY.js} +1 -1
  97. package/dist/cjs/{to-ui-error-DNNop_FY.js → to-ui-error-bCwYNt_S.js} +2 -2
  98. package/dist/cjs/ui.js +12 -12
  99. package/dist/cjs/use-export-wallet-1UzcKhL7.js +1 -0
  100. package/dist/cjs/{use-export-wallet-B7CUqWdP.js → use-export-wallet-Dd8Kpwba.js} +1 -1
  101. package/dist/cjs/{useActiveWallet-D5qqs3GS.js → useActiveWallet-CR03NUpG.js} +1 -1
  102. package/dist/cjs/{useGetTokenPrice-BRQnbdi2.js → useGetTokenPrice-iN4PCLKm.js} +1 -1
  103. package/dist/cjs/{useI18n-DKrZl8KW.js → useI18n-B_3-ntpk.js} +1 -1
  104. package/dist/cjs/{usePrivy-BKHhRZMn.js → usePrivy-OGD5cMxb.js} +1 -1
  105. package/dist/cjs/{useSolanaRpcClient-DXykrMtX.js → useSolanaRpcClient-DFZ8wsSW.js} +1 -1
  106. package/dist/cjs/{useWallets-Bv9SU-di.js → useWallets-Cuyz25d9.js} +1 -1
  107. package/dist/cjs/{useWallets-CP2-zXxW.js → useWallets-DtMRGL0-.js} +1 -1
  108. package/dist/dts/index.d.mts +2 -2
  109. package/dist/dts/index.d.ts +2 -2
  110. package/dist/esm/{AccountNotFoundScreen-Dty9AII6.mjs → AccountNotFoundScreen-kpo_wXTb.mjs} +1 -1
  111. package/dist/esm/{Address-BmCgxKQR.mjs → Address-Dc9fwaMF.mjs} +1 -1
  112. package/dist/esm/{AffirmativeConsentScreen-CZ3QtNmP.mjs → AffirmativeConsentScreen-HVhY1iYD.mjs} +1 -1
  113. package/dist/esm/{AllowlistRejectionScreen-DUd4GJIK.mjs → AllowlistRejectionScreen-BAf0N49J.mjs} +1 -1
  114. package/dist/esm/AuthenticateWithWalletScreen-DiSqjcWS.mjs +1 -0
  115. package/dist/esm/{AwaitingEvmToSolBridgingScreen-DCpcHpQX.mjs → AwaitingEvmToSolBridgingScreen-BjQ36yjF.mjs} +2 -2
  116. package/dist/esm/{AwaitingExternalEthereumTransferScreen-D1V2_vDk.mjs → AwaitingExternalEthereumTransferScreen-DP2JIEp3.mjs} +1 -1
  117. package/dist/esm/{AwaitingPasswordlessCodeScreen-DGAxwdL6.mjs → AwaitingPasswordlessCodeScreen-DKEvEwtc.mjs} +1 -1
  118. package/dist/esm/{AwaitingSolToEvmBridgingScreen-B6Xv92AB.mjs → AwaitingSolToEvmBridgingScreen-F5PFLObw.mjs} +1 -1
  119. package/dist/esm/{BridgeNetworkSelectionView-tyz86GlM.mjs → BridgeNetworkSelectionView-CzgPnmSN.mjs} +10 -10
  120. package/dist/esm/{CaptchaScreen-BL1nWi7c.mjs → CaptchaScreen-Bu46wWXz.mjs} +1 -1
  121. package/dist/esm/{CoinbaseOnrampStatusScreen-DhIZ3gwP.mjs → CoinbaseOnrampStatusScreen-COkmXcpj.mjs} +1 -1
  122. package/dist/esm/ConnectEmailForm-DeDXSXOw.mjs +3 -0
  123. package/dist/esm/{ConnectLedgerScreen-CURsQoYz.mjs → ConnectLedgerScreen-Bi1O0Lnl.mjs} +1 -1
  124. package/dist/esm/ConnectOnlyLandingScreen-DIkv-j5m.mjs +1 -0
  125. package/dist/esm/{ConnectOnlyStatusScreen-VM7nNu6X.mjs → ConnectOnlyStatusScreen-D9TWuaHq.mjs} +1 -1
  126. package/dist/esm/ConnectOrCreateScreen-czTLAMjE.mjs +1 -0
  127. package/dist/esm/{ConnectPhoneForm-nVYECWzo.mjs → ConnectPhoneForm-D3J7UDS4.mjs} +1 -1
  128. package/dist/esm/{ConnectWalletView-BXqs6pWG.mjs → ConnectWalletView-C0GcJSOP.mjs} +7 -9
  129. package/dist/esm/{ConnectionStatusScreen-SAx7YO5y.mjs → ConnectionStatusScreen-Cl_-0PvG.mjs} +2 -2
  130. package/dist/esm/CopyToClipboard-DSTf_eKU.mjs +39 -0
  131. package/dist/esm/{CrossAppAuthScreen-V6LW9fie.mjs → CrossAppAuthScreen-DJLQlQd-.mjs} +1 -1
  132. package/dist/esm/{CustomLandingScreenView-B4a5Rc9z.mjs → CustomLandingScreenView-BAs-WDHG.mjs} +4 -4
  133. package/dist/esm/{DelegatedActionsConsentScreen-0_shAgnh.mjs → DelegatedActionsConsentScreen-Da2g3sXL.mjs} +1 -1
  134. package/dist/esm/{DelegatedActionsRevokeScreen-olNf5JQw.mjs → DelegatedActionsRevokeScreen-Dfn7FXtL.mjs} +1 -1
  135. package/dist/esm/{EmbeddedWalletConnectingScreen-Dleo6nTw.mjs → EmbeddedWalletConnectingScreen-D6tpyyX6.mjs} +1 -1
  136. package/dist/esm/{EmbeddedWalletCreatedScreen-Dx0eaEaV.mjs → EmbeddedWalletCreatedScreen-c6ORbL8O.mjs} +1 -1
  137. package/dist/esm/{EmbeddedWalletKeyExportScreen-B-6Lfc6D.mjs → EmbeddedWalletKeyExportScreen-D7VLN_vu.mjs} +2 -2
  138. package/dist/esm/{EmbeddedWalletOnAccountCreateScreen-DbiGNXpt.mjs → EmbeddedWalletOnAccountCreateScreen-COzgE4dd.mjs} +1 -1
  139. package/dist/esm/{EmbeddedWalletPasswordUpdateScreen-fA9JGXuz.mjs → EmbeddedWalletPasswordUpdateScreen-BVMQP7yd.mjs} +1 -1
  140. package/dist/esm/{EmbeddedWalletPasswordUpdateSplashScreen-CTPO_C5V.mjs → EmbeddedWalletPasswordUpdateSplashScreen-CWUgL7m1.mjs} +1 -1
  141. package/dist/esm/{EnrollTotp-D6VGtjIL.mjs → EnrollTotp-U0Jk_J--.mjs} +5 -5
  142. package/dist/esm/{ErrorScreen-Ba4Ml9CI.mjs → ErrorScreen-BaE0-mzx.mjs} +1 -1
  143. package/dist/esm/{FarcasterConnectStatusScreen-BN_wRxNV.mjs → FarcasterConnectStatusScreen-4SgMYfEP.mjs} +2 -2
  144. package/dist/esm/FarcasterSignerStatusScreen-BMwwcbSb.mjs +28 -0
  145. package/dist/esm/{FundSolWalletWithExternalSolanaWallet-B3Y84dbg.mjs → FundSolWalletWithExternalSolanaWallet-BDe2TFOC.mjs} +1 -1
  146. package/dist/esm/{FundWalletMethodHeader-Ce0vLrUa.mjs → FundWalletMethodHeader-C3QM4h3L.mjs} +1 -1
  147. package/dist/esm/{FundingEditAmountScreen-DeM_ClwN.mjs → FundingEditAmountScreen-IalOk6gH.mjs} +1 -1
  148. package/dist/esm/{FundingMethodSelectionScreen-Be8LIw6i.mjs → FundingMethodSelectionScreen-BQAohPbk.mjs} +1 -1
  149. package/dist/esm/{InAppBrowserLoginNotPossible-7kqa69SP.mjs → InAppBrowserLoginNotPossible-B2zaxs1h.mjs} +1 -1
  150. package/dist/esm/{InstallWalletScreen-EfqvUoSZ.mjs → InstallWalletScreen-DVe8lA3J.mjs} +1 -1
  151. package/dist/esm/LandingScreen-B6yu6nWg.mjs +1 -0
  152. package/dist/esm/{LinkConflictScreen-B-yRqIRn.mjs → LinkConflictScreen-DzGN3f1P.mjs} +1 -1
  153. package/dist/esm/{LinkEmailScreen-CQ5mnYS9.mjs → LinkEmailScreen-BQbelwU_.mjs} +1 -1
  154. package/dist/esm/{LinkPasskeyScreen-BfGROb2f.mjs → LinkPasskeyScreen-DM05y9x2.mjs} +1 -1
  155. package/dist/esm/{LinkPhoneScreen-CVNSbTfD.mjs → LinkPhoneScreen-DeRWy-B0.mjs} +1 -1
  156. package/dist/esm/{LoginFailedScreen-B2KtCyAw.mjs → LoginFailedScreen-KBf-1t3h.mjs} +1 -1
  157. package/dist/esm/{ManualTransferScreen-C2Rl54K3.mjs → ManualTransferScreen-fwncmmcv.mjs} +1 -1
  158. package/dist/esm/MfaAuthEnrollmentFlowScreen-jwzT070s.mjs +1 -0
  159. package/dist/esm/{MfaAuthVerifyFlowScreen-zG9ps8-7.mjs → MfaAuthVerifyFlowScreen-ChKeIb2B.mjs} +1 -1
  160. package/dist/esm/MfaEnrollmentFlowScreen-OWHkPPKf.mjs +1 -0
  161. package/dist/esm/{MfaVerifyFlowScreen-6eccLZxg.mjs → MfaVerifyFlowScreen-Cw8SLRu1.mjs} +1 -1
  162. package/dist/esm/{ModalHeader-CvLNEZ0F.mjs → ModalHeader-Dgah8j-h.mjs} +28 -22
  163. package/dist/esm/{MoonpayStatusScreen-u9OjnVb2.mjs → MoonpayStatusScreen-BEKe2qdA.mjs} +1 -1
  164. package/dist/esm/{OAuthStatusScreen-C4KNGm-v.mjs → OAuthStatusScreen-J0C_mTYe.mjs} +1 -1
  165. package/dist/esm/{PasskeySelectSignupOrLogin-DM959Ikc.mjs → PasskeySelectSignupOrLogin-DY6xFBmQ.mjs} +1 -1
  166. package/dist/esm/{PasskeyStatusScreen-BfUHTu2T.mjs → PasskeyStatusScreen-ErT1tdQ8.mjs} +1 -1
  167. package/dist/esm/{PasswordRecoveryScreen-BnkB7Xwe.mjs → PasswordRecoveryScreen-Bgi9GfGJ.mjs} +1 -1
  168. package/dist/esm/{QrCode-AKgpho6r.mjs → QrCode-CV7y6Con.mjs} +1 -1
  169. package/dist/esm/RecoveryOAuthStatusScreen-CgpdP8kk.mjs +1 -0
  170. package/dist/esm/RecoveryPasswordCreateScreen-zbsBy0zO.mjs +1 -0
  171. package/dist/esm/{RecoverySelectionScreen-CJG-J3Aj.mjs → RecoverySelectionScreen-DPS-dNY6.mjs} +2 -2
  172. package/dist/esm/{Screen-DnEl8dVF.mjs → Screen-D4UVyUmz.mjs} +5 -5
  173. package/dist/esm/{ScreenLayout-kyRBwF5n.mjs → ScreenLayout-BxduQYcn.mjs} +1 -1
  174. package/dist/esm/{SetAutomaticRecoveryScreen-CXNCqRU4.mjs → SetAutomaticRecoveryScreen-DNZZB2sI.mjs} +1 -1
  175. package/dist/esm/{SetWalletPasswordForm-Bns8qtXn.mjs → SetWalletPasswordForm-DP0zxdTl.mjs} +4 -4
  176. package/dist/esm/{SignRequestScreen-7t8KCRXP.mjs → SignRequestScreen-iYnPeziQ.mjs} +3 -3
  177. package/dist/esm/{StandardSignAndSendTransactionScreen-BIJeFjT1.mjs → StandardSignAndSendTransactionScreen-D8byiEkI.mjs} +2 -2
  178. package/dist/esm/{TelegramAuthScreen-D-cJY_dj.mjs → TelegramAuthScreen-B73-F_A2.mjs} +1 -1
  179. package/dist/esm/{TransactionDetails-DhYW2qjK.mjs → TransactionDetails-DSClEY-S.mjs} +1 -1
  180. package/dist/esm/{TransactionErrorView-DtnhZ5P5.mjs → TransactionErrorView-DmcW7szz.mjs} +8 -8
  181. package/dist/esm/{TransferFromWalletScreen-BdIo62Cg.mjs → TransferFromWalletScreen-up6JSuSm.mjs} +2 -2
  182. package/dist/esm/{TransferOrBridgeLoadingScreen-C9hX5Ost.mjs → TransferOrBridgeLoadingScreen-BGi2Pwv6.mjs} +1 -1
  183. package/dist/esm/UpdateEmailScreen-BDhNAVjM.mjs +1 -0
  184. package/dist/esm/{UpdatePhoneScreen-C7fQ2ohl.mjs → UpdatePhoneScreen-BykKJQg4.mjs} +1 -1
  185. package/dist/esm/{UserLimitReachedScreen-dLjGUBN-.mjs → UserLimitReachedScreen-DlEmBPVa.mjs} +1 -1
  186. package/dist/esm/{WalletInfoCard-CVCh-Z5E.mjs → WalletInfoCard-Auf8KAhE.mjs} +2 -2
  187. package/dist/esm/{WalletInterstitialScreen-C8UPLmif.mjs → WalletInterstitialScreen-4rr799hK.mjs} +1 -1
  188. package/dist/esm/{WalletLink-xufwYyQh.mjs → WalletLink-Cn4LEfB8.mjs} +6 -6
  189. package/dist/esm/{WalletOverflowButton-qXN0KcGe.mjs → WalletOverflowButton-C1Qm1edE.mjs} +1 -1
  190. package/dist/esm/abstract-smart-wallets.mjs +1 -1
  191. package/dist/esm/context-CiVjsvSu.mjs +1 -0
  192. package/dist/esm/{ethers-DGsvPPEp.mjs → ethers-DJb7a8Zi.mjs} +1 -1
  193. package/dist/esm/extended-chains.mjs +1 -1
  194. package/dist/esm/{get-is-unified-wallet-C6sEzDpG.mjs → get-is-unified-wallet-o1p06vNx.mjs} +1 -1
  195. package/dist/esm/index-Bwrmi8Zh.mjs +174 -0
  196. package/dist/esm/{index-BMpFxPbi.mjs → index-CSPS-alu.mjs} +1 -1
  197. package/dist/esm/{index--X7RfrXS.mjs → index-Dq6gowPx.mjs} +3 -3
  198. package/dist/esm/index.mjs +1 -1
  199. package/dist/esm/internal.mjs +1 -1
  200. package/dist/esm/{shared-CSN6-8CF.mjs → shared-xDqgT98p.mjs} +1 -1
  201. package/dist/esm/{shouldProceedtoEmbeddedWalletCreationFlow-BdpCzEJT.mjs → shouldProceedtoEmbeddedWalletCreationFlow-C8hGTGhw.mjs} +1 -1
  202. package/dist/esm/{smart-wallets-DjBZWleC.mjs → smart-wallets-BbVGC7zD.mjs} +1 -1
  203. package/dist/esm/smart-wallets.mjs +1 -1
  204. package/dist/esm/solana.mjs +1 -1
  205. package/dist/esm/{styles-aArPlAod.mjs → styles-C11VS_7r.mjs} +1 -1
  206. package/dist/esm/{to-ui-error-DKeOToXI.mjs → to-ui-error-Mi0mdU5e.mjs} +2 -2
  207. package/dist/esm/ui.mjs +1 -1
  208. package/dist/esm/{use-export-wallet-BcHSx5WT.mjs → use-export-wallet-BKlUCY84.mjs} +1 -1
  209. package/dist/esm/use-export-wallet-CP-hSjOG.mjs +1 -0
  210. package/dist/esm/{useActiveWallet-36SuARye.mjs → useActiveWallet-Dm548R2J.mjs} +1 -1
  211. package/dist/esm/{useGetTokenPrice-CgGm0Ecu.mjs → useGetTokenPrice-BYyTcAvM.mjs} +1 -1
  212. package/dist/esm/{useI18n-CbESkJQ7.mjs → useI18n-DHUnRp_f.mjs} +1 -1
  213. package/dist/esm/{usePrivy-D_kd_mMH.mjs → usePrivy-kABlAB4n.mjs} +1 -1
  214. package/dist/esm/{useSolanaRpcClient-DajzMnxc.mjs → useSolanaRpcClient-Bhhf26b_.mjs} +1 -1
  215. package/dist/esm/{useWallets-02TRgRMN.mjs → useWallets-BSSZRV2z.mjs} +1 -1
  216. package/dist/esm/{useWallets-BwdySlks.mjs → useWallets-HI_iUYAd.mjs} +1 -1
  217. package/package.json +5 -5
  218. package/dist/cjs/AuthenticateWithWalletScreen-BpfHRQ17.js +0 -1
  219. package/dist/cjs/ConnectOnlyLandingScreen-CsbSt3la.js +0 -1
  220. package/dist/cjs/ConnectOrCreateScreen-C0t-tK0s.js +0 -1
  221. package/dist/cjs/ConnectWalletView-EuTf-6Vt.js +0 -171
  222. package/dist/cjs/CopyToClipboard-BCe_l6_D.js +0 -39
  223. package/dist/cjs/FarcasterSignerStatusScreen-CTZRoFL3.js +0 -29
  224. package/dist/cjs/FundingEditAmountScreen-xtC8kXZ9.js +0 -1
  225. package/dist/cjs/LandingScreen-Cclv1lfx.js +0 -1
  226. package/dist/cjs/MfaAuthEnrollmentFlowScreen-CgEdqCAi.js +0 -1
  227. package/dist/cjs/MfaEnrollmentFlowScreen-BSALpHSu.js +0 -1
  228. package/dist/cjs/copy-BiZ7dtqy.js +0 -1
  229. package/dist/cjs/index-DyCLWLpL.js +0 -174
  230. package/dist/cjs/use-export-wallet-COKs2yxH.js +0 -1
  231. package/dist/esm/AuthenticateWithWalletScreen-Fa-n1Sey.mjs +0 -1
  232. package/dist/esm/ConnectEmailForm-DvQJmoTc.mjs +0 -3
  233. package/dist/esm/ConnectOnlyLandingScreen-CBjbbuDg.mjs +0 -1
  234. package/dist/esm/ConnectOrCreateScreen-8FxDiOyl.mjs +0 -1
  235. package/dist/esm/CopyToClipboard-BGTSFnT3.mjs +0 -39
  236. package/dist/esm/FarcasterSignerStatusScreen-B8IyPJhe.mjs +0 -28
  237. package/dist/esm/LandingScreen-DPaqiLpx.mjs +0 -1
  238. package/dist/esm/MfaAuthEnrollmentFlowScreen-D6ujM0kh.mjs +0 -1
  239. package/dist/esm/MfaEnrollmentFlowScreen-gELi8Ppl.mjs +0 -1
  240. package/dist/esm/RecoveryOAuthStatusScreen-DaP1Oh1u.mjs +0 -1
  241. package/dist/esm/RecoveryPasswordCreateScreen-B-dLBQVH.mjs +0 -1
  242. package/dist/esm/UpdateEmailScreen-0TGU13Qv.mjs +0 -1
  243. package/dist/esm/context-CwMpvKNV.mjs +0 -1
  244. package/dist/esm/copy-Bx2Jwc5_.mjs +0 -1
  245. package/dist/esm/index-C47JxA4c.mjs +0 -174
  246. package/dist/esm/use-export-wallet-CwQ5-CS4.mjs +0 -1
@@ -1,11 +1,11 @@
1
- import{jsx as e,jsxs as t,Fragment as o}from"react/jsx-runtime";import{base64 as r}from"@scure/base";import{Edit as i}from"lucide-react";import{useState as n,useEffect as a}from"react";import{styled as s}from"styled-components";import{isHex as l,hexToString as c}from"viem";import{ProviderErrors as m}from"@privy-io/js-sdk-core";import{C as p}from"./CopyToClipboard-BGTSFnT3.mjs";import{a as d}from"./Layouts-BlFm53ED.mjs";import{M as u,D as g}from"./JsonTree-aPaJmPx7.mjs";import{P as h,j as y}from"./use-export-wallet-CwQ5-CS4.mjs";import{W as f,q as x}from"./context-CwMpvKNV.mjs";import{u as C}from"./internal-context-Z-fyxadS.mjs";import{u as w,a as j}from"./get-is-unified-wallet-C6sEzDpG.mjs";import{S as b}from"./ScreenLayout-kyRBwF5n.mjs";import"./copy-Bx2Jwc5_.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-02TRgRMN.mjs";import"tinycolor2";import"ofetch";import"./ModalHeader-CvLNEZ0F.mjs";import"./useActiveWallet-36SuARye.mjs";import"zustand";import"react-device-detect";import"./events-context-CI0iqAXA.mjs";import"./getPublicClient-B4uPLKn-.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-DnEl8dVF.mjs";import"./index-Dq_xe9dz.mjs";const T=s.img`
1
+ import{jsx as e,jsxs as t,Fragment as o}from"react/jsx-runtime";import{base64 as r}from"@scure/base";import{Edit as i}from"lucide-react";import{useState as n,useEffect as a}from"react";import{styled as s}from"styled-components";import{isHex as l,hexToString as c}from"viem";import{ProviderErrors as m}from"@privy-io/js-sdk-core";import{C as p}from"./CopyToClipboard-DSTf_eKU.mjs";import{a as d}from"./Layouts-BlFm53ED.mjs";import{M as u,D as g}from"./JsonTree-aPaJmPx7.mjs";import{P as h,j as y}from"./use-export-wallet-CP-hSjOG.mjs";import{W as f,q as x}from"./context-CiVjsvSu.mjs";import{u as C}from"./internal-context-Z-fyxadS.mjs";import{u as w,a as b}from"./get-is-unified-wallet-o1p06vNx.mjs";import{S as j}from"./ScreenLayout-BxduQYcn.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-BSSZRV2z.mjs";import"tinycolor2";import"ofetch";import"./ModalHeader-Dgah8j-h.mjs";import"./useActiveWallet-Dm548R2J.mjs";import"zustand";import"react-device-detect";import"./events-context-CI0iqAXA.mjs";import"./getPublicClient-B4uPLKn-.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-D4UVyUmz.mjs";import"./index-Dq_xe9dz.mjs";const v=s.img`
2
2
  && {
3
3
  height: ${e=>"sm"===e.size?"65px":"140px"};
4
4
  width: ${e=>"sm"===e.size?"65px":"140px"};
5
5
  border-radius: 16px;
6
6
  margin-bottom: 12px;
7
7
  }
8
- `;let v=e=>{if(!l(e))return e;try{let t=c(e);return t.includes("�")?e:t}catch{return e}},S=e=>{try{let t=r.decode(e),o=(new TextDecoder).decode(t);return o.includes("�")?e:o}catch{return e}},E=r=>{let{types:i,primaryType:n,...a}=r.typedData;/*#__PURE__*/return t(o,{children:[/*#__PURE__*/e(A,{data:a}),/*#__PURE__*/e(p,{text:(s=r.typedData,JSON.stringify(s,null,2)),itemName:"full payload to clipboard"})," "]});var s};const D=({method:o,messageData:r,copy:n,iconUrl:a,isLoading:s,success:l,walletProxyIsLoading:c,errorMessage:m,isCancellable:p,onSign:u,onCancel:g,onClose:h})=>/*#__PURE__*/e(b,{title:n.title,subtitle:n.description,showClose:!0,onClose:h,icon:i,iconVariant:"subtle",helpText:m?/*#__PURE__*/e(L,{children:m}):void 0,primaryCta:{label:n.buttonText,onClick:u,disabled:s||l||c,loading:s},secondaryCta:p?{label:"Not now",onClick:g,disabled:s||l||c}:void 0,watermark:!0,children:/*#__PURE__*/t(d,{children:[a?/*#__PURE__*/e(T,{style:{alignSelf:"center"},size:"sm",src:a,alt:"app image"}):null,/*#__PURE__*/t(_,{children:["personal_sign"===o&&/*#__PURE__*/e(U,{children:v(r)}),"eth_signTypedData_v4"===o&&/*#__PURE__*/e(E,{typedData:r}),"solana_signMessage"===o&&/*#__PURE__*/e(U,{children:S(r)})]})]})}),R={component:()=>{let{authenticated:t}=w(),{initializeWalletProxy:o,closePrivyModal:r}=C(),{navigate:i,data:s,onUserCloseViaDialogOrKeybindRef:l}=j(),[c,p]=n(!0),[d,u]=n(""),[g,b]=n(),[T,v]=n(null),[S,E]=n(!1);a((()=>{t||i("LandingScreen")}),[t]),a((()=>{o(f).then((e=>{p(!1),e||(u("An error has occurred, please try again."),b(new h(new y(d,m.E32603_DEFAULT_INTERNAL_ERROR.eipCode))))}))}),[]);let{method:R,data:_,confirmAndSign:L,onSuccess:A,onFailure:U,uiOptions:M}=s.signMessage,I={title:M?.title||"Sign message",description:M?.description||"Signing this message will not cost you any fees.",buttonText:M?.buttonText||"Sign and continue"},k=e=>{e?A(e):U(g||new h(new y("The user rejected the request.",m.E4001_USER_REJECTED_REQUEST.eipCode))),r({shouldCallAuthOnSuccess:!1}),setTimeout((()=>{v(null),u(""),b(void 0)}),200)};l.current=()=>{k(T)};/*#__PURE__*/return e(D,{method:R,messageData:_,copy:I,iconUrl:M?.iconUrl&&"string"==typeof M.iconUrl?M.iconUrl:void 0,isLoading:S,success:null!==T,walletProxyIsLoading:c,errorMessage:d,isCancellable:M?.isCancellable,onSign:async()=>{E(!0),u("");try{let e=await L();v(e),E(!1),setTimeout((()=>{k(e)}),x)}catch(e){console.error(e),u("An error has occurred, please try again."),b(new h(new y(d,m.E32603_DEFAULT_INTERNAL_ERROR.eipCode))),E(!1)}},onCancel:()=>k(null),onClose:()=>k(T)})}};let _=s.div`
8
+ `;let T=e=>{if(!l(e))return e;try{let t=c(e);return t.includes("�")?e:t}catch{return e}},S=e=>{try{let t=r.decode(e),o=(new TextDecoder).decode(t);return o.includes("�")?e:o}catch{return e}},E=r=>{let{types:i,primaryType:n,...a}=r.typedData;/*#__PURE__*/return t(o,{children:[/*#__PURE__*/e(A,{data:a}),/*#__PURE__*/e(p,{text:(s=r.typedData,JSON.stringify(s,null,2)),itemName:"full payload to clipboard"})," "]});var s};const R=({method:o,messageData:r,copy:n,iconUrl:a,isLoading:s,success:l,walletProxyIsLoading:c,errorMessage:m,isCancellable:p,onSign:u,onCancel:g,onClose:h})=>/*#__PURE__*/e(j,{title:n.title,subtitle:n.description,showClose:!0,onClose:h,icon:i,iconVariant:"subtle",helpText:m?/*#__PURE__*/e(L,{children:m}):void 0,primaryCta:{label:n.buttonText,onClick:u,disabled:s||l||c,loading:s},secondaryCta:p?{label:"Not now",onClick:g,disabled:s||l||c}:void 0,watermark:!0,children:/*#__PURE__*/t(d,{children:[a?/*#__PURE__*/e(v,{style:{alignSelf:"center"},size:"sm",src:a,alt:"app image"}):null,/*#__PURE__*/t(D,{children:["personal_sign"===o&&/*#__PURE__*/e(U,{children:T(r)}),"eth_signTypedData_v4"===o&&/*#__PURE__*/e(E,{typedData:r}),"solana_signMessage"===o&&/*#__PURE__*/e(U,{children:S(r)})]})]})}),_={component:()=>{let{authenticated:t}=w(),{initializeWalletProxy:o,closePrivyModal:r}=C(),{navigate:i,data:s,onUserCloseViaDialogOrKeybindRef:l}=b(),[c,p]=n(!0),[d,u]=n(""),[g,j]=n(),[v,T]=n(null),[S,E]=n(!1);a((()=>{t||i("LandingScreen")}),[t]),a((()=>{o(f).then((e=>{p(!1),e||(u("An error has occurred, please try again."),j(new h(new y(d,m.E32603_DEFAULT_INTERNAL_ERROR.eipCode))))}))}),[]);let{method:_,data:D,confirmAndSign:L,onSuccess:A,onFailure:U,uiOptions:M}=s.signMessage,I={title:M?.title||"Sign message",description:M?.description||"Signing this message will not cost you any fees.",buttonText:M?.buttonText||"Sign and continue"},k=e=>{e?A(e):U(g||new h(new y("The user rejected the request.",m.E4001_USER_REJECTED_REQUEST.eipCode))),r({shouldCallAuthOnSuccess:!1}),setTimeout((()=>{T(null),u(""),j(void 0)}),200)};l.current=()=>{k(v)};/*#__PURE__*/return e(R,{method:_,messageData:D,copy:I,iconUrl:M?.iconUrl&&"string"==typeof M.iconUrl?M.iconUrl:void 0,isLoading:S,success:null!==v,walletProxyIsLoading:c,errorMessage:d,isCancellable:M?.isCancellable,onSign:async()=>{E(!0),u("");try{let e=await L();T(e),E(!1),setTimeout((()=>{k(e)}),x)}catch(e){console.error(e),u("An error has occurred, please try again."),j(new h(new y(d,m.E32603_DEFAULT_INTERNAL_ERROR.eipCode))),E(!1)}},onCancel:()=>k(null),onClose:()=>k(v)})}};let D=s.div`
9
9
  flex: 1;
10
10
  display: flex;
11
11
  flex-direction: column;
@@ -23,4 +23,4 @@ import{jsx as e,jsxs as t,Fragment as o}from"react/jsx-runtime";import{base64 as
23
23
  margin-top: 0;
24
24
  `,U=s(u)`
25
25
  margin-top: 0;
26
- `;export{R as SignRequestScreen,D as SignRequestView,R as default};
26
+ `;export{_ as SignRequestScreen,R as SignRequestView,_ as default};
@@ -1,4 +1,4 @@
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,k as l,g as d}from"./get-is-unified-wallet-C6sEzDpG.mjs";import{u}from"./context-CwMpvKNV.mjs";import{u as m}from"./internal-context-Z-fyxadS.mjs";import{u as p}from"./useGetSolPrice-DwwjjGbd.mjs";import{ErrorScreenView as f}from"./ErrorScreen-Ba4Ml9CI.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-CvLNEZ0F.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-xufwYyQh.mjs";import{e as O}from"./StackedContainer-B2vaEl56.mjs";import{Y as x}from"./useActiveWallet-36SuARye.mjs";import{T as $,a as L}from"./TransactionErrorView-DtnhZ5P5.mjs";import{g as E}from"./transaction-CnfuREWo.mjs";import{pipe as P,getCompiledTransactionMessageDecoder as _,decompileTransactionMessage as F,setTransactionMessageLifetimeUsingBlockhash as B,compileTransaction as W,getTransactionEncoder as J,getBase58Decoder as D,fetchAddressesForLookupTables as M}from"@solana/kit";import{a as R,f as q,s as U,b as V,u as H}from"./useSolanaRpcClient-DajzMnxc.mjs";import{D as z,T as G,a as K,S as Q,A as X,R as Y,J as N,g as Z}from"./getFormattedUsdFromLamports-B6EqSEho.mjs";import"viem";import"tinycolor2";import"ofetch";import"lucide-react";import"./index-C47JxA4c.mjs";import"uuid";import"jose";import"eventemitter3";import"./useWallets-02TRgRMN.mjs";import"./use-export-wallet-CwQ5-CS4.mjs";import"viem/utils";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"react-device-detect";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-D_kd_mMH.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"./getPublicClient-B4uPLKn-.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"./reservoir-0wfhnc0j.mjs";import"./ScreenLayout-kyRBwF5n.mjs";import"./Screen-DnEl8dVF.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-DGsvPPEp.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-BmCgxKQR.mjs";import"./WalletInfoCard-CVCh-Z5E.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`
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,k as l,g as d}from"./get-is-unified-wallet-o1p06vNx.mjs";import{u}from"./context-CiVjsvSu.mjs";import{u as m}from"./internal-context-Z-fyxadS.mjs";import{u as p}from"./useGetSolPrice-DwwjjGbd.mjs";import{ErrorScreenView as f}from"./ErrorScreen-BaE0-mzx.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-Dgah8j-h.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-Cn4LEfB8.mjs";import{e as O}from"./StackedContainer-B2vaEl56.mjs";import{Y as x}from"./useActiveWallet-Dm548R2J.mjs";import{T as $,a as L}from"./TransactionErrorView-DmcW7szz.mjs";import{g as E}from"./transaction-CnfuREWo.mjs";import{pipe as P,getCompiledTransactionMessageDecoder as _,decompileTransactionMessage as F,setTransactionMessageLifetimeUsingBlockhash as B,compileTransaction as J,getTransactionEncoder as W,getBase58Decoder as D,fetchAddressesForLookupTables as R}from"@solana/kit";import{a as M,f as q,s as U,b as H,u as V}from"./useSolanaRpcClient-Bhhf26b_.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-Bwrmi8Zh.mjs";import"uuid";import"jose";import"eventemitter3";import"./useWallets-BSSZRV2z.mjs";import"./use-export-wallet-CP-hSjOG.mjs";import"viem/utils";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"react-device-detect";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-kABlAB4n.mjs";import"./events-context-CI0iqAXA.mjs";import"@scure/base";import"zustand";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./getPublicClient-B4uPLKn-.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"./reservoir-0wfhnc0j.mjs";import"./ScreenLayout-BxduQYcn.mjs";import"./Screen-D4UVyUmz.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-DJb7a8Zi.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-Dc9fwaMF.mjs";import"./WalletInfoCard-Auf8KAhE.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
2
  && {
3
3
  width: 82px;
4
4
  height: 82px;
@@ -17,4 +17,4 @@ import{jsxs as t,jsx as n,Fragment as e}from"react/jsx-runtime";import{useState
17
17
  transition:
18
18
  color 350ms ease,
19
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!==G&&a!==K)if(a!==Q){if(a===X){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(Y.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=V(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:Q,account:n?.toString(),value:ct(t.data,4),withSeed:!1}}if(2===e){let[n,e]=a;return{type:"sol-transfer",program:Q,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:Q,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:Q,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=H()(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,V]=a(!1),[z,G]=a({}),[K,Q]=a(),X=t?.standardSignAndSendTransaction?.account,Y=!!t?.standardSignAndSendTransaction?.signOnly,N=X?.imported?l(A).find((t=>t.address===X.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,X?.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)}X?.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,X?.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,X?.address,M]);if(o((()=>{!async function(){if(S&&y)try{x(void 0);let t=await st({tx:S,solanaClient:I,privyClient:y,checkFunds:!Y});T(t)}catch(t){console.error("Failed to prepare transaction",t),x(t)}}()}),[S,I,y,Y]),o((()=>{(async function(){if(!X)return;q({value:M.value,isLoading:!0});let{value:t}=await I.rpc.getBalance(X.address,{commitment:"confirmed"}).send();q({value:t??0n,isLoading:!1})})().catch(console.error)}),[C]),!S||!t?.standardSignAndSendTransaction||!X){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(K??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:Y,instruction:"sol-transfer"===a?.type?{to:a.toAccount,amount:a.value}:{to:a?.toAccount||a?.toAta,total:at?.total}})}return K?/*#__PURE__*/n($,{transactionError:K,chainId:I.chain,onClose:ot,chainType:"solana",onRetry:async()=>{Q(void 0);let{value:t}=await I.rpc.getLatestBlockhash().send();var n,e;j((n=S,e=t,P(_().decode(R(n)),(t=>F(t)),(t=>B(e,t)),(t=>W(t)),(t=>new Uint8Array(J().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:X.address,disabled:!C?.hasFunds&&!ct,isSubmitting:U,isPreparing:!C||M.isLoading,isTokenPriceLoading:b&&nt,isMissingFunds:!C?.hasFunds,submitError:K??void 0,isSponsored:!!t.standardSignAndSendTransaction?.isSponsored,parseError:O,onClick:lt?async()=>{if(!X)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(V(!0),U||!X||!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 G({...n,fees:t?.fee})}G(n)}catch(t){console.warn({transaction:S,error:t}),Q(t)}finally{V(!1)}},onClose:ot})}};export{pt as StandardSignAndSendTransactionScreen,pt as default};
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(M(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 R(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(),[R,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(R.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,R]),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(R.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,R]);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:R.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,P(_().decode(M(n)),(t=>F(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||R.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};
@@ -1 +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-C47JxA4c.mjs";import{u as s,q as n}from"./context-CwMpvKNV.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-C6sEzDpG.mjs";import{s as p}from"./shouldProceedtoEmbeddedWalletCreationFlow-BdpCzEJT.mjs";import{S as g}from"./ScreenLayout-kyRBwF5n.mjs";import{T as v}from"./telegram-B-JqnkqZ.mjs";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-36SuARye.mjs";import"zustand";import"styled-components";import"react-device-detect";import"./use-export-wallet-CwQ5-CS4.mjs";import"viem/utils";import"./useWallets-02TRgRMN.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-D_kd_mMH.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"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"tinycolor2";import"./ModalHeader-CvLNEZ0F.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-DnEl8dVF.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})},f={component:()=>{let{authenticated:g,logout:v,ready:f,user:h}=d(),{setModalData:A,navigate:b,resetNavigation:j,data:T}=u(),C=s(),{initLoginWithTelegram:S,loginWithTelegram:w,updateWallets:E,setReadyToTrue:R,closePrivyModal:W,createAnalyticsEvent:_,getAuthMeta:k}=l(),[x,L]=t(!1),[M,I]=t(void 0),D=o();async function U(){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 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((()=>{U()}),[]),r((()=>{if(!(f&&g&&x&&h))return;if(C?.legal.requireUsersAcceptTerms&&!h.hasAcceptedTerms){let e=setTimeout((()=>{b("AffirmativeConsentScreen")}),n);return()=>clearTimeout(e)}if(p(h,C.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)}),[f,g,x,h]);/*#__PURE__*/return e(y,{success:x,errorMessage:M,onRetry:M?.retryable?async()=>{try{I(void 0),T?.telegramAuthModalData?.seamlessAuth||await S(void 0,T?.login?.disableSignup),await U()}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,y as TelegramAuthScreenView,f as default};
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-Bwrmi8Zh.mjs";import{u as s,q as n}from"./context-CiVjsvSu.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-o1p06vNx.mjs";import{s as p}from"./shouldProceedtoEmbeddedWalletCreationFlow-C8hGTGhw.mjs";import{S as g}from"./ScreenLayout-BxduQYcn.mjs";import{T as v}from"./telegram-B-JqnkqZ.mjs";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-Dm548R2J.mjs";import"zustand";import"styled-components";import"react-device-detect";import"./use-export-wallet-CP-hSjOG.mjs";import"viem/utils";import"./useWallets-BSSZRV2z.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-kABlAB4n.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"ofetch";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"tinycolor2";import"./ModalHeader-Dgah8j-h.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-D4UVyUmz.mjs";import"./index-Dq_xe9dz.mjs";const 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})},f={component:()=>{let{authenticated:g,logout:v,ready:f,user:h}=d(),{setModalData:A,navigate:b,resetNavigation:j,data:T}=u(),C=s(),{initLoginWithTelegram:S,loginWithTelegram:w,updateWallets:E,setReadyToTrue:R,closePrivyModal:W,createAnalyticsEvent:_,getAuthMeta:k}=l(),[x,L]=t(!1),[M,I]=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 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((()=>{N()}),[]),r((()=>{if(!(f&&g&&x&&h))return;if(C?.legal.requireUsersAcceptTerms&&!h.hasAcceptedTerms){let e=setTimeout((()=>{b("AffirmativeConsentScreen")}),n);return()=>clearTimeout(e)}if(p(h,C.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)}),[f,g,x,h]);/*#__PURE__*/return e(y,{success:x,errorMessage:M,onRetry:M?.retryable?async()=>{try{I(void 0),T?.telegramAuthModalData?.seamlessAuth||await S(void 0,T?.login?.disableSignup),await N()}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,y as TelegramAuthScreenView,f as default};
@@ -1,4 +1,4 @@
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-xufwYyQh.mjs";import{g as d}from"./ethers-DGsvPPEp.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-CwMpvKNV.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`
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-Cn4LEfB8.mjs";import{g as d}from"./ethers-DJb7a8Zi.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-CiVjsvSu.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
2
  display: flex;
3
3
  align-items: center;
4
4
  justify-content: space-between;
@@ -1,4 +1,4 @@
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-CvLNEZ0F.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-BmCgxKQR.mjs";import{W as I}from"./WalletInfoCard-CVCh-Z5E.mjs";import{u as A}from"./context-CwMpvKNV.mjs";import{Y as S}from"./useActiveWallet-36SuARye.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 F from"@heroicons/react/24/outline/ClipboardDocumentIcon";import N from"@heroicons/react/24/outline/ExclamationCircleIcon";import{u as L}from"./internal-context-Z-fyxadS.mjs";const P=a(p)`
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-Dgah8j-h.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-Dc9fwaMF.mjs";import{W as I}from"./WalletInfoCard-Auf8KAhE.mjs";import{u as A}from"./context-CiVjsvSu.mjs";import{Y as S}from"./useActiveWallet-Dm548R2J.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-Z-fyxadS.mjs";const P=a(p)`
2
2
  cursor: pointer;
3
3
  display: inline-flex;
4
4
  gap: 8px;
@@ -7,7 +7,7 @@ import{jsx as e,jsxs as r,Fragment as n}from"react/jsx-runtime";import{BoltIcon
7
7
  svg {
8
8
  fill: var(--privy-color-accent);
9
9
  }
10
- `;var B=({iconUrl:n,value:i,symbol:o,usdValue:t,nftName:l,nftCount:a,decimals:s,$isLoading:c})=>{if(c)/*#__PURE__*/return e(W,{$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(W,{$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(z,{$isLoading:c,children:["$",t]})]})};let W=a.span`
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
11
  color: var(--privy-color-foreground);
12
12
  font-size: 0.875rem;
13
13
  font-weight: 500;
@@ -18,7 +18,7 @@ import{jsx as e,jsxs as r,Fragment as n}from"react/jsx-runtime";import{BoltIcon
18
18
  justify-content: flex-end;
19
19
 
20
20
  ${C}
21
- `;const z=a.span`
21
+ `;const W=a.span`
22
22
  color: var(--privy-color-foreground-2);
23
23
  font-size: 12px;
24
24
  font-weight: 400;
@@ -34,15 +34,15 @@ import{jsx as e,jsxs as r,Fragment as n}from"react/jsx-runtime";import{BoltIcon
34
34
  width: 14px;
35
35
  margin-right: 4px;
36
36
  object-fit: contain;
37
- `;const V=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})})]})]})})},U=({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`
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
38
  margin-top: 1.5rem;
39
39
  `,H=a.div`
40
40
  display: flex;
41
41
  align-items: center;
42
42
  gap: 0.5rem;
43
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:F,cta:N,disabled:L,chain:W,isSubmitting:z,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(B,{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(B,{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:W?.blockExplorers?.default?.url})})]}):null,j&&/*#__PURE__*/r(x,{children:[/*#__PURE__*/e(p,{children:"To"}),/*#__PURE__*/e(g,{children:/*#__PURE__*/e(T,{address:j,url:W?.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:W?.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(V,{action:I,chain:W,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(U,{variant:ae,preventMaliciousTransaction:de,setPreventMaliciousTransaction:he}),/*#__PURE__*/e(X,{$useSmallMargins:!(!u&&!s&&"warn"!==ae&&"error"!==ae),address:F,balance:G,errMsg:R||u||s||!O?void 0:`Add funds on ${W?.name??le} to complete transaction.`}),/*#__PURE__*/e(d,{style:{marginTop:"1rem"},loading:z,disabled:L||R,onClick:re,children:N}),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:F,balance:N,disabled:L,isSubmitting:B,isPreparing:W,isTokenPriceLoading:z,onClick:R,onClose:V,onBack:U,isSponsored:q})=>{let H=W||z,[J,Q]=l(!1),Y=A();/*#__PURE__*/return r(n,{children:[/*#__PURE__*/e(c,{onClose:V,backFn:U}),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})]}),(F||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})]}):F})]})]}),/*#__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:N,errMsg:W||M||j||!$?void 0:"Add funds on Solana to complete transaction."}),/*#__PURE__*/e(d,{style:{marginTop:"1rem"},loading:B,disabled:L||W,onClick:R,children:u}),/*#__PURE__*/e(m,{})]})};let X=a(I)`
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
46
  ${e=>e.$useSmallMargins?"margin-top: 0.5rem;":"margin-top: 2rem;"}
47
47
  `,G=a(y)`
48
48
  margin-top: 0.5rem;
@@ -99,7 +99,7 @@ import{jsx as e,jsxs as r,Fragment as n}from"react/jsx-runtime";import{BoltIcon
99
99
  display: flex;
100
100
  justify-content: center;
101
101
  align-items: center;
102
- `,ae=a(N)`
102
+ `,ae=a(F)`
103
103
  position: absolute;
104
104
  width: 35px;
105
105
  height: 35px;
@@ -151,7 +151,7 @@ import{jsx as e,jsxs as r,Fragment as n}from"react/jsx-runtime";import{BoltIcon
151
151
  text-align: left;
152
152
  word-wrap: break-word;
153
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(F)`
154
+ `,pe=a(N)`
155
155
  position: absolute;
156
156
  top: 13px;
157
157
  right: 13px;
@@ -1,4 +1,4 @@
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-CvLNEZ0F.mjs";import{C as r}from"./ScreenHeader-CHmc4-Lu.mjs";import{t as c}from"./FundWalletMethodHeader-Ce0vLrUa.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-CwMpvKNV.mjs";import{F as m,Q as y,m as u,T as h,U as w,v as f,a8 as T}from"./useActiveWallet-36SuARye.mjs";import{u as C}from"./internal-context-Z-fyxadS.mjs";import{a as g}from"./get-is-unified-wallet-C6sEzDpG.mjs";import{u as v}from"./useWallets-02TRgRMN.mjs";import{W as _}from"./WalletOverflowButton-qXN0KcGe.mjs";import{A as j,D as x,E as S}from"./index-C47JxA4c.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-aArPlAod.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"./use-export-wallet-CwQ5-CS4.mjs";import"eventemitter3";import"viem/utils";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.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-D_kd_mMH.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/WalletIcon";import"./LinkPasskeyScreen-BfGROb2f.mjs";import"./TodoList-CgrU7uwu.mjs";import"./ScreenLayout-kyRBwF5n.mjs";import"./Screen-DnEl8dVF.mjs";import"./index-Dq_xe9dz.mjs";const O=({provider:t,displayName:l,logo:a,connectOnly:o,connector:i})=>{let r,{navigate:c,setModalData:s}=g(),{connectWallet:p}=C(),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)`
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-Dgah8j-h.mjs";import{C as r}from"./ScreenHeader-CHmc4-Lu.mjs";import{t as c}from"./FundWalletMethodHeader-C3QM4h3L.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-CiVjsvSu.mjs";import{F as m,Q as y,m as u,T as h,U as w,v as f,a8 as T}from"./useActiveWallet-Dm548R2J.mjs";import{u as C}from"./internal-context-Z-fyxadS.mjs";import{a as g}from"./get-is-unified-wallet-o1p06vNx.mjs";import{u as v}from"./useWallets-BSSZRV2z.mjs";import{W as _}from"./WalletOverflowButton-C1Qm1edE.mjs";import{A as j,D as x,E as S}from"./index-Bwrmi8Zh.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-C11VS_7r.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"./use-export-wallet-CP-hSjOG.mjs";import"eventemitter3";import"viem/utils";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.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-kABlAB4n.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"@heroicons/react/24/outline/WalletIcon";import"./LinkPasskeyScreen-DM05y9x2.mjs";import"./TodoList-CgrU7uwu.mjs";import"./ScreenLayout-BxduQYcn.mjs";import"./Screen-D4UVyUmz.mjs";import"./index-Dq_xe9dz.mjs";const O=({provider:t,displayName:l,logo:a,connectOnly:o,connector:i})=>{let r,{navigate:c,setModalData:s}=g(),{connectWallet:p}=C(),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
2
  /* Wallet name text color */
3
3
  > span {
4
4
  color: var(--privy-color-foreground);
@@ -28,4 +28,4 @@ import{jsxs as e,jsx as n,Fragment as t}from"react/jsx-runtime";import{useState
28
28
  flex-wrap: wrap;
29
29
  gap: 8px;
30
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 E=["safe"],A=["phantom","backpack","solflare","jupiter","universal_profile"],L={component:()=>{let s,{connectors:m}=C(),{setModalData:y,data:u,navigate:h}=g(),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)),P=L.map((e=>e.walletClientType)),U=[],H={...u.funding};H.usingDefaultFundingMethod&&(H.usingDefaultFundingMethod=!1);let R=({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&&U.push(...I.map(((e,t)=>/*#__PURE__*/n(N,{onClick:()=>R({wallet:e,walletChainType:"ethereum"}),icon:e.meta.icon,name:e.meta.name,chainType:e.type},t)))),"ethereum-only"!==s&&U.push(...L.map(((e,t)=>/*#__PURE__*/n(N,{onClick:()=>R({wallet:e,walletChainType:"solana"}),icon:e.meta.icon,name:e.meta.name,chainType:e.type},t)))),U.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(A.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(E.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,...P],walletConnectEnabled:w.externalWallets.walletConnect.enabled}));let z=/*#__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"}),U]}),/*#__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:[U.length>4?U.slice(0,3):U,U.length>4&&z]}),/*#__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};
31
+ `;const B=["coinbase_wallet","base_account"];let F=["metamask","okx_wallet","rainbow","uniswap","bybit_wallet","ronin_wallet","haha_wallet","uniswap_extension","zerion","rabby_wallet","cryptocom","binance","kraken_wallet"];const E=["safe"],A=["phantom","backpack","solflare","jupiter","universal_profile"],L={component:()=>{let s,{connectors:m}=C(),{setModalData:y,data:u,navigate:h}=g(),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)),P=L.map((e=>e.walletClientType)),U=[],H={...u.funding};H.usingDefaultFundingMethod&&(H.usingDefaultFundingMethod=!1);let R=({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&&U.push(...I.map(((e,t)=>/*#__PURE__*/n(N,{onClick:()=>R({wallet:e,walletChainType:"ethereum"}),icon:e.meta.icon,name:e.meta.name,chainType:e.type},t)))),"ethereum-only"!==s&&U.push(...L.map(((e,t)=>/*#__PURE__*/n(N,{onClick:()=>R({wallet:e,walletChainType:"solana"}),icon:e.meta.icon,name:e.meta.name,chainType:e.type},t)))),U.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(A.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(F.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(B.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(E.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,...P],walletConnectEnabled:w.externalWallets.walletConnect.enabled}));let z=/*#__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"}),U]}),/*#__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:[U.length>4?U.slice(0,3):U,U.length>4&&z]}),/*#__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};
@@ -1,4 +1,4 @@
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-CvLNEZ0F.mjs";import{C as m}from"./ScreenHeader-CHmc4-Lu.mjs";import{t as s}from"./FundWalletMethodHeader-Ce0vLrUa.mjs";import{I as a}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-BmCgxKQR.mjs";import{N as g}from"./NetworkIcon-B48ilzF8.mjs";import{Q as j}from"./useActiveWallet-36SuARye.mjs";const I=({walletClientType:o,displayName:I,addressToFund:w,chainId:y,chainName:x,isBridging:N,isErc20Flow:T,totalPriceInNativeCurrency:C,totalPriceInUsd:v,gasPriceInNativeCurrency:B,gasPriceInUsd:P})=>{let A=j(o);/*#__PURE__*/return e(r,{children:[/*#__PURE__*/i(s,{}),/*#__PURE__*/i(d,{centerIcon:/*#__PURE__*/i(a,{icon:A?.image_url?.md,name:o})}),/*#__PURE__*/i(m,{style:{marginTop:"8px",marginBottom:"12px"},title:`${N?"Bridging":"Confirming"} with ${I}`}),!N&&!T&&/*#__PURE__*/e(l,{children:[/*#__PURE__*/e(c,{children:[/*#__PURE__*/i(h,{children:"Total"}),/*#__PURE__*/i(p,{children:v||C})]}),/*#__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`
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-Dgah8j-h.mjs";import{C as m}from"./ScreenHeader-CHmc4-Lu.mjs";import{t as a}from"./FundWalletMethodHeader-C3QM4h3L.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-Dc9fwaMF.mjs";import{N as g}from"./NetworkIcon-B48ilzF8.mjs";import{Q as j}from"./useActiveWallet-Dm548R2J.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
2
  display: flex;
3
3
  flex-direction: row;
4
4
  align-items: center;
@@ -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-CiVjsvSu.mjs";import{a as l}from"./index-Bwrmi8Zh.mjs";import{u as c}from"./internal-context-Z-fyxadS.mjs";import{u as d,a as p}from"./get-is-unified-wallet-o1p06vNx.mjs";import{a1 as u,V as h}from"./useActiveWallet-Dm548R2J.mjs";import{E as j,P as v}from"./ModalHeader-Dgah8j-h.mjs";import{I as f,E as y}from"./EmailInputForm-Dgoii4vf.mjs";import{E as g}from"./ErrorMessage-D8VaAP5m.mjs";import{S as w}from"./ScreenLayout-BxduQYcn.mjs";import"styled-components";import"@privy-io/js-sdk-core";import"tinycolor2";import"uuid";import"jose";import"eventemitter3";import"./useWallets-BSSZRV2z.mjs";import"./use-export-wallet-CP-hSjOG.mjs";import"viem/utils";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"react-device-detect";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-kABlAB4n.mjs";import"./events-context-CI0iqAXA.mjs";import"@scure/base";import"zustand";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"viem";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./getPublicClient-B4uPLKn-.mjs";import"ofetch";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-D4UVyUmz.mjs";import"./index-Dq_xe9dz.mjs";const k=/*#__PURE__*/s(((i,o)=>{let[s,f]=m(""),[y,w]=m(""),[k,E]=m(!1),{authenticated:x,user:C}=d(),{initUpdateEmail:A}=c(),{navigate:P,setModalData:I,currentScreen:M}=p(),{enabled:T,token:U}=l(),L=n(),W=u(s)&&(L.disablePlusEmails&&s.includes("+")?(y||w("Please enter a valid email address without a '+'."),!1):(y&&w(""),!0)),q=k||!W,D=()=>{!T||U||x?(async e=>{if(!C?.email)throw Error("User is required to have an email address to update it.");E(!0);try{await A({oldAddress:C.email.address,newAddress:s,captchaToken:e}),P("AwaitingPasswordlessCodeScreen")}catch(e){I({errorModalData:{error:e,previousScreen:M||"LandingScreen"}}),P("ErrorScreen")}E(!1)})(U):(I({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"}}),P("CaptchaScreen"))};/*#__PURE__*/return e(r,{children:[/*#__PURE__*/e(b,{children:[y&&/*#__PURE__*/t(g,{style:{marginTop:"0.25rem",textAlign:"left"},children:y}),/*#__PURE__*/e(S,{$error:!!y,children:[/*#__PURE__*/t(h,{children:/*#__PURE__*/t(a,{})}),/*#__PURE__*/t("input",{ref:o,id:"email-input",type:"email",placeholder:"your@email.com",onChange:e=>f(e.target.value),onKeyUp:e=>{"Enter"===e.key&&D()},value:s,autoComplete:"email"}),i.stacked?null:/*#__PURE__*/t(j,{isSubmitting:k,onClick:D,disabled:q,children:"Submit"})]})]}),i.stacked?/*#__PURE__*/t(v,{loadingText:null,loading:k,disabled:q,onClick:D,style:{width:"100%"},children:"Submit"}):null]})}));let b=f,S=y;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})})}),x={component:()=>/*#__PURE__*/t(E,{})};export{x as UpdateEmailScreen,E as UpdateEmailScreenView,x as default};
@@ -1 +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-nVYECWzo.mjs";import{u as i}from"./internal-context-Z-fyxadS.mjs";import{a as n,u as m}from"./get-is-unified-wallet-C6sEzDpG.mjs";import{S as a}from"./ScreenLayout-kyRBwF5n.mjs";import"styled-components";import"@privy-io/js-sdk-core";import"./context-CwMpvKNV.mjs";import"tinycolor2";import"./useActiveWallet-36SuARye.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-CwQ5-CS4.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-02TRgRMN.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"./ModalHeader-CvLNEZ0F.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-DnEl8dVF.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:l}=i(),[p,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 l(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:p})}};export{c as UpdatePhoneScreen,s as UpdatePhoneScreenView,c as default};
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-D3J7UDS4.mjs";import{u as i}from"./internal-context-Z-fyxadS.mjs";import{a as n,u as m}from"./get-is-unified-wallet-o1p06vNx.mjs";import{S as a}from"./ScreenLayout-BxduQYcn.mjs";import"styled-components";import"@privy-io/js-sdk-core";import"./context-CiVjsvSu.mjs";import"tinycolor2";import"./useActiveWallet-Dm548R2J.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-CP-hSjOG.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-BSSZRV2z.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"./ModalHeader-Dgah8j-h.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Chip-D2-wZOHJ.mjs";import"./LoadingSkeleton-U6-3yFwI.mjs";import"ofetch";import"./Screen-D4UVyUmz.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:l}=i(),[p,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 l(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:p})}};export{c as UpdatePhoneScreen,s as UpdatePhoneScreenView,c as default};
@@ -1 +1 @@
1
- import{jsx as t}from"react/jsx-runtime";import{a as e}from"./get-is-unified-wallet-C6sEzDpG.mjs";import{S as o}from"./ScreenLayout-kyRBwF5n.mjs";import"viem";import"react";import"./context-CwMpvKNV.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./internal-context-Z-fyxadS.mjs";import"ofetch";import"./ModalHeader-CvLNEZ0F.mjs";import"styled-components";import"./useActiveWallet-36SuARye.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-CwQ5-CS4.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-02TRgRMN.mjs";import"./events-context-CI0iqAXA.mjs";import"./getPublicClient-B4uPLKn-.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-DnEl8dVF.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
+ import{jsx as t}from"react/jsx-runtime";import{a as e}from"./get-is-unified-wallet-o1p06vNx.mjs";import{S as o}from"./ScreenLayout-BxduQYcn.mjs";import"viem";import"react";import"./context-CiVjsvSu.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./internal-context-Z-fyxadS.mjs";import"ofetch";import"./ModalHeader-Dgah8j-h.mjs";import"styled-components";import"./useActiveWallet-Dm548R2J.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-CP-hSjOG.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-BSSZRV2z.mjs";import"./events-context-CI0iqAXA.mjs";import"./getPublicClient-B4uPLKn-.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-D4UVyUmz.mjs";import"./index-Dq_xe9dz.mjs";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,4 +1,4 @@
1
- import{jsxs as e,jsx as r,Fragment as o}from"react/jsx-runtime";import{Check as i,Copy as t}from"lucide-react";import{useState as s,useEffect as a}from"react";import{styled as n}from"styled-components";import{S as m}from"./ModalHeader-CvLNEZ0F.mjs";import{E as l}from"./ErrorMessage-D8VaAP5m.mjs";import{L as d}from"./LabelXs-oqZNqbm_.mjs";import{A as c}from"./Address-BmCgxKQR.mjs";import{B as p}from"./shared-FM0rljBt.mjs";let h=n(p)`
1
+ import{jsxs as e,jsx as r,Fragment as o}from"react/jsx-runtime";import{Check as i,Copy as t}from"lucide-react";import{useState as s,useEffect as a}from"react";import{styled as n}from"styled-components";import{S as m}from"./ModalHeader-Dgah8j-h.mjs";import{E as l}from"./ErrorMessage-D8VaAP5m.mjs";import{L as d}from"./LabelXs-oqZNqbm_.mjs";import{A as c}from"./Address-Dc9fwaMF.mjs";import{B as p}from"./shared-FM0rljBt.mjs";let h=n(p)`
2
2
  && {
3
3
  padding: 0.75rem;
4
4
  height: 56px;
@@ -26,4 +26,4 @@ import{jsxs as e,jsx as r,Fragment as o}from"react/jsx-runtime";import{Check as
26
26
  gap: 0.375rem;
27
27
  font-size: 14px;
28
28
  }
29
- `;const j=({errMsg:n,balance:m,address:l,className:d,title:p,showCopyButton:j=!1})=>{let[b,w]=s(!1);return a((()=>{if(b){let e=setTimeout((()=>w(!1)),3e3);return()=>clearTimeout(e)}}),[b]),/*#__PURE__*/e("div",{children:[p&&/*#__PURE__*/r(x,{children:p}),/*#__PURE__*/r(h,{className:d,$state:n?"error":void 0,children:/*#__PURE__*/e(f,{children:[/*#__PURE__*/e(g,{children:[/*#__PURE__*/r(c,{address:l,showCopyIcon:!1}),void 0!==m&&/*#__PURE__*/r(u,{children:m})]}),j&&/*#__PURE__*/r(y,{onClick:function(e){e.stopPropagation(),navigator.clipboard.writeText(l).then((()=>w(!0))).catch(console.error)},size:"sm",children:/*#__PURE__*/e(o,b?{children:["Copied",/*#__PURE__*/r(i,{size:14})]}:{children:["Copy",/*#__PURE__*/r(t,{size:14})]})})]})}),n&&/*#__PURE__*/r(v,{children:n})]})};export{j as W};
29
+ `;const j=({errMsg:n,balance:m,address:l,className:d,title:p,showCopyButton:j=!1})=>{let[z,b]=s(!1);return a((()=>{if(z){let e=setTimeout((()=>b(!1)),3e3);return()=>clearTimeout(e)}}),[z]),/*#__PURE__*/e("div",{children:[p&&/*#__PURE__*/r(x,{children:p}),/*#__PURE__*/r(h,{className:d,$state:n?"error":void 0,children:/*#__PURE__*/e(f,{children:[/*#__PURE__*/e(g,{children:[/*#__PURE__*/r(c,{address:l,showCopyIcon:!1}),void 0!==m&&/*#__PURE__*/r(u,{children:m})]}),j&&/*#__PURE__*/r(y,{onClick:function(e){e.stopPropagation(),navigator.clipboard.writeText(l).then((()=>b(!0))).catch(console.error)},size:"sm",children:/*#__PURE__*/e(o,z?{children:["Copied",/*#__PURE__*/r(i,{size:14})]}:{children:["Copy",/*#__PURE__*/r(t,{size:14})]})})]})}),n&&/*#__PURE__*/r(v,{children:n})]})};export{j as W};
@@ -1 +1 @@
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-C6sEzDpG.mjs";import{S as n}from"./ScreenLayout-kyRBwF5n.mjs";import"viem";import"./context-CwMpvKNV.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./internal-context-Z-fyxadS.mjs";import"ofetch";import"./ModalHeader-CvLNEZ0F.mjs";import"styled-components";import"./useActiveWallet-36SuARye.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-CwQ5-CS4.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-02TRgRMN.mjs";import"./events-context-CI0iqAXA.mjs";import"./getPublicClient-B4uPLKn-.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-DnEl8dVF.mjs";import"./index-Dq_xe9dz.mjs";const r=({title:e,subtitle:o,buttonText:i,buttonHref:r,isLoading:l=!1,helpText:a,onButtonClick:m})=>/*#__PURE__*/t(n,{title:e,subtitle:o,primaryCta:{label:i,onClick:()=>{r&&window.open(r,"_self"),m?.()},disabled:l},helpText:a,watermark:!0}),l={component:()=>{let{ready:n}=o(),{data:l}=i(),[a,m]=e(!1);if(!l?.installWalletModalData)throw Error("Wallet data is missing");let{walletConfig:s,connectOnly:c,chainType:p}=l.installWalletModalData,u=s.getMobileRedirect({useUniversalLink:!a,isSolana:"solana"===p,connectOnly:c}),d=s.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 n&&(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 ${s.name} mobile app.`,h.footnote=`Once you're done, you can connect with ${s.name} wallet to complete the login.`),/*#__PURE__*/t(r,{title:h.title,subtitle:h.description,buttonText:a?"Go to App Store":"Continue",buttonHref:u,isLoading:n&&!u,helpText:h.footnote||void 0,onButtonClick:()=>{setTimeout((()=>m(!0)),1e3)}})}};export{l as WalletInterstitialScreen,r as WalletInterstitialScreenView,l as default};
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-o1p06vNx.mjs";import{S as n}from"./ScreenLayout-BxduQYcn.mjs";import"viem";import"./context-CiVjsvSu.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./internal-context-Z-fyxadS.mjs";import"ofetch";import"./ModalHeader-Dgah8j-h.mjs";import"styled-components";import"./useActiveWallet-Dm548R2J.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-CP-hSjOG.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-BSSZRV2z.mjs";import"./events-context-CI0iqAXA.mjs";import"./getPublicClient-B4uPLKn-.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-D4UVyUmz.mjs";import"./index-Dq_xe9dz.mjs";const r=({title:e,subtitle:o,buttonText:i,buttonHref:r,isLoading:l=!1,helpText:a,onButtonClick:m})=>/*#__PURE__*/t(n,{title:e,subtitle:o,primaryCta:{label:i,onClick:()=>{r&&window.open(r,"_self"),m?.()},disabled:l},helpText:a,watermark:!0}),l={component:()=>{let{ready:n}=o(),{data:l}=i(),[a,m]=e(!1);if(!l?.installWalletModalData)throw Error("Wallet data is missing");let{walletConfig:s,connectOnly:c,chainType:p}=l.installWalletModalData,u=s.getMobileRedirect({useUniversalLink:!a,isSolana:"solana"===p,connectOnly:c}),d=s.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 n&&(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 ${s.name} mobile app.`,h.footnote=`Once you're done, you can connect with ${s.name} wallet to complete the login.`),/*#__PURE__*/t(r,{title:h.title,subtitle:h.description,buttonText:a?"Go to App Store":"Continue",buttonHref:u,isLoading:n&&!u,helpText:h.footnote||void 0,onButtonClick:()=>{setTimeout((()=>m(!0)),1e3)}})}};export{l as WalletInterstitialScreen,r as WalletInterstitialScreenView,l as default};
@@ -1,6 +1,6 @@
1
- import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import{styled as n}from"styled-components";import{formatUnits as i}from"viem";import{s as o,a as s,g as a,b as l}from"./ethers-DGsvPPEp.mjs";import{g as c}from"./getFormattedUsdFromLamports-B6EqSEho.mjs";import{g as m}from"./transaction-CnfuREWo.mjs";import{D as d}from"./useActiveWallet-36SuARye.mjs";const p=({weiQuantities:t,tokenPrice:r,tokenSymbol:n})=>{let i=o(t),l=r?s(i,r):void 0,c=a(i,n);/*#__PURE__*/return e(u,{children:l||c})},h=({weiQuantities:n,tokenPrice:i,tokenSymbol:l})=>{let c=o(n),m=i?s(c,i):void 0,d=a(c,l);/*#__PURE__*/return e(u,{children:m?/*#__PURE__*/r(t,{children:[/*#__PURE__*/e(g,{children:"USD"}),"<$0.01"===m?
2
- /*#__PURE__*/r(S,{children:[/*#__PURE__*/e(x,{children:"<"}),"$0.01"]}):m]}):d})},f=({quantities:n,tokenPrice:o,tokenSymbol:s="SOL",tokenDecimals:a=9})=>{let l=n.reduce(((e,t)=>e+t),0n),d=o&&"SOL"===s&&9===a?c(l,o):void 0,p="SOL"===s&&9===a?m(l):`${i(l,a)} ${s}`;/*#__PURE__*/return e(u,{children:d?/*#__PURE__*/e(t,{children:"<$0.01"===d?
3
- /*#__PURE__*/r(S,{children:[/*#__PURE__*/e(x,{children:"<"}),"$0.01"]}):d}):p})};let u=n.span`
1
+ import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import{styled as n}from"styled-components";import{formatUnits as i}from"viem";import{s as o,a as s,g as a,b as l}from"./ethers-DJb7a8Zi.mjs";import{g as c}from"./getFormattedUsdFromLamports-B6EqSEho.mjs";import{g as m}from"./transaction-CnfuREWo.mjs";import{D as d}from"./useActiveWallet-Dm548R2J.mjs";const p=({weiQuantities:t,tokenPrice:r,tokenSymbol:n})=>{let i=o(t),l=r?s(i,r):void 0,c=a(i,n);/*#__PURE__*/return e(u,{children:l||c})},h=({weiQuantities:n,tokenPrice:i,tokenSymbol:l})=>{let c=o(n),m=i?s(c,i):void 0,d=a(c,l);/*#__PURE__*/return e(u,{children:m?/*#__PURE__*/r(t,{children:[/*#__PURE__*/e(g,{children:"USD"}),"<$0.01"===m?
2
+ /*#__PURE__*/r(k,{children:[/*#__PURE__*/e(x,{children:"<"}),"$0.01"]}):m]}):d})},f=({quantities:n,tokenPrice:o,tokenSymbol:s="SOL",tokenDecimals:a=9})=>{let l=n.reduce(((e,t)=>e+t),0n),d=o&&"SOL"===s&&9===a?c(l,o):void 0,p="SOL"===s&&9===a?m(l):`${i(l,a)} ${s}`;/*#__PURE__*/return e(u,{children:d?/*#__PURE__*/e(t,{children:"<$0.01"===d?
3
+ /*#__PURE__*/r(k,{children:[/*#__PURE__*/e(x,{children:"<"}),"$0.01"]}):d}):p})};let u=n.span`
4
4
  font-size: 14px;
5
5
  line-height: 140%;
6
6
  display: flex;
@@ -12,11 +12,11 @@ import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import{styled as
12
12
  color: var(--privy-color-foreground-3);
13
13
  `,x=n.span`
14
14
  font-size: 10px;
15
- `,S=n.span`
15
+ `,k=n.span`
16
16
  display: flex;
17
17
  align-items: center;
18
- `;function k(e,t){return`https://explorer.solana.com/account/${e}?chain=${t}`}const v=t=>/*#__PURE__*/e(y,{href:"ethereum"===t.chainType?l(t.chainId,t.walletAddress):k(t.walletAddress,t.chainId),target:"_blank",children:d(t.walletAddress)});let y=n.a`
18
+ `;function v(e,t){return`https://explorer.solana.com/account/${e}?chain=${t}`}const y=t=>/*#__PURE__*/e(S,{href:"ethereum"===t.chainType?l(t.chainId,t.walletAddress):v(t.walletAddress,t.chainId),target:"_blank",children:d(t.walletAddress)});let S=n.a`
19
19
  &:hover {
20
20
  text-decoration: underline;
21
21
  }
22
- `;export{p as H,h as P,f as S,v as W};
22
+ `;export{p as H,h as P,f as S,y as W};
@@ -1 +1 @@
1
- import{jsxs as r,jsx as e}from"react/jsx-runtime";import{Wallet as t}from"lucide-react";import{U as i,V as c,Y as o}from"./useActiveWallet-36SuARye.mjs";const l=({onClick:l,text:m})=>/*#__PURE__*/r(i,{onClick:l,children:[/*#__PURE__*/e(c,{children:/*#__PURE__*/e(t,{})}),/*#__PURE__*/e(o,{children:m})]});export{l as W};
1
+ import{jsxs as r,jsx as e}from"react/jsx-runtime";import{Wallet as t}from"lucide-react";import{U as i,V as c,Y as o}from"./useActiveWallet-Dm548R2J.mjs";const l=({onClick:l,text:m})=>/*#__PURE__*/r(i,{onClick:l,children:[/*#__PURE__*/e(c,{children:/*#__PURE__*/e(t,{})}),/*#__PURE__*/e(o,{children:m})]});export{l as W};