1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Merge pull request #6448 from whymarrh/getSendToAccounts

Remove unneeded array cloning in getSendToAccounts selector
This commit is contained in:
Whymarrh Whitby 2019-04-12 13:43:56 -02:30 committed by GitHub
commit 3a969b22ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -240,9 +240,7 @@ function getSendTo (state) {
function getSendToAccounts (state) {
const fromAccounts = accountsWithSendEtherInfoSelector(state)
const addressBookAccounts = getAddressBook(state)
const allAccounts = [...fromAccounts, ...addressBookAccounts]
// TODO: figure out exactly what the below returns and put a descriptive variable name on it
return Object.entries(allAccounts).map(([key, account]) => account)
return [...fromAccounts, ...addressBookAccounts]
}
function getSendWarnings (state) {