feat: Display Account context in the UI (#4069)

This commit is contained in:
Pranav Raj S
2022-02-25 16:36:36 +05:30
committed by GitHub
parent 2c8a3ef3b2
commit cc74bebc0f
13 changed files with 138 additions and 6 deletions

View File

@@ -71,6 +71,19 @@ export const getters = {
return messageSignature || '';
},
getCurrentAccount(_state) {
const { accounts = [] } = _state.currentUser;
const [currentAccount = {}] = accounts.filter(
account => account.id === _state.currentAccountId
);
return currentAccount || {};
},
getUserAccounts(_state) {
const { accounts = [] } = _state.currentUser;
return accounts;
},
};
// actions