Skip to content

Commit

Permalink
Merge branch '0.2.0' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
slaweet committed Mar 15, 2018
2 parents 7916517 + ecc86b1 commit c4dc2f6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"lisk-js": "0.5.1",
"lodash.throttle": "4.1.1",
"moment": "2.20.1",
"numeral": "=2.0.6",
"numeral": "git+https://github.com/LiskHQ/Numeral-js.git",
"parallax-js": "3.1.0",
"popmotion": "7.8.2",
"popmotion-react": "1.1.1",
Expand Down
5 changes: 4 additions & 1 deletion src/store/middlewares/account.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ const { lockDuration } = accountConfig;
const updateTransactions = (store, peers) => {
const state = store.getState();
const { filter } = state.transactions;
const address = state.transactions.address ? state.transactions.address : state.account.address;
const address = state.transactions.account
? state.transactions.account.address
: state.account.address;

getTransactions({
activePeer: peers.data, address, limit: 25, filter,
}).then(response => store.dispatch(transactionsUpdated({
Expand Down
3 changes: 2 additions & 1 deletion src/store/middlewares/account.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ describe('Account middleware', () => {
id: 12498250891724098,
}],
confirmed: [],
account: { address: 'test_address' },
},
};
store.getState = () => (state);
Expand Down Expand Up @@ -150,7 +151,7 @@ describe('Account middleware', () => {
middleware(store)(next)(newBlockCreated);

expect(stubGetAccount).to.have.been.calledWith();
expect(stubTransactions).to.have.been.calledWith();
expect(stubTransactions).to.have.been.calledWith(match({ address: 'test_address' }));
});

it(`should call transactions API methods on ${actionTypes.newBlockCreated} action if block.transactions contains null element`, () => {
Expand Down

0 comments on commit c4dc2f6

Please sign in to comment.