@getpara/react-sdk-lite 2.11.0 → 2.13.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 (311) hide show
  1. package/dist/css/modal.css +0 -3
  2. package/dist/index.d.ts +1 -0
  3. package/dist/modal/ParaModal.js +57 -98
  4. package/dist/modal/components/Body/Body.d.ts +1 -2
  5. package/dist/modal/components/Body/Body.js +119 -231
  6. package/dist/modal/components/Controls/ChainSelect.js +3 -4
  7. package/dist/modal/components/Controls/Controls.js +2 -4
  8. package/dist/modal/components/Footer/Footer.js +3 -12
  9. package/dist/modal/components/Header/Header.js +13 -14
  10. package/dist/modal/components/Header/hooks/useStepTitle.d.ts +1 -1
  11. package/dist/modal/components/Header/hooks/useStepTitle.js +88 -71
  12. package/dist/modal/components/ModalContent/ModalContent.d.ts +1 -1
  13. package/dist/modal/components/ModalContent/ModalContent.js +6 -14
  14. package/dist/modal/components/OnRampComponents/AddingFunds.js +2 -2
  15. package/dist/modal/components/WalletCard/WalletCard.js +9 -9
  16. package/dist/modal/components/WalletSelectOld/WalletSelectOld.js +13 -18
  17. package/dist/modal/components/common.d.ts +5 -0
  18. package/dist/modal/components/common.js +17 -10
  19. package/dist/modal/components/{Account → flows/account/Account}/Account.js +30 -27
  20. package/dist/modal/components/{Account/AccountHeader.d.ts → flows/account/Account/Header.d.ts} +1 -1
  21. package/dist/modal/components/{Account/AccountHeader.js → flows/account/Account/Header.js} +8 -8
  22. package/dist/modal/components/{Account/AccountWalletSelect.d.ts → flows/account/Account/WalletSelect.d.ts} +1 -1
  23. package/dist/modal/components/{Account/AccountWalletSelect.js → flows/account/Account/WalletSelect.js} +17 -22
  24. package/dist/modal/components/flows/account/AccountFlow/AccountFlow.d.ts +12 -0
  25. package/dist/modal/components/flows/account/AccountFlow/AccountFlow.js +126 -0
  26. package/dist/modal/components/flows/account/AccountProvider/AccountContext.d.ts +11 -0
  27. package/dist/modal/components/flows/account/AccountProvider/AccountContext.js +42 -0
  28. package/dist/modal/components/flows/account/AccountProvider/AccountProvider.d.ts +4 -0
  29. package/dist/modal/components/flows/account/AccountProvider/AccountProvider.js +110 -0
  30. package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFunds.js +12 -12
  31. package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsAsset.js +3 -3
  32. package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsAwaiting.js +7 -8
  33. package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsContext.d.ts +1 -1
  34. package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsContext.js +11 -11
  35. package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsDone.js +8 -9
  36. package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsNetwork.js +2 -2
  37. package/dist/modal/components/flows/account/AddFunds/AddFundsProvider.d.ts +1 -0
  38. package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsProvider.js +13 -12
  39. package/dist/modal/components/flows/account/AddFunds/AddFundsReceive.d.ts +1 -0
  40. package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsReceive.js +10 -10
  41. package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsSettings.js +10 -10
  42. package/dist/modal/components/{AddFunds → flows/account/AddFunds}/MoonPayEmbed.js +1 -1
  43. package/dist/modal/components/flows/account/AddFunds/utils.d.ts +3 -0
  44. package/dist/modal/components/flows/account/AddFunds/utils.js +16 -0
  45. package/dist/modal/components/{ChainSwitch → flows/account/ChainSwitch}/ChainSwitch.js +7 -10
  46. package/dist/modal/components/{ChainSwitch → flows/account/ChainSwitch}/config.js +1 -1
  47. package/dist/modal/components/{Account → flows/account/Profile}/AccountMonitorTx.js +13 -13
  48. package/dist/modal/components/flows/account/Profile/FarcasterLink.d.ts +2 -0
  49. package/dist/modal/components/{OAuth → flows/account/Profile}/FarcasterLink.js +6 -6
  50. package/dist/modal/components/{Account/AccountProfile.d.ts → flows/account/Profile/Profile.d.ts} +1 -1
  51. package/dist/modal/components/{Account/AccountProfile.js → flows/account/Profile/Profile.js} +20 -24
  52. package/dist/modal/components/{Account/AccountProfileEntry.js → flows/account/Profile/ProfileEntry.js} +13 -15
  53. package/dist/modal/components/flows/account/Profile/ProfileLink.d.ts +1 -0
  54. package/dist/modal/components/{Account/AccountProfileLink.js → flows/account/Profile/ProfileLink.js} +19 -34
  55. package/dist/modal/components/flows/account/Profile/ProfileLinkOptions.d.ts +1 -0
  56. package/dist/modal/components/{Account/AccountProfileLinkOptions.js → flows/account/Profile/ProfileLinkOptions.js} +11 -11
  57. package/dist/modal/components/flows/account/Profile/ProfileUnlink.d.ts +1 -0
  58. package/dist/modal/components/{Account/AccountProfileUnlink.js → flows/account/Profile/ProfileUnlink.js} +6 -6
  59. package/dist/modal/{hooks/useTelegramLogin.d.ts → components/flows/account/Profile/useTelegramLink.d.ts} +1 -5
  60. package/dist/modal/{hooks/useTelegramLogin.js → components/flows/account/Profile/useTelegramLink.js} +16 -23
  61. package/dist/modal/components/{Account/AccountSend → flows/account/Send}/AssetNetwork.js +1 -1
  62. package/dist/modal/components/flows/account/Send/SendAsset.d.ts +1 -0
  63. package/dist/modal/components/{Account/AccountSend/AccountSendAsset.js → flows/account/Send/SendAsset.js} +11 -12
  64. package/dist/modal/components/flows/account/Send/SendForm.d.ts +1 -0
  65. package/dist/modal/components/{Account/AccountSend/AccountSendForm.js → flows/account/Send/SendForm.js} +15 -16
  66. package/dist/modal/components/flows/account/Send/SendNetwork.d.ts +1 -0
  67. package/dist/modal/components/{Account/AccountSend/AccountSendNetwork.js → flows/account/Send/SendNetwork.js} +9 -10
  68. package/dist/modal/components/flows/account/Send/SendNoAssets.d.ts +1 -0
  69. package/dist/modal/components/{Account/AccountSend/AccountSendNoAssets.js → flows/account/Send/SendNoAssets.js} +8 -9
  70. package/dist/modal/components/{Account/AccountSend → flows/account/Send}/context.js +19 -6
  71. package/dist/modal/components/{Account/AccountSend → flows/account/Send}/index.js +11 -11
  72. package/dist/modal/components/flows/account/SwitchWallets/SwitchWallets.d.ts +1 -0
  73. package/dist/modal/components/{SwitchWalletsStep/SwitchWalletsStep.js → flows/account/SwitchWallets/SwitchWallets.js} +4 -4
  74. package/dist/modal/components/flows/account/Wallet/Wallet.d.ts +1 -0
  75. package/dist/modal/components/{Account/AccountWallet.js → flows/account/Wallet/Wallet.js} +12 -18
  76. package/dist/modal/components/flows/auth/AuthFlow/AuthFlow.d.ts +10 -0
  77. package/dist/modal/components/flows/auth/AuthFlow/AuthFlow.js +94 -0
  78. package/dist/modal/components/flows/auth/AuthMain/AuthMain.d.ts +9 -0
  79. package/dist/modal/components/{AuthMainStep/AuthMainStep.js → flows/auth/AuthMain/AuthMain.js} +10 -21
  80. package/dist/modal/components/flows/auth/AuthMain/AuthMainContent.d.ts +9 -0
  81. package/dist/modal/components/{AuthMainStep/AuthMainStepContent.js → flows/auth/AuthMain/AuthMainContent.js} +49 -24
  82. package/dist/modal/components/flows/auth/AwaitingAccountSetup/AwaitingAccountSetup.d.ts +1 -0
  83. package/dist/modal/components/flows/auth/AwaitingAccountSetup/AwaitingAccountSetup.js +31 -0
  84. package/dist/modal/components/flows/auth/AwaitingBiometrics/AwaitingBiometrics.d.ts +1 -0
  85. package/dist/modal/components/flows/auth/AwaitingBiometrics/AwaitingBiometrics.js +21 -0
  86. package/dist/modal/components/flows/auth/AwaitingOAuth/AwaitingOAuth.d.ts +1 -0
  87. package/dist/modal/components/{AwaitingOAuthStep/AwaitingOAuthStep.js → flows/auth/AwaitingOAuth/AwaitingOAuth.js} +4 -4
  88. package/dist/modal/components/flows/auth/AwaitingPassword/AwaitingPassword.d.ts +1 -0
  89. package/dist/modal/components/flows/auth/AwaitingPassword/AwaitingPassword.js +22 -0
  90. package/dist/modal/components/flows/auth/BiometricCreation/BiometricCreation.d.ts +1 -0
  91. package/dist/modal/components/{BiometricCreationStep/BiometricCreationStep.js → flows/auth/BiometricCreation/BiometricCreation.js} +25 -22
  92. package/dist/modal/components/flows/auth/BiometricLogin/BiometricLogin.d.ts +1 -0
  93. package/dist/modal/components/flows/auth/BiometricLogin/BiometricLogin.js +72 -0
  94. package/dist/modal/components/flows/auth/LoginDone/LoginDone.d.ts +5 -0
  95. package/dist/modal/components/{LoginDoneStep/LoginDoneStep.js → flows/auth/LoginDone/LoginDone.js} +9 -13
  96. package/dist/modal/components/{OAuth → flows/auth/OAuth}/OAuth.js +15 -23
  97. package/dist/modal/components/{RecoverySecretStep → flows/auth/RecoverySecretStep}/RecoverySecretStep.js +9 -11
  98. package/dist/modal/components/flows/auth/Setup2FA/Setup2FA.d.ts +5 -0
  99. package/dist/modal/components/{Setup2FAStep/Setup2FAStep.js → flows/auth/Setup2FA/Setup2FA.js} +42 -19
  100. package/dist/modal/components/flows/auth/Verification/Verification.d.ts +1 -0
  101. package/dist/modal/components/flows/auth/Verification/Verification.js +36 -0
  102. package/dist/modal/components/flows/auth/WalletCreationDone/WalletCreationDone.d.ts +6 -0
  103. package/dist/modal/components/{WalletCreationDoneStep/WalletCreationDoneStep.js → flows/auth/WalletCreationDone/WalletCreationDone.js} +19 -46
  104. package/dist/modal/components/{AuthOptions → shared}/AuthOptions.d.ts +2 -2
  105. package/dist/modal/components/{AuthOptions → shared}/AuthOptions.js +18 -15
  106. package/dist/modal/components/{ExternalWalletStep/ExternalWalletStep.d.ts → shared/ConnectExternalWallet/ConnectExternalWallet.d.ts} +1 -1
  107. package/dist/modal/components/{ExternalWalletStep/ExternalWalletStep.js → shared/ConnectExternalWallet/ConnectExternalWallet.js} +17 -37
  108. package/dist/modal/components/{ExternalWalletStep → shared/ConnectExternalWallet}/config.js +1 -1
  109. package/dist/modal/components/{AuthInput/AuthInput.d.ts → shared/EmailOrPhone/EmailOrPhoneInput.d.ts} +4 -4
  110. package/dist/modal/components/{AuthInput/AuthInput.js → shared/EmailOrPhone/EmailOrPhoneInput.js} +14 -10
  111. package/dist/modal/components/{AuthInput → shared/EmailOrPhone}/phoneMasks.js +1 -1
  112. package/dist/modal/components/{ExternalWalletNetworkSelectStep/ExternalWalletNetworkSelectStep.d.ts → shared/ExternalWalletNetworkSelect.d.ts} +1 -1
  113. package/dist/modal/components/{ExternalWalletNetworkSelectStep/ExternalWalletNetworkSelectStep.js → shared/ExternalWalletNetworkSelect.js} +9 -9
  114. package/dist/modal/components/{ExternalWallets → shared}/ExternalWallets.js +17 -12
  115. package/dist/modal/components/shared/IFrame.d.ts +1 -0
  116. package/dist/modal/components/shared/IFrame.js +87 -0
  117. package/dist/modal/components/{VerificationCodeStep/VerificationCodeStep.d.ts → shared/VerificationCode.d.ts} +3 -4
  118. package/dist/modal/components/{VerificationCodeStep/VerificationCodeStep.js → shared/VerificationCode.js} +4 -28
  119. package/dist/modal/components/shared/VerifyExternalWallet.d.ts +1 -0
  120. package/dist/modal/components/{ExternalWalletVerificationStep/ExternalWalletVerificationStep.js → shared/VerifyExternalWallet.js} +10 -17
  121. package/dist/modal/hooks/index.d.ts +1 -2
  122. package/dist/modal/hooks/index.js +1 -2
  123. package/dist/modal/hooks/useAuthView.d.ts +4 -0
  124. package/dist/modal/hooks/useAuthView.js +115 -0
  125. package/dist/modal/hooks/useCanbGoBack.d.ts +3 -0
  126. package/dist/modal/hooks/useCanbGoBack.js +47 -0
  127. package/dist/modal/{components/AuthInput/hooks → hooks}/useDropdownPosition.d.ts +1 -1
  128. package/dist/modal/hooks/useDropdownPosition.js +41 -0
  129. package/dist/modal/hooks/useGoBack.d.ts +4 -1
  130. package/dist/modal/hooks/useGoBack.js +60 -36
  131. package/dist/modal/hooks/useSendMutations.js +4 -5
  132. package/dist/modal/hooks/useTransactionMonitoring.js +8 -8
  133. package/dist/modal/index.d.ts +1 -2
  134. package/dist/modal/index.js +1 -3
  135. package/dist/modal/stores/index.d.ts +0 -1
  136. package/dist/modal/stores/index.js +0 -1
  137. package/dist/modal/types/modalProps.d.ts +18 -8
  138. package/dist/provider/ParaProviderMin.js +34 -38
  139. package/dist/provider/actions/getWallet.d.ts +1 -1
  140. package/dist/provider/actions/index.d.ts +43 -49
  141. package/dist/provider/actions/index.js +4 -0
  142. package/dist/provider/components/CosmosWalletWrapper.js +0 -3
  143. package/dist/provider/components/EvmWalletWrapper.js +0 -3
  144. package/dist/provider/components/ExternalWalletWrapper.js +8 -2
  145. package/dist/provider/hooks/mutations/index.d.ts +2 -0
  146. package/dist/provider/hooks/mutations/index.js +4 -0
  147. package/dist/provider/hooks/mutations/useAddAuthMethod.d.ts +7 -12
  148. package/dist/provider/hooks/mutations/useAuthenticateWithEmailOrPhone.d.ts +34 -0
  149. package/dist/provider/hooks/mutations/useAuthenticateWithEmailOrPhone.js +28 -0
  150. package/dist/provider/hooks/mutations/useAuthenticateWithOAuth.d.ts +34 -0
  151. package/dist/provider/hooks/mutations/useAuthenticateWithOAuth.js +28 -0
  152. package/dist/provider/hooks/mutations/useClaimPregenWallets.d.ts +7 -13
  153. package/dist/provider/hooks/mutations/useClaimPregenWallets.js +4 -1
  154. package/dist/provider/hooks/mutations/useCreateGuestWallets.d.ts +7 -6
  155. package/dist/provider/hooks/mutations/useCreateGuestWallets.js +6 -3
  156. package/dist/provider/hooks/mutations/useCreatePregenWallet.d.ts +7 -93
  157. package/dist/provider/hooks/mutations/useCreatePregenWallet.js +4 -1
  158. package/dist/provider/hooks/mutations/useCreatePregenWalletPerType.d.ts +7 -15
  159. package/dist/provider/hooks/mutations/useCreateWallet.d.ts +7 -15
  160. package/dist/provider/hooks/mutations/useCreateWallet.js +4 -1
  161. package/dist/provider/hooks/mutations/useCreateWalletPerType.d.ts +7 -27
  162. package/dist/provider/hooks/mutations/useEnable2fa.d.ts +7 -12
  163. package/dist/provider/hooks/mutations/useExportPrivateKey.d.ts +2 -7
  164. package/dist/provider/hooks/mutations/useHasPregenWallet.d.ts +7 -13
  165. package/dist/provider/hooks/mutations/useIssueJwt.d.ts +7 -21
  166. package/dist/provider/hooks/mutations/useKeepSessionAlive.d.ts +6 -7
  167. package/dist/provider/hooks/mutations/useKeepSessionAlive.js +2 -2
  168. package/dist/provider/hooks/mutations/useLoginExternalWallet.d.ts +7 -25
  169. package/dist/provider/hooks/mutations/useLoginExternalWallet.js +4 -1
  170. package/dist/provider/hooks/mutations/useLogout.d.ts +7 -12
  171. package/dist/provider/hooks/mutations/useResendVerificationCode.d.ts +7 -13
  172. package/dist/provider/hooks/mutations/useResendVerificationCode.js +4 -1
  173. package/dist/provider/hooks/mutations/useSetup2fa.d.ts +7 -7
  174. package/dist/provider/hooks/mutations/useSetup2fa.js +2 -2
  175. package/dist/provider/hooks/mutations/useSignMessage.d.ts +7 -31
  176. package/dist/provider/hooks/mutations/useSignTransaction.d.ts +7 -31
  177. package/dist/provider/hooks/mutations/useSignTransaction.js +4 -1
  178. package/dist/provider/hooks/mutations/useSignUpOrLogIn.d.ts +7 -19
  179. package/dist/provider/hooks/mutations/useSignUpOrLogIn.js +4 -1
  180. package/dist/provider/hooks/mutations/useSwitchWallets.d.ts +7 -30
  181. package/dist/provider/hooks/mutations/useSwitchWallets.js +4 -1
  182. package/dist/provider/hooks/mutations/useUpdatePregenWalletIdentifier.d.ts +7 -15
  183. package/dist/provider/hooks/mutations/useUpdatePregenWalletIdentifier.js +4 -1
  184. package/dist/provider/hooks/mutations/useVerify2fa.d.ts +7 -30
  185. package/dist/provider/hooks/mutations/useVerifyExternalWallet.d.ts +7 -19
  186. package/dist/provider/hooks/mutations/useVerifyExternalWallet.js +4 -1
  187. package/dist/provider/hooks/mutations/useVerifyFarcaster.d.ts +7 -31
  188. package/dist/provider/hooks/mutations/useVerifyFarcaster.js +4 -1
  189. package/dist/provider/hooks/mutations/useVerifyNewAccount.d.ts +7 -66
  190. package/dist/provider/hooks/mutations/useVerifyNewAccount.js +4 -1
  191. package/dist/provider/hooks/mutations/useVerifyOAuth.d.ts +7 -37
  192. package/dist/provider/hooks/mutations/useVerifyTelegram.d.ts +7 -22
  193. package/dist/provider/hooks/mutations/useWaitForLogin.d.ts +7 -30
  194. package/dist/provider/hooks/mutations/useWaitForLogin.js +4 -1
  195. package/dist/provider/hooks/mutations/useWaitForSignup.d.ts +7 -18
  196. package/dist/provider/hooks/mutations/useWaitForWalletCreation.d.ts +7 -27
  197. package/dist/provider/hooks/mutations/utils.js +1 -1
  198. package/dist/provider/hooks/queries/useIsFullyLoggedIn.d.ts +4 -1
  199. package/dist/provider/hooks/queries/useIsFullyLoggedIn.js +6 -1
  200. package/dist/provider/hooks/queries/useLinkedAccounts.d.ts +2 -4
  201. package/dist/provider/hooks/queries/useParaStatus.d.ts +0 -1
  202. package/dist/provider/hooks/queries/useParaStatus.js +0 -2
  203. package/dist/provider/hooks/queries/useWallet.d.ts +1 -1
  204. package/dist/provider/hooks/utils/useAutoSessionKeepAlive.js +1 -1
  205. package/dist/provider/hooks/utils/useEventListeners.js +0 -7
  206. package/dist/provider/hooks/utils/useFormattedBiometricHints.d.ts +1 -0
  207. package/dist/provider/hooks/utils/useFormattedBiometricHints.js +9 -5
  208. package/dist/provider/hooks/utils/useModal.d.ts +4 -3
  209. package/dist/provider/hooks/utils/useModal.js +17 -9
  210. package/dist/provider/hooks/utils/useWalletState.d.ts +3 -3
  211. package/dist/provider/hooks/utils/useWalletState.js +14 -6
  212. package/dist/provider/providers/AccountLinkProvider.js +21 -19
  213. package/dist/provider/providers/AuthProvider/AuthContext.d.ts +19 -0
  214. package/dist/provider/providers/AuthProvider/AuthContext.js +35 -0
  215. package/dist/provider/providers/AuthProvider/AuthProvider.d.ts +9 -0
  216. package/dist/provider/providers/AuthProvider/AuthProvider.js +261 -0
  217. package/dist/provider/providers/ExternalWalletProvider.d.ts +12 -4
  218. package/dist/provider/providers/ExternalWalletProvider.js +285 -283
  219. package/dist/provider/stores/getters.d.ts +1 -1
  220. package/dist/provider/stores/getters.js +5 -5
  221. package/dist/provider/stores/setters.js +2 -2
  222. package/dist/provider/stores/slices/accountFlow.d.ts +3 -0
  223. package/dist/provider/stores/slices/accountFlow.js +30 -0
  224. package/dist/provider/stores/slices/authFlow.d.ts +3 -0
  225. package/dist/provider/stores/slices/authFlow.js +63 -0
  226. package/dist/provider/stores/slices/externalWallets.js +10 -0
  227. package/dist/provider/stores/slices/index.d.ts +4 -0
  228. package/dist/provider/stores/slices/index.js +4 -0
  229. package/dist/provider/stores/slices/modal.js +8 -2
  230. package/dist/provider/stores/slices/onRamp.d.ts +3 -0
  231. package/dist/provider/stores/slices/onRamp.js +20 -0
  232. package/dist/provider/stores/slices/paraState.d.ts +3 -0
  233. package/dist/provider/stores/slices/paraState.js +9 -0
  234. package/dist/provider/stores/types.d.ts +117 -5
  235. package/dist/provider/stores/types.js +9 -0
  236. package/dist/provider/stores/useStore.d.ts +5 -3
  237. package/dist/provider/stores/useStore.js +15 -8
  238. package/package.json +8 -8
  239. package/dist/modal/components/Account/AccountProfileLink.d.ts +0 -1
  240. package/dist/modal/components/Account/AccountProfileLinkOptions.d.ts +0 -1
  241. package/dist/modal/components/Account/AccountProfileUnlink.d.ts +0 -1
  242. package/dist/modal/components/Account/AccountSend/AccountSendAsset.d.ts +0 -1
  243. package/dist/modal/components/Account/AccountSend/AccountSendForm.d.ts +0 -1
  244. package/dist/modal/components/Account/AccountSend/AccountSendNetwork.d.ts +0 -1
  245. package/dist/modal/components/Account/AccountSend/AccountSendNoAssets.d.ts +0 -1
  246. package/dist/modal/components/Account/AccountWallet.d.ts +0 -1
  247. package/dist/modal/components/AddFunds/AddFundsProvider.d.ts +0 -1
  248. package/dist/modal/components/AddFunds/AddFundsReceive.d.ts +0 -1
  249. package/dist/modal/components/AuthInput/hooks/useDropdownPosition.js +0 -33
  250. package/dist/modal/components/AuthMainStep/AuthMainStep.d.ts +0 -9
  251. package/dist/modal/components/AuthMainStep/AuthMainStepContent.d.ts +0 -9
  252. package/dist/modal/components/AwaitingAccountStep/AwaitingAccountStep.d.ts +0 -1
  253. package/dist/modal/components/AwaitingAccountStep/AwaitingAccountStep.js +0 -21
  254. package/dist/modal/components/AwaitingBiometricsStep/AwaitingBiometricsStep.d.ts +0 -1
  255. package/dist/modal/components/AwaitingBiometricsStep/AwaitingBiometricsStep.js +0 -18
  256. package/dist/modal/components/AwaitingOAuthStep/AwaitingOAuthStep.d.ts +0 -1
  257. package/dist/modal/components/AwaitingPasswordStep/AwaitingPasswordStep.d.ts +0 -1
  258. package/dist/modal/components/AwaitingPasswordStep/AwaitingPasswordStep.js +0 -21
  259. package/dist/modal/components/AwaitingWalletCreationStep/AwaitingWalletCreationStep.d.ts +0 -5
  260. package/dist/modal/components/AwaitingWalletCreationStep/AwaitingWalletCreationStep.js +0 -24
  261. package/dist/modal/components/BiometricCreationStep/BiometricCreationStep.d.ts +0 -1
  262. package/dist/modal/components/BiometricLoginStep/BiometricLoginStep.d.ts +0 -1
  263. package/dist/modal/components/BiometricLoginStep/BiometricLoginStep.js +0 -67
  264. package/dist/modal/components/ExternalWalletVerificationStep/ExternalWalletVerificationStep.d.ts +0 -1
  265. package/dist/modal/components/Hero/Hero.d.ts +0 -1
  266. package/dist/modal/components/Hero/Hero.js +0 -118
  267. package/dist/modal/components/IFrameStep/IFrameStep.d.ts +0 -1
  268. package/dist/modal/components/IFrameStep/IFrameStep.js +0 -83
  269. package/dist/modal/components/LoginDoneStep/LoginDoneStep.d.ts +0 -5
  270. package/dist/modal/components/OAuth/FarcasterLink.d.ts +0 -2
  271. package/dist/modal/components/OAuth/FarcasterOAuthStep.d.ts +0 -1
  272. package/dist/modal/components/OAuth/FarcasterOAuthStep.js +0 -53
  273. package/dist/modal/components/OAuth/TelegramOAuthStep.d.ts +0 -8
  274. package/dist/modal/components/OAuth/TelegramOAuthStep.js +0 -91
  275. package/dist/modal/components/Setup2FAStep/Setup2FAStep.d.ts +0 -5
  276. package/dist/modal/components/SwitchWalletsStep/SwitchWalletsStep.d.ts +0 -1
  277. package/dist/modal/components/TwoFactorDoneStep/TwoFactorDoneStep.d.ts +0 -5
  278. package/dist/modal/components/TwoFactorDoneStep/TwoFactorDoneStep.js +0 -27
  279. package/dist/modal/components/WalletCreationDoneStep/WalletCreationDoneStep.d.ts +0 -6
  280. package/dist/modal/hooks/useFarcasterLogin.d.ts +0 -9
  281. package/dist/modal/hooks/useFarcasterLogin.js +0 -77
  282. package/dist/modal/stores/modal/actions.d.ts +0 -3
  283. package/dist/modal/stores/modal/actions.js +0 -146
  284. package/dist/modal/stores/modal/useModalStore.d.ts +0 -119
  285. package/dist/modal/stores/modal/useModalStore.js +0 -80
  286. package/dist/modal/utils/steps.d.ts +0 -162
  287. package/dist/modal/utils/steps.js +0 -335
  288. package/dist/provider/providers/AuthProvider.d.ts +0 -43
  289. package/dist/provider/providers/AuthProvider.js +0 -777
  290. /package/dist/modal/components/{Account → flows/account/Account}/Account.d.ts +0 -0
  291. /package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFunds.d.ts +0 -0
  292. /package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsAsset.d.ts +0 -0
  293. /package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsAwaiting.d.ts +0 -0
  294. /package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsDone.d.ts +0 -0
  295. /package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsNetwork.d.ts +0 -0
  296. /package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsSettings.d.ts +0 -0
  297. /package/dist/modal/components/{AddFunds → flows/account/AddFunds}/MoonPayEmbed.d.ts +0 -0
  298. /package/dist/modal/components/{AddFunds → flows/account/AddFunds}/index.d.ts +0 -0
  299. /package/dist/modal/components/{AddFunds → flows/account/AddFunds}/index.js +0 -0
  300. /package/dist/modal/components/{ChainSwitch → flows/account/ChainSwitch}/ChainSwitch.d.ts +0 -0
  301. /package/dist/modal/components/{ChainSwitch → flows/account/ChainSwitch}/config.d.ts +0 -0
  302. /package/dist/modal/components/{Account → flows/account/Profile}/AccountMonitorTx.d.ts +0 -0
  303. /package/dist/modal/components/{Account/AccountProfileEntry.d.ts → flows/account/Profile/ProfileEntry.d.ts} +0 -0
  304. /package/dist/modal/components/{Account/AccountSend → flows/account/Send}/AssetNetwork.d.ts +0 -0
  305. /package/dist/modal/components/{Account/AccountSend → flows/account/Send}/context.d.ts +0 -0
  306. /package/dist/modal/components/{Account/AccountSend → flows/account/Send}/index.d.ts +0 -0
  307. /package/dist/modal/components/{OAuth → flows/auth/OAuth}/OAuth.d.ts +0 -0
  308. /package/dist/modal/components/{RecoverySecretStep → flows/auth/RecoverySecretStep}/RecoverySecretStep.d.ts +0 -0
  309. /package/dist/modal/components/{ExternalWalletStep → shared/ConnectExternalWallet}/config.d.ts +0 -0
  310. /package/dist/modal/components/{AuthInput → shared/EmailOrPhone}/phoneMasks.d.ts +0 -0
  311. /package/dist/modal/components/{ExternalWallets → shared}/ExternalWallets.d.ts +0 -0
