@privy-io/react-auth 3.11.0-beta-20260115221418 → 3.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (216) hide show
  1. package/dist/cjs/{AccountNotFoundScreen-CwhDiq3O.js → AccountNotFoundScreen-BgbWqFBz.js} +1 -1
  2. package/dist/cjs/{Address-BPnCe7Et.js → Address-DiSm2l-W.js} +1 -1
  3. package/dist/cjs/{AffirmativeConsentScreen-BA7sw_Wd.js → AffirmativeConsentScreen-frUX4n9j.js} +1 -1
  4. package/dist/cjs/{AllowlistRejectionScreen-Dg2qQUCC.js → AllowlistRejectionScreen-CZ4wDXU2.js} +1 -1
  5. package/dist/cjs/{AuthenticateWithWalletScreen-DL_l0y74.js → AuthenticateWithWalletScreen-CoV6Cepf.js} +1 -1
  6. package/dist/cjs/{AwaitingEvmToSolBridgingScreen-DvGrFYHN.js → AwaitingEvmToSolBridgingScreen-5qv5Urz2.js} +1 -1
  7. package/dist/cjs/{AwaitingExternalEthereumTransferScreen-BmrkzC_i.js → AwaitingExternalEthereumTransferScreen-DVUwVgck.js} +1 -1
  8. package/dist/cjs/{AwaitingPasswordlessCodeScreen-Co_V5loZ.js → AwaitingPasswordlessCodeScreen-DrgaEVkD.js} +1 -1
  9. package/dist/cjs/{AwaitingSolToEvmBridgingScreen-CdxhBi75.js → AwaitingSolToEvmBridgingScreen-CQAxGoKP.js} +1 -1
  10. package/dist/cjs/{BridgeNetworkSelectionView-DpLB4paD.js → BridgeNetworkSelectionView-Bd-ehyqP.js} +1 -1
  11. package/dist/cjs/{CaptchaScreen-DMRDPM48.js → CaptchaScreen-Csab6OjG.js} +1 -1
  12. package/dist/cjs/{CoinbaseOnrampStatusScreen-ghVwEuDN.js → CoinbaseOnrampStatusScreen-Dsc8OMxP.js} +1 -1
  13. package/dist/cjs/{ConnectEmailForm-CLcx5hAJ.js → ConnectEmailForm-BaLVG2V3.js} +1 -1
  14. package/dist/cjs/{ConnectLedgerScreen-XtmYNMNP.js → ConnectLedgerScreen-cPU7ad2m.js} +1 -1
  15. package/dist/cjs/{ConnectOnlyLandingScreen-B4suzCQ9.js → ConnectOnlyLandingScreen-Br3hNEVI.js} +1 -1
  16. package/dist/cjs/{ConnectOnlyStatusScreen-CRYtEuDs.js → ConnectOnlyStatusScreen-CwYbJV03.js} +1 -1
  17. package/dist/cjs/{ConnectOrCreateScreen-CYALNaVN.js → ConnectOrCreateScreen-C5n4aoBd.js} +1 -1
  18. package/dist/cjs/{ConnectPhoneForm-DUydl9PB.js → ConnectPhoneForm-grT6QJKW.js} +1 -1
  19. package/dist/cjs/{ConnectWalletView-B-T2phwg.js → ConnectWalletView-acXo09ry.js} +1 -1
  20. package/dist/cjs/{ConnectionStatusScreen-CPV0_uP7.js → ConnectionStatusScreen-DvxCQtND.js} +1 -1
  21. package/dist/cjs/{CrossAppAuthScreen-C7sEJ5lk.js → CrossAppAuthScreen-BZrqdowY.js} +1 -1
  22. package/dist/cjs/{CustomLandingScreenView-ZkRRqwv8.js → CustomLandingScreenView-DQhD7H-Y.js} +1 -1
  23. package/dist/cjs/{DelegatedActionsConsentScreen-CCloltIN.js → DelegatedActionsConsentScreen-aa3stKge.js} +1 -1
  24. package/dist/cjs/{DelegatedActionsRevokeScreen-C424tTsi.js → DelegatedActionsRevokeScreen-C4dyQxew.js} +1 -1
  25. package/dist/cjs/{EmbeddedWalletConnectingScreen-BY8pPl8L.js → EmbeddedWalletConnectingScreen-B2sIDKrU.js} +1 -1
  26. package/dist/cjs/{EmbeddedWalletCreatedScreen-DB3xOcH5.js → EmbeddedWalletCreatedScreen-Dq73pt9b.js} +1 -1
  27. package/dist/cjs/{EmbeddedWalletKeyExportScreen-AmRNb5xf.js → EmbeddedWalletKeyExportScreen-BTB0EbJJ.js} +1 -1
  28. package/dist/cjs/{EmbeddedWalletOnAccountCreateScreen-C0yyRaA-.js → EmbeddedWalletOnAccountCreateScreen-1TcX3o8K.js} +1 -1
  29. package/dist/cjs/{EmbeddedWalletPasswordUpdateScreen-BMIz5ine.js → EmbeddedWalletPasswordUpdateScreen-BBoSpChs.js} +1 -1
  30. package/dist/cjs/{EmbeddedWalletPasswordUpdateSplashScreen-Bd_FF9pO.js → EmbeddedWalletPasswordUpdateSplashScreen-CLaYjxpz.js} +1 -1
  31. package/dist/cjs/{EnrollTotp-DX2DwxuX.js → EnrollTotp-D6ocCn4v.js} +1 -1
  32. package/dist/cjs/{ErrorScreen-mFwTqRgU.js → ErrorScreen-C2xSdkYC.js} +1 -1
  33. package/dist/cjs/{FarcasterConnectStatusScreen-CZ30Csdk.js → FarcasterConnectStatusScreen-DvVyh8zU.js} +1 -1
  34. package/dist/cjs/{FarcasterSignerStatusScreen-DBo98W3P.js → FarcasterSignerStatusScreen-kIG2AKFp.js} +1 -1
  35. package/dist/cjs/{FundSolWalletWithExternalSolanaWallet-CREkLnIc.js → FundSolWalletWithExternalSolanaWallet-B2U_lFvw.js} +1 -1
  36. package/dist/cjs/{FundWalletMethodHeader-4VjLY52r.js → FundWalletMethodHeader-CfHXgc0M.js} +1 -1
  37. package/dist/cjs/{FundingEditAmountScreen-CNU0vNs6.js → FundingEditAmountScreen-CzTSH2dC.js} +1 -1
  38. package/dist/cjs/{FundingMethodSelectionScreen-CQIDT05-.js → FundingMethodSelectionScreen-CBjGLXbZ.js} +1 -1
  39. package/dist/cjs/{InAppBrowserLoginNotPossible-Dp7FvcEf.js → InAppBrowserLoginNotPossible-CIG8bv6d.js} +1 -1
  40. package/dist/cjs/{InstallWalletScreen-kcrNZ7LA.js → InstallWalletScreen-B2vD26WT.js} +1 -1
  41. package/dist/cjs/{LandingScreen-HmGqW-Ot.js → LandingScreen-BEYwefB2.js} +1 -1
  42. package/dist/cjs/{LinkConflictScreen-66YlCOcB.js → LinkConflictScreen-CgR1CRSp.js} +1 -1
  43. package/dist/cjs/{LinkEmailScreen-CLd6YPGS.js → LinkEmailScreen-aoilMVGp.js} +1 -1
  44. package/dist/cjs/{LinkPasskeyScreen-D8PZaYGV.js → LinkPasskeyScreen-CMBY4_3D.js} +1 -1
  45. package/dist/cjs/{LinkPhoneScreen-BSS7yq5H.js → LinkPhoneScreen-BuspORFm.js} +1 -1
  46. package/dist/cjs/{LoginFailedScreen-Dk5bm5nF.js → LoginFailedScreen-rbFVmsvC.js} +1 -1
  47. package/dist/cjs/{ManualTransferScreen-BwpMuj8L.js → ManualTransferScreen-COoRzSz6.js} +1 -1
  48. package/dist/cjs/{MfaAuthEnrollmentFlowScreen-CsOyC4ty.js → MfaAuthEnrollmentFlowScreen-_ncbAR0l.js} +1 -1
  49. package/dist/cjs/{MfaAuthVerifyFlowScreen-Cq6GkG2E.js → MfaAuthVerifyFlowScreen--2tpPZkF.js} +1 -1
  50. package/dist/cjs/{MfaEnrollmentFlowScreen-gTqBCZQj.js → MfaEnrollmentFlowScreen-Bn7kOj-x.js} +1 -1
  51. package/dist/cjs/{MfaVerifyFlowScreen-C5noVJw3.js → MfaVerifyFlowScreen-CjXrt1xv.js} +1 -1
  52. package/dist/cjs/{ModalHeader-CrrmvrdJ.js → ModalHeader-HFJct04e.js} +1 -1
  53. package/dist/cjs/{MoonpayStatusScreen-BbJJzw-b.js → MoonpayStatusScreen-BYVEV6Hl.js} +1 -1
  54. package/dist/cjs/{OAuthStatusScreen-BofZaG2a.js → OAuthStatusScreen-Yyaxj4Os.js} +1 -1
  55. package/dist/cjs/{PasskeySelectSignupOrLogin-CKrs61Py.js → PasskeySelectSignupOrLogin-DnuQecC6.js} +1 -1
  56. package/dist/cjs/{PasskeyStatusScreen-g42i4Mvo.js → PasskeyStatusScreen-i0ui7oVt.js} +1 -1
  57. package/dist/cjs/{PasswordRecoveryScreen-BKpzNviy.js → PasswordRecoveryScreen-eges-du_.js} +1 -1
  58. package/dist/cjs/{QrCode-CpVix74G.js → QrCode-B0wOoW1E.js} +1 -1
  59. package/dist/cjs/{RecoveryOAuthStatusScreen-CcmiXAjl.js → RecoveryOAuthStatusScreen-lyldMRwo.js} +1 -1
  60. package/dist/cjs/{RecoveryPasswordCreateScreen-DVM3riPn.js → RecoveryPasswordCreateScreen-Cb83wfAF.js} +1 -1
  61. package/dist/cjs/{RecoverySelectionScreen-DIlaAoqP.js → RecoverySelectionScreen-CwLucuiD.js} +1 -1
  62. package/dist/cjs/{Screen-D0YJLo__.js → Screen-M6XQZTd0.js} +1 -1
  63. package/dist/cjs/{ScreenLayout-JveHvcJ8.js → ScreenLayout-DND5buhY.js} +1 -1
  64. package/dist/cjs/{SetAutomaticRecoveryScreen-xO_sfXpz.js → SetAutomaticRecoveryScreen-DuRPXhP0.js} +1 -1
  65. package/dist/cjs/{SetWalletPasswordForm-8IcEJLVA.js → SetWalletPasswordForm-D0eEjP-u.js} +1 -1
  66. package/dist/cjs/{SignRequestScreen-CamoMMM-.js → SignRequestScreen-LGzYoSpD.js} +1 -1
  67. package/dist/cjs/{StandardSignAndSendTransactionScreen-6AluYC2k.js → StandardSignAndSendTransactionScreen-dtePWf7A.js} +1 -1
  68. package/dist/cjs/{TelegramAuthScreen-Cb73d07X.js → TelegramAuthScreen-BOQRRBD-.js} +1 -1
  69. package/dist/cjs/{TransactionDetails-qYKVGuJ7.js → TransactionDetails-CoviBGbu.js} +1 -1
  70. package/dist/cjs/{TransactionErrorView-B5L9vNDb.js → TransactionErrorView-CZIADuCd.js} +1 -1
  71. package/dist/cjs/{TransferFromWalletScreen-DPpoJrZz.js → TransferFromWalletScreen-CAvZpFHU.js} +1 -1
  72. package/dist/cjs/{TransferOrBridgeLoadingScreen-TirUWZnM.js → TransferOrBridgeLoadingScreen-rCuYNou5.js} +1 -1
  73. package/dist/cjs/{UpdateEmailScreen-D2klV_7q.js → UpdateEmailScreen-BRl0rLXi.js} +1 -1
  74. package/dist/cjs/{UpdatePhoneScreen-DPK7kqIb.js → UpdatePhoneScreen-mByXtOCY.js} +1 -1
  75. package/dist/cjs/{UserLimitReachedScreen-N3RJRnTW.js → UserLimitReachedScreen-CjNxv9xy.js} +1 -1
  76. package/dist/cjs/{WalletInfoCard-CqAKxpIz.js → WalletInfoCard-wDKvmmsx.js} +1 -1
  77. package/dist/cjs/{WalletInterstitialScreen-P_mZUs5E.js → WalletInterstitialScreen-BW-Ju9PU.js} +1 -1
  78. package/dist/cjs/{WalletLink-Cv4ngHRB.js → WalletLink-Dglkazqd.js} +1 -1
  79. package/dist/cjs/{WalletOverflowButton-Btvn5ZIk.js → WalletOverflowButton-BAZ96Q1e.js} +1 -1
  80. package/dist/cjs/abstract-smart-wallets.js +1 -1
  81. package/dist/cjs/{context-BQBZ_ADw.js → context-B8VkgLLk.js} +1 -1
  82. package/dist/cjs/{ethers-DbNbG59G.js → ethers-O1Nyjl84.js} +1 -1
  83. package/dist/cjs/extended-chains.js +1 -1
  84. package/dist/cjs/{get-is-unified-wallet-BvMSdvUc.js → get-is-unified-wallet--p0rdEtP.js} +1 -1
  85. package/dist/cjs/{index-CgX5_MCM.js → index-B-V647xG.js} +4 -4
  86. package/dist/cjs/{index-D4W5OFmO.js → index-BmQlwyOF.js} +1 -1
  87. package/dist/cjs/{index-DZnN2Bzr.js → index-Dnijyzka.js} +1 -1
  88. package/dist/cjs/index.js +1 -1
  89. package/dist/cjs/internal.js +1 -1
  90. package/dist/cjs/{prepareFundingModalData-DjA3GuX5.js → prepareFundingModalData-BADfvap9.js} +1 -1
  91. package/dist/cjs/{shared-D3goA11g.js → shared-CJn0wmyB.js} +1 -1
  92. package/dist/cjs/{shouldProceedtoEmbeddedWalletCreationFlow-ZoB0nZek.js → shouldProceedtoEmbeddedWalletCreationFlow-DwKYEqJV.js} +1 -1
  93. package/dist/cjs/{smart-wallets-D4CVoR7Y.js → smart-wallets-BxSjnmxi.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-CfB2jpM8.js → styles-Dg1qQgOa.js} +1 -1
  97. package/dist/cjs/{to-ui-error-Bn2yiSbL.js → to-ui-error-CnjmH8us.js} +1 -1
  98. package/dist/cjs/ui.js +1 -1
  99. package/dist/cjs/{use-create-wallet-without-fallback-CnImLq2R.js → use-create-wallet-without-fallback-B3AnOM0l.js} +1 -1
  100. package/dist/cjs/{use-export-wallet-B0Yz14lP.js → use-export-wallet-no3ZWIW-.js} +1 -1
  101. package/dist/cjs/{useActiveWallet-CJFU5uW9.js → useActiveWallet-Wp8zv7qb.js} +1 -1
  102. package/dist/cjs/{useGetTokenPrice-CVvPmZ8P.js → useGetTokenPrice-BkD8eOWh.js} +1 -1
  103. package/dist/cjs/{useI18n-BTc713en.js → useI18n-J8z0zLWw.js} +1 -1
  104. package/dist/cjs/{usePrivy-CF_OJFHb.js → usePrivy-BM1sYNel.js} +1 -1
  105. package/dist/cjs/{useSolanaRpcClient-COrWRwgi.js → useSolanaRpcClient-CLYG-Dxk.js} +1 -1
  106. package/dist/cjs/{useWallets-CejVNO5i.js → useWallets-20ZeTYCD.js} +1 -1
  107. package/dist/cjs/{useWallets-DfhM_0qx.js → useWallets-DEyFRWD0.js} +1 -1
  108. package/dist/esm/{AccountNotFoundScreen-SAoRBYPt.mjs → AccountNotFoundScreen-Q-gvf1Fn.mjs} +1 -1
  109. package/dist/esm/{Address-DCNT9qfI.mjs → Address-BGlhcEcA.mjs} +1 -1
  110. package/dist/esm/{AffirmativeConsentScreen-C0OVdF1c.mjs → AffirmativeConsentScreen-CLQuUvfP.mjs} +1 -1
  111. package/dist/esm/{AllowlistRejectionScreen-Cct-waJ2.mjs → AllowlistRejectionScreen-CA0r2B2G.mjs} +1 -1
  112. package/dist/esm/{AuthenticateWithWalletScreen-Bkvu8ujc.mjs → AuthenticateWithWalletScreen-CJ0PGjN8.mjs} +1 -1
  113. package/dist/esm/{AwaitingEvmToSolBridgingScreen-BsN93tBU.mjs → AwaitingEvmToSolBridgingScreen-BCl9wYAA.mjs} +1 -1
  114. package/dist/esm/{AwaitingExternalEthereumTransferScreen-BC11vrIp.mjs → AwaitingExternalEthereumTransferScreen-PysgS8Qt.mjs} +1 -1
  115. package/dist/esm/{AwaitingPasswordlessCodeScreen-GOaBmmDo.mjs → AwaitingPasswordlessCodeScreen-BV79QlfB.mjs} +1 -1
  116. package/dist/esm/{AwaitingSolToEvmBridgingScreen-BJ9kOZqs.mjs → AwaitingSolToEvmBridgingScreen-BAWOxcgh.mjs} +1 -1
  117. package/dist/esm/{BridgeNetworkSelectionView-M-oH2oBz.mjs → BridgeNetworkSelectionView-T2-4Tr4k.mjs} +1 -1
  118. package/dist/esm/{CaptchaScreen-D53Xo41F.mjs → CaptchaScreen-BpGtWd73.mjs} +1 -1
  119. package/dist/esm/{CoinbaseOnrampStatusScreen-CCI9ghgf.mjs → CoinbaseOnrampStatusScreen-0Uex7DsA.mjs} +1 -1
  120. package/dist/esm/{ConnectEmailForm-DYREF18y.mjs → ConnectEmailForm-DjET3G-q.mjs} +1 -1
  121. package/dist/esm/{ConnectLedgerScreen-DKa2XRwj.mjs → ConnectLedgerScreen-CQFzXuWK.mjs} +1 -1
  122. package/dist/esm/{ConnectOnlyLandingScreen-CPdHrHlO.mjs → ConnectOnlyLandingScreen-BHXmw89v.mjs} +1 -1
  123. package/dist/esm/{ConnectOnlyStatusScreen-BcPIfQVC.mjs → ConnectOnlyStatusScreen-CrK4PC6t.mjs} +1 -1
  124. package/dist/esm/{ConnectOrCreateScreen-Bqi22g9s.mjs → ConnectOrCreateScreen-BrRb6sNR.mjs} +1 -1
  125. package/dist/esm/{ConnectPhoneForm-Qkb8rJwn.mjs → ConnectPhoneForm-CYfqSIAI.mjs} +1 -1
  126. package/dist/esm/{ConnectWalletView-DIPHDDCY.mjs → ConnectWalletView-CduRtfEz.mjs} +1 -1
  127. package/dist/esm/{ConnectionStatusScreen-Dq1apJ9v.mjs → ConnectionStatusScreen-KrobwyOT.mjs} +1 -1
  128. package/dist/esm/{CrossAppAuthScreen-BWmMkCMj.mjs → CrossAppAuthScreen-BOKIMDhq.mjs} +1 -1
  129. package/dist/esm/{CustomLandingScreenView-BNfr2T51.mjs → CustomLandingScreenView-BcDpTdY_.mjs} +1 -1
  130. package/dist/esm/{DelegatedActionsConsentScreen-BPxadA77.mjs → DelegatedActionsConsentScreen-B7RhRjIf.mjs} +1 -1
  131. package/dist/esm/{DelegatedActionsRevokeScreen-if7lOzSL.mjs → DelegatedActionsRevokeScreen-C5V6mhCq.mjs} +1 -1
  132. package/dist/esm/{EmbeddedWalletConnectingScreen-CaBfDofq.mjs → EmbeddedWalletConnectingScreen-C9Fw9Ret.mjs} +1 -1
  133. package/dist/esm/{EmbeddedWalletCreatedScreen-CQpQMReB.mjs → EmbeddedWalletCreatedScreen-keGjjfu4.mjs} +1 -1
  134. package/dist/esm/{EmbeddedWalletKeyExportScreen-BENuPlQr.mjs → EmbeddedWalletKeyExportScreen-DxbOABYY.mjs} +1 -1
  135. package/dist/esm/{EmbeddedWalletOnAccountCreateScreen-D7KTGcaK.mjs → EmbeddedWalletOnAccountCreateScreen-B7blEQwB.mjs} +1 -1
  136. package/dist/esm/{EmbeddedWalletPasswordUpdateScreen-rGoQOLww.mjs → EmbeddedWalletPasswordUpdateScreen-B25GzXZc.mjs} +1 -1
  137. package/dist/esm/{EmbeddedWalletPasswordUpdateSplashScreen-Cnh2RAR3.mjs → EmbeddedWalletPasswordUpdateSplashScreen-Cu_NA9L6.mjs} +1 -1
  138. package/dist/esm/{EnrollTotp-DEV0or6R.mjs → EnrollTotp-CXZmaa4A.mjs} +1 -1
  139. package/dist/esm/{ErrorScreen-C7CRlvK4.mjs → ErrorScreen-DLsfgpC9.mjs} +1 -1
  140. package/dist/esm/{FarcasterConnectStatusScreen-BncX85cR.mjs → FarcasterConnectStatusScreen-ng3F34Zy.mjs} +1 -1
  141. package/dist/esm/{FarcasterSignerStatusScreen-BvYUPkuC.mjs → FarcasterSignerStatusScreen-C19Go4EG.mjs} +1 -1
  142. package/dist/esm/{FundSolWalletWithExternalSolanaWallet-CtNGbUxH.mjs → FundSolWalletWithExternalSolanaWallet-DpBJNLZJ.mjs} +1 -1
  143. package/dist/esm/{FundWalletMethodHeader-SJUeDFRm.mjs → FundWalletMethodHeader-CI5afzwL.mjs} +1 -1
  144. package/dist/esm/{FundingEditAmountScreen-3QpKWUpq.mjs → FundingEditAmountScreen-DVwlwSMh.mjs} +1 -1
  145. package/dist/esm/{FundingMethodSelectionScreen-DVIbUia7.mjs → FundingMethodSelectionScreen-BEXU_dRV.mjs} +1 -1
  146. package/dist/esm/{InAppBrowserLoginNotPossible-D9yoDlMN.mjs → InAppBrowserLoginNotPossible-fdO06E7f.mjs} +1 -1
  147. package/dist/esm/{InstallWalletScreen-UCKqrDea.mjs → InstallWalletScreen-BTCkqOY-.mjs} +1 -1
  148. package/dist/esm/{LandingScreen-CnTxHWb2.mjs → LandingScreen-BYYtxc3M.mjs} +1 -1
  149. package/dist/esm/{LinkConflictScreen-DOIDMFMJ.mjs → LinkConflictScreen-CEU67LFR.mjs} +1 -1
  150. package/dist/esm/{LinkEmailScreen-C6mBQ3be.mjs → LinkEmailScreen-frIcyTMB.mjs} +1 -1
  151. package/dist/esm/{LinkPasskeyScreen-DIg97p-E.mjs → LinkPasskeyScreen-DJveInKu.mjs} +1 -1
  152. package/dist/esm/{LinkPhoneScreen-CEZjt49Q.mjs → LinkPhoneScreen-DoNf-oO4.mjs} +1 -1
  153. package/dist/esm/{LoginFailedScreen-jhimuKIL.mjs → LoginFailedScreen-g2jT2Kyc.mjs} +1 -1
  154. package/dist/esm/{ManualTransferScreen-B0FDKMnc.mjs → ManualTransferScreen-Cc1Y8Jih.mjs} +1 -1
  155. package/dist/esm/{MfaAuthEnrollmentFlowScreen-ms8oHKbz.mjs → MfaAuthEnrollmentFlowScreen-O3_CYjp9.mjs} +1 -1
  156. package/dist/esm/{MfaAuthVerifyFlowScreen-Cknvwoa7.mjs → MfaAuthVerifyFlowScreen-T7Rg8uvy.mjs} +1 -1
  157. package/dist/esm/{MfaEnrollmentFlowScreen-Cdnhw-bu.mjs → MfaEnrollmentFlowScreen-Bz72-m4D.mjs} +1 -1
  158. package/dist/esm/{MfaVerifyFlowScreen-FVpFtGlV.mjs → MfaVerifyFlowScreen-C_vKdC1M.mjs} +1 -1
  159. package/dist/esm/{ModalHeader-B32Zin0a.mjs → ModalHeader-D5psNgrf.mjs} +1 -1
  160. package/dist/esm/{MoonpayStatusScreen-B5V9Yl-l.mjs → MoonpayStatusScreen-B8KZWDvr.mjs} +1 -1
  161. package/dist/esm/{OAuthStatusScreen-B4J3yosy.mjs → OAuthStatusScreen-BqifArEf.mjs} +1 -1
  162. package/dist/esm/{PasskeySelectSignupOrLogin-D2BuKrXP.mjs → PasskeySelectSignupOrLogin-BnluBsvm.mjs} +1 -1
  163. package/dist/esm/{PasskeyStatusScreen-CTV1zY6O.mjs → PasskeyStatusScreen-DNO05Efn.mjs} +1 -1
  164. package/dist/esm/{PasswordRecoveryScreen-BSw8gxaj.mjs → PasswordRecoveryScreen-B7NJ3m5d.mjs} +1 -1
  165. package/dist/esm/{QrCode-CA7VcP6Y.mjs → QrCode-Bp7vKyXB.mjs} +1 -1
  166. package/dist/esm/{RecoveryOAuthStatusScreen-DZbf8Bb6.mjs → RecoveryOAuthStatusScreen-C0tnlfv2.mjs} +1 -1
  167. package/dist/esm/{RecoveryPasswordCreateScreen-Br0bjUXH.mjs → RecoveryPasswordCreateScreen-BgT7udfA.mjs} +1 -1
  168. package/dist/esm/{RecoverySelectionScreen-C8uNTvvv.mjs → RecoverySelectionScreen-ePxeHUj1.mjs} +1 -1
  169. package/dist/esm/{Screen-DHkF35VN.mjs → Screen-q8npRQhQ.mjs} +1 -1
  170. package/dist/esm/{ScreenLayout-DptX1e0c.mjs → ScreenLayout-DIdy7nhJ.mjs} +1 -1
  171. package/dist/esm/{SetAutomaticRecoveryScreen-7R4owaUE.mjs → SetAutomaticRecoveryScreen-CVl0jRLW.mjs} +1 -1
  172. package/dist/esm/{SetWalletPasswordForm-BHKufUYQ.mjs → SetWalletPasswordForm-B55ZeX-5.mjs} +1 -1
  173. package/dist/esm/{SignRequestScreen-BrotR8aZ.mjs → SignRequestScreen-DsHKzR1x.mjs} +1 -1
  174. package/dist/esm/{StandardSignAndSendTransactionScreen-BiZtfZUw.mjs → StandardSignAndSendTransactionScreen-BuT88OVq.mjs} +1 -1
  175. package/dist/esm/{TelegramAuthScreen-BPt7Q_Py.mjs → TelegramAuthScreen-DQ63cPv-.mjs} +1 -1
  176. package/dist/esm/{TransactionDetails-CUlkPVdC.mjs → TransactionDetails-DB8AH1mq.mjs} +1 -1
  177. package/dist/esm/{TransactionErrorView-DSf6mRm9.mjs → TransactionErrorView-CkMh0sTl.mjs} +1 -1
  178. package/dist/esm/{TransferFromWalletScreen-CrnAZtNm.mjs → TransferFromWalletScreen-rtFkHQRz.mjs} +1 -1
  179. package/dist/esm/{TransferOrBridgeLoadingScreen-DTNFXZqE.mjs → TransferOrBridgeLoadingScreen-BZTN__SI.mjs} +1 -1
  180. package/dist/esm/{UpdateEmailScreen-8JUTZQXY.mjs → UpdateEmailScreen-sALtnLLN.mjs} +1 -1
  181. package/dist/esm/{UpdatePhoneScreen-DXFfn41I.mjs → UpdatePhoneScreen-DKfVISn1.mjs} +1 -1
  182. package/dist/esm/{UserLimitReachedScreen-DwqeaCAS.mjs → UserLimitReachedScreen-BoinP76r.mjs} +1 -1
  183. package/dist/esm/{WalletInfoCard-CV_N8dG_.mjs → WalletInfoCard-BtliVaf0.mjs} +1 -1
  184. package/dist/esm/{WalletInterstitialScreen-BgxtaYfl.mjs → WalletInterstitialScreen-jn7VehvZ.mjs} +1 -1
  185. package/dist/esm/{WalletLink-DAJA2_WV.mjs → WalletLink-foFywOfy.mjs} +1 -1
  186. package/dist/esm/{WalletOverflowButton-BHHEaMnB.mjs → WalletOverflowButton-DWdepzzi.mjs} +1 -1
  187. package/dist/esm/abstract-smart-wallets.mjs +1 -1
  188. package/dist/esm/context-Bu4xmqpC.mjs +1 -0
  189. package/dist/esm/{ethers-CJEkGodq.mjs → ethers-TpFbevgv.mjs} +1 -1
  190. package/dist/esm/extended-chains.mjs +1 -1
  191. package/dist/esm/{get-is-unified-wallet-DF10lirM.mjs → get-is-unified-wallet-CvIzjbW7.mjs} +1 -1
  192. package/dist/esm/{index-CA0UPK2p.mjs → index-DEy_pO5S.mjs} +1 -1
  193. package/dist/esm/{index-CjKmnG3I.mjs → index-DieEhruj.mjs} +1 -1
  194. package/dist/esm/{index-B2ZHk27q.mjs → index-ygZBlWlm.mjs} +4 -4
  195. package/dist/esm/index.mjs +1 -1
  196. package/dist/esm/internal.mjs +1 -1
  197. package/dist/esm/{prepareFundingModalData-BHP1zZ9a.mjs → prepareFundingModalData-CRrWM52E.mjs} +1 -1
  198. package/dist/esm/{shared-8FNFm3Zd.mjs → shared-JeLSzCHD.mjs} +1 -1
  199. package/dist/esm/{shouldProceedtoEmbeddedWalletCreationFlow-Z89kclWd.mjs → shouldProceedtoEmbeddedWalletCreationFlow-D0uaMzCB.mjs} +1 -1
  200. package/dist/esm/{smart-wallets-HoA3s19q.mjs → smart-wallets-XRilJC8w.mjs} +1 -1
  201. package/dist/esm/smart-wallets.mjs +1 -1
  202. package/dist/esm/solana.mjs +1 -1
  203. package/dist/esm/{styles-Bz8FxEx_.mjs → styles-CaJCyFB5.mjs} +1 -1
  204. package/dist/esm/{to-ui-error-CBHFimQU.mjs → to-ui-error-l1Vm31qE.mjs} +1 -1
  205. package/dist/esm/ui.mjs +1 -1
  206. package/dist/esm/{use-create-wallet-without-fallback-CMjcGZvq.mjs → use-create-wallet-without-fallback-BLN3_KXw.mjs} +1 -1
  207. package/dist/esm/{use-export-wallet-BjUUQuiG.mjs → use-export-wallet-D-0qOhlZ.mjs} +1 -1
  208. package/dist/esm/{useActiveWallet-BY2wKTVp.mjs → useActiveWallet-RUYo4pXO.mjs} +1 -1
  209. package/dist/esm/{useGetTokenPrice-B4b3Y3ZV.mjs → useGetTokenPrice-C1-pGMgN.mjs} +1 -1
  210. package/dist/esm/{useI18n-CS_dxsYR.mjs → useI18n-CD7HCIxK.mjs} +1 -1
  211. package/dist/esm/{usePrivy-DQKLhXbj.mjs → usePrivy-Bn7q4pcu.mjs} +1 -1
  212. package/dist/esm/{useSolanaRpcClient-CRKGswty.mjs → useSolanaRpcClient-C55AFEgY.mjs} +1 -1
  213. package/dist/esm/{useWallets-DTjrHNDw.mjs → useWallets-BkIu5vyx.mjs} +1 -1
  214. package/dist/esm/{useWallets-CvGE4Njt.mjs → useWallets-O-mGV40Z.mjs} +1 -1
  215. package/package.json +9 -9
  216. package/dist/esm/context-BuN0M_vH.mjs +0 -1
