show deposit form in mainnet onboarding (#140)
This commit is contained in:
parent
944fc6dc95
commit
e09d574d5b
@ -3,6 +3,7 @@ import styled, { AnyStyledComponent, css } from 'styled-components';
|
||||
|
||||
import { AnalyticsEvent } from '@/constants/analytics';
|
||||
import { STRING_KEYS } from '@/constants/localization';
|
||||
import { isMainnet } from '@/constants/networks';
|
||||
import { EvmDerivedAccountStatus, OnboardingSteps } from '@/constants/account';
|
||||
import { wallets } from '@/constants/wallets';
|
||||
|
||||
@ -26,6 +27,7 @@ import { track } from '@/lib/analytics';
|
||||
import { AcknowledgeTerms } from './OnboardingDialog/AcknowledgeTerms';
|
||||
import { ChooseWallet } from './OnboardingDialog/ChooseWallet';
|
||||
import { GenerateKeys } from './OnboardingDialog/GenerateKeys';
|
||||
import { DepositForm } from '../forms/AccountManagementForms/DepositForm';
|
||||
|
||||
type ElementProps = {
|
||||
setIsOpen?: (open: boolean) => void;
|
||||
@ -50,7 +52,7 @@ export const OnboardingDialog = ({ setIsOpen }: ElementProps) => {
|
||||
disconnect();
|
||||
}
|
||||
setIsOpen?.(open);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<Styled.Dialog
|
||||
@ -82,10 +84,7 @@ export const OnboardingDialog = ({ setIsOpen }: ElementProps) => {
|
||||
description: stringGetter({ key: STRING_KEYS.SIGNATURE_CREATES_COSMOS_WALLET }),
|
||||
children: (
|
||||
<Styled.Content>
|
||||
<GenerateKeys
|
||||
status={derivationStatus}
|
||||
setStatus={setDerivationStatus}
|
||||
/>
|
||||
<GenerateKeys status={derivationStatus} setStatus={setDerivationStatus} />
|
||||
</Styled.Content>
|
||||
),
|
||||
width: '23rem',
|
||||
@ -101,14 +100,22 @@ export const OnboardingDialog = ({ setIsOpen }: ElementProps) => {
|
||||
},
|
||||
[OnboardingSteps.DepositFunds]: {
|
||||
title: stringGetter({ key: STRING_KEYS.DEPOSIT }),
|
||||
description: 'Test funds will be sent directly to your dYdX account.',
|
||||
description: !isMainnet && 'Test funds will be sent directly to your dYdX account.',
|
||||
children: (
|
||||
<Styled.Content>
|
||||
<TestnetDepositForm
|
||||
onDeposit={() => {
|
||||
track(AnalyticsEvent.TransferFaucet);
|
||||
}}
|
||||
/>
|
||||
{isMainnet ? (
|
||||
<DepositForm
|
||||
onDeposit={() => {
|
||||
track(AnalyticsEvent.TransferDeposit);
|
||||
}}
|
||||
/>
|
||||
) : (
|
||||
<TestnetDepositForm
|
||||
onDeposit={() => {
|
||||
track(AnalyticsEvent.TransferFaucet);
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</Styled.Content>
|
||||
),
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user