add empty summary and receive

pull/492/head
Vladimir Volek 5 years ago
parent c47ca11f8b
commit d547206f6c

@ -0,0 +1,48 @@
/* @flow */
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { injectIntl } from 'react-intl';
import { showAddress } from 'actions/ReceiveActions';
import type { MapStateToProps, MapDispatchToProps } from 'react-redux';
import type { State, Dispatch } from 'flowtype';
import Receive from './index';
type OwnProps = {
intl: any,
};
type StateProps = {
selectedAccount: $ElementType<State, 'selectedAccount'>,
receive: $ElementType<State, 'receive'>,
modal: $ElementType<State, 'modal'>,
wallet: $ElementType<State, 'wallet'>,
};
type DispatchProps = {
showAddress: typeof showAddress,
};
export type Props = OwnProps & StateProps & DispatchProps;
const mapStateToProps: MapStateToProps<State, OwnProps, StateProps> = (
state: State
): StateProps => ({
selectedAccount: state.selectedAccount,
receive: state.receive,
modal: state.modal,
wallet: state.wallet,
});
const mapDispatchToProps: MapDispatchToProps<Dispatch, OwnProps, DispatchProps> = (
dispatch: Dispatch
): DispatchProps => ({
showAddress: bindActionCreators(showAddress, dispatch),
});
export default injectIntl(
connect(
mapStateToProps,
mapDispatchToProps
)(Receive)
);

@ -0,0 +1,13 @@
import React from 'react';
import Title from 'views/Wallet/components/Title';
import Content from 'views/Wallet/components/Content';
const BitcoinReceive = () => {
return (
<Content>
<Title>Receive bitcoin</Title>
</Content>
);
};
export default BitcoinReceive;

@ -11,7 +11,7 @@ import { CONTEXT_DEVICE } from 'actions/constants/modal';
import l10nCommonMessages from 'views/common.messages';
import VerifyAddressTooltip from '../components/VerifyAddressTooltip';
import l10nMessages from './index.messages';
import l10nReceiveMessages from '../common.messages';
import l10nReceiveMessages from '../../common.messages';
import type { Props } from './Container';