@@ -1 +1 @@
1
- import{jsx as t}from"react/jsx-runtime";import{u as o}from"./context-BuN0M_vH.mjs";import{C as r,L as i}from"./CustomLandingScreenView-BNfr2T51.mjs";import"react";import"@privy-io/js-sdk-core";import"tinycolor2";import"@heroicons/react/24/outline/UserCircleIcon";import"styled-components";import"./ModalHeader-B32Zin0a.mjs";import"./useActiveWallet-BY2wKTVp.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-BHP1zZ9a.mjs";import"./internal-context-e-Eni5bG.mjs";import"ofetch";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./get-is-unified-wallet-DF10lirM.mjs";import"./useWallets-DTjrHNDw.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./index-B2ZHk27q.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-DQKLhXbj.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-CwE9r3cT.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-eEm9Olt_.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./ConnectWalletView-DIPHDDCY.mjs";import"@heroicons/react/24/outline";import"@tanstack/react-virtual";import"@heroicons/react/24/outline/CheckIcon";import"./copy-Bx2Jwc5_.mjs";import"./Link-DJ5gq9Di.mjs";import"./QrCode-CA7VcP6Y.mjs";import"qrcode";import"./EmailInputForm-Dgoii4vf.mjs";import"./ErrorMessage-D8VaAP5m.mjs";import"./useI18n-CS_dxsYR.mjs";import"./WalletCards-DH1rqayz.mjs";import"./Screen-DHkF35VN.mjs";import"./index-Dq_xe9dz.mjs";import"lucide-react";import"./ConnectEmailForm-DYREF18y.mjs";import"./Chip-D2-wZOHJ.mjs";import"./LoadingSkeleton-U6-3yFwI.mjs";import"./farcaster-DPlSjvF5.mjs";import"@heroicons/react/24/outline/FingerPrintIcon";import"./ConnectPhoneForm-Qkb8rJwn.mjs";import"./twitter-BoAxhlj6.mjs";import"./twitch-5IOe4sIQ.mjs";import"./telegram-B-JqnkqZ.mjs";import"./WalletOverflowButton-BHHEaMnB.mjs";import"./ScreenLayout-DptX1e0c.mjs";const e={component:()=>{let e=o();return e.loginMethodsAndOrder&&e.loginMethodsAndOrder.primary.length>0?/*#__PURE__*/t(r,{connectOnly:!0}):/*#__PURE__*/t(i,{connectOnly:!0})}};export{e as ConnectOrCreateScreen,e as default};
1
+ import{jsx as t}from"react/jsx-runtime";import{u as o}from"./context-Bu4xmqpC.mjs";import{C as r,L as i}from"./CustomLandingScreenView-BcDpTdY_.mjs";import"react";import"@privy-io/js-sdk-core";import"tinycolor2";import"@heroicons/react/24/outline/UserCircleIcon";import"styled-components";import"./ModalHeader-D5psNgrf.mjs";import"./useActiveWallet-RUYo4pXO.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-CRrWM52E.mjs";import"./internal-context-e-Eni5bG.mjs";import"ofetch";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./get-is-unified-wallet-CvIzjbW7.mjs";import"./useWallets-BkIu5vyx.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./index-ygZBlWlm.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-Bn7q4pcu.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-CwE9r3cT.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-eEm9Olt_.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./ConnectWalletView-CduRtfEz.mjs";import"@heroicons/react/24/outline";import"@tanstack/react-virtual";import"@heroicons/react/24/outline/CheckIcon";import"./copy-Bx2Jwc5_.mjs";import"./Link-DJ5gq9Di.mjs";import"./QrCode-Bp7vKyXB.mjs";import"qrcode";import"./EmailInputForm-Dgoii4vf.mjs";import"./ErrorMessage-D8VaAP5m.mjs";import"./useI18n-CD7HCIxK.mjs";import"./WalletCards-DH1rqayz.mjs";import"./Screen-q8npRQhQ.mjs";import"./index-Dq_xe9dz.mjs";import"lucide-react";import"./ConnectEmailForm-DjET3G-q.mjs";import"./Chip-D2-wZOHJ.mjs";import"./LoadingSkeleton-U6-3yFwI.mjs";import"./farcaster-DPlSjvF5.mjs";import"@heroicons/react/24/outline/FingerPrintIcon";import"./ConnectPhoneForm-CYfqSIAI.mjs";import"./twitter-BoAxhlj6.mjs";import"./twitch-5IOe4sIQ.mjs";import"./telegram-B-JqnkqZ.mjs";import"./WalletOverflowButton-DWdepzzi.mjs";import"./ScreenLayout-DIdy7nhJ.mjs";const e={component:()=>{let e=o();return e.loginMethodsAndOrder&&e.loginMethodsAndOrder.primary.length>0?/*#__PURE__*/t(r,{connectOnly:!0}):/*#__PURE__*/t(i,{connectOnly:!0})}};export{e as ConnectOrCreateScreen,e as default};
@@ -1,4 +1,4 @@
1
- import{jsx as o,jsxs as e,Fragment as r}from"react/jsx-runtime";import{forwardRef as n,useState as t,useEffect as i}from"react";import{styled as a}from"styled-components";import{countryCodesAndNumbers as d,validatePhoneNumber as l,phoneNumberTypingFormatter as c,getPlaceholderPhoneNumber as p,getCountryCallingCode as u,getPhoneCountryCodeAndNumber as h,formatPhoneNumber as s}from"@privy-io/js-sdk-core";import{u as g}from"./context-BuN0M_vH.mjs";import{F as m}from"./useActiveWallet-BY2wKTVp.mjs";import{E as b,P as x}from"./ModalHeader-B32Zin0a.mjs";import{C as v}from"./Chip-D2-wZOHJ.mjs";const f=({value:r,onChange:n})=>/*#__PURE__*/o("select",{value:r,onChange:n,children:d.map((o=>/*#__PURE__*/e("option",{value:o.code,children:[o.code," +",o.callCode]},o.code)))}),w=/*#__PURE__*/n(((n,a)=>{let d=g(),[w,k]=t(!1),{accountType:$}=m(),[N,P]=t(""),[S,j]=t(d?.intl.defaultCountry??"US"),V=l(N,S),z=c(S),T=p(S),U=u(S),L=!V,[q,E]=t(!1),B=U.length,D=o=>{let e=o.target.value;j(e),P(""),n.onChange&&n.onChange({rawPhoneNumber:N,qualifiedPhoneNumber:s(N,e),countryCode:e,isValid:l(N,S)})},F=(o,e)=>{try{let r=o.replace(/\D/g,"")===N.replace(/\D/g,"")?o:z.input(o);P(r),n.onChange&&n.onChange({rawPhoneNumber:r,qualifiedPhoneNumber:s(o,e),countryCode:e,isValid:l(o,e)})}catch(o){console.error("Error processing phone number:",o)}},I=()=>{E(!0);let o=s(N,S);n.onSubmit({rawPhoneNumber:N,qualifiedPhoneNumber:o,countryCode:S,isValid:l(N,S)}).finally((()=>E(!1)))};return i((()=>{if(n.defaultValue){let o=h(n.defaultValue);z.reset(),D({target:{value:o.countryCode}}),F(o.phone,o.countryCode)}}),[n.defaultValue]),/*#__PURE__*/e(r,{children:[/*#__PURE__*/o(y,{children:/*#__PURE__*/e(C,{$callingCodeLength:B,$stacked:n.stacked,children:[/*#__PURE__*/o(f,{value:S,onChange:D}),/*#__PURE__*/o("input",{ref:a,id:"phone-number-input",className:"login-method-button",type:"tel",placeholder:T,onFocus:()=>k(!0),onChange:o=>{F(o.target.value,S)},onKeyUp:o=>{"Enter"===o.key&&I()},value:N,autoComplete:"tel"}),"phone"!==$||w||n.hideRecent?n.stacked||n.noIncludeSubmitButton?/*#__PURE__*/o("span",{}):/*#__PURE__*/o(b,{isSubmitting:q,onClick:I,disabled:L,children:"Submit"}):/*#__PURE__*/o(v,{color:"gray",children:"Recent"})]})}),n.stacked&&!n.noIncludeSubmitButton?/*#__PURE__*/o(x,{loading:q,loadingText:null,onClick:I,disabled:L,children:"Submit"}):null]})}));let y=a.div`
1
+ import{jsx as o,jsxs as e,Fragment as r}from"react/jsx-runtime";import{forwardRef as n,useState as t,useEffect as i}from"react";import{styled as a}from"styled-components";import{countryCodesAndNumbers as d,validatePhoneNumber as l,phoneNumberTypingFormatter as c,getPlaceholderPhoneNumber as p,getCountryCallingCode as u,getPhoneCountryCodeAndNumber as h,formatPhoneNumber as s}from"@privy-io/js-sdk-core";import{u as g}from"./context-Bu4xmqpC.mjs";import{F as m}from"./useActiveWallet-RUYo4pXO.mjs";import{E as b,P as x}from"./ModalHeader-D5psNgrf.mjs";import{C as v}from"./Chip-D2-wZOHJ.mjs";const f=({value:r,onChange:n})=>/*#__PURE__*/o("select",{value:r,onChange:n,children:d.map((o=>/*#__PURE__*/e("option",{value:o.code,children:[o.code," +",o.callCode]},o.code)))}),w=/*#__PURE__*/n(((n,a)=>{let d=g(),[w,k]=t(!1),{accountType:$}=m(),[N,P]=t(""),[S,j]=t(d?.intl.defaultCountry??"US"),V=l(N,S),z=c(S),T=p(S),U=u(S),L=!V,[q,E]=t(!1),B=U.length,D=o=>{let e=o.target.value;j(e),P(""),n.onChange&&n.onChange({rawPhoneNumber:N,qualifiedPhoneNumber:s(N,e),countryCode:e,isValid:l(N,S)})},F=(o,e)=>{try{let r=o.replace(/\D/g,"")===N.replace(/\D/g,"")?o:z.input(o);P(r),n.onChange&&n.onChange({rawPhoneNumber:r,qualifiedPhoneNumber:s(o,e),countryCode:e,isValid:l(o,e)})}catch(o){console.error("Error processing phone number:",o)}},I=()=>{E(!0);let o=s(N,S);n.onSubmit({rawPhoneNumber:N,qualifiedPhoneNumber:o,countryCode:S,isValid:l(N,S)}).finally((()=>E(!1)))};return i((()=>{if(n.defaultValue){let o=h(n.defaultValue);z.reset(),D({target:{value:o.countryCode}}),F(o.phone,o.countryCode)}}),[n.defaultValue]),/*#__PURE__*/e(r,{children:[/*#__PURE__*/o(y,{children:/*#__PURE__*/e(C,{$callingCodeLength:B,$stacked:n.stacked,children:[/*#__PURE__*/o(f,{value:S,onChange:D}),/*#__PURE__*/o("input",{ref:a,id:"phone-number-input",className:"login-method-button",type:"tel",placeholder:T,onFocus:()=>k(!0),onChange:o=>{F(o.target.value,S)},onKeyUp:o=>{"Enter"===o.key&&I()},value:N,autoComplete:"tel"}),"phone"!==$||w||n.hideRecent?n.stacked||n.noIncludeSubmitButton?/*#__PURE__*/o("span",{}):/*#__PURE__*/o(b,{isSubmitting:q,onClick:I,disabled:L,children:"Submit"}):/*#__PURE__*/o(v,{color:"gray",children:"Recent"})]})}),n.stacked&&!n.noIncludeSubmitButton?/*#__PURE__*/o(x,{loading:q,loadingText:null,onClick:I,disabled:L,children:"Submit"}):null]})}));let y=a.div`
2
2
  width: 100%;
3
3
  `,C=a.label`
4
4
  --country-code-dropdown-width: calc(54px + calc(12 * ${o=>o.$callingCodeLength}px));
@@ -1,4 +1,4 @@
1
- import{jsxs as e,jsx as n,Fragment as t}from"react/jsx-runtime";import{MagnifyingGlassIcon as l}from"@heroicons/react/24/outline";import{useVirtualizer as i}from"@tanstack/react-virtual";import{useState as a,useMemo as o,useCallback as r,useRef as c,useEffect as s}from"react";import{isMobile as d}from"react-device-detect";import{styled as h}from"styled-components";import{a as m,T as u}from"./ModalHeader-B32Zin0a.mjs";import p from"@heroicons/react/24/outline/CheckIcon";import{C as g}from"./copy-Bx2Jwc5_.mjs";import{L as w}from"./Link-DJ5gq9Di.mjs";import{Q as f}from"./QrCode-CA7VcP6Y.mjs";import{E as y}from"./EmailInputForm-Dgoii4vf.mjs";import{u as v,q as b}from"./context-BuN0M_vH.mjs";import{u as C}from"./useI18n-CS_dxsYR.mjs";import{M as x,q as _,d as k,e as L,K as W,V as T,w as z,S}from"./useActiveWallet-BY2wKTVp.mjs";import{u as A,P as E,b as j}from"./internal-context-e-Eni5bG.mjs";import{W as K}from"./WalletCards-DH1rqayz.mjs";import{W as B,h as q}from"./prepareFundingModalData-BHP1zZ9a.mjs";import{S as I}from"./Screen-DHkF35VN.mjs";let O=h.button`
1
+ import{jsxs as e,jsx as n,Fragment as t}from"react/jsx-runtime";import{MagnifyingGlassIcon as l}from"@heroicons/react/24/outline";import{useVirtualizer as i}from"@tanstack/react-virtual";import{useState as a,useMemo as o,useCallback as r,useRef as c,useEffect as s}from"react";import{isMobile as d}from"react-device-detect";import{styled as h}from"styled-components";import{a as m,T as u}from"./ModalHeader-D5psNgrf.mjs";import p from"@heroicons/react/24/outline/CheckIcon";import{C as g}from"./copy-Bx2Jwc5_.mjs";import{L as w}from"./Link-DJ5gq9Di.mjs";import{Q as f}from"./QrCode-Bp7vKyXB.mjs";import{E as y}from"./EmailInputForm-Dgoii4vf.mjs";import{u as v,q as b}from"./context-Bu4xmqpC.mjs";import{u as C}from"./useI18n-CD7HCIxK.mjs";import{M as x,q as _,d as k,e as L,K as W,V as T,w as z,S}from"./useActiveWallet-RUYo4pXO.mjs";import{u as A,P as E,b as j}from"./internal-context-e-Eni5bG.mjs";import{W as K}from"./WalletCards-DH1rqayz.mjs";import{W as B,h as q}from"./prepareFundingModalData-CRrWM52E.mjs";import{S as I}from"./Screen-q8npRQhQ.mjs";let O=h.button`
2
2
  display: flex;
3
3
  align-items: center;
4
4
  gap: 0.5rem;