@@ -1,16 +1,16 @@
1
1
  "use client";
2
- import "../../../chunk-MMUBH76A.js";
2
+ import "../../../../../chunk-MMUBH76A.js";
3
3
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
- import { AuthInput } from "../AuthInput/AuthInput.js";
5
- import { AccountTypeIcon, GradientScroll, StepContainer } from "../common.js";
4
+ import { AccountTypeIcon, GradientScroll, StepContainer } from "../../../common.js";
6
5
  import { CpslButton, CpslDivider, CpslText } from "@getpara/react-components";
7
- import { useExternalWallets } from "../../../provider/providers/ExternalWalletProvider.js";
8
- import { useAccountLinking } from "../../../provider/providers/AccountLinkProvider.js";
9
- import { useLinkedAccounts } from "../../../provider/hooks/index.js";
6
+ import { useExternalWallets } from "../../../../../provider/providers/ExternalWalletProvider.js";
7
+ import { useAccountLinking } from "../../../../../provider/providers/AccountLinkProvider.js";
8
+ import { useLinkedAccounts } from "../../../../../provider/hooks/index.js";
10
9
  import { useEffect, useMemo } from "react";
11
- import { useInternalClient } from "../../../provider/hooks/utils/useInternalClient.js";
10
+ import { useInternalClient } from "../../../../../provider/hooks/utils/useInternalClient.js";
12
11
  import { getAccountTypeName, safeStyled } from "@getpara/react-common";