@ -3,8 +3,10 @@ import React from 'react';
import { connect } from 'react-redux';
import type { State } from 'flowtype';
import EthereumTypeReceiveForm from './ethereum/Container';
import RippleTypeReceiveForm from './ripple/Container';
import BitcoinTypeReceiveForm from './bitcoin/Container';
export type BaseProps = {
selectedAccount: $ElementType<State, 'selectedAccount'>,
@ -25,6 +27,8 @@ export default connect(
return <EthereumTypeReceiveForm />;
case 'ripple':
return <RippleTypeReceiveForm />;
case 'bitcoin':
return <BitcoinTypeReceiveForm />;
default:
return null;
}

@ -15,7 +15,7 @@ import l10nCommonMessages from 'views/common.messages';
import VerifyAddressTooltip from '../components/VerifyAddressTooltip';
import l10nMessages from './index.messages';
import l10nReceiveMessages from '../common.messages';
import l10nReceiveMessages from '../../common.messages';
import type { Props } from './Container';

@ -2,12 +2,12 @@ import React from 'react';
import Content from 'views/Wallet/components/Content';
import Title from 'views/Wallet/components/Title';
const AccountSend = () => {
const BitcoinSend = () => {
return (
<Content>
<Title>bitcoin</Title>
<Title>Send bitcoin</Title>
</Content>
);
};
export default AccountSend;
export default BitcoinSend;

@ -5,7 +5,7 @@ import { colors, H5 } from 'trezor-ui-components';
import Transaction from 'components/Transaction';
import type { Network } from 'reducers/LocalStorageReducer';
import type { BaseProps } from '../../../index';
import type { BaseProps } from '../../index';
// import testData from './test.data';
type Props = {

@ -16,7 +16,7 @@ import AdvancedForm from './components/AdvancedForm';
import PendingTransactions from '../components/PendingTransactions';
import l10nMessages from './index.messages';
import l10nSendMessages from '../../../common.messages';
import l10nSendMessages from '../../common.messages';
import type { Props } from './Container';
const AmountInputLabelWrapper = styled.div`

@ -3,9 +3,9 @@ import React from 'react';
import { connect } from 'react-redux';
import type { State } from 'flowtype';
import EthereumTypeSendForm from './components/ethereum/Container';
import RippleTypeSendForm from './components/ripple/Container';
import BitcoinTypeSendForm from './components/bitcoin/Container';
import EthereumTypeSendForm from './ethereum/Container';
import RippleTypeSendForm from './ripple/Container';
import BitcoinTypeSendForm from './bitcoin/Container';
export type BaseProps = {
selectedAccount: $ElementType<State, 'selectedAccount'>,

@ -14,7 +14,7 @@ import PendingTransactions from '../components/PendingTransactions';
import AdvancedForm from './components/AdvancedForm';
import l10nMessages from './index.messages';
import l10nSendMessages from '../../../common.messages';
import l10nSendMessages from '../../common.messages';
import type { Props } from './Container';

@ -0,0 +1,57 @@
/* @flow */
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { injectIntl } from 'react-intl';
import type { MapStateToProps, MapDispatchToProps } from 'react-redux';
import * as TokenActions from 'actions/TokenActions';
import type { State, Dispatch } from 'flowtype';
import Summary from './index';
type OwnProps = {
intl: any,
};
type StateProps = {
selectedAccount: $ElementType<State, 'selectedAccount'>,
summary: $ElementType<State, 'summary'>,
wallet: $ElementType<State, 'wallet'>,
tokens: $ElementType<State, 'tokens'>,
fiat: $ElementType<State, 'fiat'>,
localStorage: $ElementType<State, 'localStorage'>,
};
type DispatchProps = {
addToken: typeof TokenActions.add,
loadTokens: typeof TokenActions.load,
removeToken: typeof TokenActions.remove,
};
export type Props = OwnProps & StateProps & DispatchProps;
const mapStateToProps: MapStateToProps<State, OwnProps, StateProps> = (
state: State
): StateProps => ({
selectedAccount: state.selectedAccount,
summary: state.summary,
wallet: state.wallet,
tokens: state.tokens,
fiat: state.fiat,
localStorage: state.localStorage,
});
const mapDispatchToProps: MapDispatchToProps<Dispatch, OwnProps, DispatchProps> = (
dispatch: Dispatch
): DispatchProps => ({
addToken: bindActionCreators(TokenActions.add, dispatch),
loadTokens: bindActionCreators(TokenActions.load, dispatch),
removeToken: bindActionCreators(TokenActions.remove, dispatch),
});
export default injectIntl(
connect(
mapStateToProps,
mapDispatchToProps
)(Summary)
);

@ -0,0 +1,14 @@
/* @flow */
import React from 'react';
import Content from 'views/Wallet/components/Content';
import Title from 'views/Wallet/components/Title';
const BitcoinSummary = () => {
return (
<Content>
<Title>Summary Bitcoin</Title>
</Content>
);
};
export default BitcoinSummary;

@ -5,6 +5,7 @@ import { connect } from 'react-redux';
import type { State } from 'flowtype';
import EthereumTypeSummary from './ethereum/Container';
import RippleTypeSummary from './ripple/Container';
import BitcoinTypeSummary from './bitcoin/Container';
type WrapperProps = {
selectedAccount: $ElementType<State, 'selectedAccount'>,
@ -25,6 +26,8 @@ export default connect(
return <EthereumTypeSummary />;
case 'ripple':
return <RippleTypeSummary />;
case 'bitcoin':
return <BitcoinTypeSummary />;
default:
return null;
}

Loading…
Cancel
Save