@@ -1,4 +1,4 @@
1
- import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import{useRef as o,useEffect as a,useState as i,useCallback as r}from"react";import{isMobile as c}from"react-device-detect";import{styled as l}from"styled-components";import{a as s,S as d,W as m,B as u,b as p}from"./index-B2ZHk27q.mjs";import{L as g}from"./Link-DJ5gq9Di.mjs";import{u as w,q as h}from"./context-BuN0M_vH.mjs";import{u as S}from"./useI18n-CS_dxsYR.mjs";import{C as y,P as f,d as C}from"./prepareFundingModalData-BHP1zZ9a.mjs";import{Q as b,k as v,T}from"./useActiveWallet-BY2wKTVp.mjs";import{isHex as _,getAddress as E}from"viem";import{b as R,u as k,k as A}from"./internal-context-e-Eni5bG.mjs";import{u as W,a as I}from"./get-is-unified-wallet-DF10lirM.mjs";import{s as L}from"./shouldProceedtoEmbeddedWalletCreationFlow-Z89kclWd.mjs";import{c as j,e as U}from"./usePrivy-DQKLhXbj.mjs";import{S as O}from"./ScreenLayout-DptX1e0c.mjs";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"eventemitter3";import"./useWallets-DTjrHNDw.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"viem/utils";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"@scure/base";import"./events-context-CI0iqAXA.mjs";import"zustand";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./getPublicClient-A9RSftUZ.mjs";import"ofetch";import"js-cookie";import"./frame-CwE9r3cT.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-eEm9Olt_.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"tinycolor2";import"./ModalHeader-B32Zin0a.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-DHkF35VN.mjs";import"./index-Dq_xe9dz.mjs";const M=e=>{let t=localStorage.getItem("-walletlink:https://www.walletlink.org:Addresses")?.split(" ").filter((e=>_(e,{strict:!0}))).map((e=>E(e)));return!!t?.length&&!!e?.linkedAccounts.filter((e=>"wallet"==e.type&&t.includes(e.address))).length};const N=e=>e?.privyErrorCode===R.LINKED_TO_ANOTHER_USER?y.ERROR_USER_EXISTS:e instanceof f&&!e.details.default?e.details:e instanceof C?y.ERROR_TIMED_OUT:e?.privyErrorCode===R.CANNOT_LINK_MORE_OF_TYPE?y.ERROR_USER_LIMIT_REACHED:y.ERROR_WALLET_CONNECTION,x=({walletLogo:o,title:a,subtitle:i,signSuccess:r,errorMessage:c,connectSuccess:l,separateConnectAndSign:s,signing:d,walletConnectRedirectUri:m,walletConnectFallbackUniversalUri:u,hasTabbedAway:p,showCoinbaseWalletResetCta:w,numRetries:h,onBack:f,onSign:C,onRetry:b,onCoinbaseReset:v,onDifferentWallet:T})=>{let{t:_}=S(),E=w?{label:"Use a different wallet",onClick:v,disabled:r}:c===y.ERROR_USER_EXISTS&&f?{label:"Use a different wallet",onClick:T}:l&&!r&&s?{label:d?"Signing":"Sign with your wallet",onClick:C,disabled:d}:!r&&c?.retryable&&h<2?{label:"Retry",onClick:b,disabled:!1}:r||c?void 0:{label:_("connectionStatus.connecting"),onClick:()=>{},disabled:!0};/*#__PURE__*/return e(O,{title:a,subtitle:i,icon:o,iconVariant:"loading",iconLoadingStatus:{success:r,fail:!!c},primaryCta:E,onBack:f,watermark:!0,children:!l&&m&&!p&&/*#__PURE__*/t(B,{children:[_("connectionStatus.stillHere")," ",/*#__PURE__*/e(g,{href:m,target:"_blank",variant:"underlined",size:"sm",children:_("connectionStatus.tryConnectingAgain")}),u&&/*#__PURE__*/t(n,{children:[" ",_("connectionStatus.or")," ",/*#__PURE__*/e(g,{href:u,target:"_blank",variant:"underlined",size:"sm",children:_("connectionStatus.useDifferentLink")})]})]})})},D={component:()=>{let t,[n,l]=i(!1),[g,f]=i(!1),[C,_]=i(void 0),{authenticated:E,logout:O}=W(),{navigate:D,navigateBack:B,lastScreen:F,currentScreen:P,setModalData:q,data:H}=I(),X=w(),{t:z}=S(),{getAuthFlow:Q,walletConnectionStatus:Y,closePrivyModal:J,initLoginWithWallet:K,loginWithWallet:V,updateWallets:$,createAnalyticsEvent:G}=k(),{walletConnectors:Z}=W(),[ee,te]=i(0),{user:ne}=W(),oe=j(),[ae]=i(ne?.linkedAccounts.length||0),[ie,re]=i(""),[ce,le]=i(""),[se,de]=i(!1),{hasTabbedAway:me}=function(){let[e,t]=i(!1),n=r((()=>{document.hidden&&t(!0)}),[]);return a((()=>(document.addEventListener("visibilitychange",n),()=>document.removeEventListener("visibilitychange",n))),[n]),{hasTabbedAway:e,reset:()=>t(!1)}}(),{enabled:ue,token:pe}=s(),ge=b(Y?.connector?.walletClientType||"unknown"),we=c&&"wallet_connect_v2"===Y?.connector?.connectorType||c&&"coinbase_wallet"===Y?.connector?.connectorType||c&&"base_account"===Y?.connector?.connectorType||c&&"injected"===Y?.connector?.connectorType&&"phantom"===Y?.connector?.walletClientType||c&&"solana_adapter"===Y?.connector?.connectorType&&"mobile_wallet_adapter"===Y.connector.walletClientType,he="connected"===Y?.status,Se="switching_to_supported_chain"===Y?.status;a((()=>{let e=Q(),t=e instanceof p||e instanceof d?e:void 0;he&&"solana"===Y.connector?.chainType&&"phantom"===Y.connector?.walletClientType&&oe(U)&&void 0===H?.login?.isSigningInWithLedgerSolana?D("ConnectLedgerScreen",!1):(he&&!t&&(!ue||pe||E?K(Y.connectedWallet,pe,H?.login?.disableSignup,H?.login?.isSigningInWithLedgerSolana?"transaction":"plain").then((()=>{de(!0)})):(q({captchaModalData:{callback:e=>K(Y.connectedWallet,e,H?.login?.disableSignup,H?.login?.isSigningInWithLedgerSolana?"transaction":"plain").then((()=>{de(!0)})),userIntentRequired:!1,onSuccessNavigateTo:"ConnectionStatusScreen",onErrorNavigateTo:"ErrorScreen"}}),D("CaptchaScreen",!1))),t instanceof d&&H?.login?.isSigningInWithLedgerSolana&&(t.messageType="transaction"),t&&we&&he&&!t.preparedMessage?t.buildMessage():t&&!we&&he&&(g||(async()=>{f(!0),_(void 0);try{"wallet_connect_v2"===Y?.connector?.connectorType&&"metamask"===Y?.connector?.walletClientType&&await v(2500),await fe()}catch(e){console.warn("Auto-prompted signature failed",e)}finally{f(!1)}})()))}),[ee,he,se]),a((()=>{if(ne&&n){let e=h-500;if(X?.legal.requireUsersAcceptTerms&&!ne.hasAcceptedTerms){let t=setTimeout((()=>{D("AffirmativeConsentScreen")}),e);return()=>clearTimeout(t)}if(L(ne,X.embeddedWallets)){let t=setTimeout((()=>{q({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),G({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"ConnectionStatusScreen"}}),O()},callAuthOnSuccessOnClose:!0}}),D("EmbeddedWalletOnAccountCreateScreen")}),e);return()=>clearTimeout(t)}$();let t=setTimeout((()=>J({shouldCallAuthOnSuccess:!0,isSuccess:!0})),h);return()=>clearTimeout(t)}}),[ne,n]);let ye=e=>{if(e?.privyErrorCode!==R.ALLOWLIST_REJECTED){if(e?.privyErrorCode===R.USER_LIMIT_REACHED)return console.error(new A(e).toString()),void D("UserLimitReachedScreen");if(e?.privyErrorCode!==R.USER_DOES_NOT_EXIST)return e?.privyErrorCode===R.ACCOUNT_TRANSFER_REQUIRED&&e.data?.data?.nonce?(q({accountTransfer:{nonce:e.data?.data?.nonce,account:Q()?.meta.address,displayName:e.data?.data?.account?.displayName,externalWalletMetadata:{walletClientType:Q()?.meta.walletClientType,chainId:Q()?.meta.chainId,connectorType:Q()?.meta.connectorType},linkMethod:Q()instanceof p?"siwe":"siws",embeddedWalletAddress:e.data?.data?.otherUser?.embeddedWalletAddress}}),void D("LinkConflictScreen")):void _(N(e));D("AccountNotFoundScreen")}else D("AllowlistRejectionScreen")};async function fe(){try{await V(),l(!0)}catch(e){ye(e)}finally{f(!1)}}a((()=>{Y?.connectError&&ye(Y?.connectError)}),[Y]),((e,t)=>{let n=o((()=>{}));a((()=>{n.current=e})),a((()=>{if(null!==t){let e=setInterval((()=>n.current()),t||0);return()=>clearInterval(e)}}),[t])})((()=>{let e="wallet_connect_v2"===Ce&&Y?.connector instanceof m?Y.connector.redirectUri:void 0;e&&re(e);let t="wallet_connect_v2"===Ce&&Y?.connector instanceof m?Y.connector.fallbackUniversalRedirectUri:void 0;t&&le(t)}),Y?.connector instanceof m&&!ie?500:null);let Ce=Y?.connector?.connectorType||"injected",be=Y?.connector?.walletClientType||"unknown",ve=ge?.metadata?.shortName||ge?.name||Y?.connector?.walletBranding.name||"Browser Extension",Te=ge?.image_url?.md||Y?.connector?.walletBranding.icon||(t=>/*#__PURE__*/e(u,{...t})),_e="Browser Extension"===ve?ve.toLowerCase():ve;t=n?z("connectionStatus.successfullyConnected",{walletName:_e}):C?z("connectionStatus.errorTitle",{errorMessage:C.message}):Se?"Switching networks":he?g&&we?"Signing":"Sign to verify":`Waiting for ${_e}`;let Ee=z("connectionStatus.checkOtherWindows");n?Ee=ae===(ne?.linkedAccounts.length||0)?"Wallet was already linked.":"You're good to go!":ee>=2&&C?Ee="Unable to connect wallet":C?Ee=C.detail:Se?Ee="Switch your wallet to the requested network.":he&&we?Ee="Sign the message in your wallet to verify it belongs to you.":"metamask"===be&&c?Ee="Click continue to open and connect MetaMask.":"metamask"===be?Ee="For the best experience, connect only one wallet at a time.":"wallet_connect"===Ce?Ee="Open your mobile wallet app to continue":"coinbase_wallet"===Ce?T()||(Ee=M(ne)?"Continue with the Coinbase app. Not the right wallet? Reset your connection below.":"Confirm in the Coinbase app/popup to continue."):H?.login?.isSigningInWithLedgerSolana&&(Ee="Ledger requires a transaction to verify your identity. You'll sign a transaction that performs no onchain action.");let Re=Z?.walletConnectors?.find((e=>"coinbase_wallet"===e.walletClientType)),ke="coinbase_wallet"===be&&(M(ne)||C===y.ERROR_USER_EXISTS);/*#__PURE__*/return e(x,{walletLogo:Te,title:t,subtitle:Ee,signSuccess:n,errorMessage:C,connectSuccess:he,separateConnectAndSign:we,signing:g,walletConnectRedirectUri:ie,walletConnectFallbackUniversalUri:ce,hasTabbedAway:me,showCoinbaseWalletResetCta:ke,numRetries:ee,onBack:F&&P!==F?B:void 0,onSign:()=>{f(!0),fe()},onRetry:()=>{te(ee+1),_(void 0),he?(f(!0),fe()):Y?.connectRetry()},onCoinbaseReset:()=>{Re&&Re?.disconnect()},onDifferentWallet:B})}};let B=l.p`
1
+ import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import{useRef as o,useEffect as a,useState as i,useCallback as r}from"react";import{isMobile as c}from"react-device-detect";import{styled as l}from"styled-components";import{a as s,S as d,W as m,B as u,b as p}from"./index-ygZBlWlm.mjs";import{L as g}from"./Link-DJ5gq9Di.mjs";import{u as w,q as h}from"./context-Bu4xmqpC.mjs";import{u as S}from"./useI18n-CD7HCIxK.mjs";import{C as y,P as f,d as C}from"./prepareFundingModalData-CRrWM52E.mjs";import{Q as b,k as v,T}from"./useActiveWallet-RUYo4pXO.mjs";import{isHex as _,getAddress as E}from"viem";import{b as R,u as k,k as A}from"./internal-context-e-Eni5bG.mjs";import{u as W,a as I}from"./get-is-unified-wallet-CvIzjbW7.mjs";import{s as L}from"./shouldProceedtoEmbeddedWalletCreationFlow-D0uaMzCB.mjs";import{c as j,e as U}from"./usePrivy-Bn7q4pcu.mjs";import{S as O}from"./ScreenLayout-DIdy7nhJ.mjs";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"eventemitter3";import"./useWallets-BkIu5vyx.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"viem/utils";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"@scure/base";import"./events-context-CI0iqAXA.mjs";import"zustand";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./getPublicClient-A9RSftUZ.mjs";import"ofetch";import"js-cookie";import"./frame-CwE9r3cT.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-eEm9Olt_.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"tinycolor2";import"./ModalHeader-D5psNgrf.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-q8npRQhQ.mjs";import"./index-Dq_xe9dz.mjs";const M=e=>{let t=localStorage.getItem("-walletlink:https://www.walletlink.org:Addresses")?.split(" ").filter((e=>_(e,{strict:!0}))).map((e=>E(e)));return!!t?.length&&!!e?.linkedAccounts.filter((e=>"wallet"==e.type&&t.includes(e.address))).length};const N=e=>e?.privyErrorCode===R.LINKED_TO_ANOTHER_USER?y.ERROR_USER_EXISTS:e instanceof f&&!e.details.default?e.details:e instanceof C?y.ERROR_TIMED_OUT:e?.privyErrorCode===R.CANNOT_LINK_MORE_OF_TYPE?y.ERROR_USER_LIMIT_REACHED:y.ERROR_WALLET_CONNECTION,x=({walletLogo:o,title:a,subtitle:i,signSuccess:r,errorMessage:c,connectSuccess:l,separateConnectAndSign:s,signing:d,walletConnectRedirectUri:m,walletConnectFallbackUniversalUri:u,hasTabbedAway:p,showCoinbaseWalletResetCta:w,numRetries:h,onBack:f,onSign:C,onRetry:b,onCoinbaseReset:v,onDifferentWallet:T})=>{let{t:_}=S(),E=w?{label:"Use a different wallet",onClick:v,disabled:r}:c===y.ERROR_USER_EXISTS&&f?{label:"Use a different wallet",onClick:T}:l&&!r&&s?{label:d?"Signing":"Sign with your wallet",onClick:C,disabled:d}:!r&&c?.retryable&&h<2?{label:"Retry",onClick:b,disabled:!1}:r||c?void 0:{label:_("connectionStatus.connecting"),onClick:()=>{},disabled:!0};/*#__PURE__*/return e(O,{title:a,subtitle:i,icon:o,iconVariant:"loading",iconLoadingStatus:{success:r,fail:!!c},primaryCta:E,onBack:f,watermark:!0,children:!l&&m&&!p&&/*#__PURE__*/t(B,{children:[_("connectionStatus.stillHere")," ",/*#__PURE__*/e(g,{href:m,target:"_blank",variant:"underlined",size:"sm",children:_("connectionStatus.tryConnectingAgain")}),u&&/*#__PURE__*/t(n,{children:[" ",_("connectionStatus.or")," ",/*#__PURE__*/e(g,{href:u,target:"_blank",variant:"underlined",size:"sm",children:_("connectionStatus.useDifferentLink")})]})]})})},D={component:()=>{let t,[n,l]=i(!1),[g,f]=i(!1),[C,_]=i(void 0),{authenticated:E,logout:O}=W(),{navigate:D,navigateBack:B,lastScreen:F,currentScreen:P,setModalData:q,data:H}=I(),X=w(),{t:z}=S(),{getAuthFlow:Q,walletConnectionStatus:Y,closePrivyModal:J,initLoginWithWallet:K,loginWithWallet:V,updateWallets:$,createAnalyticsEvent:G}=k(),{walletConnectors:Z}=W(),[ee,te]=i(0),{user:ne}=W(),oe=j(),[ae]=i(ne?.linkedAccounts.length||0),[ie,re]=i(""),[ce,le]=i(""),[se,de]=i(!1),{hasTabbedAway:me}=function(){let[e,t]=i(!1),n=r((()=>{document.hidden&&t(!0)}),[]);return a((()=>(document.addEventListener("visibilitychange",n),()=>document.removeEventListener("visibilitychange",n))),[n]),{hasTabbedAway:e,reset:()=>t(!1)}}(),{enabled:ue,token:pe}=s(),ge=b(Y?.connector?.walletClientType||"unknown"),we=c&&"wallet_connect_v2"===Y?.connector?.connectorType||c&&"coinbase_wallet"===Y?.connector?.connectorType||c&&"base_account"===Y?.connector?.connectorType||c&&"injected"===Y?.connector?.connectorType&&"phantom"===Y?.connector?.walletClientType||c&&"solana_adapter"===Y?.connector?.connectorType&&"mobile_wallet_adapter"===Y.connector.walletClientType,he="connected"===Y?.status,Se="switching_to_supported_chain"===Y?.status;a((()=>{let e=Q(),t=e instanceof p||e instanceof d?e:void 0;he&&"solana"===Y.connector?.chainType&&"phantom"===Y.connector?.walletClientType&&oe(U)&&void 0===H?.login?.isSigningInWithLedgerSolana?D("ConnectLedgerScreen",!1):(he&&!t&&(!ue||pe||E?K(Y.connectedWallet,pe,H?.login?.disableSignup,H?.login?.isSigningInWithLedgerSolana?"transaction":"plain").then((()=>{de(!0)})):(q({captchaModalData:{callback:e=>K(Y.connectedWallet,e,H?.login?.disableSignup,H?.login?.isSigningInWithLedgerSolana?"transaction":"plain").then((()=>{de(!0)})),userIntentRequired:!1,onSuccessNavigateTo:"ConnectionStatusScreen",onErrorNavigateTo:"ErrorScreen"}}),D("CaptchaScreen",!1))),t instanceof d&&H?.login?.isSigningInWithLedgerSolana&&(t.messageType="transaction"),t&&we&&he&&!t.preparedMessage?t.buildMessage():t&&!we&&he&&(g||(async()=>{f(!0),_(void 0);try{"wallet_connect_v2"===Y?.connector?.connectorType&&"metamask"===Y?.connector?.walletClientType&&await v(2500),await fe()}catch(e){console.warn("Auto-prompted signature failed",e)}finally{f(!1)}})()))}),[ee,he,se]),a((()=>{if(ne&&n){let e=h-500;if(X?.legal.requireUsersAcceptTerms&&!ne.hasAcceptedTerms){let t=setTimeout((()=>{D("AffirmativeConsentScreen")}),e);return()=>clearTimeout(t)}if(L(ne,X.embeddedWallets)){let t=setTimeout((()=>{q({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),G({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"ConnectionStatusScreen"}}),O()},callAuthOnSuccessOnClose:!0}}),D("EmbeddedWalletOnAccountCreateScreen")}),e);return()=>clearTimeout(t)}$();let t=setTimeout((()=>J({shouldCallAuthOnSuccess:!0,isSuccess:!0})),h);return()=>clearTimeout(t)}}),[ne,n]);let ye=e=>{if(e?.privyErrorCode!==R.ALLOWLIST_REJECTED){if(e?.privyErrorCode===R.USER_LIMIT_REACHED)return console.error(new A(e).toString()),void D("UserLimitReachedScreen");if(e?.privyErrorCode!==R.USER_DOES_NOT_EXIST)return e?.privyErrorCode===R.ACCOUNT_TRANSFER_REQUIRED&&e.data?.data?.nonce?(q({accountTransfer:{nonce:e.data?.data?.nonce,account:Q()?.meta.address,displayName:e.data?.data?.account?.displayName,externalWalletMetadata:{walletClientType:Q()?.meta.walletClientType,chainId:Q()?.meta.chainId,connectorType:Q()?.meta.connectorType},linkMethod:Q()instanceof p?"siwe":"siws",embeddedWalletAddress:e.data?.data?.otherUser?.embeddedWalletAddress}}),void D("LinkConflictScreen")):void _(N(e));D("AccountNotFoundScreen")}else D("AllowlistRejectionScreen")};async function fe(){try{await V(),l(!0)}catch(e){ye(e)}finally{f(!1)}}a((()=>{Y?.connectError&&ye(Y?.connectError)}),[Y]),((e,t)=>{let n=o((()=>{}));a((()=>{n.current=e})),a((()=>{if(null!==t){let e=setInterval((()=>n.current()),t||0);return()=>clearInterval(e)}}),[t])})((()=>{let e="wallet_connect_v2"===Ce&&Y?.connector instanceof m?Y.connector.redirectUri:void 0;e&&re(e);let t="wallet_connect_v2"===Ce&&Y?.connector instanceof m?Y.connector.fallbackUniversalRedirectUri:void 0;t&&le(t)}),Y?.connector instanceof m&&!ie?500:null);let Ce=Y?.connector?.connectorType||"injected",be=Y?.connector?.walletClientType||"unknown",ve=ge?.metadata?.shortName||ge?.name||Y?.connector?.walletBranding.name||"Browser Extension",Te=ge?.image_url?.md||Y?.connector?.walletBranding.icon||(t=>/*#__PURE__*/e(u,{...t})),_e="Browser Extension"===ve?ve.toLowerCase():ve;t=n?z("connectionStatus.successfullyConnected",{walletName:_e}):C?z("connectionStatus.errorTitle",{errorMessage:C.message}):Se?"Switching networks":he?g&&we?"Signing":"Sign to verify":`Waiting for ${_e}`;let Ee=z("connectionStatus.checkOtherWindows");n?Ee=ae===(ne?.linkedAccounts.length||0)?"Wallet was already linked.":"You're good to go!":ee>=2&&C?Ee="Unable to connect wallet":C?Ee=C.detail:Se?Ee="Switch your wallet to the requested network.":he&&we?Ee="Sign the message in your wallet to verify it belongs to you.":"metamask"===be&&c?Ee="Click continue to open and connect MetaMask.":"metamask"===be?Ee="For the best experience, connect only one wallet at a time.":"wallet_connect"===Ce?Ee="Open your mobile wallet app to continue":"coinbase_wallet"===Ce?T()||(Ee=M(ne)?"Continue with the Coinbase app. Not the right wallet? Reset your connection below.":"Confirm in the Coinbase app/popup to continue."):H?.login?.isSigningInWithLedgerSolana&&(Ee="Ledger requires a transaction to verify your identity. You'll sign a transaction that performs no onchain action.");let Re=Z?.walletConnectors?.find((e=>"coinbase_wallet"===e.walletClientType)),ke="coinbase_wallet"===be&&(M(ne)||C===y.ERROR_USER_EXISTS);/*#__PURE__*/return e(x,{walletLogo:Te,title:t,subtitle:Ee,signSuccess:n,errorMessage:C,connectSuccess:he,separateConnectAndSign:we,signing:g,walletConnectRedirectUri:ie,walletConnectFallbackUniversalUri:ce,hasTabbedAway:me,showCoinbaseWalletResetCta:ke,numRetries:ee,onBack:F&&P!==F?B:void 0,onSign:()=>{f(!0),fe()},onRetry:()=>{te(ee+1),_(void 0),he?(f(!0),fe()):Y?.connectRetry()},onCoinbaseReset:()=>{Re&&Re?.disconnect()},onDifferentWallet:B})}};let B=l.p`
2
2
  text-align: center;
3
3
  color: var(--privy-color-foreground-2);
