mirror of https://github.com/trezor/trezor-wallet
Merge pull request #541 from trezor/feature/transactions
Add transaction history - skeletonpull/569/head
commit
505a27a3ef
@ -0,0 +1,13 @@
|
||||
import React from 'react';
|
||||
import Title from 'views/Wallet/components/Title';
|
||||
import Content from 'views/Wallet/components/Content';
|
||||
|
||||
const BitcoinTransactions = () => {
|
||||
return (
|
||||
<Content>
|
||||
<Title>Bitcoin Transactions</Title>
|
||||
</Content>
|
||||
);
|
||||
};
|
||||
|
||||
export default BitcoinTransactions;
|
@ -0,0 +1,13 @@
|
||||
import React from 'react';
|
||||
import Title from 'views/Wallet/components/Title';
|
||||
import Content from 'views/Wallet/components/Content';
|
||||
|
||||
const EthereumTransactions = () => {
|
||||
return (
|
||||
<Content>
|
||||
<Title>Ethereum Transactions</Title>
|
||||
</Content>
|
||||
);
|
||||
};
|
||||
|
||||
export default EthereumTransactions;
|
@ -0,0 +1,38 @@
|
||||
/* @flow */
|
||||
import React from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import type { State } from 'flowtype';
|
||||
|
||||
import EthereumTransactions from './ethereum';
|
||||
import RippleTransactions from './ripple';
|
||||
import BitcoinTransactions from './bitcoin';
|
||||
|
||||
export type BaseProps = {|
|
||||
selectedAccount: $ElementType<State, 'selectedAccount'>,
|
||||
localStorage: $ElementType<State, 'localStorage'>,
|
||||
|};
|
||||
|
||||
export default connect<BaseProps, any, _, _, _, _>(
|
||||
(state: State): BaseProps => ({
|
||||
selectedAccount: state.selectedAccount,
|
||||
localStorage: state.localStorage,
|
||||
}),
|
||||
null
|
||||
)((props: BaseProps) => {
|
||||
const { config } = props.localStorage;
|
||||
if (!config.transactions) return null; // turn off by feature tag
|
||||
const { network } = props.selectedAccount;
|
||||
if (!network || !config) return null;
|
||||
|
||||
switch (network.type) {
|
||||
case 'ethereum':
|
||||
return <EthereumTransactions />;
|
||||
case 'ripple':
|
||||
return <RippleTransactions />;
|
||||
case 'bitcoin':
|
||||
return <BitcoinTransactions />;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
});
|
@ -0,0 +1,13 @@
|
||||
import React from 'react';
|
||||
import Title from 'views/Wallet/components/Title';
|
||||
import Content from 'views/Wallet/components/Content';
|
||||
|
||||
const RippleTransactions = () => {
|
||||
return (
|
||||
<Content>
|
||||
<Title>Ripple Transactions</Title>
|
||||
</Content>
|
||||
);
|
||||
};
|
||||
|
||||
export default RippleTransactions;
|
Loading…
Reference in new issue