Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Fix displaying delegate name - Closes #1080 #1082

Merged
merged 2 commits into from
Aug 17, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
8 changes: 8 additions & 0 deletions src/store/middlewares/transactions.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const transactionAdded = (store, action) => {
store.dispatch(newAction);
};

// eslint-disable-next-line no-unused-vars
const transactionsUpdated = (store) => {
const { transactions, account, peers } = store.getState();
if (transactions.pending.length) {
Expand All @@ -39,7 +40,14 @@ const transactionsMiddleware = store => next => (action) => {
transactionAdded(store, action);
break;
case actionTypes.transactionsUpdated:
// this was disabled, because this caused pending transactions
// to disappear from the list before they appeared again as confirmed.
// Currently, the problem is that a pending transaction will not be removed
// from the list if it fails. Caused by Lisk Core 1.0.0
// TODO: figure out how to make this work again
/*
transactionsUpdated(store, action);
*/
break;
default: break;
}
Expand Down
3 changes: 2 additions & 1 deletion src/store/middlewares/transactions.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ describe('transaction middleware', () => {
expect(store.dispatch).to.not.have.been.calledWith();
});

it('should call unconfirmedTransactions and then dispatch transactionsFailed if state.transactions.pending.length > 0 and action.type is transactionsUpdated', () => {
// TODO update after the functionality is fixed. see implementation for more info
it.skip('should call unconfirmedTransactions and then dispatch transactionsFailed if state.transactions.pending.length > 0 and action.type is transactionsUpdated', () => {
const transactions = [
mockTransaction,
];
Expand Down