Skip to content

Commit

Permalink
Merge pull request #1736 from LiskHQ/1705-replace-old-wallet-with-new…
Browse files Browse the repository at this point in the history
…-wallet

Replace old wallet with new wallet - Closes #1705
  • Loading branch information
massao committed Feb 7, 2019
2 parents a5927d3 + 4e19a4d commit e172f77
Show file tree
Hide file tree
Showing 23 changed files with 136 additions and 321 deletions.
6 changes: 6 additions & 0 deletions src/assets/images/icons-v2/tx-2nd-passphrase.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/components/dashboard/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class Dashboard extends React.Component {
dashboard: true,
history,
loading,
onClick: props => history.push(`${routes.wallet.path}?id=${props.value.id}`),
onClick: props => history.push(`${routes.transactions.pathPrefix}${routes.transactions.path}/${props.value.id}`),
showMore: this.state.showMore,
isBarEnabledTransactions,
t,
Expand Down
14 changes: 8 additions & 6 deletions src/components/singleTransaction/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,19 @@ class SingleTransaction extends React.Component {
{ this.props.transaction.id && !this.props.transaction.error ?
<Fragment>
<header>
<h2>
<h2 className={'tx-header'}>
<TransactionType
{...this.props.transaction}
address={this.props.transaction.senderId}
showTransaction />
</h2>
<CopyToClipboard
value={this.props.match.params.id}
text={this.props.match.params.id}
className={`${styles.copyLabel} transaction-id`}
copyClassName={`${styles.copyIcon}`} />
<span className={'tx-id'}>
<CopyToClipboard
value={this.props.match.params.id}
text={this.props.match.params.id}
className={`${styles.copyLabel} transaction-id`}
copyClassName={`${styles.copyIcon}`} />
</span>
</header>
<div className={styles.content}>
<div className={styles.detailsWrapper}>
Expand Down
7 changes: 1 addition & 6 deletions src/components/transactionDashboard/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ import React from 'react';
import { connect } from 'react-redux';
import { withRouter } from 'react-router-dom';
import grid from 'flexboxgrid/dist/flexboxgrid.css';
import WalletTransactions from './../transactions/walletTransactions';
import WalletTransactionsV2 from './../transactionsV2/walletTransactionsV2';
import routes from '../../constants/routes';

import styles from './transactionDasboard.css';

Expand All @@ -13,10 +11,7 @@ class TransactionsDashboard extends React.Component {
render() {
return <div className={`${grid.row} ${styles.wrapper}`}>
<div className={`${grid['col-xs-10']} ${grid['col-sm-12']} ${grid['col-md-12']} ${grid['col-lg-12']} ${styles.transactions}`}>
{ this.props.match.url === routes.wallet.path &&
<WalletTransactions {...this.props} /> }
{ this.props.match.url === routes.walletV2.path &&
<WalletTransactionsV2 {...this.props} /> }
<WalletTransactionsV2 {...this.props} />
</div>
</div>;
}
Expand Down
49 changes: 0 additions & 49 deletions src/components/transactions/walletTransactions/index.js

This file was deleted.

116 changes: 0 additions & 116 deletions src/components/transactions/walletTransactions/index.test.js

This file was deleted.

This file was deleted.

11 changes: 7 additions & 4 deletions src/components/transactionsV2/transactionDetailV2.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,22 @@ const generateVotes = (asset, t) => {
);
};

const TransactionDetailV2 = ({ type, asset, t }) => {
const TransactionDetailV2 = ({
transaction, t,
}) => {
const { asset, username, type } = transaction;
let data = '-';
let className = '';
switch (type) {
case 2:
data = asset.delegate.username || data;
data = asset && asset.delegate ? asset.delegate.username : username;
break;
case 3:
className = styles.delegateVote;
data = generateVotes(asset, t);
data = asset && asset.votes ? generateVotes(asset, t) : data;
break;
default:
data = asset.data || data;
data = asset && asset.data ? asset.data : data;
break;
}

Expand Down

0 comments on commit e172f77

Please sign in to comment.