Skip to content

Commit

Permalink
Merge pull request #69 from TrustyFund/202-update-porfolio-on-transfer
Browse files Browse the repository at this point in the history
update balances on new transfer operation
  • Loading branch information
youaresofunny authored Apr 5, 2018
2 parents b049d19 + 0f4a711 commit e97070d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/modules/operations.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ const actions = {
userId
});
if (!parsedData) return;

const { type } = parsedData.operations[0];
if (type === 'transfer' || type === 'fill_order' || type === 'cancel_order') {
// update current user balances
// todo : maybe refactor to modify balances directly
store.dispatch('account/fetchCurrentUser', null, { root: true });
}
store.dispatch('assets/fetchAssets', { assets: parsedData.assetsIds }, { root: true });
commit(types.ADD_USER_OPERATION, {
operation: parsedData.operations[0]
Expand Down

0 comments on commit e97070d

Please sign in to comment.