4
4
  font-size: 14px;
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{useMemo as t,useState as o,useEffect as r}from"react";import{u as a,q as i}from"./context-BuN0M_vH.mjs";import{R as s}from"./index-B2ZHk27q.mjs";import{u as n,a as c,e as p,b as l}from"./internal-context-e-Eni5bG.mjs";import{a as m}from"./get-is-unified-wallet-DF10lirM.mjs";import{z as d}from"./useActiveWallet-BY2wKTVp.mjs";import{s as u}from"./shouldProceedtoEmbeddedWalletCreationFlow-Z89kclWd.mjs";import{S as f}from"./ScreenLayout-DptX1e0c.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"uuid";import"jose";import"eventemitter3";import"./useWallets-DTjrHNDw.mjs";import"./prepareFundingModalData-BHP1zZ9a.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"react-device-detect";import"viem/utils";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-DQKLhXbj.mjs";import"./events-context-CI0iqAXA.mjs";import"@scure/base";import"styled-components";import"zustand";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"viem";import"./getPublicClient-A9RSftUZ.mjs";import"ofetch";import"js-cookie";import"./frame-CwE9r3cT.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-eEm9Olt_.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./ModalHeader-B32Zin0a.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-DHkF35VN.mjs";import"./index-Dq_xe9dz.mjs";const h=({providerApp:o,success:r,error:a,onClose:i})=>{let{title:s,subtitle:n}=t((()=>r?{title:`Successfully connected with ${o.name}`,subtitle:"You're good to go!"}:a?{title:"Authentication failed",subtitle:a.message}:{title:`Connecting to ${o.name}`,subtitle:`Please check the pop-up from ${o.name} to continue`}),[r,a,o.name]);/*#__PURE__*/return e(f,{title:s,subtitle:n,icon:o.logoUrl,iconVariant:"loading",iconLoadingStatus:{success:r,fail:!!a},onBack:i,watermark:!0})},g={component:()=>{let t=a(),{data:f,navigate:g,setModalData:v,onUserCloseViaDialogOrKeybindRef:A}=m(),{crossAppAuthFlow:y,updateWallets:j,closePrivyModal:b,createAnalyticsEvent:S}=n(),{logout:w}=d(),[C,I]=o({}),T=f?.crossAppAuth,U=new c(`There was an issue connecting your ${T?.name} account. Please try again.`),k=new s((async e=>{if(T?.popup)try{let t=await y({appId:e,popup:T.popup,action:T.action,disableSignup:T.disableSignup});I({data:t})}catch(e){if(e instanceof c)I({error:e});else if(e instanceof p){if(e.privyErrorCode===l.ACCOUNT_TRANSFER_REQUIRED&&e.data?.data?.nonce)return v({accountTransfer:{nonce:e.data?.data?.nonce,account:e.data?.data?.subject,displayName:e.data?.data?.account?.displayName,linkMethod:`privy:${T.appId}`,embeddedWalletAddress:e.data?.data?.otherUser?.embeddedWalletAddress,oAuthUserInfo:e.data?.data?.otherUser?.oAuthUserInfo}}),void g("LinkConflictScreen");T.popup&&T.popup.close(),I({error:U})}else I({error:U})}else I({error:U})})),W=()=>{C.data&&(j(),T?.onSuccess(C.data),b({shouldCallAuthOnSuccess:!0,isSuccess:!0})),T?.onError(C.error??new c("User canceled flow")),b({shouldCallAuthOnSuccess:!1,isSuccess:!1})};return A.current=W,r((()=>{T?.appId?.length&&k.execute(T.appId)}),[T?.appId]),r((()=>{if(!C.data)return;let e=C.data;if(t.legal.requireUsersAcceptTerms&&!e.hasAcceptedTerms){let e=setTimeout((()=>{g("AffirmativeConsentScreen")}),i);return()=>clearTimeout(e)}if(u(e,t.embeddedWallets)){let e=setTimeout((()=>{v({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),S({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,provider:`privy:${T?.appId}`,screen:"CrossAppAuthScreen"}}),w()},callAuthOnSuccessOnClose:!0}}),g("EmbeddedWalletOnAccountCreateScreen")}),i);return()=>clearTimeout(e)}let o=setTimeout(W,i);return()=>clearTimeout(o)}),[C.data]),T?.appId?/*#__PURE__*/e(h,{providerApp:{id:T?.appId,logoUrl:T?.logoUrl,name:T?.name},success:!!C.data,error:C.error,onClose:W}):(console.warn("Missing data for Screen"),null)},isShownBeforeReady:!0};export{g as CrossAppAuthScreen,h as CrossAppAuthScreenView,g as default};
1
+ import{jsx as e}from"react/jsx-runtime";import{useMemo as t,useState as o,useEffect as r}from"react";import{u as a,q as i}from"./context-Bu4xmqpC.mjs";import{R as s}from"./index-ygZBlWlm.mjs";import{u as n,a as c,e as p,b as l}from"./internal-context-e-Eni5bG.mjs";import{a as m}from"./get-is-unified-wallet-CvIzjbW7.mjs";import{z as d}from"./useActiveWallet-RUYo4pXO.mjs";import{s as u}from"./shouldProceedtoEmbeddedWalletCreationFlow-D0uaMzCB.mjs";import{S as f}from"./ScreenLayout-DIdy7nhJ.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"uuid";import"jose";import"eventemitter3";import"./useWallets-BkIu5vyx.mjs";import"./prepareFundingModalData-CRrWM52E.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"react-device-detect";import"viem/utils";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-Bn7q4pcu.mjs";import"./events-context-CI0iqAXA.mjs";import"@scure/base";import"styled-components";import"zustand";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"viem";import"./getPublicClient-A9RSftUZ.mjs";import"ofetch";import"js-cookie";import"./frame-CwE9r3cT.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-eEm9Olt_.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./ModalHeader-D5psNgrf.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-q8npRQhQ.mjs";import"./index-Dq_xe9dz.mjs";const h=({providerApp:o,success:r,error:a,onClose:i})=>{let{title:s,subtitle:n}=t((()=>r?{title:`Successfully connected with ${o.name}`,subtitle:"You're good to go!"}:a?{title:"Authentication failed",subtitle:a.message}:{title:`Connecting to ${o.name}`,subtitle:`Please check the pop-up from ${o.name} to continue`}),[r,a,o.name]);/*#__PURE__*/return e(f,{title:s,subtitle:n,icon:o.logoUrl,iconVariant:"loading",iconLoadingStatus:{success:r,fail:!!a},onBack:i,watermark:!0})},g={component:()=>{let t=a(),{data:f,navigate:g,setModalData:v,onUserCloseViaDialogOrKeybindRef:A}=m(),{crossAppAuthFlow:y,updateWallets:j,closePrivyModal:b,createAnalyticsEvent:S}=n(),{logout:w}=d(),[C,I]=o({}),T=f?.crossAppAuth,U=new c(`There was an issue connecting your ${T?.name} account. Please try again.`),k=new s((async e=>{if(T?.popup)try{let t=await y({appId:e,popup:T.popup,action:T.action,disableSignup:T.disableSignup});I({data:t})}catch(e){if(e instanceof c)I({error:e});else if(e instanceof p){if(e.privyErrorCode===l.ACCOUNT_TRANSFER_REQUIRED&&e.data?.data?.nonce)return v({accountTransfer:{nonce:e.data?.data?.nonce,account:e.data?.data?.subject,displayName:e.data?.data?.account?.displayName,linkMethod:`privy:${T.appId}`,embeddedWalletAddress:e.data?.data?.otherUser?.embeddedWalletAddress,oAuthUserInfo:e.data?.data?.otherUser?.oAuthUserInfo}}),void g("LinkConflictScreen");T.popup&&T.popup.close(),I({error:U})}else I({error:U})}else I({error:U})})),W=()=>{C.data&&(j(),T?.onSuccess(C.data),b({shouldCallAuthOnSuccess:!0,isSuccess:!0})),T?.onError(C.error??new c("User canceled flow")),b({shouldCallAuthOnSuccess:!1,isSuccess:!1})};return A.current=W,r((()=>{T?.appId?.length&&k.execute(T.appId)}),[T?.appId]),r((()=>{if(!C.data)return;let e=C.data;if(t.legal.requireUsersAcceptTerms&&!e.hasAcceptedTerms){let e=setTimeout((()=>{g("AffirmativeConsentScreen")}),i);return()=>clearTimeout(e)}if(u(e,t.embeddedWallets)){let e=setTimeout((()=>{v({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),S({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,provider:`privy:${T?.appId}`,screen:"CrossAppAuthScreen"}}),w()},callAuthOnSuccessOnClose:!0}}),g("EmbeddedWalletOnAccountCreateScreen")}),i);return()=>clearTimeout(e)}let o=setTimeout(W,i);return()=>clearTimeout(o)}),[C.data]),T?.appId?/*#__PURE__*/e(h,{providerApp:{id:T?.appId,logoUrl:T?.logoUrl,name:T?.name},success:!!C.data,error:C.error,onClose:W}):(console.warn("Missing data for Screen"),null)},isShownBeforeReady:!0};export{g as CrossAppAuthScreen,h as CrossAppAuthScreenView,g as default};
@@ -1,4 +1,4 @@
1
- import{jsx as e,jsxs as t,Fragment as i}from"react/jsx-runtime";import a from"@heroicons/react/24/outline/UserCircleIcon";import l,{useState as r,useEffect as n,useRef as o,useMemo as s}from"react";import{styled as c}from"styled-components";import{T as d,M as p,B as h}from"./ModalHeader-B32Zin0a.mjs";import{u}from"./context-BuN0M_vH.mjs";import{U as g,G as m,H as f,V as y,F as w,W as v,X as C,Y as b,e as k,Z as S,d as T,_ as M,$ as x,a0 as A}from"./useActiveWallet-BY2wKTVp.mjs";import{u as L}from"./internal-context-e-Eni5bG.mjs";import{u as W,a as E,i as I}from"./get-is-unified-wallet-DF10lirM.mjs";import{a as P,t as N}from"./index-B2ZHk27q.mjs";import{u as j,c as D,d as O}from"./ConnectWalletView-DIPHDDCY.mjs";import{Mail as R,Smartphone as _,UserCircle as V}from"lucide-react";import{C as U}from"./ConnectEmailForm-DYREF18y.mjs";import{C as F}from"./Chip-D2-wZOHJ.mjs";import{F as $}from"./farcaster-DPlSjvF5.mjs";import{toObjectKeys as z}from"@privy-io/js-sdk-core";import H from"@heroicons/react/24/outline/QuestionMarkCircleIcon";import G from"@heroicons/react/24/outline/FingerPrintIcon";import{L as q}from"./Link-DJ5gq9Di.mjs";import{C as B}from"./ConnectPhoneForm-Qkb8rJwn.mjs";import{T as Z,a as K,I as J,S as Q,L as X,G as Y,b as ee,D as te,A as ie}from"./twitter-BoAxhlj6.mjs";import{T as ae,L as le}from"./twitch-5IOe4sIQ.mjs";import{T as re}from"./telegram-B-JqnkqZ.mjs";import{W as ne}from"./WalletOverflowButton-BHHEaMnB.mjs";import{S as oe}from"./ScreenLayout-DptX1e0c.mjs";const se=()=>{let t=u(),i=t?.appearance?.logo,a=`${t?.name} logo`,r={maxHeight:"90px",maxWidth:"180px"};return i?"string"==typeof i?/*#__PURE__*/e("img",{src:i,alt:a,style:r}):"svg"===i.type||"img"===i.type?/*#__PURE__*/l.cloneElement(i,{alt:a,style:r}):(console.warn("`config.appearance.logo` must be a string, or an SVG / IMG element. Nothing will be rendered."),null):null},ce=c.div`
1
+ import{jsx as e,jsxs as t,Fragment as i}from"react/jsx-runtime";import a from"@heroicons/react/24/outline/UserCircleIcon";import l,{useState as r,useEffect as n,useRef as o,useMemo as s}from"react";import{styled as c}from"styled-components";import{T as d,M as p,B as h}from"./ModalHeader-D5psNgrf.mjs";import{u}from"./context-Bu4xmqpC.mjs";import{U as g,G as m,H as f,V as y,F as w,W as v,X as C,Y as b,e as k,Z as S,d as T,_ as M,$ as x,a0 as A}from"./useActiveWallet-RUYo4pXO.mjs";import{u as L}from"./internal-context-e-Eni5bG.mjs";import{u as W,a as E,i as I}from"./get-is-unified-wallet-CvIzjbW7.mjs";import{a as P,t as N}from"./index-ygZBlWlm.mjs";import{u as j,c as D,d as O}from"./ConnectWalletView-CduRtfEz.mjs";import{Mail as R,Smartphone as _,UserCircle as V}from"lucide-react";import{C as U}from"./ConnectEmailForm-DjET3G-q.mjs";import{C as F}from"./Chip-D2-wZOHJ.mjs";import{F as $}from"./farcaster-DPlSjvF5.mjs";import{toObjectKeys as z}from"@privy-io/js-sdk-core";import H from"@heroicons/react/24/outline/QuestionMarkCircleIcon";import G from"@heroicons/react/24/outline/FingerPrintIcon";import{L as q}from"./Link-DJ5gq9Di.mjs";import{C as B}from"./ConnectPhoneForm-CYfqSIAI.mjs";import{T as Z,a as K,I as J,S as Q,L as X,G as Y,b as ee,D as te,A as ie}from"./twitter-BoAxhlj6.mjs";import{T as ae,L as le}from"./twitch-5IOe4sIQ.mjs";import{T as re}from"./telegram-B-JqnkqZ.mjs";import{W as ne}from"./WalletOverflowButton-DWdepzzi.mjs";import{S as oe}from"./ScreenLayout-DIdy7nhJ.mjs";const se=()=>{let t=u(),i=t?.appearance?.logo,a=`${t?.name} logo`,r={maxHeight:"90px",maxWidth:"180px"};return i?"string"==typeof i?/*#__PURE__*/e("img",{src:i,alt:a,style:r}):"svg"===i.type||"img"===i.type?/*#__PURE__*/l.cloneElement(i,{alt:a,style:r}):(console.warn("`config.appearance.logo` must be a string, or an SVG / IMG element. Nothing will be rendered."),null):null},ce=c.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  align-items: center;
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{AlertCircle as t,CheckCircle as o,CloudUpload as r}from"lucide-react";import{useState as i,useEffect as s}from"react";import{W as a}from"./WalletInfoCard-CV_N8dG_.mjs";import{u as n,r as c}from"./context-BuN0M_vH.mjs";import{u as m,a as l}from"./internal-context-e-Eni5bG.mjs";import{a as p}from"./get-is-unified-wallet-DF10lirM.mjs";import{S as u}from"./ScreenLayout-DptX1e0c.mjs";import"styled-components";import"./ModalHeader-B32Zin0a.mjs";import"./useActiveWallet-BY2wKTVp.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-BHP1zZ9a.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-DTjrHNDw.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"./ErrorMessage-D8VaAP5m.mjs";import"./LabelXs-oqZNqbm_.mjs";import"./Address-DCNT9qfI.mjs";import"./shared-FM0rljBt.mjs";import"tinycolor2";import"ofetch";import"./Screen-DHkF35VN.mjs";import"./index-Dq_xe9dz.mjs";const d=({appName:i,address:s,success:n,error:c,onAccept:m,onDecline:l,onClose:p})=>/*#__PURE__*/e(u,n||c?{title:c?"Something went wrong":"Success!",subtitle:c?"Please try again.":`You've successfully granted delegated action permissions to ${i}.`,icon:c?t:o,iconVariant:c?"error":"success",onBack:p,watermark:!0}:{title:"Enable offline access",subtitle:`By confirming, ${i} will be able to use your wallet for you even when you're not around. You can revoke this later.`,icon:r,primaryCta:{label:"Accept",onClick:m},secondaryCta:{label:"Not now",onClick:l},onBack:p,watermark:!0,children:/*#__PURE__*/e(a,{address:s,title:"Wallet"})}),f={component:()=>{let{data:t}=p(),o=n(),{closePrivyModal:r}=m(),[a,u]=i(!1),[f,j]=i(),{address:y,onDelegate:g,onSuccess:h,onError:w}=t.delegatedActions.consent,v=async()=>{a?h():w(f??new l("User declined delegating actions.")),r({shouldCallAuthOnSuccess:!1})};return s((()=>{if(!a&&!f)return;let e=setTimeout(v,c);return()=>clearTimeout(e)}),[a,f]),/*#__PURE__*/e(d,{appName:o.name,address:y,success:a,error:f,onAccept:async()=>{try{await g(),u(!0)}catch(e){j(e)}},onDecline:()=>{v()},onClose:v})}};export{f as DelegatedActionsConsentScreen,d as DelegatedActionsConsentScreenView,f as default};
1
+ import{jsx as e}from"react/jsx-runtime";import{AlertCircle as t,CheckCircle as o,CloudUpload as r}from"lucide-react";import{useState as i,useEffect as s}from"react";import{W as a}from"./WalletInfoCard-BtliVaf0.mjs";import{u as n,r as c}from"./context-Bu4xmqpC.mjs";import{u as m,a as l}from"./internal-context-e-Eni5bG.mjs";import{a as p}from"./get-is-unified-wallet-CvIzjbW7.mjs";import{S as u}from"./ScreenLayout-DIdy7nhJ.mjs";import"styled-components";import"./ModalHeader-D5psNgrf.mjs";import"./useActiveWallet-RUYo4pXO.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-CRrWM52E.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-BkIu5vyx.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"./ErrorMessage-D8VaAP5m.mjs";import"./LabelXs-oqZNqbm_.mjs";import"./Address-BGlhcEcA.mjs";import"./shared-FM0rljBt.mjs";import"tinycolor2";import"ofetch";import"./Screen-q8npRQhQ.mjs";import"./index-Dq_xe9dz.mjs";const d=({appName:i,address:s,success:n,error:c,onAccept:m,onDecline:l,onClose:p})=>/*#__PURE__*/e(u,n||c?{title:c?"Something went wrong":"Success!",subtitle:c?"Please try again.":`You've successfully granted delegated action permissions to ${i}.`,icon:c?t:o,iconVariant:c?"error":"success",onBack:p,watermark:!0}:{title:"Enable offline access",subtitle:`By confirming, ${i} will be able to use your wallet for you even when you're not around. You can revoke this later.`,icon:r,primaryCta:{label:"Accept",onClick:m},secondaryCta:{label:"Not now",onClick:l},onBack:p,watermark:!0,children:/*#__PURE__*/e(a,{address:s,title:"Wallet"})}),f={component:()=>{let{data:t}=p(),o=n(),{closePrivyModal:r}=m(),[a,u]=i(!1),[f,j]=i(),{address:y,onDelegate:g,onSuccess:h,onError:w}=t.delegatedActions.consent,v=async()=>{a?h():w(f??new l("User declined delegating actions.")),r({shouldCallAuthOnSuccess:!1})};return s((()=>{if(!a&&!f)return;let e=setTimeout(v,c);return()=>clearTimeout(e)}),[a,f]),/*#__PURE__*/e(d,{appName:o.name,address:y,success:a,error:f,onAccept:async()=>{try{await g(),u(!0)}catch(e){j(e)}},onDecline:()=>{v()},onClose:v})}};export{f as DelegatedActionsConsentScreen,d as DelegatedActionsConsentScreenView,f as default};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{AlertCircle as o,CheckCircle as t,Ban as r}from"lucide-react";import{useState as i,useEffect as n}from"react";import{u as s,r as a}from"./context-BuN0M_vH.mjs";import{u as c,a as m}from"./internal-context-e-Eni5bG.mjs";import{a as l}from"./get-is-unified-wallet-DF10lirM.mjs";import{S as p}from"./ScreenLayout-DptX1e0c.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"viem";import"./ModalHeader-B32Zin0a.mjs";import"styled-components";import"./useActiveWallet-BY2wKTVp.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-BHP1zZ9a.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-DTjrHNDw.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-DHkF35VN.mjs";import"./index-Dq_xe9dz.mjs";const u=({appName:i,success:n,error:s,onRevoke:a,onDeny:c,onClose:m})=>/*#__PURE__*/e(p,n||s?{title:s?"Something went wrong":"Success!",subtitle:s?"Please try again.":"You've successfully revoked permissions.",icon:s?o:t,iconVariant:s?"error":"success",onBack:m,watermark:!0}:{title:"Revoke offline access to wallet",subtitle:`By confirming, ${i} will no longer be able to use this wallet on your behalf when you are not online.`,icon:r,primaryCta:{label:"Confirm",onClick:a},secondaryCta:{label:"Deny",onClick:c},onBack:m,watermark:!0}),d={component:()=>{let{data:o}=l(),t=s(),{closePrivyModal:r}=c(),[p,d]=i(!1),[f,y]=i(),{onRevoke:k,onSuccess:v,onError:h}=o.delegatedActions.revoke,j=async()=>{p?v():h(f??new m("User declined revoking access to their delegated wallet.")),r({shouldCallAuthOnSuccess:!1})};return n((()=>{if(!p&&!f)return;let e=setTimeout(j,a);return()=>clearTimeout(e)}),[p,f]),/*#__PURE__*/e(u,{appName:t.name,success:p,error:f,onRevoke:async()=>{try{await k(),d(!0)}catch(e){y(e)}},onDeny:()=>{j()},onClose:j})}};export{d as DelegatedActionsRevokeScreen,u as DelegatedActionsRevokeScreenView,d as default};
1
+ import{jsx as e}from"react/jsx-runtime";import{AlertCircle as o,CheckCircle as t,Ban as r}from"lucide-react";import{useState as i,useEffect as n}from"react";import{u as s,r as a}from"./context-Bu4xmqpC.mjs";import{u as c,a as m}from"./internal-context-e-Eni5bG.mjs";import{a as l}from"./get-is-unified-wallet-CvIzjbW7.mjs";import{S as p}from"./ScreenLayout-DIdy7nhJ.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"viem";import"./ModalHeader-D5psNgrf.mjs";import"styled-components";import"./useActiveWallet-RUYo4pXO.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-CRrWM52E.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-BkIu5vyx.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-q8npRQhQ.mjs";import"./index-Dq_xe9dz.mjs";const u=({appName:i,success:n,error:s,onRevoke:a,onDeny:c,onClose:m})=>/*#__PURE__*/e(p,n||s?{title:s?"Something went wrong":"Success!",subtitle:s?"Please try again.":"You've successfully revoked permissions.",icon:s?o:t,iconVariant:s?"error":"success",onBack:m,watermark:!0}:{title:"Revoke offline access to wallet",subtitle:`By confirming, ${i} will no longer be able to use this wallet on your behalf when you are not online.`,icon:r,primaryCta:{label:"Confirm",onClick:a},secondaryCta:{label:"Deny",onClick:c},onBack:m,watermark:!0}),d={component:()=>{let{data:o}=l(),t=s(),{closePrivyModal:r}=c(),[p,d]=i(!1),[f,y]=i(),{onRevoke:k,onSuccess:v,onError:h}=o.delegatedActions.revoke,j=async()=>{p?v():h(f??new m("User declined revoking access to their delegated wallet.")),r({shouldCallAuthOnSuccess:!1})};return n((()=>{if(!p&&!f)return;let e=setTimeout(j,a);return()=>clearTimeout(e)}),[p,f]),/*#__PURE__*/e(u,{appName:t.name,success:p,error:f,onRevoke:async()=>{try{await k(),d(!0)}catch(e){y(e)}},onDeny:()=>{j()},onClose:j})}};export{d as DelegatedActionsRevokeScreen,u as DelegatedActionsRevokeScreenView,d as default};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{XCircle as t}from"lucide-react";import{useMemo as r,useState as o,useEffect as i}from"react";import{e as a,c as n}from"./index-B2ZHk27q.mjs";import{u as s}from"./internal-context-e-Eni5bG.mjs";import{u as l,a as c}from"./get-is-unified-wallet-DF10lirM.mjs";import{S as m}from"./ScreenLayout-DptX1e0c.mjs";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-BY2wKTVp.mjs";import"zustand";import"./context-BuN0M_vH.mjs";import"tinycolor2";import"styled-components";import"react-device-detect";import"./prepareFundingModalData-BHP1zZ9a.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-DTjrHNDw.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-DQKLhXbj.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"ofetch";import"js-cookie";import"./frame-CwE9r3cT.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-eEm9Olt_.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./ModalHeader-B32Zin0a.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-DHkF35VN.mjs";import"./index-Dq_xe9dz.mjs";const p=({connectionFailed:r,onClose:o})=>/*#__PURE__*/e(m,r?{title:"Something went wrong",subtitle:"We're on it. Please try again later.",icon:t,iconVariant:"error",primaryCta:{label:"Close",onClick:o},watermark:!0}:{title:"Connecting to your wallet",subtitle:"Please wait...",iconVariant:"loading",showClose:!0,onClose:o,watermark:!1}),d={component:()=>{let{authenticated:t,user:m}=l(),{client:d,closePrivyModal:u,createAnalyticsEvent:y,walletProxy:v}=s(),{navigate:h,data:f,setModalData:w,onUserCloseViaDialogOrKeybindRef:b}=c(),j=r((()=>Date.now()),[]),[g,C]=o(!1),{onCompleteNavigateTo:A,onFailure:I,shouldForceMFA:k,entropyId:x,entropyIdVerifier:S,recoveryMethod:F,connectingWalletAddress:M,isUnifiedWallet:P=!1}=f?.connectWallet,T=e=>{g||(C(!0),I("string"==typeof e?Error(e):e))};return i((()=>{let e;return t?v?((async()=>{let t=await d.getAccessToken();if(!t)return T("User must be authenticated and have a Privy wallet before it can be connected");try{if(!P){if(!x||!S)return T("For on-device first-class chain wallets, entropyId and entropyIdVerifier are required");await v.connect({accessToken:t,entropyId:x,entropyIdVerifier:S})}k&&await v.verifyMfa({accessToken:t});let r=(Date.now()-j)/1e3;"EmbeddedWalletKeyExportScreen"===A&&r<1?e=setTimeout((()=>{h(A,!1)}),1e3*(1-r)):h(A,!1)}catch(e){if(a(e)&&"privy"===F){let e=await d.getAccessToken();if(!e)return T("User must be authenticated and have a Privy wallet before it can be recovered");try{y({eventName:"embedded_wallet_pinless_recovery_started",payload:{walletAddress:M}});let t=await(v?.recover({accessToken:e,entropyId:x,entropyIdVerifier:S}));t?.entropyId||T(Error("Unable to recover wallet")),A?h(A):u({shouldCallAuthOnSuccess:!1}),y({eventName:"embedded_wallet_recovery_completed",payload:{walletAddress:M}}),h(A)}catch(e){T("An error has occurred, please try again.")}}else a(e)&&"privy"!==F&&"privy-v2"!==F?(w({...f,recoverWallet:{entropyId:x,entropyIdVerifier:S,onCompleteNavigateTo:A,onFailure:I},recoveryOAuthStatus:{provider:F,action:"recover",isInAccountCreateFlow:!1,shouldCreateEth:!1,shouldCreateSol:!1}}),h(n(F))):T(e)}})(),()=>clearTimeout(e)):void 0:T("User must be authenticated and have a Privy wallet before it can be connected")}),[t,m,v]),b.current=()=>{T("User exited before wallet could be connected"),u({shouldCallAuthOnSuccess:!1})},/*#__PURE__*/e(p,{connectionFailed:g,onClose:()=>u({shouldCallAuthOnSuccess:!1})})}};export{d as EmbeddedWalletConnectingScreen,p as EmbeddedWalletConnectingView,d as default};
1
+ import{jsx as e}from"react/jsx-runtime";import{XCircle as t}from"lucide-react";import{useMemo as r,useState as o,useEffect as i}from"react";import{e as a,c as n}from"./index-ygZBlWlm.mjs";import{u as s}from"./internal-context-e-Eni5bG.mjs";import{u as l,a as c}from"./get-is-unified-wallet-CvIzjbW7.mjs";import{S as m}from"./ScreenLayout-DIdy7nhJ.mjs";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-RUYo4pXO.mjs";import"zustand";import"./context-Bu4xmqpC.mjs";import"tinycolor2";import"styled-components";import"react-device-detect";import"./prepareFundingModalData-CRrWM52E.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-BkIu5vyx.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-Bn7q4pcu.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"ofetch";import"js-cookie";import"./frame-CwE9r3cT.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-eEm9Olt_.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./ModalHeader-D5psNgrf.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-q8npRQhQ.mjs";import"./index-Dq_xe9dz.mjs";const p=({connectionFailed:r,onClose:o})=>/*#__PURE__*/e(m,r?{title:"Something went wrong",subtitle:"We're on it. Please try again later.",icon:t,iconVariant:"error",primaryCta:{label:"Close",onClick:o},watermark:!0}:{title:"Connecting to your wallet",subtitle:"Please wait...",iconVariant:"loading",showClose:!0,onClose:o,watermark:!1}),d={component:()=>{let{authenticated:t,user:m}=l(),{client:d,closePrivyModal:u,createAnalyticsEvent:y,walletProxy:v}=s(),{navigate:h,data:f,setModalData:w,onUserCloseViaDialogOrKeybindRef:b}=c(),j=r((()=>Date.now()),[]),[g,C]=o(!1),{onCompleteNavigateTo:A,onFailure:I,shouldForceMFA:k,entropyId:x,entropyIdVerifier:S,recoveryMethod:F,connectingWalletAddress:M,isUnifiedWallet:P=!1}=f?.connectWallet,T=e=>{g||(C(!0),I("string"==typeof e?Error(e):e))};return i((()=>{let e;return t?v?((async()=>{let t=await d.getAccessToken();if(!t)return T("User must be authenticated and have a Privy wallet before it can be connected");try{if(!P){if(!x||!S)return T("For on-device first-class chain wallets, entropyId and entropyIdVerifier are required");await v.connect({accessToken:t,entropyId:x,entropyIdVerifier:S})}k&&await v.verifyMfa({accessToken:t});let r=(Date.now()-j)/1e3;"EmbeddedWalletKeyExportScreen"===A&&r<1?e=setTimeout((()=>{h(A,!1)}),1e3*(1-r)):h(A,!1)}catch(e){if(a(e)&&"privy"===F){let e=await d.getAccessToken();if(!e)return T("User must be authenticated and have a Privy wallet before it can be recovered");try{y({eventName:"embedded_wallet_pinless_recovery_started",payload:{walletAddress:M}});let t=await(v?.recover({accessToken:e,entropyId:x,entropyIdVerifier:S}));t?.entropyId||T(Error("Unable to recover wallet")),A?h(A):u({shouldCallAuthOnSuccess:!1}),y({eventName:"embedded_wallet_recovery_completed",payload:{walletAddress:M}}),h(A)}catch(e){T("An error has occurred, please try again.")}}else a(e)&&"privy"!==F&&"privy-v2"!==F?(w({...f,recoverWallet:{entropyId:x,entropyIdVerifier:S,onCompleteNavigateTo:A,onFailure:I},recoveryOAuthStatus:{provider:F,action:"recover",isInAccountCreateFlow:!1,shouldCreateEth:!1,shouldCreateSol:!1}}),h(n(F))):T(e)}})(),()=>clearTimeout(e)):void 0:T("User must be authenticated and have a Privy wallet before it can be connected")}),[t,m,v]),b.current=()=>{T("User exited before wallet could be connected"),u({shouldCallAuthOnSuccess:!1})},/*#__PURE__*/e(p,{connectionFailed:g,onClose:()=>u({shouldCallAuthOnSuccess:!1})})}};export{d as EmbeddedWalletConnectingScreen,p as EmbeddedWalletConnectingView,d as default};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{CheckCircle as t}from"lucide-react";import{useEffect as o}from"react";import{u as r,a as i,b as s,c}from"./get-is-unified-wallet-DF10lirM.mjs";import{u as a,r as n}from"./context-BuN0M_vH.mjs";import{u as m}from"./internal-context-e-Eni5bG.mjs";import{S as l}from"./ScreenLayout-DptX1e0c.mjs";import"viem";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"./ModalHeader-B32Zin0a.mjs";import"styled-components";import"./useActiveWallet-BY2wKTVp.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-BHP1zZ9a.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-DTjrHNDw.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-DHkF35VN.mjs";import"./index-Dq_xe9dz.mjs";const u=({title:o,description:r,onClose:i})=>/*#__PURE__*/e(l,{title:o,subtitle:r,icon:t,iconVariant:"success",watermark:!0,onBack:i}),p={component:()=>{let{user:t}=r(),{closePrivyModal:l,isNewUserThisSession:p,updateWallets:d}=m(),{data:j,onUserCloseViaDialogOrKeybindRef:f}=i(),h=a(),{onSuccess:v,onFailure:C,callAuthOnSuccessOnClose:y}=j.createWallet,S=()=>{let e=s(t)??c(t);t&&e?(d(),v({user:t,account:e})):C(Error("Failed to create wallet")),l({shouldCallAuthOnSuccess:y})};return o((()=>{let e=setTimeout(S,n);return()=>clearTimeout(e)}),[]),f.current=S,/*#__PURE__*/e(u,{title:p?"Welcome"+(h?.name?` to ${h?.name}`:""):"All set!",description:p?"You've successfully created an account.":"Your account is secured.",onClose:S})}};export{p as EmbeddedWalletCreatedScreen,u as EmbeddedWalletCreatedScreenView,p as default};
1
+ import{jsx as e}from"react/jsx-runtime";import{CheckCircle as t}from"lucide-react";import{useEffect as o}from"react";import{u as r,a as i,b as s,c}from"./get-is-unified-wallet-CvIzjbW7.mjs";import{u as a,r as n}from"./context-Bu4xmqpC.mjs";import{u as m}from"./internal-context-e-Eni5bG.mjs";import{S as l}from"./ScreenLayout-DIdy7nhJ.mjs";import"viem";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"./ModalHeader-D5psNgrf.mjs";import"styled-components";import"./useActiveWallet-RUYo4pXO.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-CRrWM52E.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-BkIu5vyx.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-q8npRQhQ.mjs";import"./index-Dq_xe9dz.mjs";const u=({title:o,description:r,onClose:i})=>/*#__PURE__*/e(l,{title:o,subtitle:r,icon:t,iconVariant:"success",watermark:!0,onBack:i}),p={component:()=>{let{user:t}=r(),{closePrivyModal:l,isNewUserThisSession:p,updateWallets:d}=m(),{data:j,onUserCloseViaDialogOrKeybindRef:f}=i(),h=a(),{onSuccess:v,onFailure:C,callAuthOnSuccessOnClose:y}=j.createWallet,S=()=>{let e=s(t)??c(t);t&&e?(d(),v({user:t,account:e})):C(Error("Failed to create wallet")),l({shouldCallAuthOnSuccess:y})};return o((()=>{let e=setTimeout(S,n);return()=>clearTimeout(e)}),[]),f.current=S,/*#__PURE__*/e(u,{title:p?"Welcome"+(h?.name?` to ${h?.name}`:""):"All set!",description:p?"You've successfully created an account.":"Your account is secured.",onClose:S})}};export{p as EmbeddedWalletCreatedScreen,u as EmbeddedWalletCreatedScreenView,p as default};
@@ -1,4 +1,4 @@
1
- import{jsx as e,jsxs as r,Fragment as t}from"react/jsx-runtime";import{useState as o,useEffect as i,useRef as n}from"react";import{styled as a}from"styled-components";import{constructURL as l}from"@privy-io/urls";import{W as d}from"./WarningBanner-c8L53pJ2.mjs";import{W as c}from"./WalletInfoCard-CV_N8dG_.mjs";import{u as s}from"./context-BuN0M_vH.mjs";import{u as p}from"./internal-context-e-Eni5bG.mjs";import{u as m,a as u}from"./get-is-unified-wallet-DF10lirM.mjs";import{S as h}from"./ScreenLayout-DptX1e0c.mjs";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"lucide-react";import"./ModalHeader-B32Zin0a.mjs";import"./useActiveWallet-BY2wKTVp.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-BHP1zZ9a.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-DTjrHNDw.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"./ErrorMessage-D8VaAP5m.mjs";import"./LabelXs-oqZNqbm_.mjs";import"./Address-DCNT9qfI.mjs";import"./shared-FM0rljBt.mjs";import"tinycolor2";import"ofetch";import"./Screen-DHkF35VN.mjs";import"./index-Dq_xe9dz.mjs";const y=({address:o,accessToken:i,appConfigTheme:n,onClose:a,isLoading:l=!1,exportButtonProps:s})=>/*#__PURE__*/e(h,{title:"Export wallet",subtitle:/*#__PURE__*/r(t,{children:["Copy either your private key or seed phrase to export your wallet."," ",/*#__PURE__*/e("a",{href:"https://privy-io.notion.site/Transferring-your-account-9dab9e16c6034a7ab1ff7fa479b02828",target:"blank",rel:"noopener noreferrer",children:"Learn more"})]}),onClose:a,watermark:!0,children:/*#__PURE__*/r(g,{children:[/*#__PURE__*/e(d,{theme:n,children:"Never share your private key or seed phrase with anyone."}),/*#__PURE__*/e(c,{title:"Your wallet",address:o,showCopyButton:!0}),/*#__PURE__*/e("div",{style:{width:"100%"},children:l?/*#__PURE__*/e(f,{}):i&&s&&/*#__PURE__*/e(w,{accessToken:i,dimensions:{height:"44px"},...s})})]})});let g=a.div`
1
+ import{jsx as e,jsxs as r,Fragment as t}from"react/jsx-runtime";import{useState as o,useEffect as i,useRef as n}from"react";import{styled as a}from"styled-components";import{constructURL as l}from"@privy-io/urls";import{W as d}from"./WarningBanner-c8L53pJ2.mjs";import{W as c}from"./WalletInfoCard-BtliVaf0.mjs";import{u as s}from"./context-Bu4xmqpC.mjs";import{u as p}from"./internal-context-e-Eni5bG.mjs";import{u as m,a as u}from"./get-is-unified-wallet-CvIzjbW7.mjs";import{S as h}from"./ScreenLayout-DIdy7nhJ.mjs";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"lucide-react";import"./ModalHeader-D5psNgrf.mjs";import"./useActiveWallet-RUYo4pXO.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-CRrWM52E.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-BkIu5vyx.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"./ErrorMessage-D8VaAP5m.mjs";import"./LabelXs-oqZNqbm_.mjs";import"./Address-BGlhcEcA.mjs";import"./shared-FM0rljBt.mjs";import"tinycolor2";import"ofetch";import"./Screen-q8npRQhQ.mjs";import"./index-Dq_xe9dz.mjs";const y=({address:o,accessToken:i,appConfigTheme:n,onClose:a,isLoading:l=!1,exportButtonProps:s})=>/*#__PURE__*/e(h,{title:"Export wallet",subtitle:/*#__PURE__*/r(t,{children:["Copy either your private key or seed phrase to export your wallet."," ",/*#__PURE__*/e("a",{href:"https://privy-io.notion.site/Transferring-your-account-9dab9e16c6034a7ab1ff7fa479b02828",target:"blank",rel:"noopener noreferrer",children:"Learn more"})]}),onClose:a,watermark:!0,children:/*#__PURE__*/r(g,{children:[/*#__PURE__*/e(d,{theme:n,children:"Never share your private key or seed phrase with anyone."}),/*#__PURE__*/e(c,{title:"Your wallet",address:o,showCopyButton:!0}),/*#__PURE__*/e("div",{style:{width:"100%"},children:l?/*#__PURE__*/e(f,{}):i&&s&&/*#__PURE__*/e(w,{accessToken:i,dimensions:{height:"44px"},...s})})]})});let g=a.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 1.25rem;
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{XCircle as t}from"lucide-react";import{useState as r,useEffect as o}from"react";import{u as a}from"./context-BuN0M_vH.mjs";import{s as i,k as s,E as l,R as n}from"./index-B2ZHk27q.mjs";import{u as m,m as c}from"./internal-context-e-Eni5bG.mjs";import{u as d}from"./use-create-wallet-without-fallback-CMjcGZvq.mjs";import{a as u,u as p}from"./get-is-unified-wallet-DF10lirM.mjs";import{S as h}from"./ScreenLayout-DptX1e0c.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-BY2wKTVp.mjs";import"zustand";import"styled-components";import"react-device-detect";import"./prepareFundingModalData-BHP1zZ9a.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-DTjrHNDw.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-DQKLhXbj.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"ofetch";import"js-cookie";import"./frame-CwE9r3cT.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-eEm9Olt_.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./ModalHeader-B32Zin0a.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-DHkF35VN.mjs";import"./index-Dq_xe9dz.mjs";const w=({errorMessage:r,onClose:o})=>/*#__PURE__*/e(h,r?{title:"Something went wrong",subtitle:r,icon:t,iconVariant:"error",primaryCta:{label:"Close",onClick:o},watermark:!0}:{title:"Creating your wallet",subtitle:"Please wait...",iconVariant:"loading",watermark:!1}),y={component:()=>{let{setModalData:t,navigate:h,data:y,onUserCloseViaDialogOrKeybindRef:v}=u(),g=a(),[C,j]=r(""),{embeddedWallets:f}=a(),{authenticated:b,user:S}=p(),{closePrivyModal:x,walletProxy:W,client:O}=m(),{onSuccess:k,onFailure:A,callAuthOnSuccessOnClose:I,shouldCreateEth:M,shouldCreateSol:P}=y.createWallet,R="legacy-embedded-wallets-only"===g.embeddedWallets.mode&&!0===g?.embeddedWallets.requireUserOwnedRecoveryOnCreate,[U,E]=r(null),{create:L}=d(),T=M??(!!S&&i(S,g.embeddedWallets.ethereum.createOnLogin)),F=P??(!!S&&s(S,g.embeddedWallets.solana.createOnLogin)),D=new n((async()=>{let e=await O.getAccessToken();if(S&&e&&W)try{let e;if(T&&F)e=await L({chainType:"ethereum",walletIndex:0,latestUser:S}),e=await L({chainType:"solana",walletIndex:0,latestUser:e.user});else if(F)e=await L({chainType:"solana",walletIndex:0,latestUser:S});else{if(!T)return void x({shouldCallAuthOnSuccess:I});e=await L({chainType:"ethereum",walletIndex:0,latestUser:S})}E(e),h("EmbeddedWalletCreatedScreen")}catch(e){j(e.message)}}));return o((()=>b&&S?R?(t({...y,createWallet:{...y.createWallet,shouldCreateEth:T,shouldCreateSol:F},recoverySelection:{...y?.recoverySelection,isInAccountCreateFlow:!0,shouldCreateEth:T,shouldCreateSol:F}}),h(l({walletAction:"create",showAutomaticRecovery:!1,availableRecoveryMethods:f.userOwnedRecoveryOptions,legacySetWalletPasswordFlow:!1,isResettingPassword:!1}))):void D.execute():(h("LandingScreen"),void A(Error("User must be authenticated before creating a Privy wallet")))),[R,b]),v.current=()=>null/*#__PURE__*/,e(w,{errorMessage:C||void 0,onClose:()=>{U?(k(U),x({shouldCallAuthOnSuccess:I})):(A(new c("User wallet creation failed")),x({shouldCallAuthOnSuccess:!1}))}})}};export{y as EmbeddedWalletOnAccountCreateScreen,w as EmbeddedWalletOnAccountCreateView,y as default};
1
+ import{jsx as e}from"react/jsx-runtime";import{XCircle as t}from"lucide-react";import{useState as r,useEffect as o}from"react";import{u as a}from"./context-Bu4xmqpC.mjs";import{s as i,k as s,E as l,R as n}from"./index-ygZBlWlm.mjs";import{u as m,m as c}from"./internal-context-e-Eni5bG.mjs";import{u as d}from"./use-create-wallet-without-fallback-BLN3_KXw.mjs";import{a as u,u as p}from"./get-is-unified-wallet-CvIzjbW7.mjs";import{S as h}from"./ScreenLayout-DIdy7nhJ.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-RUYo4pXO.mjs";import"zustand";import"styled-components";import"react-device-detect";import"./prepareFundingModalData-CRrWM52E.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-BkIu5vyx.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-Bn7q4pcu.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"ofetch";import"js-cookie";import"./frame-CwE9r3cT.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-eEm9Olt_.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./ModalHeader-D5psNgrf.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-q8npRQhQ.mjs";import"./index-Dq_xe9dz.mjs";const w=({errorMessage:r,onClose:o})=>/*#__PURE__*/e(h,r?{title:"Something went wrong",subtitle:r,icon:t,iconVariant:"error",primaryCta:{label:"Close",onClick:o},watermark:!0}:{title:"Creating your wallet",subtitle:"Please wait...",iconVariant:"loading",watermark:!1}),y={component:()=>{let{setModalData:t,navigate:h,data:y,onUserCloseViaDialogOrKeybindRef:v}=u(),g=a(),[C,j]=r(""),{embeddedWallets:f}=a(),{authenticated:b,user:S}=p(),{closePrivyModal:x,walletProxy:W,client:O}=m(),{onSuccess:k,onFailure:A,callAuthOnSuccessOnClose:I,shouldCreateEth:M,shouldCreateSol:P}=y.createWallet,R="legacy-embedded-wallets-only"===g.embeddedWallets.mode&&!0===g?.embeddedWallets.requireUserOwnedRecoveryOnCreate,[U,E]=r(null),{create:L}=d(),T=M??(!!S&&i(S,g.embeddedWallets.ethereum.createOnLogin)),F=P??(!!S&&s(S,g.embeddedWallets.solana.createOnLogin)),D=new n((async()=>{let e=await O.getAccessToken();if(S&&e&&W)try{let e;if(T&&F)e=await L({chainType:"ethereum",walletIndex:0,latestUser:S}),e=await L({chainType:"solana",walletIndex:0,latestUser:e.user});else if(F)e=await L({chainType:"solana",walletIndex:0,latestUser:S});else{if(!T)return void x({shouldCallAuthOnSuccess:I});e=await L({chainType:"ethereum",walletIndex:0,latestUser:S})}E(e),h("EmbeddedWalletCreatedScreen")}catch(e){j(e.message)}}));return o((()=>b&&S?R?(t({...y,createWallet:{...y.createWallet,shouldCreateEth:T,shouldCreateSol:F},recoverySelection:{...y?.recoverySelection,isInAccountCreateFlow:!0,shouldCreateEth:T,shouldCreateSol:F}}),h(l({walletAction:"create",showAutomaticRecovery:!1,availableRecoveryMethods:f.userOwnedRecoveryOptions,legacySetWalletPasswordFlow:!1,isResettingPassword:!1}))):void D.execute():(h("LandingScreen"),void A(Error("User must be authenticated before creating a Privy wallet")))),[R,b]),v.current=()=>null/*#__PURE__*/,e(w,{errorMessage:C||void 0,onClose:()=>{U?(k(U),x({shouldCallAuthOnSuccess:I})):(A(new c("User wallet creation failed")),x({shouldCallAuthOnSuccess:!1}))}})}};export{y as EmbeddedWalletOnAccountCreateScreen,w as EmbeddedWalletOnAccountCreateView,y as default};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{useState as o,useEffect as r}from"react";import{u as t,a as s,g as a}from"./get-is-unified-wallet-DF10lirM.mjs";import{u as i}from"./context-BuN0M_vH.mjs";import{u as n,o as d,m as c}from"./internal-context-e-Eni5bG.mjs";import{g as l}from"./useWallets-DTjrHNDw.mjs";import{S as m,g as p}from"./SetWalletPasswordForm-BHKufUYQ.mjs";import"viem";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"./Layouts-BlFm53ED.mjs";import"styled-components";import"./ModalHeader-B32Zin0a.mjs";import"./useActiveWallet-BY2wKTVp.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-BHP1zZ9a.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-A9RSftUZ.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"./shared-8FNFm3Zd.mjs";import"@heroicons/react/24/outline/ArrowPathIcon";import"@heroicons/react/24/outline/EyeIcon";import"@heroicons/react/24/outline/EyeSlashIcon";import"./Checkbox-BhNoOKjX.mjs";import"@heroicons/react/24/outline/KeyIcon";import"@heroicons/react/24/solid/CheckCircleIcon";import"fast-password-entropy";import"secure-password-utilities";import"secure-password-utilities/wordlists";import"@heroicons/react/24/outline/ArrowDownTrayIcon";import"@heroicons/react/24/outline/ClipboardDocumentCheckIcon";import"@heroicons/react/24/outline/DocumentDuplicateIcon";import"@heroicons/react/24/solid/XCircleIcon";import"./ScreenHeader-CHmc4-Lu.mjs";const u={component:()=>{let[u,w]=o(null),[y,h]=o(!1),[v,g]=o(null),[f,M]=o(""),{authenticated:_,user:A}=t(),{client:I,walletProxy:j,refreshSessionAndUser:C,closePrivyModal:R,createAnalyticsEvent:b}=n(),{navigate:P,data:x,onUserCloseViaDialogOrKeybindRef:S}=s(),E=i(),{onSuccess:k,onFailure:D}=x.setWalletPassword,N=a(A),O="user-passcode"===u?.recoveryMethod,L="user-passcode"===N?.recoveryMethod;r((()=>{_||(P("LandingScreen"),D(new d("User must be authenticated before setting a password on a Privy wallet")))}),[_]);let T=()=>v?(D(v),void R({shouldCallAuthOnSuccess:!1})):O?(k(u),void R({shouldCallAuthOnSuccess:!1})):(D(new c("Exited before password was added to wallet")),void R({shouldCallAuthOnSuccess:!1}));S.current=T;/*#__PURE__*/return e(m,{appName:E?.name||"privy",config:{initiatedBy:"user",onCancel:T},error:v?"An error has occurred, please try again.":void 0,buttonLoading:y,buttonHideAnimations:!1,password:f,isResettingPassword:L,onPasswordGenerate:()=>M(p()),onPasswordChange:M,onSubmit:async()=>{O?(k(u),R({shouldCallAuthOnSuccess:!1})):(h(!0),g(null),await(async()=>{let e=await I.getAccessToken();if(e&&A&&N?.address&&f&&j)try{b({eventName:"embedded_wallet_set_recovery_started",payload:{walletAddress:N.address,existingRecoveryMethod:N.recoveryMethod,targetRecoveryMethod:"user-passcode",isResettingPassword:L}});let{entropyId:o,entropyIdVerifier:r}=l(A);if(!(await j.setRecovery({accessToken:e,entropyId:o,entropyIdVerifier:r,recoveryPassword:f,recoveryMethod:"user-passcode"})).entropyId)return g(new c("Error setting password on privy wallet")),void b({eventName:"embedded_wallet_set_recovery_failed",payload:{walletAddress:N.address,existingRecoveryMethod:N.recoveryMethod,targetRecoveryMethod:"user-passcode",isResettingPassword:L,reason:"error setting password"}});let t=await C(),s=a(t);if(!s)return g(new c("Error setting password on privy wallet")),void b({eventName:"embedded_wallet_set_recovery_failed",payload:{walletAddress:N.address,existingRecoveryMethod:N.recoveryMethod,targetRecoveryMethod:"user-passcode",isResettingPassword:L,reason:"wallet disconnected"}});w(s),b({eventName:"embedded_wallet_set_recovery_completed",payload:{walletAddress:N.address,existingRecoveryMethod:N.recoveryMethod,targetRecoveryMethod:"user-passcode",isResettingPassword:L}})}catch(e){console.warn(e),g(e instanceof Error?e:Error("Error setting password on privy wallet")),b({eventName:"embedded_wallet_set_password_failed",payload:{walletAddress:N.address,reason:e}})}})(),h(!1))},onClose:T})}};export{u as EmbeddedWalletPasswordUpdateScreen,u as default};
1
+ import{jsx as e}from"react/jsx-runtime";import{useState as o,useEffect as r}from"react";import{u as t,a as s,g as a}from"./get-is-unified-wallet-CvIzjbW7.mjs";import{u as i}from"./context-Bu4xmqpC.mjs";import{u as n,o as d,m as c}from"./internal-context-e-Eni5bG.mjs";import{g as l}from"./useWallets-BkIu5vyx.mjs";import{S as m,g as p}from"./SetWalletPasswordForm-B55ZeX-5.mjs";import"viem";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"./Layouts-BlFm53ED.mjs";import"styled-components";import"./ModalHeader-D5psNgrf.mjs";import"./useActiveWallet-RUYo4pXO.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-CRrWM52E.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-A9RSftUZ.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"./shared-JeLSzCHD.mjs";import"@heroicons/react/24/outline/ArrowPathIcon";import"@heroicons/react/24/outline/EyeIcon";import"@heroicons/react/24/outline/EyeSlashIcon";import"./Checkbox-BhNoOKjX.mjs";import"@heroicons/react/24/outline/KeyIcon";import"@heroicons/react/24/solid/CheckCircleIcon";import"fast-password-entropy";import"secure-password-utilities";import"secure-password-utilities/wordlists";import"@heroicons/react/24/outline/ArrowDownTrayIcon";import"@heroicons/react/24/outline/ClipboardDocumentCheckIcon";import"@heroicons/react/24/outline/DocumentDuplicateIcon";import"@heroicons/react/24/solid/XCircleIcon";import"./ScreenHeader-CHmc4-Lu.mjs";const u={component:()=>{let[u,w]=o(null),[y,h]=o(!1),[v,g]=o(null),[f,M]=o(""),{authenticated:_,user:A}=t(),{client:I,walletProxy:j,refreshSessionAndUser:C,closePrivyModal:R,createAnalyticsEvent:b}=n(),{navigate:P,data:x,onUserCloseViaDialogOrKeybindRef:S}=s(),E=i(),{onSuccess:k,onFailure:D}=x.setWalletPassword,N=a(A),O="user-passcode"===u?.recoveryMethod,L="user-passcode"===N?.recoveryMethod;r((()=>{_||(P("LandingScreen"),D(new d("User must be authenticated before setting a password on a Privy wallet")))}),[_]);let T=()=>v?(D(v),void R({shouldCallAuthOnSuccess:!1})):O?(k(u),void R({shouldCallAuthOnSuccess:!1})):(D(new c("Exited before password was added to wallet")),void R({shouldCallAuthOnSuccess:!1}));S.current=T;/*#__PURE__*/return e(m,{appName:E?.name||"privy",config:{initiatedBy:"user",onCancel:T},error:v?"An error has occurred, please try again.":void 0,buttonLoading:y,buttonHideAnimations:!1,password:f,isResettingPassword:L,onPasswordGenerate:()=>M(p()),onPasswordChange:M,onSubmit:async()=>{O?(k(u),R({shouldCallAuthOnSuccess:!1})):(h(!0),g(null),await(async()=>{let e=await I.getAccessToken();if(e&&A&&N?.address&&f&&j)try{b({eventName:"embedded_wallet_set_recovery_started",payload:{walletAddress:N.address,existingRecoveryMethod:N.recoveryMethod,targetRecoveryMethod:"user-passcode",isResettingPassword:L}});let{entropyId:o,entropyIdVerifier:r}=l(A);if(!(await j.setRecovery({accessToken:e,entropyId:o,entropyIdVerifier:r,recoveryPassword:f,recoveryMethod:"user-passcode"})).entropyId)return g(new c("Error setting password on privy wallet")),void b({eventName:"embedded_wallet_set_recovery_failed",payload:{walletAddress:N.address,existingRecoveryMethod:N.recoveryMethod,targetRecoveryMethod:"user-passcode",isResettingPassword:L,reason:"error setting password"}});let t=await C(),s=a(t);if(!s)return g(new c("Error setting password on privy wallet")),void b({eventName:"embedded_wallet_set_recovery_failed",payload:{walletAddress:N.address,existingRecoveryMethod:N.recoveryMethod,targetRecoveryMethod:"user-passcode",isResettingPassword:L,reason:"wallet disconnected"}});w(s),b({eventName:"embedded_wallet_set_recovery_completed",payload:{walletAddress:N.address,existingRecoveryMethod:N.recoveryMethod,targetRecoveryMethod:"user-passcode",isResettingPassword:L}})}catch(e){console.warn(e),g(e instanceof Error?e:Error("Error setting password on privy wallet")),b({eventName:"embedded_wallet_set_password_failed",payload:{walletAddress:N.address,reason:e}})}})(),h(!1))},onClose:T})}};export{u as EmbeddedWalletPasswordUpdateScreen,u as default};
@@ -1 +1 @@
1
- import{jsx as e,jsxs as o,Fragment as t}from"react/jsx-runtime";import{Lock as r}from"lucide-react";import{u as i,m as s}from"./internal-context-e-Eni5bG.mjs";import{a}from"./get-is-unified-wallet-DF10lirM.mjs";import{S as n}from"./ScreenLayout-DptX1e0c.mjs";import"ofetch";import"react";import"viem";import"./context-BuN0M_vH.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./ModalHeader-B32Zin0a.mjs";import"styled-components";import"./useActiveWallet-BY2wKTVp.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-BHP1zZ9a.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-DTjrHNDw.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-DHkF35VN.mjs";import"./index-Dq_xe9dz.mjs";const c=({onClose:i,onProceed:s})=>/*#__PURE__*/e(n,{title:"Secure Your Account",subtitle:/*#__PURE__*/o(t,{children:["Please set a password to secure your account.",/*#__PURE__*/e("br",{}),"Losing access to this password and this device will make your account inaccessible."]}),icon:r,primaryCta:{label:"Add password",onClick:s},onClose:i,watermark:!0}),m={component:()=>{let{closePrivyModal:o}=i(),{data:t,navigate:r,onUserCloseViaDialogOrKeybindRef:n}=a(),{onFailure:m}=t.setWalletPassword,l=()=>{m(new s("Exited before password was added to wallet")),o({shouldCallAuthOnSuccess:!1})};return n.current=l,/*#__PURE__*/e(c,{onClose:l,onProceed:()=>{r("EmbeddedWalletPasswordUpdateScreen")}})}};export{m as EmbeddedWalletPasswordUpdateSplashScreen,c as EmbeddedWalletPasswordUpdateSplashView,m as default};
1
+ import{jsx as e,jsxs as o,Fragment as t}from"react/jsx-runtime";import{Lock as r}from"lucide-react";import{u as i,m as s}from"./internal-context-e-Eni5bG.mjs";import{a}from"./get-is-unified-wallet-CvIzjbW7.mjs";import{S as n}from"./ScreenLayout-DIdy7nhJ.mjs";import"ofetch";import"react";import"viem";import"./context-Bu4xmqpC.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./ModalHeader-D5psNgrf.mjs";import"styled-components";import"./useActiveWallet-RUYo4pXO.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-CRrWM52E.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-BkIu5vyx.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-q8npRQhQ.mjs";import"./index-Dq_xe9dz.mjs";const c=({onClose:i,onProceed:s})=>/*#__PURE__*/e(n,{title:"Secure Your Account",subtitle:/*#__PURE__*/o(t,{children:["Please set a password to secure your account.",/*#__PURE__*/e("br",{}),"Losing access to this password and this device will make your account inaccessible."]}),icon:r,primaryCta:{label:"Add password",onClick:s},onClose:i,watermark:!0}),m={component:()=>{let{closePrivyModal:o}=i(),{data:t,navigate:r,onUserCloseViaDialogOrKeybindRef:n}=a(),{onFailure:m}=t.setWalletPassword,l=()=>{m(new s("Exited before password was added to wallet")),o({shouldCallAuthOnSuccess:!1})};return n.current=l,/*#__PURE__*/e(c,{onClose:l,onProceed:()=>{r("EmbeddedWalletPasswordUpdateScreen")}})}};export{m as EmbeddedWalletPasswordUpdateSplashScreen,c as EmbeddedWalletPasswordUpdateSplashView,m as default};
@@ -1,4 +1,4 @@
1
- import{jsxs as e,jsx as r,Fragment as t}from"react/jsx-runtime";import{styled as o}from"styled-components";import i from"@heroicons/react/24/outline/ChevronRightIcon";import n from"@heroicons/react/24/outline/DevicePhoneMobileIcon";import s from"@heroicons/react/24/outline/FingerPrintIcon";import a from"@heroicons/react/24/outline/MinusCircleIcon";import l from"@heroicons/react/24/outline/PhoneIcon";import C from"@heroicons/react/24/outline/ShieldCheckIcon";import{U as c,L as d}from"./useActiveWallet-BY2wKTVp.mjs";import{M as h,b as m,P as p}from"./ModalHeader-B32Zin0a.mjs";import{C as u}from"./Chip-D2-wZOHJ.mjs";import{I as y,T as f,S as g,E as k,M as w,d as v,e as b,f as M,g as x,R as Z,a as j,A as L,F as E,L as S,b as I,c as P,C as T,N as R}from"./PinInput-3SLvbnQa.mjs";import A from"@heroicons/react/24/outline/ArrowRightEndOnRectangleIcon";import W from"@heroicons/react/24/outline/ClockIcon";import{useState as F,useMemo as B}from"react";import{u as U}from"./context-BuN0M_vH.mjs";import{u as z}from"./internal-context-e-Eni5bG.mjs";import{u as $}from"./get-is-unified-wallet-DF10lirM.mjs";import{ErrorScreenView as N}from"./ErrorScreen-C7CRlvK4.mjs";import{DoubleIconWrapper as D}from"./LinkPasskeyScreen-DIg97p-E.mjs";import{C as O}from"./CopyToClipboard-BGTSFnT3.mjs";import{C as _}from"./Layouts-BlFm53ED.mjs";import{C as V}from"./Column-C2X2MHYX.mjs";import{L as H}from"./LabelXs-oqZNqbm_.mjs";import{S as Q}from"./Subtitle-CV-2yKE4.mjs";import{T as Y}from"./Title-BnzYV3Is.mjs";import{B as q}from"./shared-FM0rljBt.mjs";import{f as X,g as K,h as G,i as J}from"./index-B2ZHk27q.mjs";import ee from"@heroicons/react/24/solid/ShieldCheckIcon";import{Q as re}from"./QrCode-CA7VcP6Y.mjs";const te=t=>/*#__PURE__*/e(oe,{xmlns:"http://www.w3.org/2000/svg",fill:"none",width:"88",height:"89",viewBox:"0 0 88 89",...t,children:[/*#__PURE__*/r("rect",{y:"0.666016",width:"88",height:"88",rx:"44"}),/*#__PURE__*/r("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M45.2463 20.9106C44.5473 20.2486 43.4527 20.2486 42.7537 20.9106C37.8798 25.5263 31.3034 28.3546 24.0625 28.3546C23.9473 28.3546 23.8323 28.3539 23.7174 28.3525C22.9263 28.3427 22.2202 28.8471 21.9731 29.5987C20.9761 32.6311 20.4375 35.8693 20.4375 39.2297C20.4375 53.5896 30.259 65.651 43.5482 69.0714C43.8446 69.1477 44.1554 69.1477 44.4518 69.0714C57.741 65.651 67.5625 53.5896 67.5625 39.2297C67.5625 35.8693 67.0239 32.6311 66.0269 29.5987C65.7798 28.8471 65.0737 28.3427 64.2826 28.3525C64.1677 28.3539 64.0527 28.3546 63.9375 28.3546C56.6966 28.3546 50.1202 25.5263 45.2463 20.9106ZM52.7249 40.2829C53.3067 39.4683 53.1181 38.3363 52.3035 37.7545C51.4889 37.1726 50.3569 37.3613 49.7751 38.1759L41.9562 49.1223L38.0316 45.1977C37.3238 44.4899 36.1762 44.4899 35.4684 45.1977C34.7605 45.9056 34.7605 47.0532 35.4684 47.761L40.9059 53.1985C41.2826 53.5752 41.806 53.7671 42.337 53.7232C42.868 53.6792 43.3527 53.4039 43.6624 52.9704L52.7249 40.2829Z"})]});let oe=o.svg`
1
+ import{jsxs as e,jsx as r,Fragment as t}from"react/jsx-runtime";import{styled as o}from"styled-components";import i from"@heroicons/react/24/outline/ChevronRightIcon";import n from"@heroicons/react/24/outline/DevicePhoneMobileIcon";import s from"@heroicons/react/24/outline/FingerPrintIcon";import a from"@heroicons/react/24/outline/MinusCircleIcon";import l from"@heroicons/react/24/outline/PhoneIcon";import C from"@heroicons/react/24/outline/ShieldCheckIcon";import{U as c,L as d}from"./useActiveWallet-RUYo4pXO.mjs";import{M as h,b as m,P as p}from"./ModalHeader-D5psNgrf.mjs";import{C as u}from"./Chip-D2-wZOHJ.mjs";import{I as y,T as f,S as g,E as k,M as w,d as v,e as b,f as M,g as x,R as Z,a as j,A as L,F as E,L as S,b as I,c as P,C as T,N as R}from"./PinInput-3SLvbnQa.mjs";import A from"@heroicons/react/24/outline/ArrowRightEndOnRectangleIcon";import W from"@heroicons/react/24/outline/ClockIcon";import{useState as F,useMemo as B}from"react";import{u as U}from"./context-Bu4xmqpC.mjs";import{u as z}from"./internal-context-e-Eni5bG.mjs";import{u as $}from"./get-is-unified-wallet-CvIzjbW7.mjs";import{ErrorScreenView as N}from"./ErrorScreen-DLsfgpC9.mjs";import{DoubleIconWrapper as D}from"./LinkPasskeyScreen-DJveInKu.mjs";import{C as O}from"./CopyToClipboard-BGTSFnT3.mjs";import{C as _}from"./Layouts-BlFm53ED.mjs";import{C as V}from"./Column-C2X2MHYX.mjs";import{L as H}from"./LabelXs-oqZNqbm_.mjs";import{S as Q}from"./Subtitle-CV-2yKE4.mjs";import{T as Y}from"./Title-BnzYV3Is.mjs";import{B as q}from"./shared-FM0rljBt.mjs";import{f as X,g as K,h as G,i as J}from"./index-ygZBlWlm.mjs";import ee from"@heroicons/react/24/solid/ShieldCheckIcon";import{Q as re}from"./QrCode-Bp7vKyXB.mjs";const te=t=>/*#__PURE__*/e(oe,{xmlns:"http://www.w3.org/2000/svg",fill:"none",width:"88",height:"89",viewBox:"0 0 88 89",...t,children:[/*#__PURE__*/r("rect",{y:"0.666016",width:"88",height:"88",rx:"44"}),/*#__PURE__*/r("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M45.2463 20.9106C44.5473 20.2486 43.4527 20.2486 42.7537 20.9106C37.8798 25.5263 31.3034 28.3546 24.0625 28.3546C23.9473 28.3546 23.8323 28.3539 23.7174 28.3525C22.9263 28.3427 22.2202 28.8471 21.9731 29.5987C20.9761 32.6311 20.4375 35.8693 20.4375 39.2297C20.4375 53.5896 30.259 65.651 43.5482 69.0714C43.8446 69.1477 44.1554 69.1477 44.4518 69.0714C57.741 65.651 67.5625 53.5896 67.5625 39.2297C67.5625 35.8693 67.0239 32.6311 66.0269 29.5987C65.7798 28.8471 65.0737 28.3427 64.2826 28.3525C64.1677 28.3539 64.0527 28.3546 63.9375 28.3546C56.6966 28.3546 50.1202 25.5263 45.2463 20.9106ZM52.7249 40.2829C53.3067 39.4683 53.1181 38.3363 52.3035 37.7545C51.4889 37.1726 50.3569 37.3613 49.7751 38.1759L41.9562 49.1223L38.0316 45.1977C37.3238 44.4899 36.1762 44.4899 35.4684 45.1977C34.7605 45.9056 34.7605 47.0532 35.4684 47.761L40.9059 53.1985C41.2826 53.5752 41.806 53.7671 42.337 53.7232C42.868 53.6792 43.3527 53.4039 43.6624 52.9704L52.7249 40.2829Z"})]});let oe=o.svg`
2
2
  height: 90px;
