@getpara/react-sdk-lite 2.12.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.
- package/dist/css/modal.css +0 -3
- package/dist/index.d.ts +1 -0
- package/dist/modal/ParaModal.js +46 -98
- package/dist/modal/components/Body/Body.d.ts +1 -2
- package/dist/modal/components/Body/Body.js +119 -231
- package/dist/modal/components/Controls/ChainSelect.js +1 -1
- package/dist/modal/components/Controls/Controls.js +2 -4
- package/dist/modal/components/Footer/Footer.js +3 -12
- package/dist/modal/components/Header/Header.js +13 -14
- package/dist/modal/components/Header/hooks/useStepTitle.d.ts +1 -1
- package/dist/modal/components/Header/hooks/useStepTitle.js +88 -71
- package/dist/modal/components/ModalContent/ModalContent.d.ts +1 -1
- package/dist/modal/components/ModalContent/ModalContent.js +6 -14
- package/dist/modal/components/OnRampComponents/AddingFunds.js +2 -2
- package/dist/modal/components/WalletCard/WalletCard.js +9 -9
- package/dist/modal/components/WalletSelectOld/WalletSelectOld.js +7 -5
- package/dist/modal/components/{Account → flows/account/Account}/Account.js +30 -27
- package/dist/modal/components/{Account/AccountHeader.d.ts → flows/account/Account/Header.d.ts} +1 -1
- package/dist/modal/components/{Account/AccountHeader.js → flows/account/Account/Header.js} +8 -8
- package/dist/modal/components/{Account/AccountWalletSelect.d.ts → flows/account/Account/WalletSelect.d.ts} +1 -1
- package/dist/modal/components/{Account/AccountWalletSelect.js → flows/account/Account/WalletSelect.js} +13 -11
- package/dist/modal/components/flows/account/AccountFlow/AccountFlow.d.ts +12 -0
- package/dist/modal/components/flows/account/AccountFlow/AccountFlow.js +126 -0
- package/dist/modal/components/flows/account/AccountProvider/AccountContext.d.ts +11 -0
- package/dist/modal/components/flows/account/AccountProvider/AccountContext.js +42 -0
- package/dist/modal/components/flows/account/AccountProvider/AccountProvider.d.ts +4 -0
- package/dist/modal/components/flows/account/AccountProvider/AccountProvider.js +110 -0
- package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFunds.js +12 -12
- package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsAsset.js +3 -3
- package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsAwaiting.js +7 -8
- package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsContext.d.ts +1 -1
- package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsContext.js +11 -11
- package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsDone.js +8 -9
- package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsNetwork.js +2 -2
- package/dist/modal/components/flows/account/AddFunds/AddFundsProvider.d.ts +1 -0
- package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsProvider.js +13 -12
- package/dist/modal/components/flows/account/AddFunds/AddFundsReceive.d.ts +1 -0
- package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsReceive.js +10 -10
- package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsSettings.js +10 -10
- package/dist/modal/components/{AddFunds → flows/account/AddFunds}/MoonPayEmbed.js +1 -1
- package/dist/modal/components/flows/account/AddFunds/utils.d.ts +3 -0
- package/dist/modal/components/flows/account/AddFunds/utils.js +16 -0
- package/dist/modal/components/{ChainSwitch → flows/account/ChainSwitch}/ChainSwitch.js +7 -10
- package/dist/modal/components/{ChainSwitch → flows/account/ChainSwitch}/config.js +1 -1
- package/dist/modal/components/{Account → flows/account/Profile}/AccountMonitorTx.js +13 -13
- package/dist/modal/components/flows/account/Profile/FarcasterLink.d.ts +2 -0
- package/dist/modal/components/{OAuth → flows/account/Profile}/FarcasterLink.js +6 -6
- package/dist/modal/components/{Account/AccountProfile.d.ts → flows/account/Profile/Profile.d.ts} +1 -1
- package/dist/modal/components/{Account/AccountProfile.js → flows/account/Profile/Profile.js} +20 -24
- package/dist/modal/components/{Account/AccountProfileEntry.js → flows/account/Profile/ProfileEntry.js} +13 -15
- package/dist/modal/components/flows/account/Profile/ProfileLink.d.ts +1 -0
- package/dist/modal/components/{Account/AccountProfileLink.js → flows/account/Profile/ProfileLink.js} +19 -34
- package/dist/modal/components/flows/account/Profile/ProfileLinkOptions.d.ts +1 -0
- package/dist/modal/components/{Account/AccountProfileLinkOptions.js → flows/account/Profile/ProfileLinkOptions.js} +11 -11
- package/dist/modal/components/flows/account/Profile/ProfileUnlink.d.ts +1 -0
- package/dist/modal/components/{Account/AccountProfileUnlink.js → flows/account/Profile/ProfileUnlink.js} +6 -6
- package/dist/modal/{hooks/useTelegramLogin.d.ts → components/flows/account/Profile/useTelegramLink.d.ts} +1 -5
- package/dist/modal/{hooks/useTelegramLogin.js → components/flows/account/Profile/useTelegramLink.js} +15 -22
- package/dist/modal/components/{Account/AccountSend → flows/account/Send}/AssetNetwork.js +1 -1
- package/dist/modal/components/flows/account/Send/SendAsset.d.ts +1 -0
- package/dist/modal/components/{Account/AccountSend/AccountSendAsset.js → flows/account/Send/SendAsset.js} +11 -12
- package/dist/modal/components/flows/account/Send/SendForm.d.ts +1 -0
- package/dist/modal/components/{Account/AccountSend/AccountSendForm.js → flows/account/Send/SendForm.js} +15 -16
- package/dist/modal/components/flows/account/Send/SendNetwork.d.ts +1 -0
- package/dist/modal/components/{Account/AccountSend/AccountSendNetwork.js → flows/account/Send/SendNetwork.js} +9 -10
- package/dist/modal/components/flows/account/Send/SendNoAssets.d.ts +1 -0
- package/dist/modal/components/{Account/AccountSend/AccountSendNoAssets.js → flows/account/Send/SendNoAssets.js} +8 -9
- package/dist/modal/components/{Account/AccountSend → flows/account/Send}/context.js +5 -5
- package/dist/modal/components/{Account/AccountSend → flows/account/Send}/index.js +11 -11
- package/dist/modal/components/flows/account/SwitchWallets/SwitchWallets.d.ts +1 -0
- package/dist/modal/components/{SwitchWalletsStep/SwitchWalletsStep.js → flows/account/SwitchWallets/SwitchWallets.js} +4 -4
- package/dist/modal/components/flows/account/Wallet/Wallet.d.ts +1 -0
- package/dist/modal/components/{Account/AccountWallet.js → flows/account/Wallet/Wallet.js} +11 -12
- package/dist/modal/components/flows/auth/AuthFlow/AuthFlow.d.ts +10 -0
- package/dist/modal/components/flows/auth/AuthFlow/AuthFlow.js +94 -0
- package/dist/modal/components/flows/auth/AuthMain/AuthMain.d.ts +9 -0
- package/dist/modal/components/{AuthMainStep/AuthMainStep.js → flows/auth/AuthMain/AuthMain.js} +10 -21
- package/dist/modal/components/flows/auth/AuthMain/AuthMainContent.d.ts +9 -0
- package/dist/modal/components/{AuthMainStep/AuthMainStepContent.js → flows/auth/AuthMain/AuthMainContent.js} +49 -24
- package/dist/modal/components/flows/auth/AwaitingAccountSetup/AwaitingAccountSetup.d.ts +1 -0
- package/dist/modal/components/flows/auth/AwaitingAccountSetup/AwaitingAccountSetup.js +31 -0
- package/dist/modal/components/flows/auth/AwaitingBiometrics/AwaitingBiometrics.d.ts +1 -0
- package/dist/modal/components/flows/auth/AwaitingBiometrics/AwaitingBiometrics.js +21 -0
- package/dist/modal/components/flows/auth/AwaitingOAuth/AwaitingOAuth.d.ts +1 -0
- package/dist/modal/components/{AwaitingOAuthStep/AwaitingOAuthStep.js → flows/auth/AwaitingOAuth/AwaitingOAuth.js} +4 -4
- package/dist/modal/components/flows/auth/AwaitingPassword/AwaitingPassword.d.ts +1 -0
- package/dist/modal/components/flows/auth/AwaitingPassword/AwaitingPassword.js +22 -0
- package/dist/modal/components/flows/auth/BiometricCreation/BiometricCreation.d.ts +1 -0
- package/dist/modal/components/{BiometricCreationStep/BiometricCreationStep.js → flows/auth/BiometricCreation/BiometricCreation.js} +25 -22
- package/dist/modal/components/flows/auth/BiometricLogin/BiometricLogin.d.ts +1 -0
- package/dist/modal/components/flows/auth/BiometricLogin/BiometricLogin.js +72 -0
- package/dist/modal/components/flows/auth/LoginDone/LoginDone.d.ts +5 -0
- package/dist/modal/components/{LoginDoneStep/LoginDoneStep.js → flows/auth/LoginDone/LoginDone.js} +9 -13
- package/dist/modal/components/{OAuth → flows/auth/OAuth}/OAuth.js +15 -23
- package/dist/modal/components/{RecoverySecretStep → flows/auth/RecoverySecretStep}/RecoverySecretStep.js +9 -11
- package/dist/modal/components/flows/auth/Setup2FA/Setup2FA.d.ts +5 -0
- package/dist/modal/components/{Setup2FAStep/Setup2FAStep.js → flows/auth/Setup2FA/Setup2FA.js} +42 -19
- package/dist/modal/components/flows/auth/Verification/Verification.d.ts +1 -0
- package/dist/modal/components/flows/auth/Verification/Verification.js +36 -0
- package/dist/modal/components/flows/auth/WalletCreationDone/WalletCreationDone.d.ts +6 -0
- package/dist/modal/components/{WalletCreationDoneStep/WalletCreationDoneStep.js → flows/auth/WalletCreationDone/WalletCreationDone.js} +19 -46
- package/dist/modal/components/{AuthOptions → shared}/AuthOptions.d.ts +2 -2
- package/dist/modal/components/{AuthOptions → shared}/AuthOptions.js +18 -15
- package/dist/modal/components/{ExternalWalletStep/ExternalWalletStep.d.ts → shared/ConnectExternalWallet/ConnectExternalWallet.d.ts} +1 -1
- package/dist/modal/components/{ExternalWalletStep/ExternalWalletStep.js → shared/ConnectExternalWallet/ConnectExternalWallet.js} +16 -36
- package/dist/modal/components/{ExternalWalletStep → shared/ConnectExternalWallet}/config.js +1 -1
- package/dist/modal/components/{AuthInput/AuthInput.d.ts → shared/EmailOrPhone/EmailOrPhoneInput.d.ts} +4 -4
- package/dist/modal/components/{AuthInput/AuthInput.js → shared/EmailOrPhone/EmailOrPhoneInput.js} +14 -10
- package/dist/modal/components/{AuthInput → shared/EmailOrPhone}/phoneMasks.js +1 -1
- package/dist/modal/components/{ExternalWalletNetworkSelectStep/ExternalWalletNetworkSelectStep.d.ts → shared/ExternalWalletNetworkSelect.d.ts} +1 -1
- package/dist/modal/components/{ExternalWalletNetworkSelectStep/ExternalWalletNetworkSelectStep.js → shared/ExternalWalletNetworkSelect.js} +9 -9
- package/dist/modal/components/{ExternalWallets → shared}/ExternalWallets.js +17 -12
- package/dist/modal/components/shared/IFrame.d.ts +1 -0
- package/dist/modal/components/shared/IFrame.js +87 -0
- package/dist/modal/components/{VerificationCodeStep/VerificationCodeStep.d.ts → shared/VerificationCode.d.ts} +3 -4
- package/dist/modal/components/{VerificationCodeStep/VerificationCodeStep.js → shared/VerificationCode.js} +4 -28
- package/dist/modal/components/shared/VerifyExternalWallet.d.ts +1 -0
- package/dist/modal/components/{ExternalWalletVerificationStep/ExternalWalletVerificationStep.js → shared/VerifyExternalWallet.js} +10 -17
- package/dist/modal/hooks/index.d.ts +1 -2
- package/dist/modal/hooks/index.js +1 -2
- package/dist/modal/hooks/useAuthView.d.ts +4 -0
- package/dist/modal/hooks/useAuthView.js +115 -0
- package/dist/modal/hooks/useCanbGoBack.d.ts +3 -0
- package/dist/modal/hooks/useCanbGoBack.js +47 -0
- package/dist/modal/{components/AuthInput/hooks → hooks}/useDropdownPosition.js +3 -3
- package/dist/modal/hooks/useGoBack.d.ts +4 -1
- package/dist/modal/hooks/useGoBack.js +60 -36
- package/dist/modal/hooks/useSendMutations.js +4 -5
- package/dist/modal/hooks/useTransactionMonitoring.js +8 -8
- package/dist/modal/index.d.ts +1 -2
- package/dist/modal/index.js +1 -3
- package/dist/modal/stores/index.d.ts +0 -1
- package/dist/modal/stores/index.js +0 -1
- package/dist/modal/types/modalProps.d.ts +18 -8
- package/dist/provider/ParaProviderMin.js +34 -38
- package/dist/provider/actions/getWallet.d.ts +1 -1
- package/dist/provider/actions/index.d.ts +43 -49
- package/dist/provider/actions/index.js +4 -0
- package/dist/provider/components/CosmosWalletWrapper.js +0 -3
- package/dist/provider/components/EvmWalletWrapper.js +0 -3
- package/dist/provider/components/ExternalWalletWrapper.js +8 -2
- package/dist/provider/hooks/mutations/index.d.ts +2 -0
- package/dist/provider/hooks/mutations/index.js +4 -0
- package/dist/provider/hooks/mutations/useAddAuthMethod.d.ts +7 -12
- package/dist/provider/hooks/mutations/useAuthenticateWithEmailOrPhone.d.ts +34 -0
- package/dist/provider/hooks/mutations/useAuthenticateWithEmailOrPhone.js +28 -0
- package/dist/provider/hooks/mutations/useAuthenticateWithOAuth.d.ts +34 -0
- package/dist/provider/hooks/mutations/useAuthenticateWithOAuth.js +28 -0
- package/dist/provider/hooks/mutations/useClaimPregenWallets.d.ts +7 -13
- package/dist/provider/hooks/mutations/useClaimPregenWallets.js +4 -1
- package/dist/provider/hooks/mutations/useCreateGuestWallets.d.ts +7 -6
- package/dist/provider/hooks/mutations/useCreateGuestWallets.js +6 -3
- package/dist/provider/hooks/mutations/useCreatePregenWallet.d.ts +7 -93
- package/dist/provider/hooks/mutations/useCreatePregenWallet.js +4 -1
- package/dist/provider/hooks/mutations/useCreatePregenWalletPerType.d.ts +7 -15
- package/dist/provider/hooks/mutations/useCreateWallet.d.ts +7 -15
- package/dist/provider/hooks/mutations/useCreateWallet.js +4 -1
- package/dist/provider/hooks/mutations/useCreateWalletPerType.d.ts +7 -27
- package/dist/provider/hooks/mutations/useEnable2fa.d.ts +7 -12
- package/dist/provider/hooks/mutations/useExportPrivateKey.d.ts +2 -7
- package/dist/provider/hooks/mutations/useHasPregenWallet.d.ts +7 -13
- package/dist/provider/hooks/mutations/useIssueJwt.d.ts +7 -21
- package/dist/provider/hooks/mutations/useKeepSessionAlive.d.ts +6 -7
- package/dist/provider/hooks/mutations/useKeepSessionAlive.js +2 -2
- package/dist/provider/hooks/mutations/useLoginExternalWallet.d.ts +7 -25
- package/dist/provider/hooks/mutations/useLoginExternalWallet.js +4 -1
- package/dist/provider/hooks/mutations/useLogout.d.ts +7 -12
- package/dist/provider/hooks/mutations/useResendVerificationCode.d.ts +7 -13
- package/dist/provider/hooks/mutations/useResendVerificationCode.js +4 -1
- package/dist/provider/hooks/mutations/useSetup2fa.d.ts +7 -7
- package/dist/provider/hooks/mutations/useSetup2fa.js +2 -2
- package/dist/provider/hooks/mutations/useSignMessage.d.ts +7 -31
- package/dist/provider/hooks/mutations/useSignTransaction.d.ts +7 -31
- package/dist/provider/hooks/mutations/useSignTransaction.js +4 -1
- package/dist/provider/hooks/mutations/useSignUpOrLogIn.d.ts +7 -19
- package/dist/provider/hooks/mutations/useSignUpOrLogIn.js +4 -1
- package/dist/provider/hooks/mutations/useSwitchWallets.d.ts +7 -30
- package/dist/provider/hooks/mutations/useSwitchWallets.js +4 -1
- package/dist/provider/hooks/mutations/useUpdatePregenWalletIdentifier.d.ts +7 -15
- package/dist/provider/hooks/mutations/useUpdatePregenWalletIdentifier.js +4 -1
- package/dist/provider/hooks/mutations/useVerify2fa.d.ts +7 -30
- package/dist/provider/hooks/mutations/useVerifyExternalWallet.d.ts +7 -19
- package/dist/provider/hooks/mutations/useVerifyExternalWallet.js +4 -1
- package/dist/provider/hooks/mutations/useVerifyFarcaster.d.ts +7 -31
- package/dist/provider/hooks/mutations/useVerifyFarcaster.js +4 -1
- package/dist/provider/hooks/mutations/useVerifyNewAccount.d.ts +7 -66
- package/dist/provider/hooks/mutations/useVerifyNewAccount.js +4 -1
- package/dist/provider/hooks/mutations/useVerifyOAuth.d.ts +7 -37
- package/dist/provider/hooks/mutations/useVerifyTelegram.d.ts +7 -22
- package/dist/provider/hooks/mutations/useWaitForLogin.d.ts +7 -30
- package/dist/provider/hooks/mutations/useWaitForLogin.js +4 -1
- package/dist/provider/hooks/mutations/useWaitForSignup.d.ts +7 -18
- package/dist/provider/hooks/mutations/useWaitForWalletCreation.d.ts +7 -27
- package/dist/provider/hooks/queries/useIsFullyLoggedIn.d.ts +4 -1
- package/dist/provider/hooks/queries/useIsFullyLoggedIn.js +6 -1
- package/dist/provider/hooks/queries/useLinkedAccounts.d.ts +2 -4
- package/dist/provider/hooks/queries/useParaStatus.d.ts +0 -1
- package/dist/provider/hooks/queries/useParaStatus.js +0 -2
- package/dist/provider/hooks/queries/useWallet.d.ts +1 -1
- package/dist/provider/hooks/utils/useEventListeners.js +0 -7
- package/dist/provider/hooks/utils/useFormattedBiometricHints.d.ts +1 -0
- package/dist/provider/hooks/utils/useFormattedBiometricHints.js +9 -5
- package/dist/provider/hooks/utils/useModal.d.ts +2 -2
- package/dist/provider/hooks/utils/useModal.js +9 -8
- package/dist/provider/hooks/utils/useWalletState.d.ts +3 -3
- package/dist/provider/hooks/utils/useWalletState.js +14 -6
- package/dist/provider/providers/AccountLinkProvider.js +21 -19
- package/dist/provider/providers/AuthProvider/AuthContext.d.ts +19 -0
- package/dist/provider/providers/AuthProvider/AuthContext.js +35 -0
- package/dist/provider/providers/AuthProvider/AuthProvider.d.ts +9 -0
- package/dist/provider/providers/AuthProvider/AuthProvider.js +261 -0
- package/dist/provider/providers/ExternalWalletProvider.d.ts +12 -4
- package/dist/provider/providers/ExternalWalletProvider.js +285 -283
- package/dist/provider/stores/getters.d.ts +1 -1
- package/dist/provider/stores/getters.js +5 -5
- package/dist/provider/stores/setters.js +2 -2
- package/dist/provider/stores/slices/accountFlow.d.ts +3 -0
- package/dist/provider/stores/slices/accountFlow.js +30 -0
- package/dist/provider/stores/slices/authFlow.d.ts +3 -0
- package/dist/provider/stores/slices/authFlow.js +63 -0
- package/dist/provider/stores/slices/externalWallets.js +10 -0
- package/dist/provider/stores/slices/index.d.ts +4 -0
- package/dist/provider/stores/slices/index.js +4 -0
- package/dist/provider/stores/slices/modal.js +8 -2
- package/dist/provider/stores/slices/onRamp.d.ts +3 -0
- package/dist/provider/stores/slices/onRamp.js +20 -0
- package/dist/provider/stores/slices/paraState.d.ts +3 -0
- package/dist/provider/stores/slices/paraState.js +9 -0
- package/dist/provider/stores/types.d.ts +117 -5
- package/dist/provider/stores/types.js +9 -0
- package/dist/provider/stores/useStore.d.ts +5 -3
- package/dist/provider/stores/useStore.js +15 -8
- package/package.json +8 -8
- package/dist/modal/components/Account/AccountProfileLink.d.ts +0 -1
- package/dist/modal/components/Account/AccountProfileLinkOptions.d.ts +0 -1
- package/dist/modal/components/Account/AccountProfileUnlink.d.ts +0 -1
- package/dist/modal/components/Account/AccountSend/AccountSendAsset.d.ts +0 -1
- package/dist/modal/components/Account/AccountSend/AccountSendForm.d.ts +0 -1
- package/dist/modal/components/Account/AccountSend/AccountSendNetwork.d.ts +0 -1
- package/dist/modal/components/Account/AccountSend/AccountSendNoAssets.d.ts +0 -1
- package/dist/modal/components/Account/AccountWallet.d.ts +0 -1
- package/dist/modal/components/AddFunds/AddFundsProvider.d.ts +0 -1
- package/dist/modal/components/AddFunds/AddFundsReceive.d.ts +0 -1
- package/dist/modal/components/AuthMainStep/AuthMainStep.d.ts +0 -9
- package/dist/modal/components/AuthMainStep/AuthMainStepContent.d.ts +0 -9
- package/dist/modal/components/AwaitingAccountStep/AwaitingAccountStep.d.ts +0 -1
- package/dist/modal/components/AwaitingAccountStep/AwaitingAccountStep.js +0 -21
- package/dist/modal/components/AwaitingBiometricsStep/AwaitingBiometricsStep.d.ts +0 -1
- package/dist/modal/components/AwaitingBiometricsStep/AwaitingBiometricsStep.js +0 -18
- package/dist/modal/components/AwaitingOAuthStep/AwaitingOAuthStep.d.ts +0 -1
- package/dist/modal/components/AwaitingPasswordStep/AwaitingPasswordStep.d.ts +0 -1
- package/dist/modal/components/AwaitingPasswordStep/AwaitingPasswordStep.js +0 -21
- package/dist/modal/components/AwaitingWalletCreationStep/AwaitingWalletCreationStep.d.ts +0 -5
- package/dist/modal/components/AwaitingWalletCreationStep/AwaitingWalletCreationStep.js +0 -24
- package/dist/modal/components/BiometricCreationStep/BiometricCreationStep.d.ts +0 -1
- package/dist/modal/components/BiometricLoginStep/BiometricLoginStep.d.ts +0 -1
- package/dist/modal/components/BiometricLoginStep/BiometricLoginStep.js +0 -67
- package/dist/modal/components/ExternalWalletVerificationStep/ExternalWalletVerificationStep.d.ts +0 -1
- package/dist/modal/components/Hero/Hero.d.ts +0 -1
- package/dist/modal/components/Hero/Hero.js +0 -118
- package/dist/modal/components/IFrameStep/IFrameStep.d.ts +0 -1
- package/dist/modal/components/IFrameStep/IFrameStep.js +0 -83
- package/dist/modal/components/LoginDoneStep/LoginDoneStep.d.ts +0 -5
- package/dist/modal/components/OAuth/FarcasterLink.d.ts +0 -2
- package/dist/modal/components/OAuth/FarcasterOAuthStep.d.ts +0 -1
- package/dist/modal/components/OAuth/FarcasterOAuthStep.js +0 -53
- package/dist/modal/components/OAuth/TelegramOAuthStep.d.ts +0 -8
- package/dist/modal/components/OAuth/TelegramOAuthStep.js +0 -91
- package/dist/modal/components/Setup2FAStep/Setup2FAStep.d.ts +0 -5
- package/dist/modal/components/SwitchWalletsStep/SwitchWalletsStep.d.ts +0 -1
- package/dist/modal/components/TwoFactorDoneStep/TwoFactorDoneStep.d.ts +0 -5
- package/dist/modal/components/TwoFactorDoneStep/TwoFactorDoneStep.js +0 -27
- package/dist/modal/components/WalletCreationDoneStep/WalletCreationDoneStep.d.ts +0 -6
- package/dist/modal/hooks/useFarcasterLogin.d.ts +0 -9
- package/dist/modal/hooks/useFarcasterLogin.js +0 -77
- package/dist/modal/stores/modal/actions.d.ts +0 -3
- package/dist/modal/stores/modal/actions.js +0 -146
- package/dist/modal/stores/modal/useModalStore.d.ts +0 -120
- package/dist/modal/stores/modal/useModalStore.js +0 -81
- package/dist/modal/utils/steps.d.ts +0 -162
- package/dist/modal/utils/steps.js +0 -335
- package/dist/provider/providers/AuthProvider.d.ts +0 -43
- package/dist/provider/providers/AuthProvider.js +0 -777
- /package/dist/modal/components/{Account → flows/account/Account}/Account.d.ts +0 -0
- /package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFunds.d.ts +0 -0
- /package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsAsset.d.ts +0 -0
- /package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsAwaiting.d.ts +0 -0
- /package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsDone.d.ts +0 -0
- /package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsNetwork.d.ts +0 -0
- /package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsSettings.d.ts +0 -0
- /package/dist/modal/components/{AddFunds → flows/account/AddFunds}/MoonPayEmbed.d.ts +0 -0
- /package/dist/modal/components/{AddFunds → flows/account/AddFunds}/index.d.ts +0 -0
- /package/dist/modal/components/{AddFunds → flows/account/AddFunds}/index.js +0 -0
- /package/dist/modal/components/{ChainSwitch → flows/account/ChainSwitch}/ChainSwitch.d.ts +0 -0
- /package/dist/modal/components/{ChainSwitch → flows/account/ChainSwitch}/config.d.ts +0 -0
- /package/dist/modal/components/{Account → flows/account/Profile}/AccountMonitorTx.d.ts +0 -0
- /package/dist/modal/components/{Account/AccountProfileEntry.d.ts → flows/account/Profile/ProfileEntry.d.ts} +0 -0
- /package/dist/modal/components/{Account/AccountSend → flows/account/Send}/AssetNetwork.d.ts +0 -0
- /package/dist/modal/components/{Account/AccountSend → flows/account/Send}/context.d.ts +0 -0
- /package/dist/modal/components/{Account/AccountSend → flows/account/Send}/index.d.ts +0 -0
- /package/dist/modal/components/{OAuth → flows/auth/OAuth}/OAuth.d.ts +0 -0
- /package/dist/modal/components/{RecoverySecretStep → flows/auth/RecoverySecretStep}/RecoverySecretStep.d.ts +0 -0
- /package/dist/modal/components/{ExternalWalletStep → shared/ConnectExternalWallet}/config.d.ts +0 -0
- /package/dist/modal/components/{AuthInput → shared/EmailOrPhone}/phoneMasks.d.ts +0 -0
- /package/dist/modal/components/{ExternalWallets → shared}/ExternalWallets.d.ts +0 -0
- /package/dist/modal/{components/AuthInput/hooks → hooks}/useDropdownPosition.d.ts +0 -0
package/dist/modal/{hooks/useTelegramLogin.js → components/flows/account/Profile/useTelegramLink.js}
RENAMED
|
@@ -1,37 +1,33 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
__async
|
|
4
|
-
} from "
|
|
4
|
+
} from "../../../../../chunk-MMUBH76A.js";
|
|
5
5
|
import { useEffect, useState } from "react";
|
|
6
|
-
import { useInternalClient } from "
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
const
|
|
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 =
|
|
17
|
-
const
|
|
18
|
-
const
|
|
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 (!
|
|
24
|
-
|
|
25
|
-
|
|
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,
|
|
30
|
+
}, [isActive, iFrameUrl]);
|
|
35
31
|
useEffect(() => {
|
|
36
32
|
const updateState = (event) => __async(void 0, null, function* () {
|
|
37
33
|
var _a, _b;
|
|
@@ -52,7 +48,7 @@ const useTelegramLogin = ({
|
|
|
52
48
|
try {
|
|
53
49
|
onSubmit == null ? void 0 : onSubmit(authObject);
|
|
54
50
|
} catch (e) {
|
|
55
|
-
(_b = (_a = refs.
|
|
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
|
-
|
|
69
|
+
useTelegramLink
|
|
77
70
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SendAsset: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import "
|
|
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 "
|
|
6
|
-
import { useAssets } from "
|
|
7
|
-
import { SearchableButtonList } from "
|
|
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
|
-
|
|
38
|
-
const
|
|
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
|
-
|
|
77
|
+
setAccountView(item.networks.length > 1 ? "ACCOUNT_SEND_NETWORK" : "ACCOUNT_SEND");
|
|
79
78
|
},
|
|
80
|
-
[setTransferAmount, setSendMetadata,
|
|
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
|
-
|
|
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 "
|
|
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 "
|
|
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 {
|
|
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 "
|
|
12
|
+
import { useDebounce } from "../../../../hooks/useDebounce.js";
|
|
14
13
|
import { AssetNetwork } from "./AssetNetwork.js";
|
|
15
|
-
import { useWalletState } from "
|
|
16
|
-
import { useInternalClient } from "
|
|
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
|
-
|
|
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
|
|
23
|
-
const
|
|
24
|
-
const
|
|
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 =
|
|
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: () =>
|
|
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) ?
|
|
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
|
-
|
|
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 "
|
|
5
|
+
} from "../../../../../chunk-MMUBH76A.js";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
import { useMemo } from "react";
|
|
8
|
-
import { useAssets } from "
|
|
9
|
-
import { SearchableButtonList } from "
|
|
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 {
|
|
13
|
-
import { useModalStore } from "../../../stores/index.js";
|
|
12
|
+
import { useStore } from "../../../../../provider/stores/useStore.js";
|
|
14
13
|
import { AssetNetwork } from "./AssetNetwork.js";
|
|
15
|
-
|
|
16
|
-
const
|
|
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
|
-
|
|
45
|
+
setAccountView("ACCOUNT_SEND");
|
|
47
46
|
}
|
|
48
47
|
}
|
|
49
48
|
) });
|
|
50
|
-
}
|
|
49
|
+
};
|
|
51
50
|
export {
|
|
52
|
-
|
|
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 "
|
|
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 {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const
|
|
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
|
-
|
|
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
|
-
|
|
54
|
+
SendNoAssets
|
|
56
55
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
__spreadProps,
|
|
4
4
|
__spreadValues
|
|
5
|
-
} from "
|
|
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 "
|
|
17
|
-
import { useProfileBalance, useWalletState } from "
|
|
18
|
-
import { useSendMutations } from "
|
|
19
|
-
import { useStore } from "
|
|
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 };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import "
|
|
2
|
+
import "../../../../../chunk-MMUBH76A.js";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
import { StepContainer } from "
|
|
4
|
+
import { StepContainer } from "../../../common.js";
|
|
5
5
|
import { useMemo, useRef, useEffect, useState } from "react";
|
|
6
|
-
import {
|
|
6
|
+
import { SendForm } from "./SendForm.js";
|
|
7
7
|
import { AccountSendProvider, useSend } from "./context.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
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 "
|
|
13
|
-
import {
|
|
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(
|
|
27
|
+
return /* @__PURE__ */ jsx(SendNoAssets, {});
|
|
28
28
|
}
|
|
29
29
|
switch (step) {
|
|
30
30
|
case "SEND_FORM":
|
|
31
|
-
return /* @__PURE__ */ jsx(
|
|
31
|
+
return /* @__PURE__ */ jsx(SendForm, {});
|
|
32
32
|
case "SEND_ASSET":
|
|
33
|
-
return /* @__PURE__ */ jsx(
|
|
33
|
+
return /* @__PURE__ */ jsx(SendAsset, {});
|
|
34
34
|
case "SEND_NETWORK":
|
|
35
|
-
return /* @__PURE__ */ jsx(
|
|
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 "
|
|
2
|
+
import "../../../../../chunk-MMUBH76A.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
import { Waiting } from "
|
|
5
|
-
const
|
|
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
|
-
|
|
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 "
|
|
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
8
|
import { useMemo } from "react";
|
|
11
|
-
import { useAccount, useExportPrivateKey } from "
|
|
12
|
-
import { useExternalWallets } from "
|
|
13
|
-
import {
|
|
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
|
|
29
|
-
const profileWallet =
|
|
30
|
-
const setProfileWallet =
|
|
31
|
-
const
|
|
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
|
-
|
|
104
|
+
setAccountView("ACCOUNT_PROFILE");
|
|
106
105
|
}),
|
|
107
106
|
"data-testid": "para-disconnect-wallet",
|
|
108
107
|
children: [
|
|
@@ -127,5 +126,5 @@ const DestructiveButton = safeStyled(CpslButton)`
|
|
|
127
126
|
--button-destructive-active-background-color: rgba(255, 0, 0, 0.1);
|
|
128
127
|
`;
|
|
129
128
|
export {
|
|
130
|
-
|
|
129
|
+
Wallet
|
|
131
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 {};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
__objRest,
|
|
4
|
+
__spreadValues
|
|
5
|
+
} from "../../../../../chunk-MMUBH76A.js";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
import { useStore } from "../../../../../provider/stores/useStore.js";
|
|
8
|
+
import { memo, useMemo } from "react";
|
|
9
|
+
import { useAuthView } from "../../../../hooks/useAuthView.js";
|
|
10
|
+
import { AuthMain } from "../AuthMain/AuthMain.js";
|
|
11
|
+
import { AwaitingPassword } from "../AwaitingPassword/AwaitingPassword.js";
|
|
12
|
+
import { Verification } from "../Verification/Verification.js";
|
|
13
|
+
import { AwaitingOAuth } from "../AwaitingOAuth/AwaitingOAuth.js";
|
|
14
|
+
import { WalletCreationDone } from "../WalletCreationDone/WalletCreationDone.js";
|
|
15
|
+
import { RecoverySecretStep } from "../RecoverySecretStep/RecoverySecretStep.js";
|
|
16
|
+
import { AwaitingAccountSetup } from "../AwaitingAccountSetup/AwaitingAccountSetup.js";
|
|
17
|
+
import { BiometricCreation } from "../BiometricCreation/BiometricCreation.js";
|
|
18
|
+
import { BiometricLogin } from "../BiometricLogin/BiometricLogin.js";
|
|
19
|
+
import { AwaitingBiometrics } from "../AwaitingBiometrics/AwaitingBiometrics.js";
|
|
20
|
+
import { Setup2FA } from "../Setup2FA/Setup2FA.js";
|
|
21
|
+
import { LoginDone } from "../LoginDone/LoginDone.js";
|
|
22
|
+
import { VerifyExternalWallet } from "../../../shared/VerifyExternalWallet.js";
|
|
23
|
+
import { ExternalWalletNetworkSelect } from "../../../shared/ExternalWalletNetworkSelect.js";
|
|
24
|
+
import { ConnectExternalWallet } from "../../../shared/ConnectExternalWallet/ConnectExternalWallet.js";
|
|
25
|
+
const MemoizedAuthMain = memo(AuthMain);
|
|
26
|
+
const MemoizedVerification = memo(Verification);
|
|
27
|
+
const MemoizedAwaitingOAuth = memo(AwaitingOAuth);
|
|
28
|
+
const MemoizedAwaitingPassword = memo(AwaitingPassword);
|
|
29
|
+
const MemoizedAwaitingBiometrics = memo(AwaitingBiometrics);
|
|
30
|
+
const MemoizedBiometricLogin = memo(BiometricLogin);
|
|
31
|
+
const MemoizedBiometricCreation = memo(BiometricCreation);
|
|
32
|
+
const MemoizedAwaitingAccountSetup = memo(AwaitingAccountSetup);
|
|
33
|
+
const MemoizedRecoverySecretStep = memo(RecoverySecretStep);
|
|
34
|
+
const MemoizedWalletCreationDone = memo(WalletCreationDone);
|
|
35
|
+
const MemoizedSetup2FA = memo(Setup2FA);
|
|
36
|
+
const MemoizedConnectExternalWallet = memo(ConnectExternalWallet);
|
|
37
|
+
const MemoizedVerifyExternalWallet = memo(VerifyExternalWallet);
|
|
38
|
+
const MemoizedExternalWalletNetworkSelect = memo(ExternalWalletNetworkSelect);
|
|
39
|
+
const MemoizedLoginDone = memo(LoginDone);
|
|
40
|
+
const AuthFlow = memo((_a) => {
|
|
41
|
+
var _b = _a, { onClose } = _b, rest = __objRest(_b, ["onClose"]);
|
|
42
|
+
const { authView } = useAuthView();
|
|
43
|
+
const isLogin = useStore((state) => {
|
|
44
|
+
var _a2, _b2;
|
|
45
|
+
return ((_b2 = (_a2 = state.paraState) == null ? void 0 : _a2.authStateInfo) == null ? void 0 : _b2.isNewUser) === false;
|
|
46
|
+
});
|
|
47
|
+
const lastValidComponentRef = useStore((state) => state.lastValidComponentRef);
|
|
48
|
+
const selectedComponent = useMemo(() => {
|
|
49
|
+
switch (authView) {
|
|
50
|
+
case "AUTH_MAIN":
|
|
51
|
+
case "AUTH_ALL_EXTERNAL_WALLETS":
|
|
52
|
+
case "AUTH_ALL_OPTIONS":
|
|
53
|
+
return /* @__PURE__ */ jsx(MemoizedAuthMain, __spreadValues({}, rest));
|
|
54
|
+
case "AUTH_VERIFY_ACCOUNT":
|
|
55
|
+
return /* @__PURE__ */ jsx(MemoizedVerification, {});
|
|
56
|
+
case "AUTH_OAUTH_CONNECT":
|
|
57
|
+
return /* @__PURE__ */ jsx(MemoizedAwaitingOAuth, {});
|
|
58
|
+
case "AUTH_EXTERNAL_WALLET_CONNECT":
|
|
59
|
+
return /* @__PURE__ */ jsx(MemoizedConnectExternalWallet, {});
|
|
60
|
+
case "AUTH_EXTERNAL_WALLET_NETWORK_SELECT":
|
|
61
|
+
return /* @__PURE__ */ jsx(MemoizedExternalWalletNetworkSelect, { type: "CONNECT" });
|
|
62
|
+
case "AUTH_EXTERNAL_WALLET_VERIFY":
|
|
63
|
+
return /* @__PURE__ */ jsx(MemoizedVerifyExternalWallet, {});
|
|
64
|
+
case "AUTH_GUEST_MODE_CONNECTING":
|
|
65
|
+
case "AUTH_CONNECTING":
|
|
66
|
+
case "AUTH_BASIC_LOGIN":
|
|
67
|
+
return /* @__PURE__ */ jsx(MemoizedAwaitingAccountSetup, {});
|
|
68
|
+
case "AUTH_BIOMETRIC_PASSWORD":
|
|
69
|
+
case "AUTH_BIOMETRIC_PIN":
|
|
70
|
+
return /* @__PURE__ */ jsx(MemoizedAwaitingPassword, {});
|
|
71
|
+
case "AUTH_BIOMETRIC_PASSKEY":
|
|
72
|
+
return /* @__PURE__ */ jsx(MemoizedAwaitingBiometrics, {});
|
|
73
|
+
case "AUTH_BIOMETRIC_SELECT":
|
|
74
|
+
return isLogin ? /* @__PURE__ */ jsx(MemoizedBiometricLogin, {}) : /* @__PURE__ */ jsx(MemoizedBiometricCreation, {});
|
|
75
|
+
case "AUTH_2FA_SETUP":
|
|
76
|
+
return /* @__PURE__ */ jsx(MemoizedSetup2FA, { onClose });
|
|
77
|
+
case "AUTH_RECOVERY_SECRET":
|
|
78
|
+
return /* @__PURE__ */ jsx(MemoizedRecoverySecretStep, {});
|
|
79
|
+
case "AUTH_WALLETS_CREATED":
|
|
80
|
+
return /* @__PURE__ */ jsx(MemoizedWalletCreationDone, { onClose });
|
|
81
|
+
case "AUTH_CONNECTED":
|
|
82
|
+
return /* @__PURE__ */ jsx(MemoizedLoginDone, { onClose });
|
|
83
|
+
case "AUTH_ERROR":
|
|
84
|
+
return null;
|
|
85
|
+
}
|
|
86
|
+
}, [authView, isLogin, rest]);
|
|
87
|
+
if (selectedComponent !== null) {
|
|
88
|
+
lastValidComponentRef.current = selectedComponent;
|
|
89
|
+
}
|
|
90
|
+
return selectedComponent || lastValidComponentRef.current;
|
|
91
|
+
});
|
|
92
|
+
export {
|
|
93
|
+
AuthFlow
|
|
94
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TOAuthMethod } from '@getpara/web-sdk';
|
|
2
|
+
interface AuthMainProps {
|
|
3
|
+
oAuthMethods?: TOAuthMethod[];
|
|
4
|
+
disableEmailLogin: boolean;
|
|
5
|
+
disablePhoneLogin: boolean;
|
|
6
|
+
isGuestModeEnabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const AuthMain: (props: AuthMainProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
package/dist/modal/components/{AuthMainStep/AuthMainStep.js → flows/auth/AuthMain/AuthMain.js}
RENAMED
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
2
|
+
import {
|
|
3
|
+
__spreadValues
|
|
4
|
+
} from "../../../../../chunk-MMUBH76A.js";
|
|
3
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
6
|
import { safeStyled } from "@getpara/react-common";
|
|
5
|
-
import {
|
|
6
|
-
import { CenteredText } from "
|
|
7
|
-
import { useStore } from "
|
|
8
|
-
import { useStepTitle } from "
|
|
9
|
-
const
|
|
10
|
-
oAuthMethods,
|
|
11
|
-
disableEmailLogin,
|
|
12
|
-
disablePhoneLogin,
|
|
13
|
-
isGuestModeEnabled = false
|
|
14
|
-
}) => {
|
|
7
|
+
import { AuthMainContent } from "./AuthMainContent.js";
|
|
8
|
+
import { CenteredText } from "../../../common.js";
|
|
9
|
+
import { useStore } from "../../../../../provider/stores/useStore.js";
|
|
10
|
+
import { useStepTitle } from "../../../Header/hooks/useStepTitle.js";
|
|
11
|
+
const AuthMain = (props) => {
|
|
15
12
|
const embeddedModal = useStore((state) => {
|
|
16
13
|
var _a;
|
|
17
14
|
return (_a = state.modalConfig) == null ? void 0 : _a.embeddedModal;
|
|
@@ -25,15 +22,7 @@ const AuthMainStep = ({
|
|
|
25
22
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
26
23
|
logo && /* @__PURE__ */ jsx(Logo, { src: logo, alt: `${appName ? `${appName} -` : ""}logo` }),
|
|
27
24
|
!embeddedModal && !isTitleDisplayed && /* @__PURE__ */ jsx(CenteredText, { variant: logo ? "bodyM" : "headingS", weight: "semiBold", children: title }),
|
|
28
|
-
/* @__PURE__ */ jsx(
|
|
29
|
-
AuthMainStepContent,
|
|
30
|
-
{
|
|
31
|
-
disableEmailLogin,
|
|
32
|
-
disablePhoneLogin,
|
|
33
|
-
isGuestModeEnabled,
|
|
34
|
-
oAuthMethods
|
|
35
|
-
}
|
|
36
|
-
)
|
|
25
|
+
/* @__PURE__ */ jsx(AuthMainContent, __spreadValues({}, props))
|
|
37
26
|
] });
|
|
38
27
|
};
|
|
39
28
|
const Logo = safeStyled.img`
|
|
@@ -44,5 +33,5 @@ const Logo = safeStyled.img`
|
|
|
44
33
|
align-self: center;
|
|
45
34
|
`;
|
|
46
35
|
export {
|
|
47
|
-
|
|
36
|
+
AuthMain
|
|
48
37
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TOAuthMethod } from '@getpara/web-sdk';
|
|
2
|
+
interface AuthMainContentProps {
|
|
3
|
+
oAuthMethods?: TOAuthMethod[];
|
|
4
|
+
disableEmailLogin: boolean;
|
|
5
|
+
disablePhoneLogin: boolean;
|
|
6
|
+
isGuestModeEnabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const AuthMainContent: ({ oAuthMethods, disableEmailLogin, disablePhoneLogin, isGuestModeEnabled, }: AuthMainContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|