Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix stuck on loading screen on transaction details - Closes #565 #574

Merged
merged 4 commits into from
Mar 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/transactions/transactionDetailView.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const TransactionsDetailView = props => (
</header> : null
}
<div>
<div className={`${grid.row} ${grid['between-md']} ${grid['between-sm']} ${styles.row}`}>
<div className={`transactions-detail-view ${grid.row} ${grid['between-md']} ${grid['between-sm']} ${styles.row}`}>
<div className={`${grid['col-xs-12']} ${grid['col-sm-4']} ${grid['col-md-4']} ${styles.column}`}>
<div className={styles.label}>{props.t('Sender')}</div>
{
Expand Down
5 changes: 3 additions & 2 deletions src/components/transactions/transactionRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ class TransactionRow extends React.Component {

render() {
const { props } = this;
const nextStep = props.nextStep || (() => {});
const nextStep = !props.nextStep ? (() => {}) : () => (props.nextStep({ value: props.value }));

return (
<div className={`${grid.row} ${styles.rows} ${styles.clickable} transactionsRow`} onClick={nextStep.bind(this, { ...props })}>
<div className={`${grid.row} ${styles.rows} ${styles.clickable} transactionsRow`} onClick={nextStep}>
<div className={`${styles.leftText} ${grid['col-xs-6']} ${grid['col-sm-6']} transactions-cell`}>
<div className={`${styles.mainRow} ${styles.address}`}>
<TransactionType {...props.value} address={props.address}></TransactionType>
Expand Down
2 changes: 1 addition & 1 deletion src/components/transactions/transactions.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Transactions extends React.Component {
<Box>
<MultiStep className={styles.transactions}>
<TransactionOverview {...this.props} />
<TransactionDetailView />
<TransactionDetailView {...this.props} />
</MultiStep>
</Box>
);
Expand Down
2 changes: 2 additions & 0 deletions test/integration/accountTransactions.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ describe('@integration: Account Transactions', () => {
describe('Scenario: should allow to view transactions of any account', () => {
step('Given I\'m on "accounts/123L" as "genesis" account', () => setupStep({ accountType: 'genesis', address: '123L' }));
step('Then I should see 20 transaction rows as result of the address 123L', () => helper.shouldSeeCountInstancesOf(20, 'TransactionRow'));
step('When I click on a transaction row', () => helper.clickOnElement('.transactionsRow'));
step('Then I should be able to see the details of that transaction', () => helper.shouldSeeCountInstancesOf(1, '.transactions-detail-view'));
});

describe('Scenario: should allow to filter transactions', () => {
Expand Down