3
3
  width: 90px;
4
4
 
@@ -1,4 +1,4 @@
1
- import{jsx as t,jsxs as e,Fragment as r}from"react/jsx-runtime";import{AlertTriangle as i,Phone as a,Lock as o}from"lucide-react";import{styled as n}from"styled-components";import{u as s}from"./context-BuN0M_vH.mjs";import{a as c,P as l}from"./index-B2ZHk27q.mjs";import{c as m,b as p,a as d,e as u}from"./internal-context-e-Eni5bG.mjs";import{a as T}from"./get-is-unified-wallet-DF10lirM.mjs";import{R as g}from"./reservoir-kvLjIrEo.mjs";import{S as h}from"./ScreenLayout-DptX1e0c.mjs";import"react";import"@privy-io/js-sdk-core";import"tinycolor2";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-BY2wKTVp.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-BHP1zZ9a.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-DTjrHNDw.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-DQKLhXbj.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"ofetch";import"js-cookie";import"./frame-CwE9r3cT.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-eEm9Olt_.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./ModalHeader-B32Zin0a.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-DHkF35VN.mjs";import"./index-Dq_xe9dz.mjs";const y=({error:n,allowlistConfig:s,onRetry:c,onCaptchaReset:T,onBack:y})=>{let f=((n,s)=>{if(n instanceof g)return{title:"Transaction failed",detail:/*#__PURE__*/e(r,{children:[/*#__PURE__*/t("span",{children:n.message}),/*#__PURE__*/e("span",{children:[" ","Check the"," ",/*#__PURE__*/t(w,{href:n.relayLink,target:"_blank",children:"refund status"}),"."]})]}),ctaText:"Try again",icon:i};if(n instanceof d)switch(n.privyErrorCode){case p.CLIENT_REQUEST_TIMEOUT:return{title:"Timed out",detail:n.message,ctaText:"Try again",icon:i};case p.INSUFFICIENT_BALANCE:return{title:"Insufficient balance",detail:n.message,ctaText:"Try again",icon:i};case p.TRANSACTION_FAILURE:return{title:"Transaction failure",detail:n.message,ctaText:"Try again",icon:i};default:return{title:"Something went wrong",detail:"Try again later",ctaText:"Try again",icon:i}}else{if(n instanceof l&&"twilio_verification_failed"===n.type)return{title:"Something went wrong",detail:n.message,ctaText:"Try again",icon:a};if(!(n instanceof m))return n instanceof u&&n.status&&[400,422].includes(n.status)?{title:"Something went wrong",detail:n.message,ctaText:"Try again",icon:i}:{title:"Something went wrong",detail:"Try again later",ctaText:"Try again",icon:i};switch(n.privyErrorCode){case p.INVALID_CAPTCHA:return{title:"Something went wrong",detail:"Please try again.",ctaText:"Try again",icon:i};case p.DISALLOWED_LOGIN_METHOD:return{title:"Not allowed",detail:n.message,ctaText:"Try another method",icon:i};case p.ALLOWLIST_REJECTED:return{title:s.errorTitle||"You don't have access to this app",detail:s.errorDetail||"Have you been invited?",ctaText:s.errorCtaText||"Try another account",icon:o};case p.CAPTCHA_FAILURE:return{title:"Something went wrong",detail:"You did not pass CAPTCHA. Please try again.",ctaText:"Try again",icon:null};case p.CAPTCHA_TIMEOUT:return{title:"Something went wrong",detail:"Something went wrong! Please try again later.",ctaText:"Try again",icon:null};case p.LINKED_TO_ANOTHER_USER:return{title:"Authentication failed",detail:"This account has already been linked to another user.",ctaText:"Try again",icon:i};case p.NOT_SUPPORTED:return{title:"This region is not supported",detail:"SMS authentication from this region is not available",ctaText:"Try another method",icon:i};case p.TOO_MANY_REQUESTS:return{title:"Request failed",detail:"Too many attempts.",ctaText:"Try again later",icon:i};default:return{title:"Something went wrong",detail:"Try again later",ctaText:"Try again",icon:i}}}})(n,s);/*#__PURE__*/return t(h,{title:f.title,subtitle:f.detail,icon:f.icon,onBack:y,iconVariant:"error",primaryCta:{label:f.ctaText,onClick:()=>{n instanceof m&&(n.privyErrorCode===p.INVALID_CAPTCHA&&T?.(),n.privyErrorCode===p.ALLOWLIST_REJECTED&&s.errorCtaLink)?window.location.href=s.errorCtaLink:c?.()},variant:"error"},watermark:!0})},f={component:()=>{let{navigate:e,data:r,lastScreen:i,currentScreen:a}=T(),o=s(),{reset:n}=c(),l=r?.errorModalData?.previousScreen||(i===a?void 0:i);/*#__PURE__*/return t(y,{error:r?.errorModalData?.error||Error(),allowlistConfig:o.allowlistConfig,onRetry:()=>{e(l||"LandingScreen",!1)},onCaptchaReset:n})}};let w=n.a`
1
+ import{jsx as t,jsxs as e,Fragment as r}from"react/jsx-runtime";import{AlertTriangle as i,Phone as a,Lock as o}from"lucide-react";import{styled as n}from"styled-components";import{u as s}from"./context-Bu4xmqpC.mjs";import{a as c,P as l}from"./index-ygZBlWlm.mjs";import{c as m,b as p,a as d,e as u}from"./internal-context-e-Eni5bG.mjs";import{a as T}from"./get-is-unified-wallet-CvIzjbW7.mjs";import{R as g}from"./reservoir-kvLjIrEo.mjs";import{S as h}from"./ScreenLayout-DIdy7nhJ.mjs";import"react";import"@privy-io/js-sdk-core";import"tinycolor2";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-RUYo4pXO.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-CRrWM52E.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-BkIu5vyx.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-Bn7q4pcu.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"ofetch";import"js-cookie";import"./frame-CwE9r3cT.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-eEm9Olt_.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./ModalHeader-D5psNgrf.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-q8npRQhQ.mjs";import"./index-Dq_xe9dz.mjs";const y=({error:n,allowlistConfig:s,onRetry:c,onCaptchaReset:T,onBack:y})=>{let f=((n,s)=>{if(n instanceof g)return{title:"Transaction failed",detail:/*#__PURE__*/e(r,{children:[/*#__PURE__*/t("span",{children:n.message}),/*#__PURE__*/e("span",{children:[" ","Check the"," ",/*#__PURE__*/t(w,{href:n.relayLink,target:"_blank",children:"refund status"}),"."]})]}),ctaText:"Try again",icon:i};if(n instanceof d)switch(n.privyErrorCode){case p.CLIENT_REQUEST_TIMEOUT:return{title:"Timed out",detail:n.message,ctaText:"Try again",icon:i};case p.INSUFFICIENT_BALANCE:return{title:"Insufficient balance",detail:n.message,ctaText:"Try again",icon:i};case p.TRANSACTION_FAILURE:return{title:"Transaction failure",detail:n.message,ctaText:"Try again",icon:i};default:return{title:"Something went wrong",detail:"Try again later",ctaText:"Try again",icon:i}}else{if(n instanceof l&&"twilio_verification_failed"===n.type)return{title:"Something went wrong",detail:n.message,ctaText:"Try again",icon:a};if(!(n instanceof m))return n instanceof u&&n.status&&[400,422].includes(n.status)?{title:"Something went wrong",detail:n.message,ctaText:"Try again",icon:i}:{title:"Something went wrong",detail:"Try again later",ctaText:"Try again",icon:i};switch(n.privyErrorCode){case p.INVALID_CAPTCHA:return{title:"Something went wrong",detail:"Please try again.",ctaText:"Try again",icon:i};case p.DISALLOWED_LOGIN_METHOD:return{title:"Not allowed",detail:n.message,ctaText:"Try another method",icon:i};case p.ALLOWLIST_REJECTED:return{title:s.errorTitle||"You don't have access to this app",detail:s.errorDetail||"Have you been invited?",ctaText:s.errorCtaText||"Try another account",icon:o};case p.CAPTCHA_FAILURE:return{title:"Something went wrong",detail:"You did not pass CAPTCHA. Please try again.",ctaText:"Try again",icon:null};case p.CAPTCHA_TIMEOUT:return{title:"Something went wrong",detail:"Something went wrong! Please try again later.",ctaText:"Try again",icon:null};case p.LINKED_TO_ANOTHER_USER:return{title:"Authentication failed",detail:"This account has already been linked to another user.",ctaText:"Try again",icon:i};case p.NOT_SUPPORTED:return{title:"This region is not supported",detail:"SMS authentication from this region is not available",ctaText:"Try another method",icon:i};case p.TOO_MANY_REQUESTS:return{title:"Request failed",detail:"Too many attempts.",ctaText:"Try again later",icon:i};default:return{title:"Something went wrong",detail:"Try again later",ctaText:"Try again",icon:i}}}})(n,s);/*#__PURE__*/return t(h,{title:f.title,subtitle:f.detail,icon:f.icon,onBack:y,iconVariant:"error",primaryCta:{label:f.ctaText,onClick:()=>{n instanceof m&&(n.privyErrorCode===p.INVALID_CAPTCHA&&T?.(),n.privyErrorCode===p.ALLOWLIST_REJECTED&&s.errorCtaLink)?window.location.href=s.errorCtaLink:c?.()},variant:"error"},watermark:!0})},f={component:()=>{let{navigate:e,data:r,lastScreen:i,currentScreen:a}=T(),o=s(),{reset:n}=c(),l=r?.errorModalData?.previousScreen||(i===a?void 0:i);/*#__PURE__*/return t(y,{error:r?.errorModalData?.error||Error(),allowlistConfig:o.allowlistConfig,onRetry:()=>{e(l||"LandingScreen",!1)},onCaptchaReset:n})}};let w=n.a`
2
2
  color: var(--privy-color-accent) !important;
