@getpara/react-sdk 2.0.0-dev.3 → 2.0.0-dev.5
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/cosmos/actions/getCosmjsAminoSigner.d.ts +8 -0
- package/dist/cosmos/actions/getCosmjsAminoSigner.js +16 -0
- package/dist/cosmos/actions/getCosmjsProtoSigner.d.ts +8 -0
- package/dist/cosmos/actions/getCosmjsProtoSigner.js +16 -0
- package/dist/cosmos/actions/index.d.ts +2 -0
- package/dist/cosmos/actions/index.js +3 -0
- package/dist/cosmos/hooks/index.d.ts +2 -0
- package/dist/cosmos/hooks/index.js +3 -0
- package/dist/cosmos/hooks/useCosmjsAminoSigner.d.ts +11 -0
- package/dist/cosmos/hooks/useCosmjsAminoSigner.js +37 -0
- package/dist/cosmos/hooks/useCosmjsProtoSigner.d.ts +11 -0
- package/dist/cosmos/hooks/useCosmjsProtoSigner.js +37 -0
- package/dist/cosmos/index.d.ts +2 -0
- package/dist/cosmos/index.js +3 -0
- package/dist/css/modal.css +14 -1
- package/dist/evm/actions/getViemAccount.d.ts +22 -0
- package/dist/evm/actions/getViemAccount.js +20 -0
- package/dist/evm/actions/getViemClient.d.ts +7659 -0
- package/dist/evm/actions/getViemClient.js +25 -0
- package/dist/evm/actions/index.d.ts +2 -0
- package/dist/evm/actions/index.js +3 -0
- package/dist/evm/hooks/index.d.ts +2 -0
- package/dist/evm/hooks/index.js +3 -0
- package/dist/evm/hooks/useViemAccount.d.ts +26 -0
- package/dist/evm/hooks/useViemAccount.js +32 -0
- package/dist/evm/hooks/useViemClient.d.ts +7663 -0
- package/dist/evm/hooks/useViemClient.js +30 -0
- package/dist/evm/index.d.ts +2 -0
- package/dist/evm/index.js +3 -0
- package/dist/index.d.ts +3 -5
- package/dist/index.js +4 -4
- package/dist/provider/ParaProvider.d.ts +1 -2
- package/dist/provider/ParaProvider.js +13 -106
- package/dist/public/PPMori-Regular.woff2 +0 -0
- package/dist/public/PPMori-SemiBold.woff2 +0 -0
- package/dist/solana/actions/getSolanaSigner.d.ts +8 -0
- package/dist/solana/actions/getSolanaSigner.js +15 -0
- package/dist/solana/actions/index.d.ts +1 -0
- package/dist/solana/actions/index.js +2 -0
- package/dist/solana/hooks/index.d.ts +1 -0
- package/dist/solana/hooks/index.js +2 -0
- package/dist/solana/hooks/useSolanaSigner.d.ts +12 -0
- package/dist/solana/hooks/useSolanaSigner.js +32 -0
- package/dist/solana/index.d.ts +2 -0
- package/dist/solana/index.js +3 -0
- package/package.json +19 -29
- package/styles.css/package.json +1 -1
- package/dist/cli/cli.mjs +0 -50
- package/dist/modal/ParaModal.d.ts +0 -2
- package/dist/modal/ParaModal.js +0 -301
- package/dist/modal/components/Account/Account.d.ts +0 -5
- package/dist/modal/components/Account/Account.js +0 -148
- package/dist/modal/components/Account/AccountProfile.d.ts +0 -1
- package/dist/modal/components/Account/AccountProfile.js +0 -168
- package/dist/modal/components/Account/AccountProfileLink.d.ts +0 -1
- package/dist/modal/components/Account/AccountProfileLink.js +0 -206
- package/dist/modal/components/Account/AccountProfileLinkOptions.d.ts +0 -1
- package/dist/modal/components/Account/AccountProfileLinkOptions.js +0 -111
- package/dist/modal/components/Account/AccountProfileUnlink.d.ts +0 -1
- package/dist/modal/components/Account/AccountProfileUnlink.js +0 -47
- package/dist/modal/components/AddFunds/AddFunds.d.ts +0 -1
- package/dist/modal/components/AddFunds/AddFunds.js +0 -69
- package/dist/modal/components/AddFunds/AddFundsAsset.d.ts +0 -1
- package/dist/modal/components/AddFunds/AddFundsAsset.js +0 -125
- package/dist/modal/components/AddFunds/AddFundsAwaiting.d.ts +0 -1
- package/dist/modal/components/AddFunds/AddFundsAwaiting.js +0 -78
- package/dist/modal/components/AddFunds/AddFundsContext.d.ts +0 -31
- package/dist/modal/components/AddFunds/AddFundsContext.js +0 -160
- package/dist/modal/components/AddFunds/AddFundsDone.d.ts +0 -6
- package/dist/modal/components/AddFunds/AddFundsDone.js +0 -49
- package/dist/modal/components/AddFunds/AddFundsProvider.d.ts +0 -1
- package/dist/modal/components/AddFunds/AddFundsProvider.js +0 -109
- package/dist/modal/components/AddFunds/AddFundsReceive.d.ts +0 -1
- package/dist/modal/components/AddFunds/AddFundsReceive.js +0 -83
- package/dist/modal/components/AddFunds/AddFundsSettings.d.ts +0 -1
- package/dist/modal/components/AddFunds/AddFundsSettings.js +0 -237
- package/dist/modal/components/AddFunds/MoonPayEmbed.d.ts +0 -2
- package/dist/modal/components/AddFunds/MoonPayEmbed.js +0 -7
- package/dist/modal/components/AddFunds/common.d.ts +0 -19
- package/dist/modal/components/AddFunds/common.js +0 -24
- package/dist/modal/components/AddFunds/index.d.ts +0 -3
- package/dist/modal/components/AddFunds/index.js +0 -4
- package/dist/modal/components/AuthInput/AuthInput.d.ts +0 -20
- package/dist/modal/components/AuthInput/AuthInput.js +0 -277
- package/dist/modal/components/AuthInput/hooks/useDropdownPosition.d.ts +0 -7
- package/dist/modal/components/AuthInput/hooks/useDropdownPosition.js +0 -33
- package/dist/modal/components/AuthInput/phoneMasks.d.ts +0 -247
- package/dist/modal/components/AuthInput/phoneMasks.js +0 -253
- package/dist/modal/components/AuthMainStep/AuthMainStep.d.ts +0 -9
- package/dist/modal/components/AuthMainStep/AuthMainStep.js +0 -50
- package/dist/modal/components/AuthMainStep/AuthMainStepContent.d.ts +0 -9
- package/dist/modal/components/AuthMainStep/AuthMainStepContent.js +0 -164
- package/dist/modal/components/AuthOptions/AuthOptions.d.ts +0 -9
- package/dist/modal/components/AuthOptions/AuthOptions.js +0 -85
- 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/AwaitingOAuthStep/AwaitingOAuthStep.js +0 -10
- package/dist/modal/components/AwaitingPasswordStep/AwaitingPasswordStep.d.ts +0 -1
- package/dist/modal/components/AwaitingPasswordStep/AwaitingPasswordStep.js +0 -18
- package/dist/modal/components/AwaitingWalletCreationStep/AwaitingWalletCreationStep.d.ts +0 -5
- package/dist/modal/components/AwaitingWalletCreationStep/AwaitingWalletCreationStep.js +0 -49
- package/dist/modal/components/BiometricCreationStep/BiometricCreationStep.d.ts +0 -1
- package/dist/modal/components/BiometricCreationStep/BiometricCreationStep.js +0 -62
- package/dist/modal/components/BiometricLoginStep/BiometricLoginStep.d.ts +0 -1
- package/dist/modal/components/BiometricLoginStep/BiometricLoginStep.js +0 -48
- package/dist/modal/components/Body/AnimatedHeightWrapper.d.ts +0 -6
- package/dist/modal/components/Body/AnimatedHeightWrapper.js +0 -29
- package/dist/modal/components/Body/Body.d.ts +0 -11
- package/dist/modal/components/Body/Body.js +0 -350
- package/dist/modal/components/ChainSwitch/ChainSwitch.d.ts +0 -1
- package/dist/modal/components/ChainSwitch/ChainSwitch.js +0 -95
- package/dist/modal/components/ChainSwitch/config.d.ts +0 -7
- package/dist/modal/components/ChainSwitch/config.js +0 -17
- package/dist/modal/components/Controls/Controls.d.ts +0 -5
- package/dist/modal/components/Controls/Controls.js +0 -78
- package/dist/modal/components/Controls/Selects.d.ts +0 -2
- package/dist/modal/components/Controls/Selects.js +0 -173
- package/dist/modal/components/ExternalWalletNetworkSelectStep/ExternalWalletNetworkSelectStep.d.ts +0 -1
- package/dist/modal/components/ExternalWalletNetworkSelectStep/ExternalWalletNetworkSelectStep.js +0 -75
- package/dist/modal/components/ExternalWalletStep/ExternalWalletStep.d.ts +0 -8
- package/dist/modal/components/ExternalWalletStep/ExternalWalletStep.js +0 -175
- package/dist/modal/components/ExternalWalletStep/config.d.ts +0 -7
- package/dist/modal/components/ExternalWalletStep/config.js +0 -17
- package/dist/modal/components/ExternalWalletVerificationStep/ExternalWalletVerificationStep.d.ts +0 -1
- package/dist/modal/components/ExternalWalletVerificationStep/ExternalWalletVerificationStep.js +0 -39
- package/dist/modal/components/ExternalWallets/ExternalWallets.d.ts +0 -1
- package/dist/modal/components/ExternalWallets/ExternalWallets.js +0 -184
- package/dist/modal/components/Footer/Footer.d.ts +0 -1
- package/dist/modal/components/Footer/Footer.js +0 -95
- package/dist/modal/components/Header/Header.d.ts +0 -1
- package/dist/modal/components/Header/Header.js +0 -43
- package/dist/modal/components/Header/hooks/useStepTitle.d.ts +0 -3
- package/dist/modal/components/Header/hooks/useStepTitle.js +0 -61
- package/dist/modal/components/Hero/Hero.d.ts +0 -1
- package/dist/modal/components/Hero/Hero.js +0 -116
- package/dist/modal/components/IFrameStep/IFrameStep.d.ts +0 -1
- package/dist/modal/components/IFrameStep/IFrameStep.js +0 -59
- package/dist/modal/components/LoginDoneStep/LoginDoneStep.d.ts +0 -5
- package/dist/modal/components/LoginDoneStep/LoginDoneStep.js +0 -44
- package/dist/modal/components/ModalContent/ModalContent.d.ts +0 -10
- package/dist/modal/components/ModalContent/ModalContent.js +0 -88
- package/dist/modal/components/OAuth/FarcasterOAuthStep.d.ts +0 -3
- package/dist/modal/components/OAuth/FarcasterOAuthStep.js +0 -31
- package/dist/modal/components/OAuth/OAuth.d.ts +0 -6
- package/dist/modal/components/OAuth/OAuth.js +0 -79
- package/dist/modal/components/OAuth/TelegramOAuthStep.d.ts +0 -8
- package/dist/modal/components/OAuth/TelegramOAuthStep.js +0 -74
- package/dist/modal/components/OnRampComponents/AddingFunds.d.ts +0 -1
- package/dist/modal/components/OnRampComponents/AddingFunds.js +0 -23
- package/dist/modal/components/OnRampComponents/OnRampProviderButton.d.ts +0 -9
- package/dist/modal/components/OnRampComponents/OnRampProviderButton.js +0 -77
- package/dist/modal/components/RecoverySecretStep/RecoverySecretStep.d.ts +0 -6
- package/dist/modal/components/RecoverySecretStep/RecoverySecretStep.js +0 -107
- package/dist/modal/components/Setup2FAStep/Setup2FAStep.d.ts +0 -5
- package/dist/modal/components/Setup2FAStep/Setup2FAStep.js +0 -132
- package/dist/modal/components/TwoFactorDoneStep/TwoFactorDoneStep.d.ts +0 -5
- package/dist/modal/components/TwoFactorDoneStep/TwoFactorDoneStep.js +0 -27
- package/dist/modal/components/VerificationCodeStep/VerificationCodeStep.d.ts +0 -12
- package/dist/modal/components/VerificationCodeStep/VerificationCodeStep.js +0 -160
- package/dist/modal/components/Waiting/Waiting.d.ts +0 -6
- package/dist/modal/components/Waiting/Waiting.js +0 -17
- package/dist/modal/components/WalletCard/PartnerIcon.d.ts +0 -6
- package/dist/modal/components/WalletCard/PartnerIcon.js +0 -34
- package/dist/modal/components/WalletCard/WalletCard.d.ts +0 -18
- package/dist/modal/components/WalletCard/WalletCard.js +0 -128
- package/dist/modal/components/WalletCreationDoneStep/WalletCreationDoneStep.d.ts +0 -6
- package/dist/modal/components/WalletCreationDoneStep/WalletCreationDoneStep.js +0 -83
- package/dist/modal/components/common.d.ts +0 -59
- package/dist/modal/components/common.js +0 -261
- package/dist/modal/components/index.d.ts +0 -1
- package/dist/modal/components/index.js +0 -2
- package/dist/modal/constants/constants.d.ts +0 -40
- package/dist/modal/constants/constants.js +0 -142
- package/dist/modal/constants/defaults.d.ts +0 -5
- package/dist/modal/constants/defaults.js +0 -10
- package/dist/modal/constants/oAuthLogos.d.ts +0 -17
- package/dist/modal/constants/oAuthLogos.js +0 -158
- package/dist/modal/constants/walletTypeConfig.d.ts +0 -6
- package/dist/modal/constants/walletTypeConfig.js +0 -13
- package/dist/modal/hooks/useGoBack.d.ts +0 -1
- package/dist/modal/hooks/useGoBack.js +0 -43
- package/dist/modal/hooks/useTelegramLogin.d.ts +0 -12
- package/dist/modal/hooks/useTelegramLogin.js +0 -65
- package/dist/modal/index.d.ts +0 -8
- package/dist/modal/index.js +0 -29
- package/dist/modal/stores/index.d.ts +0 -1
- package/dist/modal/stores/index.js +0 -2
- package/dist/modal/stores/modal/actions.d.ts +0 -3
- package/dist/modal/stores/modal/actions.js +0 -135
- package/dist/modal/stores/modal/useModalStore.d.ts +0 -103
- package/dist/modal/stores/modal/useModalStore.js +0 -73
- package/dist/modal/types/commonTypes.d.ts +0 -6
- package/dist/modal/types/commonTypes.js +0 -1
- package/dist/modal/types/modalProps.d.ts +0 -129
- package/dist/modal/types/modalProps.js +0 -12
- package/dist/modal/utils/authInputHelpers.d.ts +0 -5
- package/dist/modal/utils/authInputHelpers.js +0 -41
- package/dist/modal/utils/authLayoutHelpers.d.ts +0 -3
- package/dist/modal/utils/authLayoutHelpers.js +0 -8
- package/dist/modal/utils/countryCodes.d.ts +0 -8
- package/dist/modal/utils/countryCodes.js +0 -45
- package/dist/modal/utils/getMailtoLink.d.ts +0 -1
- package/dist/modal/utils/getMailtoLink.js +0 -10
- package/dist/modal/utils/getTileButtonFlex.d.ts +0 -1
- package/dist/modal/utils/getTileButtonFlex.js +0 -20
- package/dist/modal/utils/getWalletDisplayName.d.ts +0 -5
- package/dist/modal/utils/getWalletDisplayName.js +0 -22
- package/dist/modal/utils/isPasskeySupported.d.ts +0 -1
- package/dist/modal/utils/isPasskeySupported.js +0 -15
- package/dist/modal/utils/openPopup.d.ts +0 -6
- package/dist/modal/utils/openPopup.js +0 -60
- package/dist/modal/utils/routeMobileExternalWallet.d.ts +0 -1
- package/dist/modal/utils/routeMobileExternalWallet.js +0 -31
- package/dist/modal/utils/steps.d.ts +0 -133
- package/dist/modal/utils/steps.js +0 -273
- package/dist/modal/utils/stringFormatters.d.ts +0 -5
- package/dist/modal/utils/stringFormatters.js +0 -19
- package/dist/modal/utils/validateOnRampConfig.d.ts +0 -5
- package/dist/modal/utils/validateOnRampConfig.js +0 -32
- package/dist/provider/actions/getEmbeddedAccount.d.ts +0 -26
- package/dist/provider/actions/getEmbeddedAccount.js +0 -52
- package/dist/provider/actions/getWallet.d.ts +0 -5
- package/dist/provider/actions/getWallet.js +0 -18
- package/dist/provider/actions/index.d.ts +0 -47
- package/dist/provider/actions/index.js +0 -79
- package/dist/provider/actions/utils.d.ts +0 -4
- package/dist/provider/actions/utils.js +0 -34
- package/dist/provider/components/CosmosWalletWrapper.d.ts +0 -11
- package/dist/provider/components/CosmosWalletWrapper.js +0 -43
- package/dist/provider/components/EvmWalletWrapper.d.ts +0 -12
- package/dist/provider/components/EvmWalletWrapper.js +0 -43
- package/dist/provider/components/ExternalWalletWrapper.d.ts +0 -8
- package/dist/provider/components/ExternalWalletWrapper.js +0 -140
- package/dist/provider/components/SolanaWalletWrapper.d.ts +0 -9
- package/dist/provider/components/SolanaWalletWrapper.js +0 -44
- package/dist/provider/external/getParaCosmosConnector.d.ts +0 -7
- package/dist/provider/external/getParaCosmosConnector.js +0 -19
- package/dist/provider/external/getParaCosmosLib.d.ts +0 -4
- package/dist/provider/external/getParaCosmosLib.js +0 -16
- package/dist/provider/external/getParaEvmConnector.d.ts +0 -7
- package/dist/provider/external/getParaEvmConnector.js +0 -19
- package/dist/provider/external/getParaEvmLib.d.ts +0 -4
- package/dist/provider/external/getParaEvmLib.js +0 -16
- package/dist/provider/external/getParaSolanaConnector.d.ts +0 -7
- package/dist/provider/external/getParaSolanaConnector.js +0 -19
- package/dist/provider/external/getParaSolanaLib.d.ts +0 -4
- package/dist/provider/external/getParaSolanaLib.js +0 -16
- package/dist/provider/external/stubs/CosmosExternalWalletContextStub.d.ts +0 -2
- package/dist/provider/external/stubs/CosmosExternalWalletContextStub.js +0 -8
- package/dist/provider/external/stubs/EvmExternalWalletContextStub.d.ts +0 -2
- package/dist/provider/external/stubs/EvmExternalWalletContextStub.js +0 -8
- package/dist/provider/external/stubs/SolanaExternalWalletContextStub.d.ts +0 -2
- package/dist/provider/external/stubs/SolanaExternalWalletContextStub.js +0 -8
- package/dist/provider/hooks/index.d.ts +0 -3
- package/dist/provider/hooks/index.js +0 -4
- package/dist/provider/hooks/mutations/core.d.ts +0 -27
- package/dist/provider/hooks/mutations/core.js +0 -66
- package/dist/provider/hooks/mutations/index.d.ts +0 -3
- package/dist/provider/hooks/mutations/index.js +0 -9
- package/dist/provider/hooks/mutations/useLinkAccount.d.ts +0 -9
- package/dist/provider/hooks/mutations/useLinkAccount.js +0 -18
- package/dist/provider/hooks/mutations/utils.d.ts +0 -12
- package/dist/provider/hooks/mutations/utils.js +0 -90
- package/dist/provider/hooks/queries/core.d.ts +0 -4
- package/dist/provider/hooks/queries/core.js +0 -16
- package/dist/provider/hooks/queries/index.d.ts +0 -4
- package/dist/provider/hooks/queries/index.js +0 -11
- package/dist/provider/hooks/queries/useAccount.d.ts +0 -90
- package/dist/provider/hooks/queries/useAccount.js +0 -135
- package/dist/provider/hooks/queries/useIsFullyLoggedIn.d.ts +0 -5
- package/dist/provider/hooks/queries/useIsFullyLoggedIn.js +0 -24
- package/dist/provider/hooks/queries/useWallet.d.ts +0 -5
- package/dist/provider/hooks/queries/useWallet.js +0 -26
- package/dist/provider/hooks/queries/useWalletBalance.d.ts +0 -6
- package/dist/provider/hooks/queries/useWalletBalance.js +0 -55
- package/dist/provider/hooks/queries/utils.d.ts +0 -7
- package/dist/provider/hooks/queries/utils.js +0 -25
- package/dist/provider/hooks/utils/index.d.ts +0 -3
- package/dist/provider/hooks/utils/index.js +0 -10
- package/dist/provider/hooks/utils/useAutoSessionKeepAlive.d.ts +0 -3
- package/dist/provider/hooks/utils/useAutoSessionKeepAlive.js +0 -74
- package/dist/provider/hooks/utils/useClient.d.ts +0 -5
- package/dist/provider/hooks/utils/useClient.js +0 -10
- package/dist/provider/hooks/utils/useEventListeners.d.ts +0 -2
- package/dist/provider/hooks/utils/useEventListeners.js +0 -157
- package/dist/provider/hooks/utils/useFormattedBiometricHints.d.ts +0 -4
- package/dist/provider/hooks/utils/useFormattedBiometricHints.js +0 -27
- package/dist/provider/hooks/utils/useInternalClient.d.ts +0 -5
- package/dist/provider/hooks/utils/useInternalClient.js +0 -10
- package/dist/provider/hooks/utils/useModal.d.ts +0 -11
- package/dist/provider/hooks/utils/useModal.js +0 -27
- package/dist/provider/hooks/utils/useWalletState.d.ts +0 -15
- package/dist/provider/hooks/utils/useWalletState.js +0 -48
- package/dist/provider/index.d.ts +0 -6
- package/dist/provider/index.js +0 -11
- package/dist/provider/providers/AccountLinkProvider.d.ts +0 -47
- package/dist/provider/providers/AccountLinkProvider.js +0 -452
- package/dist/provider/providers/AuthProvider.d.ts +0 -37
- package/dist/provider/providers/AuthProvider.js +0 -523
- package/dist/provider/providers/CosmosExternalWalletProvider.d.ts +0 -7
- package/dist/provider/providers/CosmosExternalWalletProvider.js +0 -66
- package/dist/provider/providers/EvmExternalWalletProvider.d.ts +0 -7
- package/dist/provider/providers/EvmExternalWalletProvider.js +0 -74
- package/dist/provider/providers/ExternalWalletProvider.d.ts +0 -59
- package/dist/provider/providers/ExternalWalletProvider.js +0 -596
- package/dist/provider/providers/SolanaExternalWalletProvider.d.ts +0 -7
- package/dist/provider/providers/SolanaExternalWalletProvider.js +0 -66
- package/dist/provider/stores/getters.d.ts +0 -4
- package/dist/provider/stores/getters.js +0 -13
- package/dist/provider/stores/setters.d.ts +0 -1
- package/dist/provider/stores/setters.js +0 -7
- package/dist/provider/stores/slices/analytics.d.ts +0 -3
- package/dist/provider/stores/slices/analytics.js +0 -9
- package/dist/provider/stores/slices/client.d.ts +0 -3
- package/dist/provider/stores/slices/client.js +0 -9
- package/dist/provider/stores/slices/config.d.ts +0 -3
- package/dist/provider/stores/slices/config.js +0 -9
- package/dist/provider/stores/slices/externalWallets.d.ts +0 -3
- package/dist/provider/stores/slices/externalWallets.js +0 -46
- package/dist/provider/stores/slices/index.d.ts +0 -5
- package/dist/provider/stores/slices/index.js +0 -6
- package/dist/provider/stores/slices/modal.d.ts +0 -3
- package/dist/provider/stores/slices/modal.js +0 -18
- package/dist/provider/stores/slices/wallet.d.ts +0 -3
- package/dist/provider/stores/slices/wallet.js +0 -13
- package/dist/provider/stores/types.d.ts +0 -76
- package/dist/provider/stores/types.js +0 -1
- package/dist/provider/stores/useStore.d.ts +0 -17
- package/dist/provider/stores/useStore.js +0 -34
- package/dist/provider/types/externalWalletProviders.d.ts +0 -12
- package/dist/provider/types/externalWalletProviders.js +0 -1
- package/dist/provider/types/provider.d.ts +0 -161
- package/dist/provider/types/provider.js +0 -1
- package/dist/provider/types/query.d.ts +0 -3
- package/dist/provider/types/query.js +0 -1
- package/dist/provider/types/utils.d.ts +0 -45
- package/dist/provider/types/utils.js +0 -1
- package/dist/provider/utils/constants.d.ts +0 -5
- package/dist/provider/utils/constants.js +0 -10
- package/dist/provider/utils/paraConfigTypeGuards.d.ts +0 -7
- package/dist/provider/utils/paraConfigTypeGuards.js +0 -13
- package/dist/provider/utils/renameMutations.d.ts +0 -5
- package/dist/provider/utils/renameMutations.js +0 -18
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import "../../../chunk-MMUBH76A.js";
|
|
3
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
import { CpslButton, CpslText } from "@getpara/react-components";
|
|
5
|
-
import { Heading, StepContainer, InnerStepContainer, HeroIcon } from "../common.js";
|
|
6
|
-
import { useStore } from "../../../provider/stores/useStore.js";
|
|
7
|
-
const TwoFactorDoneStep = ({ onClose }) => {
|
|
8
|
-
const hideWallets = useStore((state) => {
|
|
9
|
-
var _a;
|
|
10
|
-
return (_a = state.modalConfig) == null ? void 0 : _a.hideWallets;
|
|
11
|
-
});
|
|
12
|
-
return /* @__PURE__ */ jsxs(StepContainer, { children: [
|
|
13
|
-
/* @__PURE__ */ jsx(HeroIcon, { icon: "checkCircleFilled" }),
|
|
14
|
-
/* @__PURE__ */ jsxs(InnerStepContainer, { children: [
|
|
15
|
-
/* @__PURE__ */ jsx(Heading, { variant: "headingXS", weight: "semiBold", children: "Success" }),
|
|
16
|
-
/* @__PURE__ */ jsxs(CpslText, { variant: "bodyS", color: "secondary", weight: "medium", children: [
|
|
17
|
-
"Your ",
|
|
18
|
-
hideWallets ? "account" : "wallet",
|
|
19
|
-
" is now protected by 2FA"
|
|
20
|
-
] })
|
|
21
|
-
] }),
|
|
22
|
-
/* @__PURE__ */ jsx(CpslButton, { fullWidth: true, onClick: onClose, children: "Done" })
|
|
23
|
-
] });
|
|
24
|
-
};
|
|
25
|
-
export {
|
|
26
|
-
TwoFactorDoneStep
|
|
27
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { AuthInfo } from '@getpara/user-management-client';
|
|
2
|
-
import { MutationStatus } from '@tanstack/react-query';
|
|
3
|
-
type Props = {
|
|
4
|
-
authInfo: AuthInfo<'email' | 'phone'>;
|
|
5
|
-
onSubmit: (_: string) => void;
|
|
6
|
-
onResend: () => void;
|
|
7
|
-
status: MutationStatus;
|
|
8
|
-
error?: Error | string | null;
|
|
9
|
-
};
|
|
10
|
-
export declare const VerificationCode: ({ authInfo, onResend, onSubmit, status, error }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export declare const VerificationCodeStep: () => import("react/jsx-runtime").JSX.Element | null;
|
|
12
|
-
export {};
|
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
__async
|
|
4
|
-
} from "../../../chunk-MMUBH76A.js";
|
|
5
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import { CpslCodeInput, CpslSpinner, CpslText } from "@getpara/react-components";
|
|
7
|
-
import { useEffect, useRef, useState } from "react";
|
|
8
|
-
import { safeStyled } from "@getpara/react-common";
|
|
9
|
-
import { Heading, InnerStepContainer, StepContainer } from "../common.js";
|
|
10
|
-
import { displayPhoneNumber } from "@getpara/core-sdk";
|
|
11
|
-
import { useAuthActions } from "../../../provider/providers/AuthProvider.js";
|
|
12
|
-
import { useResendVerificationCode } from "../../../provider/index.js";
|
|
13
|
-
import { useInternalClient } from "../../../provider/hooks/utils/useInternalClient.js";
|
|
14
|
-
const VerificationCode = ({ authInfo, onResend, onSubmit, status, error }) => {
|
|
15
|
-
const inputRef = useRef(null);
|
|
16
|
-
const [code, setCode] = useState("");
|
|
17
|
-
const [isPending, setIsPending] = useState(status === "pending");
|
|
18
|
-
const [codeError, setCodeError] = useState(null);
|
|
19
|
-
const [resendDisabled, setResendDisabled] = useState(false);
|
|
20
|
-
const isEmail = (authInfo == null ? void 0 : authInfo.authType) === "email";
|
|
21
|
-
useEffect(() => {
|
|
22
|
-
setTimeout(() => {
|
|
23
|
-
var _a, _b, _c, _d;
|
|
24
|
-
(_d = (_c = (_b = (_a = inputRef.current) == null ? void 0 : _a.shadowRoot) == null ? void 0 : _b.querySelectorAll("input")) == null ? void 0 : _c[0]) == null ? void 0 : _d.focus();
|
|
25
|
-
}, 10);
|
|
26
|
-
}, []);
|
|
27
|
-
useEffect(() => {
|
|
28
|
-
setCodeError(null);
|
|
29
|
-
if (code.length === 6) {
|
|
30
|
-
handleSubmitCode();
|
|
31
|
-
}
|
|
32
|
-
}, [code]);
|
|
33
|
-
useEffect(() => {
|
|
34
|
-
if (status === "pending") {
|
|
35
|
-
setIsPending(true);
|
|
36
|
-
}
|
|
37
|
-
}, [status]);
|
|
38
|
-
const handleResendClick = () => __async(void 0, null, function* () {
|
|
39
|
-
if (!resendDisabled) {
|
|
40
|
-
setResendDisabled(true);
|
|
41
|
-
try {
|
|
42
|
-
onResend();
|
|
43
|
-
} finally {
|
|
44
|
-
setTimeout(() => {
|
|
45
|
-
setResendDisabled(false);
|
|
46
|
-
}, 3e3);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
const handleCodeInput = (e) => {
|
|
51
|
-
setCode(e.detail.value.trim());
|
|
52
|
-
};
|
|
53
|
-
const handleSubmitCode = () => __async(void 0, null, function* () {
|
|
54
|
-
if (code.length === 6 && /^\d+$/.test(code)) {
|
|
55
|
-
onSubmit(code);
|
|
56
|
-
} else {
|
|
57
|
-
setCodeError("Incorrect code.");
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
useEffect(() => {
|
|
61
|
-
if (!!error) {
|
|
62
|
-
setIsPending(false);
|
|
63
|
-
const status2 = error.status;
|
|
64
|
-
switch (status2) {
|
|
65
|
-
case 429:
|
|
66
|
-
setCodeError("Too many incorrect attempts. Please try again in 10 minutes.");
|
|
67
|
-
break;
|
|
68
|
-
default:
|
|
69
|
-
setCodeError("Incorrect code.");
|
|
70
|
-
break;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}, [error]);
|
|
74
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
75
|
-
/* @__PURE__ */ jsxs(InnerStepContainer, { children: [
|
|
76
|
-
/* @__PURE__ */ jsxs(Heading, { variant: "headingS", weight: "bold", children: [
|
|
77
|
-
"Verify ",
|
|
78
|
-
isEmail ? "Email" : "Phone Number"
|
|
79
|
-
] }),
|
|
80
|
-
/* @__PURE__ */ jsxs(InlineText, { variant: "bodyS", color: "secondary", children: [
|
|
81
|
-
"Please enter the code we sent to",
|
|
82
|
-
" ",
|
|
83
|
-
/* @__PURE__ */ jsx(InlineText, { variant: "bodyS", children: (authInfo == null ? void 0 : authInfo.authType) === "phone" ? displayPhoneNumber(authInfo.identifier) : authInfo.identifier })
|
|
84
|
-
] })
|
|
85
|
-
] }),
|
|
86
|
-
/* @__PURE__ */ jsx(InnerStepContainer, { children: isPending ? /* @__PURE__ */ jsx(CpslSpinner, {}) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
87
|
-
/* @__PURE__ */ jsx(
|
|
88
|
-
"form",
|
|
89
|
-
{
|
|
90
|
-
onSubmit: (e) => __async(void 0, null, function* () {
|
|
91
|
-
e.preventDefault();
|
|
92
|
-
yield handleSubmitCode();
|
|
93
|
-
}),
|
|
94
|
-
children: /* @__PURE__ */ jsx(
|
|
95
|
-
StyledCodeInput,
|
|
96
|
-
{
|
|
97
|
-
ref: inputRef,
|
|
98
|
-
length: 6,
|
|
99
|
-
type: "number",
|
|
100
|
-
code,
|
|
101
|
-
onCpslInput: handleCodeInput,
|
|
102
|
-
errorText: codeError || "",
|
|
103
|
-
onKeyDown: (e) => __async(void 0, null, function* () {
|
|
104
|
-
return e.key === "Enter" && (yield handleSubmitCode());
|
|
105
|
-
})
|
|
106
|
-
}
|
|
107
|
-
)
|
|
108
|
-
}
|
|
109
|
-
),
|
|
110
|
-
/* @__PURE__ */ jsxs(InlineText, { variant: "bodyS", color: "secondary", children: [
|
|
111
|
-
"Didn\u2019t receive a code?",
|
|
112
|
-
" ",
|
|
113
|
-
/* @__PURE__ */ jsx(
|
|
114
|
-
ClickableText,
|
|
115
|
-
{
|
|
116
|
-
variant: "bodyS",
|
|
117
|
-
style: { cursor: resendDisabled ? "default" : "pointer" },
|
|
118
|
-
onClick: handleResendClick,
|
|
119
|
-
children: resendDisabled ? "Resent!" : "Resend."
|
|
120
|
-
}
|
|
121
|
-
)
|
|
122
|
-
] })
|
|
123
|
-
] }) })
|
|
124
|
-
] });
|
|
125
|
-
};
|
|
126
|
-
const VerificationCodeStep = () => {
|
|
127
|
-
const { verifyNewAccount, verifyNewAccountStatus, verifyNewAccountError } = useAuthActions();
|
|
128
|
-
const { mutateAsync: resendVerificationCode } = useResendVerificationCode();
|
|
129
|
-
const para = useInternalClient();
|
|
130
|
-
if (!para.authInfo) {
|
|
131
|
-
return null;
|
|
132
|
-
}
|
|
133
|
-
return /* @__PURE__ */ jsx(StepContainer, { $wide: true, children: /* @__PURE__ */ jsx(
|
|
134
|
-
VerificationCode,
|
|
135
|
-
{
|
|
136
|
-
authInfo: para.authInfo,
|
|
137
|
-
onSubmit: verifyNewAccount,
|
|
138
|
-
onResend: () => {
|
|
139
|
-
resendVerificationCode({ type: "SIGNUP" });
|
|
140
|
-
},
|
|
141
|
-
status: verifyNewAccountStatus,
|
|
142
|
-
error: verifyNewAccountError
|
|
143
|
-
}
|
|
144
|
-
) });
|
|
145
|
-
};
|
|
146
|
-
const StyledCodeInput = safeStyled(CpslCodeInput)`
|
|
147
|
-
align-self: center;
|
|
148
|
-
`;
|
|
149
|
-
const InlineText = safeStyled(CpslText)`
|
|
150
|
-
text-align: center;
|
|
151
|
-
display: inline-block;
|
|
152
|
-
`;
|
|
153
|
-
const ClickableText = safeStyled(InlineText)`
|
|
154
|
-
cursor: pointer;
|
|
155
|
-
display: inline-block;
|
|
156
|
-
`;
|
|
157
|
-
export {
|
|
158
|
-
VerificationCode,
|
|
159
|
-
VerificationCodeStep
|
|
160
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import "../../../chunk-MMUBH76A.js";
|
|
3
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
import { CpslSpinner, CpslText } from "@getpara/react-components";
|
|
5
|
-
import { Heading, SpinnerContainer, StepContainer, InnerStepContainer } from "../common.js";
|
|
6
|
-
const Waiting = ({ heading, subheading }) => {
|
|
7
|
-
return /* @__PURE__ */ jsxs(StepContainer, { $wide: true, children: [
|
|
8
|
-
/* @__PURE__ */ jsx(SpinnerContainer, { children: /* @__PURE__ */ jsx(CpslSpinner, { size: 100 }) }),
|
|
9
|
-
/* @__PURE__ */ jsxs(InnerStepContainer, { children: [
|
|
10
|
-
/* @__PURE__ */ jsx(Heading, { variant: "headingS", weight: "bold", children: heading }),
|
|
11
|
-
/* @__PURE__ */ jsx(CpslText, { variant: "bodyS", color: "secondary", weight: "medium", children: subheading })
|
|
12
|
-
] })
|
|
13
|
-
] });
|
|
14
|
-
};
|
|
15
|
-
export {
|
|
16
|
-
Waiting
|
|
17
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import "../../../chunk-MMUBH76A.js";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
import { safeStyled } from "@getpara/react-common";
|
|
5
|
-
import { CpslIcon, CpslText } from "@getpara/react-components";
|
|
6
|
-
const PartnerIcon = ({ partner }) => {
|
|
7
|
-
const { logoUrl, displayName, backgroundColor, foregroundColor } = partner;
|
|
8
|
-
if (logoUrl) {
|
|
9
|
-
return /* @__PURE__ */ jsx(Icon, { src: logoUrl });
|
|
10
|
-
}
|
|
11
|
-
return /* @__PURE__ */ jsx(Container, { $backgroundColor: backgroundColor, children: /* @__PURE__ */ jsx(Text, { variant: "bodyXS", $color: foregroundColor, children: displayName[0] }) });
|
|
12
|
-
};
|
|
13
|
-
const Container = safeStyled.div`
|
|
14
|
-
width: 14px;
|
|
15
|
-
height: 14px;
|
|
16
|
-
display: flex;
|
|
17
|
-
align-items: center;
|
|
18
|
-
justify-content: center;
|
|
19
|
-
background-color: ${({ $backgroundColor }) => `${$backgroundColor != null ? $backgroundColor : "var(--cpsl-color-contrast)"}`};
|
|
20
|
-
border-radius: 100%;
|
|
21
|
-
`;
|
|
22
|
-
const Text = safeStyled(CpslText)`
|
|
23
|
-
&::part(text-element) {
|
|
24
|
-
line-height: 100%;
|
|
25
|
-
color: ${({ $color }) => `${$color != null ? $color : "var(--cpsl-color-foreground-0)"}`};
|
|
26
|
-
}
|
|
27
|
-
`;
|
|
28
|
-
const Icon = safeStyled(CpslIcon)`
|
|
29
|
-
--height: 14px;
|
|
30
|
-
--width: 14px;
|
|
31
|
-
`;
|
|
32
|
-
export {
|
|
33
|
-
PartnerIcon
|
|
34
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { TWalletType } from '@getpara/web-sdk';
|
|
2
|
-
export declare const ExternalWalletCard: ({ address, showAddFunds }: Pick<SharedWalletCardProps, "address" | "showAddFunds">) => import("react/jsx-runtime").JSX.Element | null;
|
|
3
|
-
interface WalletCardProps {
|
|
4
|
-
id: string;
|
|
5
|
-
type: TWalletType;
|
|
6
|
-
showAddFunds?: boolean;
|
|
7
|
-
}
|
|
8
|
-
export declare const WalletCard: ({ id, type, showAddFunds }: WalletCardProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
9
|
-
interface SharedWalletCardProps {
|
|
10
|
-
address: string;
|
|
11
|
-
id?: string;
|
|
12
|
-
type?: TWalletType;
|
|
13
|
-
name?: string;
|
|
14
|
-
identiconHash: string;
|
|
15
|
-
showAddFunds?: boolean;
|
|
16
|
-
}
|
|
17
|
-
export declare const WalletCards: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
18
|
-
export {};
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import "../../../chunk-MMUBH76A.js";
|
|
3
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
import { safeStyled } from "@getpara/react-common";
|
|
5
|
-
import { useModalStore } from "../../stores/index.js";
|
|
6
|
-
import { CpslButton, CpslIdenticon, CpslText } from "@getpara/react-components";
|
|
7
|
-
import { truncateAddress } from "@getpara/web-sdk";
|
|
8
|
-
import { ModalStep } from "../../utils/steps.js";
|
|
9
|
-
import { useWalletState } from "../../../provider/index.js";
|
|
10
|
-
import { useInternalClient } from "../../../provider/hooks/utils/useInternalClient.js";
|
|
11
|
-
import { useStore } from "../../../provider/stores/useStore.js";
|
|
12
|
-
const ExternalWalletCard = ({ address, showAddFunds }) => {
|
|
13
|
-
var _a, _b;
|
|
14
|
-
const para = useInternalClient();
|
|
15
|
-
const wallet = para.externalWallets[address];
|
|
16
|
-
if (!(wallet == null ? void 0 : wallet.address) || !(wallet == null ? void 0 : wallet.type)) {
|
|
17
|
-
return null;
|
|
18
|
-
}
|
|
19
|
-
return /* @__PURE__ */ jsx(
|
|
20
|
-
SharedWalletCard,
|
|
21
|
-
{
|
|
22
|
-
address: (_a = wallet.ensName) != null ? _a : truncateAddress(wallet.address, wallet.type),
|
|
23
|
-
identiconHash: (_b = para.getIdenticonHash(wallet.id, wallet.type)) != null ? _b : "",
|
|
24
|
-
showAddFunds
|
|
25
|
-
}
|
|
26
|
-
);
|
|
27
|
-
};
|
|
28
|
-
const WalletCard = ({ id, type, showAddFunds }) => {
|
|
29
|
-
var _a, _b, _c;
|
|
30
|
-
const para = useInternalClient();
|
|
31
|
-
const appName = useStore((state) => state.appName);
|
|
32
|
-
const wallet = para.findWallet(id, type);
|
|
33
|
-
if (!wallet) {
|
|
34
|
-
return null;
|
|
35
|
-
}
|
|
36
|
-
const address = para.getDisplayAddress(wallet.id, { addressType: type });
|
|
37
|
-
return /* @__PURE__ */ jsx(
|
|
38
|
-
SharedWalletCard,
|
|
39
|
-
{
|
|
40
|
-
id: wallet.id,
|
|
41
|
-
type: wallet.type,
|
|
42
|
-
address: (_a = wallet.ensName) != null ? _a : truncateAddress(address, type, { prefix: para.cosmosPrefix }),
|
|
43
|
-
name: (_b = wallet.name) != null ? _b : `${appName ? `${appName} ` : ""}Wallet`,
|
|
44
|
-
identiconHash: (_c = para.getIdenticonHash(wallet.id, type)) != null ? _c : "",
|
|
45
|
-
showAddFunds
|
|
46
|
-
}
|
|
47
|
-
);
|
|
48
|
-
};
|
|
49
|
-
const SharedWalletCard = ({ address, name, identiconHash, showAddFunds, id, type }) => {
|
|
50
|
-
const onRampConfig = useModalStore((state) => state.onRampConfig);
|
|
51
|
-
const { setSelectedWallet } = useWalletState();
|
|
52
|
-
const setStep = useModalStore((state) => state.setStep);
|
|
53
|
-
const isAddFundsEnabled = (onRampConfig == null ? void 0 : onRampConfig.isBuyEnabled) || (onRampConfig == null ? void 0 : onRampConfig.isReceiveEnabled);
|
|
54
|
-
const handleAddFundsClick = () => {
|
|
55
|
-
if (id && type) {
|
|
56
|
-
setSelectedWallet({ id, type });
|
|
57
|
-
isAddFundsEnabled && setStep(onRampConfig.isBuyEnabled ? ModalStep.ADD_FUNDS_BUY : ModalStep.ADD_FUNDS_RECEIVE);
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
return /* @__PURE__ */ jsxs(Container, { children: [
|
|
61
|
-
/* @__PURE__ */ jsxs(InnerContainer, { children: [
|
|
62
|
-
/* @__PURE__ */ jsx(CpslIdenticon, { size: "48px", hash: identiconHash }),
|
|
63
|
-
/* @__PURE__ */ jsxs(WalletNameContainer, { children: [
|
|
64
|
-
!!name && /* @__PURE__ */ jsx(Name, { color: "contrast", variant: "bodyL", weight: "semiBold", children: name }),
|
|
65
|
-
/* @__PURE__ */ jsx(Name, { color: "secondary", variant: "bodyS", weight: "medium", children: address })
|
|
66
|
-
] })
|
|
67
|
-
] }),
|
|
68
|
-
showAddFunds && isAddFundsEnabled && /* @__PURE__ */ jsx(AddFundsButton, { onClick: handleAddFundsClick, children: /* @__PURE__ */ jsx(CpslText, { variant: "bodyXS", color: "contrast", weight: "medium", children: "Add Funds" }) })
|
|
69
|
-
] });
|
|
70
|
-
};
|
|
71
|
-
const WalletCards = safeStyled.div`
|
|
72
|
-
display: flex;
|
|
73
|
-
flex-direction: column;
|
|
74
|
-
gap: 8px;
|
|
75
|
-
width: 100%;
|
|
76
|
-
`;
|
|
77
|
-
const Container = safeStyled.div`
|
|
78
|
-
width: 100%;
|
|
79
|
-
padding: 24px;
|
|
80
|
-
display: flex;
|
|
81
|
-
justify-content: space-between;
|
|
82
|
-
align-items: center;
|
|
83
|
-
gap: 16px;
|
|
84
|
-
background-color: var(--cpsl-color-background-8);
|
|
85
|
-
border-radius: 16px;
|
|
86
|
-
`;
|
|
87
|
-
const InnerContainer = safeStyled.div`
|
|
88
|
-
display: flex;
|
|
89
|
-
justify-content: flex-start;
|
|
90
|
-
gap: 8px;
|
|
91
|
-
align-items: center;
|
|
92
|
-
overflow: hidden;
|
|
93
|
-
`;
|
|
94
|
-
const WalletNameContainer = safeStyled.div`
|
|
95
|
-
flex: 1;
|
|
96
|
-
display: flex;
|
|
97
|
-
flex-direction: column;
|
|
98
|
-
gap: 4px;
|
|
99
|
-
align-items: flex-start;
|
|
100
|
-
justify-content: center;
|
|
101
|
-
overflow: hidden;
|
|
102
|
-
`;
|
|
103
|
-
const Name = safeStyled(CpslText)`
|
|
104
|
-
width: 100%;
|
|
105
|
-
&::part(text-element) {
|
|
106
|
-
line-height: 100%;
|
|
107
|
-
text-overflow: ellipsis;
|
|
108
|
-
overflow: hidden;
|
|
109
|
-
white-space: nowrap;
|
|
110
|
-
}
|
|
111
|
-
`;
|
|
112
|
-
const AddFundsButton = safeStyled(CpslButton)`
|
|
113
|
-
--button-primary-background-color: var(--cpsl-color-card-surface);
|
|
114
|
-
--button-primary-hover-background-color: var(--cpsl-color-background-4);
|
|
115
|
-
--button-primary-color: var(--cpsl-color-text-contrast);
|
|
116
|
-
--button-primary-hover-color: var(--cpsl-color-text-contrast);
|
|
117
|
-
--button-primary-active-color: var(--cpsl-color-text-contrast);
|
|
118
|
-
--button-padding-start: 8px;
|
|
119
|
-
--button-padding-end: 8px;
|
|
120
|
-
--button-padding-top: 8px;
|
|
121
|
-
--button-padding-bottom: 8px;
|
|
122
|
-
--button-border-radius: 8px;
|
|
123
|
-
`;
|
|
124
|
-
export {
|
|
125
|
-
ExternalWalletCard,
|
|
126
|
-
WalletCard,
|
|
127
|
-
WalletCards
|
|
128
|
-
};
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
__async
|
|
4
|
-
} from "../../../chunk-MMUBH76A.js";
|
|
5
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import { CpslButton, CpslText } from "@getpara/react-components";
|
|
7
|
-
import { StepContainer, InnerStepContainer, HeroIcon } from "../common.js";
|
|
8
|
-
import { useModalStore } from "../../stores/index.js";
|
|
9
|
-
import { ModalStep } from "../../utils/steps.js";
|
|
10
|
-
import { WalletCard, WalletCards } from "../WalletCard/WalletCard.js";
|
|
11
|
-
import { safeStyled } from "@getpara/react-common";
|
|
12
|
-
import { useInternalClient } from "../../../provider/hooks/utils/useInternalClient.js";
|
|
13
|
-
import { useStore } from "../../../provider/stores/useStore.js";
|
|
14
|
-
import { useAuthActions } from "../../../provider/providers/AuthProvider.js";
|
|
15
|
-
import { useEffect, useState } from "react";
|
|
16
|
-
const WalletCreationDoneStep = ({ twoFactorAuthEnabled, onClose }) => {
|
|
17
|
-
const { isSetup2faPending } = useAuthActions();
|
|
18
|
-
const hideWallets = useStore((state) => {
|
|
19
|
-
var _a;
|
|
20
|
-
return (_a = state.modalConfig) == null ? void 0 : _a.hideWallets;
|
|
21
|
-
});
|
|
22
|
-
const bareModal = useStore((state) => {
|
|
23
|
-
var _a;
|
|
24
|
-
return (_a = state.modalConfig) == null ? void 0 : _a.bareModal;
|
|
25
|
-
});
|
|
26
|
-
const setStep = useModalStore((state) => state.setStep);
|
|
27
|
-
const setFlow = useModalStore((state) => state.setFlow);
|
|
28
|
-
const isLogin = useModalStore((state) => state.isLogin());
|
|
29
|
-
const twoFactorStatus = useModalStore((state) => state.twoFactorStatus);
|
|
30
|
-
const onRampConfig = useModalStore((state) => state.onRampConfig);
|
|
31
|
-
const para = useInternalClient();
|
|
32
|
-
const [isWaiting, setIsWaiting] = useState(false);
|
|
33
|
-
const isOnRampConfigured = (onRampConfig == null ? void 0 : onRampConfig.isBuyEnabled) || (onRampConfig == null ? void 0 : onRampConfig.isReceiveEnabled) || (onRampConfig == null ? void 0 : onRampConfig.isWithdrawEnabled);
|
|
34
|
-
const onBypass2fa = () => {
|
|
35
|
-
if (isLogin) {
|
|
36
|
-
setStep(ModalStep.LOGIN_DONE);
|
|
37
|
-
} else {
|
|
38
|
-
if (bareModal) {
|
|
39
|
-
setFlow("account");
|
|
40
|
-
setStep(ModalStep.ACCOUNT_MAIN);
|
|
41
|
-
} else {
|
|
42
|
-
onClose();
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
const handleNext = () => __async(void 0, null, function* () {
|
|
47
|
-
if (!twoFactorAuthEnabled) {
|
|
48
|
-
onBypass2fa();
|
|
49
|
-
}
|
|
50
|
-
if (!twoFactorStatus) {
|
|
51
|
-
if (isSetup2faPending) {
|
|
52
|
-
setIsWaiting(true);
|
|
53
|
-
}
|
|
54
|
-
} else {
|
|
55
|
-
if (twoFactorStatus.isSetup) {
|
|
56
|
-
onBypass2fa();
|
|
57
|
-
} else {
|
|
58
|
-
setStep(ModalStep.SETUP_2FA);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
useEffect(() => {
|
|
63
|
-
if (isWaiting && !!twoFactorStatus) {
|
|
64
|
-
setStep(ModalStep.SETUP_2FA);
|
|
65
|
-
}
|
|
66
|
-
}, [isWaiting, twoFactorStatus]);
|
|
67
|
-
return /* @__PURE__ */ jsxs(StepContainer, { $wide: true, children: [
|
|
68
|
-
/* @__PURE__ */ jsx(CardContainer, { children: hideWallets ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
69
|
-
/* @__PURE__ */ jsx(HeroIcon, { icon: "checkCircleFilled" }),
|
|
70
|
-
/* @__PURE__ */ jsx(CpslText, { variant: "bodyM", color: "secondary", weight: "medium", style: { marginTop: "16px" }, children: "Your account has been created." })
|
|
71
|
-
] }) : /* @__PURE__ */ jsx(WalletCards, { children: para.currentWalletIdsArray.map(([id, type]) => {
|
|
72
|
-
return /* @__PURE__ */ jsx(WalletCard, { id, type, showAddFunds: isOnRampConfigured }, id);
|
|
73
|
-
}) }) }),
|
|
74
|
-
/* @__PURE__ */ jsx(InnerStepContainer, { children: /* @__PURE__ */ jsx(CpslButton, { fullWidth: true, onClick: handleNext, disabled: isWaiting, children: twoFactorAuthEnabled ? "Continue" : "Done" }) })
|
|
75
|
-
] });
|
|
76
|
-
};
|
|
77
|
-
const CardContainer = safeStyled(InnerStepContainer)`
|
|
78
|
-
min-height: 196px;
|
|
79
|
-
justify-content: center;
|
|
80
|
-
`;
|
|
81
|
-
export {
|
|
82
|
-
WalletCreationDoneStep
|
|
83
|
-
};
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { CpslInput, CpslText, CpslTileButton } from '@getpara/react-components';
|
|
2
|
-
import { Network, OnRampAsset, TExternalWallet, TLinkedAccountType } from '@getpara/web-sdk';
|
|
3
|
-
import { PropsWithChildren } from 'react';
|
|
4
|
-
export declare const SpinnerContainer: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
5
|
-
export declare const QRContainer: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
6
|
-
export declare const InfoBoxContent: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
7
|
-
export declare const InfoBoxHeader: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
8
|
-
export declare const FilledDisabledInput: typeof CpslInput;
|
|
9
|
-
export declare const FullWidthFilledDisabledInput: typeof CpslInput;
|
|
10
|
-
export declare const CenteredText: typeof CpslText;
|
|
11
|
-
export declare const InnerStepContainer: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
12
|
-
export declare const StepContainer: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components/dist/types.js").Substitute<Omit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>, "ref"> & {
|
|
13
|
-
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
14
|
-
}, {
|
|
15
|
-
$wide?: boolean;
|
|
16
|
-
}>> & string;
|
|
17
|
-
export declare const Heading: typeof CpslText;
|
|
18
|
-
export declare const StyledCpslTileButton: typeof CpslTileButton;
|
|
19
|
-
export declare const HeroIcon: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<Omit<any, "ref"> & import("react").RefAttributes<any>, "ref"> & {
|
|
20
|
-
ref?: ((instance: any) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<any> | null | undefined;
|
|
21
|
-
}, never>> & string & Omit<import("react").ForwardRefExoticComponent<Omit<any, "ref"> & import("react").RefAttributes<any>>, keyof import("react").Component<any, {}, any>>;
|
|
22
|
-
export declare const HeaderSelect: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components/dist/types.js").Substitute<Omit<Omit<any, "ref"> & import("react").RefAttributes<any>, "ref"> & {
|
|
23
|
-
ref?: ((instance: any) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<any> | null | undefined;
|
|
24
|
-
}, {
|
|
25
|
-
$width: number;
|
|
26
|
-
$top?: number;
|
|
27
|
-
}>> & string & Omit<import("react").ForwardRefExoticComponent<Omit<any, "ref"> & import("react").RefAttributes<any>>, keyof import("react").Component<any, {}, any>>;
|
|
28
|
-
export declare const HeaderSelectItem: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<Omit<any, "ref"> & import("react").RefAttributes<any>, "ref"> & {
|
|
29
|
-
ref?: ((instance: any) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<any> | null | undefined;
|
|
30
|
-
}, never>> & string & Omit<import("react").ForwardRefExoticComponent<Omit<any, "ref"> & import("react").RefAttributes<any>>, keyof import("react").Component<any, {}, any>>;
|
|
31
|
-
export declare const HeaderSelectContainer: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
32
|
-
export declare function AssetIcon({ asset, size }: {
|
|
33
|
-
asset: OnRampAsset;
|
|
34
|
-
size?: string;
|
|
35
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
36
|
-
export declare function NetworkIcon({ network, size }: {
|
|
37
|
-
network: Network;
|
|
38
|
-
size?: string;
|
|
39
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
40
|
-
export declare const ErrorContainer: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
41
|
-
export declare const ErrorIcon: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<Omit<any, "ref"> & import("react").RefAttributes<any>, "ref"> & {
|
|
42
|
-
ref?: ((instance: any) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<any> | null | undefined;
|
|
43
|
-
}, never>> & string & Omit<import("react").ForwardRefExoticComponent<Omit<any, "ref"> & import("react").RefAttributes<any>>, keyof import("react").Component<any, {}, any>>;
|
|
44
|
-
export declare function AccountTypeIcon({ accountType, size, inset, }: {
|
|
45
|
-
accountType?: TLinkedAccountType | TExternalWallet;
|
|
46
|
-
size?: string;
|
|
47
|
-
inset?: string;
|
|
48
|
-
}): import("react/jsx-runtime").JSX.Element | null;
|
|
49
|
-
export declare function HeroAccountTypeIcon({ accountType }: {
|
|
50
|
-
accountType: TLinkedAccountType | TExternalWallet;
|
|
51
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
52
|
-
export declare function HeroSuccessIcon(): import("react/jsx-runtime").JSX.Element;
|
|
53
|
-
export declare function GradientScroll({ height, gap, children }: PropsWithChildren<{
|
|
54
|
-
gap?: string;
|
|
55
|
-
height?: string;
|
|
56
|
-
}>): import("react/jsx-runtime").JSX.Element;
|
|
57
|
-
export declare const HeroGenericIcon: ({ accountType }: {
|
|
58
|
-
accountType: "EMAIL" | "PHONE";
|
|
59
|
-
}) => import("react/jsx-runtime").JSX.Element;
|