13
- function AccountProfileLinkOptions() {
12
+ import { EmailOrPhoneInput } from "../../../shared/EmailOrPhone/EmailOrPhoneInput.js";
13
+ const ProfileLinkOptions = () => {
14
14
  const para = useInternalClient();
15
15
  const { accountLinkOptions, linkAccount, isLinkAccountPending, linkAccountError, setLinkAccountError, resetMutations } = useAccountLinking();
16
16
  const { wallets } = useExternalWallets();
@@ -63,7 +63,7 @@ function AccountProfileLinkOptions() {
63
63
  return /* @__PURE__ */ jsx(StepContainer, { $wide: true, children: /* @__PURE__ */ jsxs(Content, { children: [
64
64
  (isEmail || isPhone) && /* @__PURE__ */ jsxs(Fragment, { children: [
65
65
  /* @__PURE__ */ jsx(
66
- AuthInput,
66
+ EmailOrPhoneInput,
67
67
  {
68
68
  disableEmailLogin: !isEmail,
69
69
  disablePhoneLogin: !isPhone,
@@ -109,7 +109,7 @@ function AccountProfileLinkOptions() {
109
109
  );
110
110
  }) })
111
111
  ] }) });
112
- }
112
+ };
113
113
  const Content = safeStyled.div`
114
114
  display: flex;
115
115
  flex-direction: column;
@@ -125,5 +125,5 @@ const Option = safeStyled(CpslButton)`
125
125
  align-items: flex-start;
126
126
  `;
127
127
  export {
128
- AccountProfileLinkOptions
128
+ ProfileLinkOptions
129
129
  };
@@ -0,0 +1 @@
1
+ export declare const ProfileUnlink: () => import("react/jsx-runtime").JSX.Element;
@@ -1,12 +1,12 @@
1
1
  "use client";
2
- import "../../../chunk-MMUBH76A.js";
2
+ import "../../../../../chunk-MMUBH76A.js";
3
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
4
  import { CpslButton, CpslText } from "@getpara/react-components";
5
5
  import { useEffect, useState } from "react";
6
- import { AccountTypeIcon } from "../common.js";
7
- import { useAccountLinking } from "../../../provider/providers/AccountLinkProvider.js";
6
+ import { AccountTypeIcon } from "../../../common.js";
7
+ import { useAccountLinking } from "../../../../../provider/providers/AccountLinkProvider.js";
8
8
  import { getAccountTypeName, safeStyled } from "@getpara/react-common";
9
- function AccountProfileUnlink() {
9
+ const ProfileUnlink = () => {
10
10
  var _a, _b;
11
11
  const { unlinkingAccount, unlinkAccountConfirm, isUnlinkAccountPending } = useAccountLinking(), [accountType, setAccountType] = useState((_b = (_a = unlinkingAccount == null ? void 0 : unlinkingAccount.externalWallet) == null ? void 0 : _a.providerId) != null ? _b : unlinkingAccount == null ? void 0 : unlinkingAccount.type), [isUnlinkingExternalWallet, setIsUnlinkingExternalWallet] = useState(false);
12
12
  useEffect(() => {
@@ -28,7 +28,7 @@ function AccountProfileUnlink() {
28
28
  ] }),
29
29
  /* @__PURE__ */ jsx(CpslButton, { variant: "destructive", fullWidth: true, onClick: unlinkAccountConfirm, disabled: isUnlinkAccountPending, children: "Confirm" })
30
30
  ] });
31
- }
31
+ };
32
32
  const Content = safeStyled.div`
33
33
  display: flex;
34
34
  flex-direction: column;
@@ -44,5 +44,5 @@ const Message = safeStyled(CpslText)`
44
44
  max-width: 342px;
45
45
  `;
46
46
  export {
47
- AccountProfileUnlink
47
+ ProfileUnlink
48
48
  };
@@ -1,13 +1,9 @@
1
1
  import { TelegramAuthResponse, VerifyThirdPartyAuth } from '@getpara/user-management-client';
2
2
  import { MutationStatus } from '@tanstack/react-query';
3
- export declare const useTelegramLogin: ({ isActive, onSubmit, status: propsStatus, isLinking, }?: {
3
+ export declare const useTelegramLink: ({ isActive, onSubmit, status: propsStatus, }?: {
4
4
  isActive?: boolean;
5
5
  onSubmit?: (_: VerifyThirdPartyAuth | TelegramAuthResponse) => void;
6
6
  status?: MutationStatus;
7
- isLinking?: boolean;
8
7
  }) => {
9
- url: string | undefined;
10
- isLoaded: boolean;
11
- setIsLoaded: import("react").Dispatch<import("react").SetStateAction<boolean>>;
12
8
  status: MutationStatus | undefined;
13
9
  };
@@ -1,37 +1,33 @@
1
1
  "use client";
2
2
  import {
3
3
  __async
4
- } from "../../chunk-MMUBH76A.js";
4
+ } from "../../../../../chunk-MMUBH76A.js";
5
5
  import { useEffect, useState } from "react";
6
- import { useInternalClient } from "../../provider/hooks/utils/useInternalClient.js";
7
- import { useModalStore } from "../stores/index.js";
8
- import { validatePortalOrigin } from "../utils/validatePortalOrigin.js";
9
- const useTelegramLogin = ({
6
+ import { useInternalClient } from "../../../../../provider/hooks/utils/useInternalClient.js";
7
+ import { validatePortalOrigin } from "../../../../utils/validatePortalOrigin.js";
8
+ import { useStore } from "../../../../../provider/stores/useStore.js";
9
+ const useTelegramLink = ({
10
10
  isActive = false,
11
11
  onSubmit,
12
- status: propsStatus,
13
- isLinking
12
+ status: propsStatus
14
13
  } = {}) => {
15
14
  const para = useInternalClient();
16
- const refs = useModalStore((state) => state.refs);
17
- const [url, setUrl] = useState();
18
- const [isLoaded, setIsLoaded] = useState(false);
15
+ const refs = useStore((state) => state.refs);
16
+ const iFrameUrl = useStore((state) => state.iFrameUrl);
17
+ const setIFrameUrl = useStore((state) => state.setIFrameUrl);
19
18
  const [msgStatus, setMsgStatus] = useState("idle");
20
19
  const status = msgStatus === "success" ? propsStatus : msgStatus;
21
20
  useEffect(() => {
22
21
  const setup = () => __async(void 0, null, function* () {
23
- if (!url) {
24
- if (!isLinking) {
25
- yield para.logout();
26
- yield para.touchSession(true);
27
- }
28
- para.constructPortalUrl(!isLinking ? "telegramLoginVerify" : "telegramLogin").then(setUrl);
22
+ if (!iFrameUrl) {
23
+ const url = yield para.constructPortalUrl("telegramLogin");
24
+ setIFrameUrl(url);
29
25
  }
30
26
  });
31
27
  if (isActive) {
32
28
  setup();
33
29
  }
34
- }, [isActive, url]);
30
+ }, [isActive, iFrameUrl]);
35
31
  useEffect(() => {
36
32
  const updateState = (event) => __async(void 0, null, function* () {
37
33
  var _a, _b;
@@ -50,9 +46,9 @@ const useTelegramLogin = ({
50
46
  if (!!event.data.payload) {
51
47
  const authObject = event.data.payload;
52
48
  try {
53
- yield onSubmit == null ? void 0 : onSubmit(authObject);
49
+ onSubmit == null ? void 0 : onSubmit(authObject);
54
50
  } catch (e) {
55
- (_b = (_a = refs.telegramIFrame.current) == null ? void 0 : _a.contentWindow) == null ? void 0 : _b.postMessage({ type: "TELEGRAM_RETRY" }, "*");
51
+ (_b = (_a = refs.iFrame.current) == null ? void 0 : _a.contentWindow) == null ? void 0 : _b.postMessage({ type: "TELEGRAM_RETRY" }, "*");
56
52
  }
57
53
  }
58
54
  break;
@@ -66,12 +62,9 @@ const useTelegramLogin = ({
66
62
  };
67
63
  }, [isActive, onSubmit]);
68
64
  return {
69
- url,
70
- isLoaded,
71
- setIsLoaded,
72
65
  status
73
66
  };
74
67
  };
75
68
  export {
76
- useTelegramLogin
69
+ useTelegramLink
77
70
  };
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import "../../../../chunk-MMUBH76A.js";
2
+ import "../../../../../chunk-MMUBH76A.js";
3
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
4
  import { CpslIcon } from "@getpara/react-components";
5
5
  function AssetNetwork({
@@ -0,0 +1 @@
1
+ export declare const SendAsset: () => import("react/jsx-runtime").JSX.Element;
@@ -1,16 +1,15 @@
1
1
  "use client";
2
- import "../../../../chunk-MMUBH76A.js";
2
+ import "../../../../../chunk-MMUBH76A.js";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  import { useMemo, useCallback, memo } from "react";
5
- import { useWalletState } from "../../../../provider/index.js";
6
- import { useAssets } from "../../../../provider/providers/AssetsProvider.js";
7
- import { SearchableButtonList } from "../../SearchableButtonList.js";
5
+ import { useWalletState } from "../../../../../provider/index.js";
6
+ import { useAssets } from "../../../../../provider/providers/AssetsProvider.js";
7
+ import { SearchableButtonList } from "../../../SearchableButtonList.js";
8
8
  import { useSend } from "./context.js";
9
9
  import { CpslIcon } from "@getpara/react-components";
10
10
  import { formatAssetQuantity, formatCurrency } from "@getpara/web-sdk";
11
- import { ModalStep } from "../../../utils/steps.js";
12
- import { useModalStore } from "../../../stores/index.js";
13
11
  import { AssetNetwork } from "./AssetNetwork.js";
12
+ import { useStore } from "../../../../../provider/stores/useStore.js";
14
13
  const NetworkIcons = memo(({ networks }) => {
15
14
  return /* @__PURE__ */ jsx("div", { style: { position: "relative", height: "12px" }, children: networks.slice(0, 3).map((network, index) => {
16
15
  var _a;
@@ -34,8 +33,8 @@ const NetworkIcons = memo(({ networks }) => {
34
33
  }) });
35
34
  });
36
35
  NetworkIcons.displayName = "NetworkIcons";
37
- function AccountSendAsset() {
38
- const setStep = useModalStore((state) => state.setStep);
36
+ const SendAsset = () => {
37
+ const setAccountView = useStore((state) => state.setAccountView);
39
38
  const { profileBalance } = useAssets();
40
39
  const { selectedWallet } = useWalletState();
41
40
  const { setSendMetadata, setTransferAmount } = useSend();
@@ -75,9 +74,9 @@ function AccountSendAsset() {
75
74
  asset: item,
76
75
  network: item.networks[0]
77
76
  });
78
- setStep(item.networks.length > 1 ? ModalStep.ACCOUNT_SEND_NETWORK : ModalStep.ACCOUNT_SEND);
77
+ setAccountView(item.networks.length > 1 ? "ACCOUNT_SEND_NETWORK" : "ACCOUNT_SEND");
79
78
  },
80
- [setTransferAmount, setSendMetadata, setStep]
79
+ [setTransferAmount, setSendMetadata, setAccountView]
81
80
  );
82
81
  return /* @__PURE__ */ jsx("div", { style: { width: "100%" }, children: /* @__PURE__ */ jsx(
83
82
  SearchableButtonList,
@@ -88,7 +87,7 @@ function AccountSendAsset() {
88
87
  onSelect
89
88
  }
90
89
  ) });
91
- }
90
+ };
92
91
  export {
93
- AccountSendAsset
92
+ SendAsset
94
93
  };
@@ -0,0 +1 @@
1
+ export declare const SendForm: () => import("react/jsx-runtime").JSX.Element;
@@ -1,27 +1,26 @@
1
1
  "use client";
2
- import "../../../../chunk-MMUBH76A.js";
2
+ import "../../../../../chunk-MMUBH76A.js";
3
3
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
4
  import { CpslButton, CpslIcon, CpslInput, CpslText } from "@getpara/react-components";
5
- import { QuantityInput } from "../../QuantityInput.js";
5
+ import { QuantityInput } from "../../../QuantityInput.js";
6
6
  import { formatAssetQuantity, formatCurrency } from "@getpara/shared";
7
7
  import { WalletTypeIcon } from "@getpara/react-common";
8
8
  import { useSend } from "./context.js";
9
- import { useModalStore } from "../../../stores/index.js";
10
- import { ModalStep } from "../../../utils/steps.js";
9
+ import { useStore } from "../../../../../provider/stores/useStore.js";
11
10
  import { useEffect, useMemo, useRef, useState } from "react";
12
11
  import { createPortal } from "react-dom";
13
- import { useDebounce } from "../../../hooks/useDebounce.js";
12
+ import { useDebounce } from "../../../../hooks/useDebounce.js";
14
13
  import { AssetNetwork } from "./AssetNetwork.js";
15
- import { useWalletState } from "../../../../provider/index.js";
16
- import { useInternalClient } from "../../../../provider/hooks/utils/useInternalClient.js";
14
+ import { useWalletState } from "../../../../../provider/index.js";
15
+ import { useInternalClient } from "../../../../../provider/hooks/utils/useInternalClient.js";
17
16
  import { Environment } from "@getpara/web-sdk";
18
17
  import { safeStyled } from "@getpara/react-common";
19
- function AccountSendForm() {
18
+ const SendForm = () => {
20
19
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
21
20
  const { selectedWallet } = useWalletState();
22
- const setStep = useModalStore((state) => state.setStep);
23
- const onRampConfig = useModalStore((state) => state.onRampConfig);
24
- const currentStep = useModalStore((state) => state.step);
21
+ const setAccountView = useStore((state) => state.setAccountView);
22
+ const accountView = useStore((state) => state.accountView);
23
+ const onRampConfig = useStore((state) => state.onRampConfig);
25
24
  const {
26
25
  estimate,
27
26
  broadcast,
@@ -46,7 +45,7 @@ function AccountSendForm() {
46
45
  } = useSend();
47
46
  const para = useInternalClient();
48
47
  const isDevOrSandbox = ((_a = para.ctx) == null ? void 0 : _a.env) === Environment.DEV || ((_b = para.ctx) == null ? void 0 : _b.env) === Environment.SANDBOX;
49
- const isSendFormStep = currentStep === ModalStep.ACCOUNT_SEND;
48
+ const isSendFormStep = accountView === "ACCOUNT_SEND";
50
49
  const [inputDestinationAddress, setInputDestinationAddress] = useState(destinationAddress);
51
50
  const dbInputDestinationAddress = useDebounce(inputDestinationAddress, 500);
52
51
  const isTestnet = (_d = (_c = sendMetadata == null ? void 0 : sendMetadata.network) == null ? void 0 : _c.metadata) == null ? void 0 : _d.isTestnet;
@@ -88,7 +87,7 @@ function AccountSendForm() {
88
87
  gap: "4px",
89
88
  paddingRight: 0
90
89
  },
91
- onClick: () => setStep(ModalStep.ADD_FUNDS_BUY),
90
+ onClick: () => setAccountView("ACCOUNT_ADD_FUNDS_BUY"),
92
91
  children: [
93
92
  /* @__PURE__ */ jsxs("span", { children: [
94
93
  "Buy ",
@@ -218,7 +217,7 @@ function AccountSendForm() {
218
217
  (sendMetadata == null ? void 0 : sendMetadata.asset) && (sendMetadata == null ? void 0 : sendMetadata.network) && /* @__PURE__ */ jsxs(
219
218
  "button",
220
219
  {
221
- onClick: () => !["SINGLE_NETWORK", "NONE"].includes(optionsType) ? setStep(optionsType === "SINGLE_ASSET" ? ModalStep.ACCOUNT_SEND_NETWORK : ModalStep.ACCOUNT_SEND_ASSET) : void 0,
220
+ onClick: () => !["SINGLE_NETWORK", "NONE"].includes(optionsType) ? setAccountView(optionsType === "SINGLE_ASSET" ? "ACCOUNT_SEND_NETWORK" : "ACCOUNT_SEND_ASSET") : void 0,
222
221
  style: {
223
222
  cursor: "pointer",
224
223
  background: "transparent",
@@ -384,7 +383,7 @@ function AccountSendForm() {
384
383
  document.body
385
384
  )
386
385
  ] });
387
- }
386
+ };
388
387
  const RecipientInput = safeStyled(CpslInput)`
389
388
  --cpsl-color-input-surface-hover: var(--cpsl-color-input-surface-default);
390
389
  `;
@@ -406,5 +405,5 @@ const SimulateFailureContainer = safeStyled.div`
406
405
  isolation: isolate;
407
406
  `;
408
407
  export {
409
- AccountSendForm
408
+ SendForm
410
409
  };
@@ -0,0 +1 @@
1
+ export declare const SendNetwork: () => import("react/jsx-runtime").JSX.Element;
@@ -2,18 +2,17 @@
2
2
  import {
3
3
  __spreadProps,
4
4
  __spreadValues
5
- } from "../../../../chunk-MMUBH76A.js";
5
+ } from "../../../../../chunk-MMUBH76A.js";
6
6
  import { jsx } from "react/jsx-runtime";
7
7
  import { useMemo } from "react";
8
- import { useAssets } from "../../../../provider/providers/AssetsProvider.js";
9
- import { SearchableButtonList } from "../../SearchableButtonList.js";
8
+ import { useAssets } from "../../../../../provider/providers/AssetsProvider.js";
9
+ import { SearchableButtonList } from "../../../SearchableButtonList.js";
10
10
  import { useSend } from "./context.js";
11
11
  import { formatAssetQuantity, formatCurrency } from "@getpara/web-sdk";
12
- import { ModalStep } from "../../../utils/steps.js";
13
- import { useModalStore } from "../../../stores/index.js";
12
+ import { useStore } from "../../../../../provider/stores/useStore.js";
14
13
  import { AssetNetwork } from "./AssetNetwork.js";
15
- function AccountSendNetwork() {
16
- const setStep = useModalStore((state) => state.setStep);
14
+ const SendNetwork = () => {
15
+ const setAccountView = useStore((state) => state.setAccountView);
17
16
  const { profileBalance } = useAssets();
18
17
  const { sendMetadata, setSendMetadata } = useSend();
19
18
  const assetNetworks = useMemo(() => {
@@ -43,11 +42,11 @@ function AccountSendNetwork() {
43
42
  setSendMetadata((prev) => __spreadProps(__spreadValues({}, prev), {
44
43
  network: item
45
44
  }));
46
- setStep(ModalStep.ACCOUNT_SEND);
45
+ setAccountView("ACCOUNT_SEND");
47
46
  }
48
47
  }
49
48
  ) });
50
- }
49
+ };
51
50
  export {
52
- AccountSendNetwork
51
+ SendNetwork
53
52
  };
@@ -0,0 +1 @@
1
+ export declare const SendNoAssets: () => import("react/jsx-runtime").JSX.Element;
@@ -1,12 +1,11 @@
1
1
  "use client";
2
- import "../../../../chunk-MMUBH76A.js";
2
+ import "../../../../../chunk-MMUBH76A.js";
3
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
4
  import { CpslButton, CpslText } from "@getpara/react-components";
5
- import { useModalStore } from "../../../stores/index.js";
6
- import { ModalStep } from "../../../utils/steps.js";
7
- function AccountSendNoAssets() {
8
- const onRampConfig = useModalStore((state) => state.onRampConfig);
9
- const setStep = useModalStore((state) => state.setStep);
5
+ import { useStore } from "../../../../../provider/stores/useStore.js";
6
+ const SendNoAssets = () => {
7
+ const onRampConfig = useStore((state) => state.onRampConfig);
8
+ const setAccountView = useStore((state) => state.setAccountView);
10
9
  return /* @__PURE__ */ jsxs(
11
10
  "div",
12
11
  {
@@ -42,7 +41,7 @@ function AccountSendNoAssets() {
42
41
  fullWidth: true,
43
42
  variant: "primary",
44
43
  onClick: () => {
45
- setStep(ModalStep.ADD_FUNDS_BUY);
44
+ setAccountView("ACCOUNT_ADD_FUNDS_BUY");
46
45
  },
47
46
  children: "Buy"
48
47
  }
@@ -50,7 +49,7 @@ function AccountSendNoAssets() {
50
49
  ]
51
50
  }
52
51
  );
53
- }
52
+ };
54
53
  export {
55
- AccountSendNoAssets
54
+ SendNoAssets
56
55
  };
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  __spreadProps,
4
4
  __spreadValues
5
- } from "../../../../chunk-MMUBH76A.js";
5
+ } from "../../../../../chunk-MMUBH76A.js";
6
6
  import { jsx } from "react/jsx-runtime";
7
7
  import {
8
8
  createContext,
@@ -13,10 +13,10 @@ import {
13
13
  useRef,
14
14
  useState
15
15
  } from "react";
16
- import { useInternalClient } from "../../../../provider/hooks/utils/useInternalClient.js";
17
- import { useProfileBalance, useWalletState } from "../../../../provider/index.js";
18
- import { useSendMutations } from "../../../hooks/index.js";
19
- import { useStore } from "../../../../provider/stores/useStore.js";
16
+ import { useInternalClient } from "../../../../../provider/hooks/utils/useInternalClient.js";
17
+ import { useProfileBalance, useWalletState } from "../../../../../provider/index.js";
18
+ import { useSendMutations } from "../../../../hooks/index.js";
19
+ import { useStore } from "../../../../../provider/stores/useStore.js";
20
20
  const getDefaultSendMetadata = (balances, wallet) => {
21
21
  if (!balances || !(wallet == null ? void 0 : wallet.type) || !(wallet == null ? void 0 : wallet.address) || (wallet == null ? void 0 : wallet.type) === "COSMOS") {
22
22
  return { asset: null, network: null };
@@ -61,7 +61,8 @@ function AccountSendProvider({ children, step }) {
61
61
  var _a2;
62
62
  return (_a2 = state.modalConfig) == null ? void 0 : _a2.balances;
63
63
  });
64
- const { data: balances } = useProfileBalance({ isComprehensive: true });
64
+ const [refetchTrigger, setRefetchTrigger] = useState(0);
65
+ const { data: balances } = useProfileBalance({ isComprehensive: true, refetchTrigger });
65
66
  const { selectedWallet, setSelectedWallet } = useWalletState();
66
67
  const [estimate, setEstimate] = useState(null);
67
68
  const [broadcast, setBroadcast] = useState(null);
@@ -161,6 +162,7 @@ function AccountSendProvider({ children, step }) {
161
162
  const prevWalletAddressRef = useRef(selectedWallet == null ? void 0 : selectedWallet.address);
162
163
  const isSettingMaxRef = useRef(false);
163
164
  const isResettingRef = useRef(false);
165
+ const recentTxCompletedRef = useRef(false);
164
166
  const resetState = useCallback(() => {
165
167
  if (isResettingRef.current) {
166
168
  return;
@@ -291,6 +293,17 @@ function AccountSendProvider({ children, step }) {
291
293
  assetAmountOnNetwork,
292
294
  isMax
293
295
  ]);
296
+ useEffect(() => {
297
+ if (broadcast && !broadcast.error) {
298
+ recentTxCompletedRef.current = true;
299
+ }
300
+ }, [broadcast]);
301
+ useEffect(() => {
302
+ if (step === "SEND_FORM" && recentTxCompletedRef.current) {
303
+ setRefetchTrigger((prev) => prev + 1);
304
+ recentTxCompletedRef.current = false;
305
+ }
306
+ }, [step]);
294
307
  const value = useMemo(() => {
295
308
  return {
296
309
  step,
@@ -1,16 +1,16 @@
1
1
  "use client";
2
- import "../../../../chunk-MMUBH76A.js";
2
+ import "../../../../../chunk-MMUBH76A.js";
3
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
- import { StepContainer } from "../../common.js";
4
+ import { StepContainer } from "../../../common.js";
5
5
  import { useMemo, useRef, useEffect, useState } from "react";
6
- import { AccountSendForm } from "./AccountSendForm.js";
6
+ import { SendForm } from "./SendForm.js";
7
7
  import { AccountSendProvider, useSend } from "./context.js";
8
- import { AccountSendAsset } from "./AccountSendAsset.js";
9
- import { AccountSendNetwork } from "./AccountSendNetwork.js";
8
+ import { SendAsset } from "./SendAsset.js";
9
+ import { SendNetwork } from "./SendNetwork.js";
10
10
  import { AnimatePresence, motion } from "framer-motion";
11
11
  import { BODY_MOTION_VARIANTS, BODY_TRANSITION, safeStyled } from "@getpara/react-common";
12
- import { WalletSelectOld } from "../../WalletSelectOld/WalletSelectOld.js";
13
- import { AccountSendNoAssets } from "./AccountSendNoAssets.js";
12
+ import { WalletSelectOld } from "../../../WalletSelectOld/WalletSelectOld.js";
13
+ import { SendNoAssets } from "./SendNoAssets.js";
14
14
  const STEP_ORDER = ["SEND_FORM", "SEND_ASSET", "SEND_NETWORK"];
15
15
  function AccountSendIndex() {
16
16
  const { step, optionsType } = useSend();
@@ -24,15 +24,15 @@ function AccountSendIndex() {
24
24
  }, [step]);
25
25
  const Content = useMemo(() => {
26
26
  if (optionsType === "NONE") {
27
- return /* @__PURE__ */ jsx(AccountSendNoAssets, {});
27
+ return /* @__PURE__ */ jsx(SendNoAssets, {});
28
28
  }
29
29
  switch (step) {
30
30
  case "SEND_FORM":
31
- return /* @__PURE__ */ jsx(AccountSendForm, {});
31
+ return /* @__PURE__ */ jsx(SendForm, {});
32
32
  case "SEND_ASSET":
33
- return /* @__PURE__ */ jsx(AccountSendAsset, {});
33
+ return /* @__PURE__ */ jsx(SendAsset, {});
34
34
  case "SEND_NETWORK":
35
- return /* @__PURE__ */ jsx(AccountSendNetwork, {});
35
+ return /* @__PURE__ */ jsx(SendNetwork, {});
36
36
  }
37
37
  }, [step, optionsType]);
38
38
  return /* @__PURE__ */ jsxs(StepContainer, { style: { gap: "16px" }, children: [
@@ -0,0 +1 @@
1
+ export declare const SwitchWallet: () => import("react/jsx-runtime").JSX.Element;
@@ -1,10 +1,10 @@
1
1
  "use client";
2
- import "../../../chunk-MMUBH76A.js";
2
+ import "../../../../../chunk-MMUBH76A.js";
3
3
  import { jsx } from "react/jsx-runtime";
4
- import { Waiting } from "../Waiting/Waiting.js";
5
- const SwitchWalletsStep = () => {
4
+ import { Waiting } from "../../../Waiting/Waiting.js";
5
+ const SwitchWallet = () => {
6
6
  return /* @__PURE__ */ jsx(Waiting, { heading: "Switching Wallets", subheading: "Please complete the wallet selection in the popup window." });
7
7
  };
8
8
  export {
9
- SwitchWalletsStep
9
+ SwitchWallet
10
10
  };
@@ -0,0 +1 @@
1
+ export declare const Wallet: () => import("react/jsx-runtime").JSX.Element;
@@ -1,16 +1,15 @@
1
1
  "use client";
2
2
  import {
3
3
  __async
4
- } from "../../../chunk-MMUBH76A.js";
4
+ } from "../../../../../chunk-MMUBH76A.js";
5
5
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
6
  import { safeStyled, SpinnerContainer } from "@getpara/react-common";
7
7
  import { CpslButton, CpslIcon, CpslSpinner } from "@getpara/react-components";
8
- import { useModalStore } from "../../stores/modal/useModalStore.js";
9
- import { WalletEntry } from "./AccountProfileEntry.js";
10
- import { useEffect, useMemo } from "react";
11
- import { useAccount, useExportPrivateKey } from "../../../provider/index.js";
12
- import { useExternalWallets } from "../../../provider/providers/ExternalWalletProvider.js";
13
- import { ModalStep } from "../../utils/steps.js";
8
+ import { useMemo } from "react";
9
+ import { useAccount, useExportPrivateKey } from "../../../../../provider/index.js";
10
+ import { useExternalWallets } from "../../../../../provider/providers/ExternalWalletProvider.js";
11
+ import { WalletEntry } from "../Profile/ProfileEntry.js";
12
+ import { useStore } from "../../../../../provider/stores/useStore.js";
14
13
  const EXPLORERS = {
15
14
  EVM: {
16
15
  name: "Etherscan",
@@ -25,10 +24,10 @@ const EXPLORERS = {
25
24
  url: (address) => `https://atomscan.com/accounts/${address}`
26
25
  }
27
26
  };
28
- const AccountWallet = () => {
29
- const profileWallet = useModalStore((state) => state.profileWallet);
30
- const setProfileWallet = useModalStore((state) => state.setProfileWallet);
31
- const setStep = useModalStore((state) => state.setStep);
27
+ const Wallet = () => {
28
+ const profileWallet = useStore((state) => state.profileWallet);
29
+ const setProfileWallet = useStore((state) => state.setProfileWallet);
30
+ const setAccountView = useStore((state) => state.setAccountView);
32
31
  const { connectionType } = useAccount();
33
32
  const { mutate: exportPrivateKey } = useExportPrivateKey();
34
33
  const { disconnectBase, evmDisconnectStatus, solanaDisconnectStatus, cosmosDisconnectStatus } = useExternalWallets();
@@ -102,7 +101,7 @@ const AccountWallet = () => {
102
101
  disconnectType: "ACCOUNT_WIDGET"
103
102
  });
104
103
  setProfileWallet(void 0);
105
- setStep(ModalStep.ACCOUNT_PROFILE);
104
+ setAccountView("ACCOUNT_PROFILE");
106
105
  }),
107
106
  "data-testid": "para-disconnect-wallet",
108
107
  children: [
@@ -113,11 +112,6 @@ const AccountWallet = () => {
113
112
  )
114
113
  ] });
115
114
  }, [profileWallet, connectionType, disconnectStatus]);
116
- useEffect(() => {
117
- return () => {
118
- setProfileWallet(void 0);
119
- };
120
- }, []);
121
115
  return /* @__PURE__ */ jsx(Container, { children: Content });
122
116
  };
123
117
  const Container = safeStyled.div`
@@ -132,5 +126,5 @@ const DestructiveButton = safeStyled(CpslButton)`
132
126
  --button-destructive-active-background-color: rgba(255, 0, 0, 0.1);
133
127
  `;
134
128
  export {
135
- AccountWallet
129
+ Wallet
136
130
  };
@@ -0,0 +1,10 @@
1
+ import { TOAuthMethod } from '@getpara/web-sdk';
2
+ interface AuthFlowProps {
3
+ oAuthMethods?: TOAuthMethod[];
4
+ disableEmailLogin: boolean;
5
+ disablePhoneLogin: boolean;
6
+ isGuestModeEnabled?: boolean;
7
+ onClose: () => void;
8
+ }
9
+ export declare const AuthFlow: import("react").MemoExoticComponent<({ onClose, ...rest }: AuthFlowProps) => string | number | boolean | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined>;
10
+ export {};