3
3
  font-weight: 600;
4
4
  `;export{f as ErrorScreen,y as ErrorScreenView,f as default};
@@ -1,4 +1,4 @@
1
- import{jsxs as e,jsx as r,Fragment as t}from"react/jsx-runtime";import{useState as i,useEffect as o,useRef as a}from"react";import{isMobile as n,isIOS as s}from"react-device-detect";import{styled as l}from"styled-components";import{L as c}from"./useActiveWallet-BY2wKTVp.mjs";import{O as d}from"./OpenLink-DZHy38vr.mjs";import{Q as m}from"./QrCode-CA7VcP6Y.mjs";import{Check as p,Copy as u}from"lucide-react";import{S as h}from"./ModalHeader-B32Zin0a.mjs";import{L as v}from"./LabelXs-oqZNqbm_.mjs";import{u as f,q as g}from"./context-BuN0M_vH.mjs";import{u as y,b,k as w}from"./internal-context-e-Eni5bG.mjs";import{u as x,a as C}from"./get-is-unified-wallet-DF10lirM.mjs";import{s as S}from"./shouldProceedtoEmbeddedWalletCreationFlow-Z89kclWd.mjs";import{S as k}from"./ScreenLayout-DptX1e0c.mjs";import{F as E}from"./farcaster-DPlSjvF5.mjs";import"zustand";import"./prepareFundingModalData-BHP1zZ9a.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-DTjrHNDw.mjs";import"qrcode";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"tinycolor2";import"ofetch";import"./index-B2ZHk27q.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-DQKLhXbj.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-CwE9r3cT.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-eEm9Olt_.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./Screen-DHkF35VN.mjs";import"./index-Dq_xe9dz.mjs";let T=l.div`
1
+ import{jsxs as e,jsx as r,Fragment as t}from"react/jsx-runtime";import{useState as i,useEffect as o,useRef as a}from"react";import{isMobile as n,isIOS as s}from"react-device-detect";import{styled as l}from"styled-components";import{L as c}from"./useActiveWallet-RUYo4pXO.mjs";import{O as d}from"./OpenLink-DZHy38vr.mjs";import{Q as m}from"./QrCode-Bp7vKyXB.mjs";import{Check as p,Copy as u}from"lucide-react";import{S as h}from"./ModalHeader-D5psNgrf.mjs";import{L as v}from"./LabelXs-oqZNqbm_.mjs";import{u as f,q as g}from"./context-Bu4xmqpC.mjs";import{u as y,b,k as w}from"./internal-context-e-Eni5bG.mjs";import{u as x,a as C}from"./get-is-unified-wallet-CvIzjbW7.mjs";import{s as S}from"./shouldProceedtoEmbeddedWalletCreationFlow-D0uaMzCB.mjs";import{S as k}from"./ScreenLayout-DIdy7nhJ.mjs";import{F as E}from"./farcaster-DPlSjvF5.mjs";import"zustand";import"./prepareFundingModalData-CRrWM52E.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-BkIu5vyx.mjs";import"qrcode";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"tinycolor2";import"ofetch";import"./index-ygZBlWlm.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-Bn7q4pcu.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-CwE9r3cT.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-eEm9Olt_.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./Screen-q8npRQhQ.mjs";import"./index-Dq_xe9dz.mjs";let T=l.div`
2
2
  width: 100%;
3
3
  `,j=l.div`
4
4
  display: flex;
@@ -1,4 +1,4 @@
1
- import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useState as r,useRef as o,useEffect as a}from"react";import{isMobile as i,isIOS as s}from"react-device-detect";import{styled as n}from"styled-components";import{C as l}from"./CopyToClipboard-BGTSFnT3.mjs";import{L as c}from"./useActiveWallet-BY2wKTVp.mjs";import{O as m}from"./OpenLink-DZHy38vr.mjs";import{Q as p}from"./QrCode-CA7VcP6Y.mjs";import{u as d,q as u}from"./context-BuN0M_vH.mjs";import{u as g}from"./internal-context-e-Eni5bG.mjs";import{a as h}from"./get-is-unified-wallet-DF10lirM.mjs";import{S as f}from"./ScreenLayout-DptX1e0c.mjs";import{F as v}from"./farcaster-DPlSjvF5.mjs";import"./copy-Bx2Jwc5_.mjs";import"zustand";import"./prepareFundingModalData-BHP1zZ9a.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-DTjrHNDw.mjs";import"qrcode";import"tinycolor2";import"ofetch";import"./ModalHeader-B32Zin0a.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-DHkF35VN.mjs";import"./index-Dq_xe9dz.mjs";let y="#8a63d2";const k=({appName:r,loading:o,success:a,errorMessage:n,connectUri:d,onBack:u,onClose:g,onOpenFarcaster:h})=>/*#__PURE__*/e(f,i||o?s?{title:n?n.message:"Add a signer to Farcaster",subtitle:n?n.detail:`This will allow ${r} to add casts, likes, follows, and more on your behalf.`,icon:v,iconVariant:"loading",iconLoadingStatus:{success:a,fail:!!n},primaryCta:d&&h?{label:"Open Farcaster app",onClick:h}:void 0,onBack:u,onClose:g,watermark:!0}:{title:n?n.message:"Requesting signer from Farcaster",subtitle:n?n.detail:"This should only take a moment",icon:v,iconVariant:"loading",iconLoadingStatus:{success:a,fail:!!n},onBack:u,onClose:g,watermark:!0,children:d&&i&&/*#__PURE__*/e(j,{children:/*#__PURE__*/e(m,{text:"Take me to Farcaster",url:d,color:y})})}:{title:"Add a signer to Farcaster",subtitle:`This will allow ${r} to add casts, likes, follows, and more on your behalf.`,onBack:u,onClose:g,watermark:!0,children:/*#__PURE__*/t(w,{children:[/*#__PURE__*/e(x,{children:d?/*#__PURE__*/e(p,{url:d,size:275,squareLogoElement:v}):/*#__PURE__*/e(S,{children:/*#__PURE__*/e(c,{})})}),/*#__PURE__*/t(C,{children:[/*#__PURE__*/e(b,{children:"Or copy this link and paste it into a phone browser to open the Farcaster app."}),d&&/*#__PURE__*/e(l,{text:d,itemName:"link",color:y})]})]})});let j=n.div`
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useState as r,useRef as o,useEffect as a}from"react";import{isMobile as i,isIOS as s}from"react-device-detect";import{styled as n}from"styled-components";import{C as l}from"./CopyToClipboard-BGTSFnT3.mjs";import{L as c}from"./useActiveWallet-RUYo4pXO.mjs";import{O as m}from"./OpenLink-DZHy38vr.mjs";import{Q as p}from"./QrCode-Bp7vKyXB.mjs";import{u as d,q as u}from"./context-Bu4xmqpC.mjs";import{u as g}from"./internal-context-e-Eni5bG.mjs";import{a as h}from"./get-is-unified-wallet-CvIzjbW7.mjs";import{S as f}from"./ScreenLayout-DIdy7nhJ.mjs";import{F as v}from"./farcaster-DPlSjvF5.mjs";import"./copy-Bx2Jwc5_.mjs";import"zustand";import"./prepareFundingModalData-CRrWM52E.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-BkIu5vyx.mjs";import"qrcode";import"tinycolor2";import"ofetch";import"./ModalHeader-D5psNgrf.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-q8npRQhQ.mjs";import"./index-Dq_xe9dz.mjs";let y="#8a63d2";const k=({appName:r,loading:o,success:a,errorMessage:n,connectUri:d,onBack:u,onClose:g,onOpenFarcaster:h})=>/*#__PURE__*/e(f,i||o?s?{title:n?n.message:"Add a signer to Farcaster",subtitle:n?n.detail:`This will allow ${r} to add casts, likes, follows, and more on your behalf.`,icon:v,iconVariant:"loading",iconLoadingStatus:{success:a,fail:!!n},primaryCta:d&&h?{label:"Open Farcaster app",onClick:h}:void 0,onBack:u,onClose:g,watermark:!0}:{title:n?n.message:"Requesting signer from Farcaster",subtitle:n?n.detail:"This should only take a moment",icon:v,iconVariant:"loading",iconLoadingStatus:{success:a,fail:!!n},onBack:u,onClose:g,watermark:!0,children:d&&i&&/*#__PURE__*/e(j,{children:/*#__PURE__*/e(m,{text:"Take me to Farcaster",url:d,color:y})})}:{title:"Add a signer to Farcaster",subtitle:`This will allow ${r} to add casts, likes, follows, and more on your behalf.`,onBack:u,onClose:g,watermark:!0,children:/*#__PURE__*/t(w,{children:[/*#__PURE__*/e(x,{children:d?/*#__PURE__*/e(p,{url:d,size:275,squareLogoElement:v}):/*#__PURE__*/e(S,{children:/*#__PURE__*/e(c,{})})}),/*#__PURE__*/t(C,{children:[/*#__PURE__*/e(b,{children:"Or copy this link and paste it into a phone browser to open the Farcaster app."}),d&&/*#__PURE__*/e(l,{text:d,itemName:"link",color:y})]})]})});let j=n.div`
2
2
  margin-top: 24px;
3
3
  `,w=n.div`
4
4
  display: flex;
@@ -1 +1 @@
1
- import{jsx as t,jsxs as e,Fragment as a}from"react/jsx-runtime";import n from"@heroicons/react/24/outline/CheckCircleIcon";import{useState as o,useEffect as r}from"react";import{formatWalletAddress as s}from"@privy-io/js-sdk-core";import{B as i,P as l}from"./ModalHeader-B32Zin0a.mjs";import{b as m,c,R as d,e as u}from"./Layouts-BlFm53ED.mjs";import{C as p}from"./ScreenHeader-CHmc4-Lu.mjs";import{t as f}from"./FundWalletMethodHeader-SJUeDFRm.mjs";import{I as g}from"./InjectedWalletIcon-DLcYOGDj.mjs";import{N as h}from"./index-Dq_xe9dz.mjs";import{L as I,V as w}from"./Value-tcJV9e0L.mjs";import{a as S,R as v}from"./Row-C9vrS4Zi.mjs";import{u as j,t as C}from"./context-BuN0M_vH.mjs";import{u as y,a as L,b as F}from"./internal-context-e-Eni5bG.mjs";import{a as x}from"./get-is-unified-wallet-DF10lirM.mjs";import{u as k,g as U}from"./useWallets-CvGE4Njt.mjs";import{u as T}from"./useGetTokenPrice-B4b3Y3ZV.mjs";import{O as A}from"./analytics-mkkvFRju.mjs";import{getTransferSolInstruction as W}from"@solana-program/system";import{pipe as b,createTransactionMessage as P,setTransactionMessageFeePayerSigner as D,setTransactionMessageLifetimeUsingBlockhash as N,appendTransactionMessageInstruction as M,compileTransaction as O,getTransactionEncoder as E}from"@solana/kit";import{findAssociatedTokenPda as $,getCreateAssociatedTokenIdempotentInstruction as B,getTransferInstruction as R}from"@solana-program/token";import{T as H,L as G,g as V}from"./getFormattedUsdFromLamports-B6EqSEho.mjs";import{g as Q}from"./getUsdcMintAddress-DFI1hv05.mjs";import{u as _,f as z,s as X,w as Y}from"./useSolanaRpcClient-CRKGswty.mjs";import{g as q}from"./getChainName-DjpPdUSc.mjs";import{t as J}from"./prepareFundingModalData-BHP1zZ9a.mjs";import"styled-components";import"./useActiveWallet-BY2wKTVp.mjs";import"zustand";import"react-device-detect";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-DTjrHNDw.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"@heroicons/react/24/outline/WalletIcon";import"./LoadingSkeleton-U6-3yFwI.mjs";import"tinycolor2";import"ofetch";import"./usePrivy-DQKLhXbj.mjs";import"eventemitter3";import"@scure/base";import"./use-sign-with-user-signer-eEm9Olt_.mjs";import"./useGetSolPrice-Cfm8o9C5.mjs";function K({rows:a}){/*#__PURE__*/return t(S,{children:a.filter((t=>!!t)).map(((a,n)=>null!=a.value||a.isLoading?/*#__PURE__*/e(v,{children:[/*#__PURE__*/t(I,{children:a.label}),/*#__PURE__*/t(w,{$isLoading:a.isLoading,children:a.value})]},n):null))})}function Z(t){return BigInt(Math.floor(1e9*parseFloat(t)))}function tt(t){return+et.format(parseFloat(t.toString())/1e9)}let et=Intl.NumberFormat(void 0,{maximumFractionDigits:8});async function at({tx:t,solanaClient:e,amount:a,asset:n,tokenPrice:o}){if(!t)return null;if("SOL"===n&&o){let n=Z(a),r=V(n,o),s=await z({solanaClient:e,tx:t});return{amountInUsd:r,feeInUsd:o?V(s,o):void 0,totalInUsd:V(n+s,o)}}if("USDC"===n&&o){let n="$"+a,r=await z({solanaClient:e,tx:t}),s=function(t,e){let a=parseFloat(t.toString())/G*e;return a<.01?0:a}(r,o);return{amountInUsd:n,feeInUsd:V(r,o),totalInUsd:"$"+(parseFloat(a)+s).toFixed(2)}}if("SOL"===n){let n=Z(a),o=await z({solanaClient:e,tx:t});return{amountInSol:a+" SOL",feeInSol:tt(o)+" SOL",totalInSol:tt(n+o)+" SOL"}}return{amountInUsdc:a+" USDC",feeInSol:tt(await z({solanaClient:e,tx:t}))+" SOL"}}const nt={component:function(){let I=j(),{closePrivyModal:w,createAnalyticsEvent:S}=y(),{data:v,setModalData:G,navigate:z}=x(),{wallets:tt}=k(),[et,nt]=o("preparing"),[ot,rt]=o(),[st,it]=o(),[lt,mt]=o();if(!v?.solanaFundingData)throw Error("Funding config is missing");if(!v.solanaFundingData.sourceWalletData)throw Error("Funding config is missing source wallet data");let{amount:ct,asset:dt,chain:ut,sourceWalletData:pt,destinationAddress:ft,afterSuccessScreen:gt}=v.solanaFundingData,ht=tt.find((t=>t.address===pt.address&&J(pt.walletClientType)===J(t.standardWallet.name))),It=_()(ut),{tokenPrice:wt,isTokenPriceLoading:St}=T("solana");return r((()=>{if("preparing"!==et||St||!ht)return;let t="SOL"===dt?Z(ct):function(t){return BigInt(Math.floor(1e6*parseFloat(t)))}(ct);it({amount:("SOL"===dt&&wt?V(t,wt):ct)??ct}),("SOL"===dt?async function({solanaClient:t,source:e,destination:a,amountInLamports:n}){let{value:o}=await t.rpc.getLatestBlockhash().send(),r={address:e},s=b(P({version:0}),(t=>D(r,t)),(t=>N(o,t)),(t=>M(W({amount:n,source:r,destination:a}),t)),(t=>O(t)));return new Uint8Array(E().encode(s))}({solanaClient:It,source:ht.address,destination:ft,amountInLamports:t}):async function({solanaClient:t,source:e,destination:a,amountInBaseUnits:n}){let o=Q(t.chain),{value:r}=await t.rpc.getLatestBlockhash().send(),s={address:e},[i]=await $({mint:o,owner:e,tokenProgram:H}),[l]=await $({mint:o,owner:a,tokenProgram:H}),[m,c]=await Promise.all([t.rpc.getAccountInfo(i,{commitment:"confirmed",encoding:"jsonParsed"}).send().catch((()=>null)),t.rpc.getAccountInfo(l,{commitment:"confirmed",encoding:"jsonParsed"}).send().catch((()=>null))]);if(!m?.value)throw Error(`Source token account does not exist for address: ${e}`);let d=B({payer:s,ata:l,owner:a,mint:o}),u=b(P({version:0}),(t=>D(s,t)),(t=>N(r,t)),(t=>c?.value?t:M(d,t)),(t=>M(R({source:i,destination:l,authority:s,amount:n}),t)),(t=>O(t)));return new Uint8Array(E().encode(u))}({solanaClient:It,source:ht.address,destination:ft,amountInBaseUnits:t})).then(rt).catch((t=>{nt("error"),mt(t)}))}),[et,ct,dt,ut,ht,ft,St,wt]),r((()=>{"preparing"===et&&ot&&at({tx:ot,solanaClient:It,amount:ct,asset:dt,tokenPrice:wt}).then((t=>{nt("loaded"),it({amount:t?.amountInUsd??t?.amountInUsdc??t?.amountInSol??ct,fee:t?.feeInUsd??t?.feeInSol,total:t?.totalInUsd??t?.totalInSol})})).catch((t=>{nt("error"),mt(t)}))}),[ot,ct,dt,et,wt]),r((()=>{"error"===et&&lt&&(G({errorModalData:{error:lt,previousScreen:"FundSolWalletWithExternalSolanaWallet"},solanaFundingData:v.solanaFundingData}),z("ErrorScreen",!1))}),[et,z]),r((()=>{if("success"!==et)return;let t=setTimeout(gt?()=>z(gt):w,C);return()=>clearTimeout(t)}),[et]),/*#__PURE__*/e(a,"success"===et?{children:[/*#__PURE__*/t(f,{}),/*#__PURE__*/t(m,{}),/*#__PURE__*/e(c,{children:[/*#__PURE__*/t(n,{color:"var(--privy-color-success)",width:"64px",height:"64px"}),/*#__PURE__*/t(p,{title:"Success!",description:`You’ve successfully added ${ct} ${dt} to your ${I.name} wallet. It may take a minute before the funds are available to use.`})]}),/*#__PURE__*/t(d,{}),/*#__PURE__*/t(i,{})]}:"preparing"===et||"loaded"===et||"sending"===et?{children:[/*#__PURE__*/t(f,{}),/*#__PURE__*/t(u,{style:{marginTop:"16px"},children:/*#__PURE__*/t(g,{icon:ht?.standardWallet.icon,name:ht?.standardWallet.name})}),/*#__PURE__*/t(p,{style:{marginTop:"8px",marginBottom:"12px"},title:"sending"===et&&ht?`Confirming with ${ht.standardWallet.name}`:"Confirm transaction"}),/*#__PURE__*/t(K,{rows:[{label:"Source",value:s(pt.address)},{label:"Destination",value:s(ft)},{label:"Network",value:q(ut)},{label:"Amount",value:st?.amount,isLoading:"preparing"===et},{label:"Estimated fee",value:st?.fee,isLoading:"preparing"===et},{label:"Total",value:st?.total,isLoading:"preparing"===et}]}),/*#__PURE__*/t(l,{style:{marginTop:"1rem"},loading:"preparing"===et||"sending"===et,onClick:function(){"loaded"===et&&ot&&ht&&(nt("sending"),async function({transaction:t,chain:e,sourceWallet:a,solanaClient:n}){let{hasFunds:o}=await X({solanaClient:n,tx:t});if(!o)throw new L(`Wallet ${s(a.address)} does not have enough funds.`,void 0,F.INSUFFICIENT_BALANCE);let r=U((await a.signAndSendTransaction({transaction:t,chain:e}).catch((t=>{throw new L("Transaction was rejected by the user",t,F.TRANSACTION_FAILURE)}))).signature);return await Y({rpcSubscriptions:n.rpcSubscriptions,signature:r,timeout:2e4}),r}({solanaClient:It,transaction:ot,chain:ut,sourceWallet:ht}).then((t=>{nt("success"),S({eventName:A,payload:{provider:"external",status:"success",txHash:t,address:ht.address,value:ct,chainType:"solana",clusterName:ut,token:dt,destinationAddress:ft,destinationValue:ct,destinationChainType:"solana",destinationClusterName:ut,destinationToken:dt}})})).catch((t=>{nt("error"),mt(t)})))},children:"Confirm"}),/*#__PURE__*/t(i,{})]}:{children:[/*#__PURE__*/t(f,{}),/*#__PURE__*/t(h,{}),/*#__PURE__*/t("div",{style:{marginTop:"1rem"}}),/*#__PURE__*/t(i,{})]})}};export{nt as FundSolWalletWithExternalSolanaWallet,nt as default};
1
+ import{jsx as t,jsxs as e,Fragment as a}from"react/jsx-runtime";import n from"@heroicons/react/24/outline/CheckCircleIcon";import{useState as o,useEffect as r}from"react";import{formatWalletAddress as s}from"@privy-io/js-sdk-core";import{B as i,P as l}from"./ModalHeader-D5psNgrf.mjs";import{b as m,c,R as d,e as u}from"./Layouts-BlFm53ED.mjs";import{C as p}from"./ScreenHeader-CHmc4-Lu.mjs";import{t as f}from"./FundWalletMethodHeader-CI5afzwL.mjs";import{I as g}from"./InjectedWalletIcon-DLcYOGDj.mjs";import{N as h}from"./index-Dq_xe9dz.mjs";import{L as I,V as w}from"./Value-tcJV9e0L.mjs";import{a as S,R as v}from"./Row-C9vrS4Zi.mjs";import{u as j,t as C}from"./context-Bu4xmqpC.mjs";import{u as y,a as L,b as F}from"./internal-context-e-Eni5bG.mjs";import{a as x}from"./get-is-unified-wallet-CvIzjbW7.mjs";import{u as k,g as U}from"./useWallets-O-mGV40Z.mjs";import{u as T}from"./useGetTokenPrice-C1-pGMgN.mjs";import{O as A}from"./analytics-mkkvFRju.mjs";import{getTransferSolInstruction as W}from"@solana-program/system";import{pipe as b,createTransactionMessage as P,setTransactionMessageFeePayerSigner as D,setTransactionMessageLifetimeUsingBlockhash as N,appendTransactionMessageInstruction as M,compileTransaction as O,getTransactionEncoder as E}from"@solana/kit";import{findAssociatedTokenPda as $,getCreateAssociatedTokenIdempotentInstruction as B,getTransferInstruction as R}from"@solana-program/token";import{T as H,L as G,g as V}from"./getFormattedUsdFromLamports-B6EqSEho.mjs";import{g as Q}from"./getUsdcMintAddress-DFI1hv05.mjs";import{u as _,f as z,s as X,w as Y}from"./useSolanaRpcClient-C55AFEgY.mjs";import{g as q}from"./getChainName-DjpPdUSc.mjs";import{t as J}from"./prepareFundingModalData-CRrWM52E.mjs";import"styled-components";import"./useActiveWallet-RUYo4pXO.mjs";import"zustand";import"react-device-detect";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-BkIu5vyx.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"@heroicons/react/24/outline/WalletIcon";import"./LoadingSkeleton-U6-3yFwI.mjs";import"tinycolor2";import"ofetch";import"./usePrivy-Bn7q4pcu.mjs";import"eventemitter3";import"@scure/base";import"./use-sign-with-user-signer-eEm9Olt_.mjs";import"./useGetSolPrice-Cfm8o9C5.mjs";function K({rows:a}){/*#__PURE__*/return t(S,{children:a.filter((t=>!!t)).map(((a,n)=>null!=a.value||a.isLoading?/*#__PURE__*/e(v,{children:[/*#__PURE__*/t(I,{children:a.label}),/*#__PURE__*/t(w,{$isLoading:a.isLoading,children:a.value})]},n):null))})}function Z(t){return BigInt(Math.floor(1e9*parseFloat(t)))}function tt(t){return+et.format(parseFloat(t.toString())/1e9)}let et=Intl.NumberFormat(void 0,{maximumFractionDigits:8});async function at({tx:t,solanaClient:e,amount:a,asset:n,tokenPrice:o}){if(!t)return null;if("SOL"===n&&o){let n=Z(a),r=V(n,o),s=await z({solanaClient:e,tx:t});return{amountInUsd:r,feeInUsd:o?V(s,o):void 0,totalInUsd:V(n+s,o)}}if("USDC"===n&&o){let n="$"+a,r=await z({solanaClient:e,tx:t}),s=function(t,e){let a=parseFloat(t.toString())/G*e;return a<.01?0:a}(r,o);return{amountInUsd:n,feeInUsd:V(r,o),totalInUsd:"$"+(parseFloat(a)+s).toFixed(2)}}if("SOL"===n){let n=Z(a),o=await z({solanaClient:e,tx:t});return{amountInSol:a+" SOL",feeInSol:tt(o)+" SOL",totalInSol:tt(n+o)+" SOL"}}return{amountInUsdc:a+" USDC",feeInSol:tt(await z({solanaClient:e,tx:t}))+" SOL"}}const nt={component:function(){let I=j(),{closePrivyModal:w,createAnalyticsEvent:S}=y(),{data:v,setModalData:G,navigate:z}=x(),{wallets:tt}=k(),[et,nt]=o("preparing"),[ot,rt]=o(),[st,it]=o(),[lt,mt]=o();if(!v?.solanaFundingData)throw Error("Funding config is missing");if(!v.solanaFundingData.sourceWalletData)throw Error("Funding config is missing source wallet data");let{amount:ct,asset:dt,chain:ut,sourceWalletData:pt,destinationAddress:ft,afterSuccessScreen:gt}=v.solanaFundingData,ht=tt.find((t=>t.address===pt.address&&J(pt.walletClientType)===J(t.standardWallet.name))),It=_()(ut),{tokenPrice:wt,isTokenPriceLoading:St}=T("solana");return r((()=>{if("preparing"!==et||St||!ht)return;let t="SOL"===dt?Z(ct):function(t){return BigInt(Math.floor(1e6*parseFloat(t)))}(ct);it({amount:("SOL"===dt&&wt?V(t,wt):ct)??ct}),("SOL"===dt?async function({solanaClient:t,source:e,destination:a,amountInLamports:n}){let{value:o}=await t.rpc.getLatestBlockhash().send(),r={address:e},s=b(P({version:0}),(t=>D(r,t)),(t=>N(o,t)),(t=>M(W({amount:n,source:r,destination:a}),t)),(t=>O(t)));return new Uint8Array(E().encode(s))}({solanaClient:It,source:ht.address,destination:ft,amountInLamports:t}):async function({solanaClient:t,source:e,destination:a,amountInBaseUnits:n}){let o=Q(t.chain),{value:r}=await t.rpc.getLatestBlockhash().send(),s={address:e},[i]=await $({mint:o,owner:e,tokenProgram:H}),[l]=await $({mint:o,owner:a,tokenProgram:H}),[m,c]=await Promise.all([t.rpc.getAccountInfo(i,{commitment:"confirmed",encoding:"jsonParsed"}).send().catch((()=>null)),t.rpc.getAccountInfo(l,{commitment:"confirmed",encoding:"jsonParsed"}).send().catch((()=>null))]);if(!m?.value)throw Error(`Source token account does not exist for address: ${e}`);let d=B({payer:s,ata:l,owner:a,mint:o}),u=b(P({version:0}),(t=>D(s,t)),(t=>N(r,t)),(t=>c?.value?t:M(d,t)),(t=>M(R({source:i,destination:l,authority:s,amount:n}),t)),(t=>O(t)));return new Uint8Array(E().encode(u))}({solanaClient:It,source:ht.address,destination:ft,amountInBaseUnits:t})).then(rt).catch((t=>{nt("error"),mt(t)}))}),[et,ct,dt,ut,ht,ft,St,wt]),r((()=>{"preparing"===et&&ot&&at({tx:ot,solanaClient:It,amount:ct,asset:dt,tokenPrice:wt}).then((t=>{nt("loaded"),it({amount:t?.amountInUsd??t?.amountInUsdc??t?.amountInSol??ct,fee:t?.feeInUsd??t?.feeInSol,total:t?.totalInUsd??t?.totalInSol})})).catch((t=>{nt("error"),mt(t)}))}),[ot,ct,dt,et,wt]),r((()=>{"error"===et&&lt&&(G({errorModalData:{error:lt,previousScreen:"FundSolWalletWithExternalSolanaWallet"},solanaFundingData:v.solanaFundingData}),z("ErrorScreen",!1))}),[et,z]),r((()=>{if("success"!==et)return;let t=setTimeout(gt?()=>z(gt):w,C);return()=>clearTimeout(t)}),[et]),/*#__PURE__*/e(a,"success"===et?{children:[/*#__PURE__*/t(f,{}),/*#__PURE__*/t(m,{}),/*#__PURE__*/e(c,{children:[/*#__PURE__*/t(n,{color:"var(--privy-color-success)",width:"64px",height:"64px"}),/*#__PURE__*/t(p,{title:"Success!",description:`You’ve successfully added ${ct} ${dt} to your ${I.name} wallet. It may take a minute before the funds are available to use.`})]}),/*#__PURE__*/t(d,{}),/*#__PURE__*/t(i,{})]}:"preparing"===et||"loaded"===et||"sending"===et?{children:[/*#__PURE__*/t(f,{}),/*#__PURE__*/t(u,{style:{marginTop:"16px"},children:/*#__PURE__*/t(g,{icon:ht?.standardWallet.icon,name:ht?.standardWallet.name})}),/*#__PURE__*/t(p,{style:{marginTop:"8px",marginBottom:"12px"},title:"sending"===et&&ht?`Confirming with ${ht.standardWallet.name}`:"Confirm transaction"}),/*#__PURE__*/t(K,{rows:[{label:"Source",value:s(pt.address)},{label:"Destination",value:s(ft)},{label:"Network",value:q(ut)},{label:"Amount",value:st?.amount,isLoading:"preparing"===et},{label:"Estimated fee",value:st?.fee,isLoading:"preparing"===et},{label:"Total",value:st?.total,isLoading:"preparing"===et}]}),/*#__PURE__*/t(l,{style:{marginTop:"1rem"},loading:"preparing"===et||"sending"===et,onClick:function(){"loaded"===et&&ot&&ht&&(nt("sending"),async function({transaction:t,chain:e,sourceWallet:a,solanaClient:n}){let{hasFunds:o}=await X({solanaClient:n,tx:t});if(!o)throw new L(`Wallet ${s(a.address)} does not have enough funds.`,void 0,F.INSUFFICIENT_BALANCE);let r=U((await a.signAndSendTransaction({transaction:t,chain:e}).catch((t=>{throw new L("Transaction was rejected by the user",t,F.TRANSACTION_FAILURE)}))).signature);return await Y({rpcSubscriptions:n.rpcSubscriptions,signature:r,timeout:2e4}),r}({solanaClient:It,transaction:ot,chain:ut,sourceWallet:ht}).then((t=>{nt("success"),S({eventName:A,payload:{provider:"external",status:"success",txHash:t,address:ht.address,value:ct,chainType:"solana",clusterName:ut,token:dt,destinationAddress:ft,destinationValue:ct,destinationChainType:"solana",destinationClusterName:ut,destinationToken:dt}})})).catch((t=>{nt("error"),mt(t)})))},children:"Confirm"}),/*#__PURE__*/t(i,{})]}:{children:[/*#__PURE__*/t(f,{}),/*#__PURE__*/t(h,{}),/*#__PURE__*/t("div",{style:{marginTop:"1rem"}}),/*#__PURE__*/t(i,{})]})}};export{nt as FundSolWalletWithExternalSolanaWallet,nt as default};
@@ -1 +1 @@
1
- import{jsx as n}from"react/jsx-runtime";import{a as e}from"./get-is-unified-wallet-DF10lirM.mjs";import{M as a}from"./ModalHeader-B32Zin0a.mjs";function t({title:t}){let{currentScreen:i,navigateBack:r,navigate:d,data:o,setModalData:u}=e();/*#__PURE__*/return n(a,{title:t,backFn:"ManualTransferScreen"===i?r:i===o?.funding?.methodScreen?o.funding.comingFromSendTransactionScreen?()=>d("SendTransactionScreen"):void 0:o?.funding?.methodScreen?()=>{let n=o.funding;n.usingDefaultFundingMethod&&(n.usingDefaultFundingMethod=!1),u({funding:n,solanaFundingData:o?.solanaFundingData}),d(n.methodScreen)}:void 0})}export{t};
1
+ import{jsx as n}from"react/jsx-runtime";import{a as e}from"./get-is-unified-wallet-CvIzjbW7.mjs";import{M as a}from"./ModalHeader-D5psNgrf.mjs";function t({title:t}){let{currentScreen:i,navigateBack:r,navigate:d,data:o,setModalData:u}=e();/*#__PURE__*/return n(a,{title:t,backFn:"ManualTransferScreen"===i?r:i===o?.funding?.methodScreen?o.funding.comingFromSendTransactionScreen?()=>d("SendTransactionScreen"):void 0:o?.funding?.methodScreen?()=>{let n=o.funding;n.usingDefaultFundingMethod&&(n.usingDefaultFundingMethod=!1),u({funding:n,solanaFundingData:o?.solanaFundingData}),d(n.methodScreen)}:void 0})}export{t};
@@ -1 +1 @@
1
- import{jsxs as t,Fragment as e,jsx as o}from"react/jsx-runtime";import{useRef as r}from"react";import{c as i,B as n}from"./ModalHeader-B32Zin0a.mjs";import{F as a}from"./Layouts-BlFm53ED.mjs";import{t as m}from"./FundWalletMethodHeader-SJUeDFRm.mjs";import{N as s}from"./index-Dq_xe9dz.mjs";import{T as c}from"./Title-BnzYV3Is.mjs";import{a as l}from"./get-is-unified-wallet-DF10lirM.mjs";import{u as p}from"./useGetTokenPrice-B4b3Y3ZV.mjs";import{c as d}from"./ethers-CJEkGodq.mjs";import{F as u,a as h,h as j,c as f,d as C}from"./styles-Bz8FxEx_.mjs";import"styled-components";import"./context-BuN0M_vH.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./useActiveWallet-BY2wKTVp.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-BHP1zZ9a.mjs";import"./internal-context-e-Eni5bG.mjs";import"ofetch";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-DTjrHNDw.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"./useGetSolPrice-Cfm8o9C5.mjs";import"./LinkPasskeyScreen-DIg97p-E.mjs";import"lucide-react";import"./TodoList-CgrU7uwu.mjs";import"./ScreenLayout-DptX1e0c.mjs";import"./Screen-DHkF35VN.mjs";const g={component:()=>{let{data:g,setModalData:v}=l(),y=g?.funding,k="solana"===y.chainType,S=r(null),{tokenPrice:x}=p(k?"solana":y.chain.id),D=k?void 0:y,F=!(!D?.erc20Address||D?.erc20ContractInfo),T=k?y.isUSDC?"USDC":"SOL":y.erc20Address?y.erc20ContractInfo?.symbol:y.chain.nativeCurrency.symbol||"ETH",M=parseFloat(y.amount),A=!isNaN(M)&&M>0,I=x?d(y.amount,x):void 0;/*#__PURE__*/return t(e,{children:[/*#__PURE__*/o(m,{}),/*#__PURE__*/o(c,{children:"Confirm or edit amount"}),/*#__PURE__*/t(a,{style:{marginTop:"32px"},children:[/*#__PURE__*/o(u,{children:F?/*#__PURE__*/o(s,{size:"50px"}):/*#__PURE__*/t(e,{children:[/*#__PURE__*/t(h,{onClick:()=>S.current?.focus(),children:[/*#__PURE__*/o(j,{ref:S,value:y.amount,onChange:t=>{let e=t.target.value;/^[0-9.]*$/.test(e)&&e.split(".").length-1<=1&&v({...g,funding:{...y,amount:e},solanaFundingData:g?.solanaFundingData?{...g.solanaFundingData,amount:e}:void 0})}}),/*#__PURE__*/o(f,{children:T})]}),!D?.erc20Address&&!(k&&y.isUSDC)&&/*#__PURE__*/o(C,{children:I&&A?`${I} USD`:""})]})}),/*#__PURE__*/o(i,{style:{marginTop:"1rem"},disabled:!A,onClick:y.onContinueWithExternalWallet,children:"Continue"})]}),/*#__PURE__*/o(n,{})]})}};export{g as FundingAmountEditScreen,g as default};
1
+ import{jsxs as t,Fragment as e,jsx as o}from"react/jsx-runtime";import{useRef as r}from"react";import{c as i,B as n}from"./ModalHeader-D5psNgrf.mjs";import{F as a}from"./Layouts-BlFm53ED.mjs";import{t as m}from"./FundWalletMethodHeader-CI5afzwL.mjs";import{N as s}from"./index-Dq_xe9dz.mjs";import{T as c}from"./Title-BnzYV3Is.mjs";import{a as l}from"./get-is-unified-wallet-CvIzjbW7.mjs";import{u as p}from"./useGetTokenPrice-C1-pGMgN.mjs";import{c as d}from"./ethers-TpFbevgv.mjs";import{F as u,a as h,h as j,c as f,d as C}from"./styles-CaJCyFB5.mjs";import"styled-components";import"./context-Bu4xmqpC.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./useActiveWallet-RUYo4pXO.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-CRrWM52E.mjs";import"./internal-context-e-Eni5bG.mjs";import"ofetch";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-A9RSftUZ.mjs";import"./useWallets-BkIu5vyx.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"./useGetSolPrice-Cfm8o9C5.mjs";import"./LinkPasskeyScreen-DJveInKu.mjs";import"lucide-react";import"./TodoList-CgrU7uwu.mjs";import"./ScreenLayout-DIdy7nhJ.mjs";import"./Screen-q8npRQhQ.mjs";const g={component:()=>{let{data:g,setModalData:v}=l(),y=g?.funding,k="solana"===y.chainType,S=r(null),{tokenPrice:x}=p(k?"solana":y.chain.id),D=k?void 0:y,F=!(!D?.erc20Address||D?.erc20ContractInfo),T=k?y.isUSDC?"USDC":"SOL":y.erc20Address?y.erc20ContractInfo?.symbol:y.chain.nativeCurrency.symbol||"ETH",M=parseFloat(y.amount),A=!isNaN(M)&&M>0,I=x?d(y.amount,x):void 0;/*#__PURE__*/return t(e,{children:[/*#__PURE__*/o(m,{}),/*#__PURE__*/o(c,{children:"Confirm or edit amount"}),/*#__PURE__*/t(a,{style:{marginTop:"32px"},children:[/*#__PURE__*/o(u,{children:F?/*#__PURE__*/o(s,{size:"50px"}):/*#__PURE__*/t(e,{children:[/*#__PURE__*/t(h,{onClick:()=>S.current?.focus(),children:[/*#__PURE__*/o(j,{ref:S,value:y.amount,onChange:t=>{let e=t.target.value;/^[0-9.]*$/.test(e)&&e.split(".").length-1<=1&&v({...g,funding:{...y,amount:e},solanaFundingData:g?.solanaFundingData?{...g.solanaFundingData,amount:e}:void 0})}}),/*#__PURE__*/o(f,{children:T})]}),!D?.erc20Address&&!(k&&y.isUSDC)&&/*#__PURE__*/o(C,{children:I&&A?`${I} USD`:""})]})}),/*#__PURE__*/o(i,{style:{marginTop:"1rem"},disabled:!A,onClick:y.onContinueWithExternalWallet,children:"Continue"})]}),/*#__PURE__*/o(n,{})]})}};export{g as FundingAmountEditScreen,g as default};
@@ -1 +1 @@
1
- import{jsx as e,jsxs as n,Fragment as t}from"react/jsx-runtime";import a from"@heroicons/react/24/outline/CreditCardIcon";import i from"@heroicons/react/24/outline/QrCodeIcon";import o from"@heroicons/react/24/solid/ArrowsRightLeftIcon";import{useState as r,useEffect as c,useMemo as d}from"react";import{getAddress as s}from"viem/utils";import{B as l}from"./ModalHeader-B32Zin0a.mjs";import{t as h}from"./FundWalletMethodHeader-SJUeDFRm.mjs";import{E as p}from"./ErrorBanner-CQERa7bL.mjs";import{I as m}from"./InfoBanner-Dk1KghcK.mjs";import{u}from"./context-BuN0M_vH.mjs";import{v as f,Q as g,U as y}from"./useActiveWallet-BY2wKTVp.mjs";import{a as C,u as v}from"./internal-context-e-Eni5bG.mjs";import{a as w}from"./get-is-unified-wallet-DF10lirM.mjs";import{u as F}from"./useWallets-DTjrHNDw.mjs";import{W as M}from"./WalletCards-DH1rqayz.mjs";import{g as b}from"./getErc20TokenInfo-BFoeg5F6.mjs";import{avalanche as S,arbitrum as W,polygon as x,optimism as I,base as j,mainnet as D,toCoinbaseAssetId as T,getCoinbaseOnRampUrl as k,chainToMoonpayCurrency as A,isSupportedChainIdForMoonpay as z,isSupportedChainIdForCoinbaseOnramp as L}from"@privy-io/js-sdk-core";import{trigger as E}from"@privy-io/popup";import{a as U}from"./index-CA0UPK2p.mjs";import{e as O,I as _,f as H,g as P}from"./styles-Bz8FxEx_.mjs";import"styled-components";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"@heroicons/react/24/outline/ExclamationCircleIcon";import"@heroicons/react/24/outline/InformationCircleIcon";import"tinycolor2";import"zustand";import"react-device-detect";import"./prepareFundingModalData-BHP1zZ9a.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-A9RSftUZ.mjs";import"ofetch";import"./analytics-mkkvFRju.mjs";import"./LinkPasskeyScreen-DIg97p-E.mjs";import"lucide-react";import"./TodoList-CgrU7uwu.mjs";import"./ScreenLayout-DptX1e0c.mjs";import"./Screen-DHkF35VN.mjs";import"./index-Dq_xe9dz.mjs";const B=n=>/*#__PURE__*/e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 210.2",xmlSpace:"preserve",...n,children:/*#__PURE__*/e("path",{d:"M93.6,27.1C87.6,34.2,78,39.8,68.4,39c-1.2-9.6,3.5-19.8,9-26.1c6-7.3,16.5-12.5,25-12.9 C103.4,10,99.5,19.8,93.6,27.1 M102.3,40.9c-13.9-0.8-25.8,7.9-32.4,7.9c-6.7,0-16.8-7.5-27.8-7.3c-14.3,0.2-27.6,8.3-34.9,21.2 c-15,25.8-3.9,64,10.6,85c7.1,10.4,15.6,21.8,26.8,21.4c10.6-0.4,14.8-6.9,27.6-6.9c12.9,0,16.6,6.9,27.8,6.7 c11.6-0.2,18.9-10.4,26-20.8c8.1-11.8,11.4-23.3,11.6-23.9c-0.2-0.2-22.4-8.7-22.6-34.3c-0.2-21.4,17.5-31.6,18.3-32.2 C123.3,42.9,107.7,41.3,102.3,40.9 M182.6,11.9v155.9h24.2v-53.3h33.5c30.6,0,52.1-21,52.1-51.4c0-30.4-21.1-51.2-51.3-51.2H182.6z M206.8,32.3h27.9c21,0,33,11.2,33,30.9c0,19.7-12,31-33.1,31h-27.8V32.3z M336.6,169c15.2,0,29.3-7.7,35.7-19.9h0.5v18.7h22.4V90.2 c0-22.5-18-37-45.7-37c-25.7,0-44.7,14.7-45.4,34.9h21.8c1.8-9.6,10.7-15.9,22.9-15.9c14.8,0,23.1,6.9,23.1,19.6v8.6l-30.2,1.8 c-28.1,1.7-43.3,13.2-43.3,33.2C298.4,155.6,314.1,169,336.6,169z M343.1,150.5c-12.9,0-21.1-6.2-21.1-15.7c0-9.8,7.9-15.5,23-16.4 l26.9-1.7v8.8C371.9,140.1,359.5,150.5,343.1,150.5z M425.1,210.2c23.6,0,34.7-9,44.4-36.3L512,54.7h-24.6l-28.5,92.1h-0.5 l-28.5-92.1h-25.3l41,113.5l-2.2,6.9c-3.7,11.7-9.7,16.2-20.4,16.2c-1.9,0-5.6-0.2-7.1-0.4v18.7C417.3,210,423.3,210.2,425.1,210.2z"})}),R=t=>/*#__PURE__*/n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 80 38.1",xmlSpace:"preserve",...t,children:[/*#__PURE__*/e("path",{style:{fill:"#5F6368"},d:"M37.8,19.7V29h-3V6h7.8c1.9,0,3.7,0.7,5.1,2c1.4,1.2,2.1,3,2.1,4.9c0,1.9-0.7,3.6-2.1,4.9c-1.4,1.3-3.1,2-5.1,2 L37.8,19.7L37.8,19.7z M37.8,8.8v8h5c1.1,0,2.2-0.4,2.9-1.2c1.6-1.5,1.6-4,0.1-5.5c0,0-0.1-0.1-0.1-0.1c-0.8-0.8-1.8-1.3-2.9-1.2 L37.8,8.8L37.8,8.8z"}),/*#__PURE__*/e("path",{style:{fill:"#5F6368"},d:"M56.7,12.8c2.2,0,3.9,0.6,5.2,1.8s1.9,2.8,1.9,4.8V29H61v-2.2h-0.1c-1.2,1.8-2.9,2.7-4.9,2.7 c-1.7,0-3.2-0.5-4.4-1.5c-1.1-1-1.8-2.4-1.8-3.9c0-1.6,0.6-2.9,1.8-3.9c1.2-1,2.9-1.4,4.9-1.4c1.8,0,3.2,0.3,4.3,1v-0.7 c0-1-0.4-2-1.2-2.6c-0.8-0.7-1.8-1.1-2.9-1.1c-1.7,0-3,0.7-3.9,2.1l-2.6-1.6C51.8,13.8,53.9,12.8,56.7,12.8z M52.9,24.2 c0,0.8,0.4,1.5,1,1.9c0.7,0.5,1.5,0.8,2.3,0.8c1.2,0,2.4-0.5,3.3-1.4c1-0.9,1.5-2,1.5-3.2c-0.9-0.7-2.2-1.1-3.9-1.1 c-1.2,0-2.2,0.3-3,0.9C53.3,22.6,52.9,23.3,52.9,24.2z"}),/*#__PURE__*/e("path",{style:{fill:"#5F6368"},d:"M80,13.3l-9.9,22.7h-3l3.7-7.9l-6.5-14.7h3.2l4.7,11.3h0.1l4.6-11.3H80z"}),/*#__PURE__*/e("path",{style:{fill:"#4285F4"},d:"M25.9,17.7c0-0.9-0.1-1.8-0.2-2.7H13.2v5.1h7.1c-0.3,1.6-1.2,3.1-2.6,4v3.3H22C24.5,25.1,25.9,21.7,25.9,17.7z"}),/*#__PURE__*/e("path",{style:{fill:"#34A853"},d:"M13.2,30.6c3.6,0,6.6-1.2,8.8-3.2l-4.3-3.3c-1.2,0.8-2.7,1.3-4.5,1.3c-3.4,0-6.4-2.3-7.4-5.5H1.4v3.4 C3.7,27.8,8.2,30.6,13.2,30.6z"}),/*#__PURE__*/e("path",{style:{fill:"#FBBC04"},d:"M5.8,19.9c-0.6-1.6-0.6-3.4,0-5.1v-3.4H1.4c-1.9,3.7-1.9,8.1,0,11.9L5.8,19.9z"}),/*#__PURE__*/e("path",{style:{fill:"#EA4335"},d:"M13.2,9.4c1.9,0,3.7,0.7,5.1,2l0,0l3.8-3.8c-2.4-2.2-5.6-3.5-8.8-3.4c-5,0-9.6,2.8-11.8,7.3l4.4,3.4 C6.8,11.7,9.8,9.4,13.2,9.4z"})]}),V=e=>{let[n,t]=r();return c((()=>{e().then((e=>{t(e)})).catch((()=>{}))}),[]),n};function q(e){let n=N[e];if(!n)throw new C(`Unsupported chainId: ${e} for Coinbase Onramp`);return n}let N={[D.id]:"ethereum",[j.id]:"base",[I.id]:"optimism",[x.id]:"polygon",[W.id]:"arbitrum",[S.id]:"avacchain"};const Q=(e,n,t,a,i,o)=>new Promise((async(r,c)=>{let d=E();if(!d)return void c(Error("Unable to initialize flow"));let s="ethereum"===n.chainType?q(n.chain.id):"solana",l=n.isUSDC?"USDC":"ethereum"===n.chainType?T(n.chain.id,"native-currency"):"SOL",h=await e.initCoinbaseOnRamp({addresses:[{address:n.address,blockchains:[s]}],assets:[l]}),{url:p}=k({appId:e.getAppId(),input:h,amount:n.amount,blockchain:s,asset:l,experience:o});d.location=p.toString();let m={...i?.funding,showAlternateFundingMethod:!0};n.usingDefaultFundingMethod&&(m.usingDefaultFundingMethod=!1),t({funding:m,solanaFundingData:i?.solanaFundingData,coinbaseOnrampStatus:{popup:d}}),a("CoinbaseOnrampStatusScreen"),e.createAnalyticsEvent({eventName:"sdk_fiat_on_ramp_started",payload:{provider:"coinbase-onramp",value:n.amount,chainType:n.chainType,chainId:"ethereum"===n.chainType?n.chain.id:n.chain}}),setTimeout((()=>{t({funding:m,solanaFundingData:i?.solanaFundingData,coinbaseOnrampStatus:{partnerUserId:h.partner_user_id,popup:d}})}),5e3),r()})),$=async(e,n,t,a,i,o,r,c)=>{let d=E();if(!d)throw Error("Unable to initialize flow");let s="ethereum"===n.chainType?A(n.chain.id,a):n.isUSDC?"USDC_SOL":"SOL",{signedUrl:l,externalTransactionId:h}=await e.signMoonpayOnRampUrl({address:n.address,useSandbox:t.fundingMethodConfig.moonpay.useSandbox??!1,config:{uiConfig:{accentColor:t.appearance.palette.accent,theme:t.appearance.palette.colorScheme},paymentMethod:c,currencyCode:s,quoteCurrencyAmount:U(n.amount)}});e.createAnalyticsEvent({eventName:"sdk_fiat_on_ramp_started",payload:{provider:"moonpay",value:n.amount,chainType:n.chainType,chainId:"ethereum"===n.chainType?n.chain.id:n.chain}}),d.location=l;let p={...r?.funding,showAlternateFundingMethod:!0};n.usingDefaultFundingMethod&&(p.usingDefaultFundingMethod=!1),i({moonpayStatus:{},funding:p,solanaFundingData:r?.solanaFundingData}),o("MoonpayStatusScreen"),setTimeout((()=>{i({moonpayStatus:{externalTransactionId:h},funding:p,solanaFundingData:r?.solanaFundingData})}),8e3)};let J=async e=>"undefined"!=typeof window&&"PaymentRequest"in window&&await new window.PaymentRequest([{supportedMethods:e}],{id:"0",total:{label:"Item",amount:{currency:"USD",value:"1.00"}}}).canMakePayment();const X=()=>J("https://apple.com/apple-pay"),G=()=>J("https://google.com/pay"),K={component:()=>{let{wallets:r}=F(),{connectors:C}=v(),S=C.filter(f).flatMap((e=>e.wallets)),{navigate:W,data:x,setModalData:I}=w(),{client:j}=v(),D=u(),T=x?.funding,k=V(X),A=V(G),E="solana"===T.chainType,U=E?void 0:T,q=d((()=>((e,n,t,a,i,o)=>{let r,c,d="solana"===t.chainType,s=d?void 0:t,l=t.isUSDC?"USDC":s?.erc20Address?void 0:"native-currency",h=!!d||l&&z(Number(t.chain.id),l),p=!!d||l&&L(Number(t.chain.id),l),m=[];for(let r of(t.preferredCardProvider&&t.supportedOptions.sort((e=>e.provider===t.preferredCardProvider?-1:1)),t.supportedOptions))"card"===r.method&&"coinbase"===r.provider&&p&&m.push((()=>Q(n,t,a,i,o,"buy"))),"card"===r.method&&"moonpay"===r.provider&&h&&l&&m.push((()=>$(n,t,e,l,a,i,o,"credit_debit_card")));for(let e of t.supportedOptions)"exchange"===e.method&&"coinbase"===e.provider&&p&&(r=()=>Q(n,t,a,i,o,"buy"));for(let e of o?.funding?.supportedOptions??[])"wallets"===e.method&&(c=()=>i("TransferFromWalletScreen"));return{onFundWithCard:m,onFundWithExchange:r,onFundWithWallet:c}})(D,j,T,I,W,x)),[D,j,T,x,I,W]),N=E?S.find((({address:e})=>e===T.address)):r.find((({address:e})=>s(e)===s(T.address))),J=g(N?.walletClientType||"unknown"),K=J?.name||"wallet",Y=N&&"privy"!==N.walletClientType?K:D.name,Z=d((()=>T.uiConfig?.landing?.title?T.uiConfig?.landing?.title:`Add funds to your ${Y?.toLowerCase().endsWith("wallet")?Y:Y+" wallet"}`),[T.uiConfig?.landing?.title,Y]);c((()=>{if(T?.defaultFundingMethod&&T.usingDefaultFundingMethod)switch(I({funding:{...T,usingDefaultFundingMethod:!1},solanaFundingData:x?.solanaFundingData}),T?.defaultFundingMethod){case"card":q.onFundWithCard[0]&&q.onFundWithCard[0]();break;case"exchange":q.onFundWithExchange&&q.onFundWithExchange();break;case"wallet":q.onFundWithWallet&&q.onFundWithWallet();break;case"manual":W("ManualTransferScreen")}}),[]),c((()=>{U?.erc20Address&&!U.erc20ContractInfo&&b({address:U.erc20Address,chain:U.chain,rpcConfig:D.rpcConfig,privyAppId:D.id}).then((e=>{I({...x,funding:{...U,erc20ContractInfo:e?{symbol:e.symbol,decimals:e.decimals}:void 0}})})).catch(console.error)}),[U?.erc20Address,U?.chain]);let ee=!(!U?.erc20Address||U?.erc20ContractInfo);/*#__PURE__*/return n(t,{children:[/*#__PURE__*/e(h,{}),/*#__PURE__*/e("h3",{children:Z}),/*#__PURE__*/n(O,{children:[T.errorMessage&&/*#__PURE__*/e(p,{theme:D.appearance.palette.colorScheme,children:T.errorMessage}),q.onFundWithCard?.[0]&&/*#__PURE__*/n(y,{disabled:ee,onClick:q.onFundWithCard[0],children:[/*#__PURE__*/e(_,{children:/*#__PURE__*/e(a,{style:{width:24}})}),"Pay with card",k?/*#__PURE__*/e(B,{style:{marginLeft:"auto",maxWidth:"100%",width:"auto",height:"0.875rem"}}):A?/*#__PURE__*/e(R,{style:{marginLeft:"auto",maxWidth:"100%",width:"auto",height:"0.875rem"}}):null]}),q.onFundWithExchange&&/*#__PURE__*/n(y,{disabled:ee,onClick:q.onFundWithExchange,children:[/*#__PURE__*/e(_,{children:/*#__PURE__*/e(o,{style:{width:24}})}),"Transfer from an exchange"]}),q.onFundWithWallet&&/*#__PURE__*/n(y,{disabled:ee,onClick:q.onFundWithWallet,children:[/*#__PURE__*/e(_,{children:/*#__PURE__*/e(M,{style:{width:24}})}),"Transfer from wallet"]}),/*#__PURE__*/n(y,{disabled:ee,onClick:()=>W("ManualTransferScreen"),children:[/*#__PURE__*/e(_,{children:/*#__PURE__*/e(i,{style:{width:24}})}),"Receive funds"]}),T?.showAlternateFundingMethod&&q.onFundWithCard?.[1]&&/*#__PURE__*/e(m,{theme:D.appearance.palette.colorScheme,children:/*#__PURE__*/n(H,{children:["Having trouble or facing location restrictions?"," ",/*#__PURE__*/e(P,{onClick:q.onFundWithCard[1],children:"Try a different provider."})]})})]}),/*#__PURE__*/e(l,{})]})}};export{K as FundingMethodSelectionScreen,K as default};
1
+ import{jsx as e,jsxs as n,Fragment as t}from"react/jsx-runtime";import a from"@heroicons/react/24/outline/CreditCardIcon";import i from"@heroicons/react/24/outline/QrCodeIcon";import o from"@heroicons/react/24/solid/ArrowsRightLeftIcon";import{useState as r,useEffect as c,useMemo as d}from"react";import{getAddress as s}from"viem/utils";import{B as l}from"./ModalHeader-D5psNgrf.mjs";import{t as h}from"./FundWalletMethodHeader-CI5afzwL.mjs";import{E as p}from"./ErrorBanner-CQERa7bL.mjs";import{I as m}from"./InfoBanner-Dk1KghcK.mjs";import{u}from"./context-Bu4xmqpC.mjs";import{v as f,Q as g,U as y}from"./useActiveWallet-RUYo4pXO.mjs";import{a as C,u as v}from"./internal-context-e-Eni5bG.mjs";import{a as w}from"./get-is-unified-wallet-CvIzjbW7.mjs";import{u as F}from"./useWallets-BkIu5vyx.mjs";import{W as M}from"./WalletCards-DH1rqayz.mjs";import{g as b}from"./getErc20TokenInfo-BFoeg5F6.mjs";import{avalanche as S,arbitrum as W,polygon as x,optimism as I,base as j,mainnet as D,toCoinbaseAssetId as T,getCoinbaseOnRampUrl as k,chainToMoonpayCurrency as A,isSupportedChainIdForMoonpay as z,isSupportedChainIdForCoinbaseOnramp as L}from"@privy-io/js-sdk-core";import{trigger as E}from"@privy-io/popup";import{a as U}from"./index-DEy_pO5S.mjs";import{e as O,I as _,f as H,g as P}from"./styles-CaJCyFB5.mjs";import"styled-components";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"@heroicons/react/24/outline/ExclamationCircleIcon";import"@heroicons/react/24/outline/InformationCircleIcon";import"tinycolor2";import"zustand";import"react-device-detect";import"./prepareFundingModalData-CRrWM52E.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-A9RSftUZ.mjs";import"ofetch";import"./analytics-mkkvFRju.mjs";import"./LinkPasskeyScreen-DJveInKu.mjs";import"lucide-react";import"./TodoList-CgrU7uwu.mjs";import"./ScreenLayout-DIdy7nhJ.mjs";import"./Screen-q8npRQhQ.mjs";import"./index-Dq_xe9dz.mjs";const B=n=>/*#__PURE__*/e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 210.2",xmlSpace:"preserve",...n,children:/*#__PURE__*/e("path",{d:"M93.6,27.1C87.6,34.2,78,39.8,68.4,39c-1.2-9.6,3.5-19.8,9-26.1c6-7.3,16.5-12.5,25-12.9 C103.4,10,99.5,19.8,93.6,27.1 M102.3,40.9c-13.9-0.8-25.8,7.9-32.4,7.9c-6.7,0-16.8-7.5-27.8-7.3c-14.3,0.2-27.6,8.3-34.9,21.2 c-15,25.8-3.9,64,10.6,85c7.1,10.4,15.6,21.8,26.8,21.4c10.6-0.4,14.8-6.9,27.6-6.9c12.9,0,16.6,6.9,27.8,6.7 c11.6-0.2,18.9-10.4,26-20.8c8.1-11.8,11.4-23.3,11.6-23.9c-0.2-0.2-22.4-8.7-22.6-34.3c-0.2-21.4,17.5-31.6,18.3-32.2 C123.3,42.9,107.7,41.3,102.3,40.9 M182.6,11.9v155.9h24.2v-53.3h33.5c30.6,0,52.1-21,52.1-51.4c0-30.4-21.1-51.2-51.3-51.2H182.6z M206.8,32.3h27.9c21,0,33,11.2,33,30.9c0,19.7-12,31-33.1,31h-27.8V32.3z M336.6,169c15.2,0,29.3-7.7,35.7-19.9h0.5v18.7h22.4V90.2 c0-22.5-18-37-45.7-37c-25.7,0-44.7,14.7-45.4,34.9h21.8c1.8-9.6,10.7-15.9,22.9-15.9c14.8,0,23.1,6.9,23.1,19.6v8.6l-30.2,1.8 c-28.1,1.7-43.3,13.2-43.3,33.2C298.4,155.6,314.1,169,336.6,169z M343.1,150.5c-12.9,0-21.1-6.2-21.1-15.7c0-9.8,7.9-15.5,23-16.4 l26.9-1.7v8.8C371.9,140.1,359.5,150.5,343.1,150.5z M425.1,210.2c23.6,0,34.7-9,44.4-36.3L512,54.7h-24.6l-28.5,92.1h-0.5 l-28.5-92.1h-25.3l41,113.5l-2.2,6.9c-3.7,11.7-9.7,16.2-20.4,16.2c-1.9,0-5.6-0.2-7.1-0.4v18.7C417.3,210,423.3,210.2,425.1,210.2z"})}),R=t=>/*#__PURE__*/n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 80 38.1",xmlSpace:"preserve",...t,children:[/*#__PURE__*/e("path",{style:{fill:"#5F6368"},d:"M37.8,19.7V29h-3V6h7.8c1.9,0,3.7,0.7,5.1,2c1.4,1.2,2.1,3,2.1,4.9c0,1.9-0.7,3.6-2.1,4.9c-1.4,1.3-3.1,2-5.1,2 L37.8,19.7L37.8,19.7z M37.8,8.8v8h5c1.1,0,2.2-0.4,2.9-1.2c1.6-1.5,1.6-4,0.1-5.5c0,0-0.1-0.1-0.1-0.1c-0.8-0.8-1.8-1.3-2.9-1.2 L37.8,8.8L37.8,8.8z"}),/*#__PURE__*/e("path",{style:{fill:"#5F6368"},d:"M56.7,12.8c2.2,0,3.9,0.6,5.2,1.8s1.9,2.8,1.9,4.8V29H61v-2.2h-0.1c-1.2,1.8-2.9,2.7-4.9,2.7 c-1.7,0-3.2-0.5-4.4-1.5c-1.1-1-1.8-2.4-1.8-3.9c0-1.6,0.6-2.9,1.8-3.9c1.2-1,2.9-1.4,4.9-1.4c1.8,0,3.2,0.3,4.3,1v-0.7 c0-1-0.4-2-1.2-2.6c-0.8-0.7-1.8-1.1-2.9-1.1c-1.7,0-3,0.7-3.9,2.1l-2.6-1.6C51.8,13.8,53.9,12.8,56.7,12.8z M52.9,24.2 c0,0.8,0.4,1.5,1,1.9c0.7,0.5,1.5,0.8,2.3,0.8c1.2,0,2.4-0.5,3.3-1.4c1-0.9,1.5-2,1.5-3.2c-0.9-0.7-2.2-1.1-3.9-1.1 c-1.2,0-2.2,0.3-3,0.9C53.3,22.6,52.9,23.3,52.9,24.2z"}),/*#__PURE__*/e("path",{style:{fill:"#5F6368"},d:"M80,13.3l-9.9,22.7h-3l3.7-7.9l-6.5-14.7h3.2l4.7,11.3h0.1l4.6-11.3H80z"}),/*#__PURE__*/e("path",{style:{fill:"#4285F4"},d:"M25.9,17.7c0-0.9-0.1-1.8-0.2-2.7H13.2v5.1h7.1c-0.3,1.6-1.2,3.1-2.6,4v3.3H22C24.5,25.1,25.9,21.7,25.9,17.7z"}),/*#__PURE__*/e("path",{style:{fill:"#34A853"},d:"M13.2,30.6c3.6,0,6.6-1.2,8.8-3.2l-4.3-3.3c-1.2,0.8-2.7,1.3-4.5,1.3c-3.4,0-6.4-2.3-7.4-5.5H1.4v3.4 C3.7,27.8,8.2,30.6,13.2,30.6z"}),/*#__PURE__*/e("path",{style:{fill:"#FBBC04"},d:"M5.8,19.9c-0.6-1.6-0.6-3.4,0-5.1v-3.4H1.4c-1.9,3.7-1.9,8.1,0,11.9L5.8,19.9z"}),/*#__PURE__*/e("path",{style:{fill:"#EA4335"},d:"M13.2,9.4c1.9,0,3.7,0.7,5.1,2l0,0l3.8-3.8c-2.4-2.2-5.6-3.5-8.8-3.4c-5,0-9.6,2.8-11.8,7.3l4.4,3.4 C6.8,11.7,9.8,9.4,13.2,9.4z"})]}),V=e=>{let[n,t]=r();return c((()=>{e().then((e=>{t(e)})).catch((()=>{}))}),[]),n};function q(e){let n=N[e];if(!n)throw new C(`Unsupported chainId: ${e} for Coinbase Onramp`);return n}let N={[D.id]:"ethereum",[j.id]:"base",[I.id]:"optimism",[x.id]:"polygon",[W.id]:"arbitrum",[S.id]:"avacchain"};const Q=(e,n,t,a,i,o)=>new Promise((async(r,c)=>{let d=E();if(!d)return void c(Error("Unable to initialize flow"));let s="ethereum"===n.chainType?q(n.chain.id):"solana",l=n.isUSDC?"USDC":"ethereum"===n.chainType?T(n.chain.id,"native-currency"):"SOL",h=await e.initCoinbaseOnRamp({addresses:[{address:n.address,blockchains:[s]}],assets:[l]}),{url:p}=k({appId:e.getAppId(),input:h,amount:n.amount,blockchain:s,asset:l,experience:o});d.location=p.toString();let m={...i?.funding,showAlternateFundingMethod:!0};n.usingDefaultFundingMethod&&(m.usingDefaultFundingMethod=!1),t({funding:m,solanaFundingData:i?.solanaFundingData,coinbaseOnrampStatus:{popup:d}}),a("CoinbaseOnrampStatusScreen"),e.createAnalyticsEvent({eventName:"sdk_fiat_on_ramp_started",payload:{provider:"coinbase-onramp",value:n.amount,chainType:n.chainType,chainId:"ethereum"===n.chainType?n.chain.id:n.chain}}),setTimeout((()=>{t({funding:m,solanaFundingData:i?.solanaFundingData,coinbaseOnrampStatus:{partnerUserId:h.partner_user_id,popup:d}})}),5e3),r()})),$=async(e,n,t,a,i,o,r,c)=>{let d=E();if(!d)throw Error("Unable to initialize flow");let s="ethereum"===n.chainType?A(n.chain.id,a):n.isUSDC?"USDC_SOL":"SOL",{signedUrl:l,externalTransactionId:h}=await e.signMoonpayOnRampUrl({address:n.address,useSandbox:t.fundingMethodConfig.moonpay.useSandbox??!1,config:{uiConfig:{accentColor:t.appearance.palette.accent,theme:t.appearance.palette.colorScheme},paymentMethod:c,currencyCode:s,quoteCurrencyAmount:U(n.amount)}});e.createAnalyticsEvent({eventName:"sdk_fiat_on_ramp_started",payload:{provider:"moonpay",value:n.amount,chainType:n.chainType,chainId:"ethereum"===n.chainType?n.chain.id:n.chain}}),d.location=l;let p={...r?.funding,showAlternateFundingMethod:!0};n.usingDefaultFundingMethod&&(p.usingDefaultFundingMethod=!1),i({moonpayStatus:{},funding:p,solanaFundingData:r?.solanaFundingData}),o("MoonpayStatusScreen"),setTimeout((()=>{i({moonpayStatus:{externalTransactionId:h},funding:p,solanaFundingData:r?.solanaFundingData})}),8e3)};let J=async e=>"undefined"!=typeof window&&"PaymentRequest"in window&&await new window.PaymentRequest([{supportedMethods:e}],{id:"0",total:{label:"Item",amount:{currency:"USD",value:"1.00"}}}).canMakePayment();const X=()=>J("https://apple.com/apple-pay"),G=()=>J("https://google.com/pay"),K={component:()=>{let{wallets:r}=F(),{connectors:C}=v(),S=C.filter(f).flatMap((e=>e.wallets)),{navigate:W,data:x,setModalData:I}=w(),{client:j}=v(),D=u(),T=x?.funding,k=V(X),A=V(G),E="solana"===T.chainType,U=E?void 0:T,q=d((()=>((e,n,t,a,i,o)=>{let r,c,d="solana"===t.chainType,s=d?void 0:t,l=t.isUSDC?"USDC":s?.erc20Address?void 0:"native-currency",h=!!d||l&&z(Number(t.chain.id),l),p=!!d||l&&L(Number(t.chain.id),l),m=[];for(let r of(t.preferredCardProvider&&t.supportedOptions.sort((e=>e.provider===t.preferredCardProvider?-1:1)),t.supportedOptions))"card"===r.method&&"coinbase"===r.provider&&p&&m.push((()=>Q(n,t,a,i,o,"buy"))),"card"===r.method&&"moonpay"===r.provider&&h&&l&&m.push((()=>$(n,t,e,l,a,i,o,"credit_debit_card")));for(let e of t.supportedOptions)"exchange"===e.method&&"coinbase"===e.provider&&p&&(r=()=>Q(n,t,a,i,o,"buy"));for(let e of o?.funding?.supportedOptions??[])"wallets"===e.method&&(c=()=>i("TransferFromWalletScreen"));return{onFundWithCard:m,onFundWithExchange:r,onFundWithWallet:c}})(D,j,T,I,W,x)),[D,j,T,x,I,W]),N=E?S.find((({address:e})=>e===T.address)):r.find((({address:e})=>s(e)===s(T.address))),J=g(N?.walletClientType||"unknown"),K=J?.name||"wallet",Y=N&&"privy"!==N.walletClientType?K:D.name,Z=d((()=>T.uiConfig?.landing?.title?T.uiConfig?.landing?.title:`Add funds to your ${Y?.toLowerCase().endsWith("wallet")?Y:Y+" wallet"}`),[T.uiConfig?.landing?.title,Y]);c((()=>{if(T?.defaultFundingMethod&&T.usingDefaultFundingMethod)switch(I({funding:{...T,usingDefaultFundingMethod:!1},solanaFundingData:x?.solanaFundingData}),T?.defaultFundingMethod){case"card":q.onFundWithCard[0]&&q.onFundWithCard[0]();break;case"exchange":q.onFundWithExchange&&q.onFundWithExchange();break;case"wallet":q.onFundWithWallet&&q.onFundWithWallet();break;case"manual":W("ManualTransferScreen")}}),[]),c((()=>{U?.erc20Address&&!U.erc20ContractInfo&&b({address:U.erc20Address,chain:U.chain,rpcConfig:D.rpcConfig,privyAppId:D.id}).then((e=>{I({...x,funding:{...U,erc20ContractInfo:e?{symbol:e.symbol,decimals:e.decimals}:void 0}})})).catch(console.error)}),[U?.erc20Address,U?.chain]);let ee=!(!U?.erc20Address||U?.erc20ContractInfo);/*#__PURE__*/return n(t,{children:[/*#__PURE__*/e(h,{}),/*#__PURE__*/e("h3",{children:Z}),/*#__PURE__*/n(O,{children:[T.errorMessage&&/*#__PURE__*/e(p,{theme:D.appearance.palette.colorScheme,children:T.errorMessage}),q.onFundWithCard?.[0]&&/*#__PURE__*/n(y,{disabled:ee,onClick:q.onFundWithCard[0],children:[/*#__PURE__*/e(_,{children:/*#__PURE__*/e(a,{style:{width:24}})}),"Pay with card",k?/*#__PURE__*/e(B,{style:{marginLeft:"auto",maxWidth:"100%",width:"auto",height:"0.875rem"}}):A?/*#__PURE__*/e(R,{style:{marginLeft:"auto",maxWidth:"100%",width:"auto",height:"0.875rem"}}):null]}),q.onFundWithExchange&&/*#__PURE__*/n(y,{disabled:ee,onClick:q.onFundWithExchange,children:[/*#__PURE__*/e(_,{children:/*#__PURE__*/e(o,{style:{width:24}})}),"Transfer from an exchange"]}),q.onFundWithWallet&&/*#__PURE__*/n(y,{disabled:ee,onClick:q.onFundWithWallet,children:[/*#__PURE__*/e(_,{children:/*#__PURE__*/e(M,{style:{width:24}})}),"Transfer from wallet"]}),/*#__PURE__*/n(y,{disabled:ee,onClick:()=>W("ManualTransferScreen"),children:[/*#__PURE__*/e(_,{children:/*#__PURE__*/e(i,{style:{width:24}})}),"Receive funds"]}),T?.showAlternateFundingMethod&&q.onFundWithCard?.[1]&&/*#__PURE__*/e(m,{theme:D.appearance.palette.colorScheme,children:/*#__PURE__*/n(H,{children:["Having trouble or facing location restrictions?"," ",/*#__PURE__*/e(P,{onClick:q.onFundWithCard[1],children:"Try a different provider."})]})})]}),/*#__PURE__*/e(l,{})]})}};export{K as FundingMethodSelectionScreen,K as default};