diff options
author | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2018-06-05 06:03:03 +0800 |
---|---|---|
committer | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2018-06-06 08:17:27 +0800 |
commit | d9d09f953b9500b783a164b4aba85efcbd7ddbe2 (patch) | |
tree | 32750c12bd75f21b974a14e3f59d63010321a587 /ui | |
parent | 8b449b325d96ad28c346d87729c1ebd230b8d38e (diff) | |
download | tangerine-wallet-browser-d9d09f953b9500b783a164b4aba85efcbd7ddbe2.tar tangerine-wallet-browser-d9d09f953b9500b783a164b4aba85efcbd7ddbe2.tar.gz tangerine-wallet-browser-d9d09f953b9500b783a164b4aba85efcbd7ddbe2.tar.bz2 tangerine-wallet-browser-d9d09f953b9500b783a164b4aba85efcbd7ddbe2.tar.lz tangerine-wallet-browser-d9d09f953b9500b783a164b4aba85efcbd7ddbe2.tar.xz tangerine-wallet-browser-d9d09f953b9500b783a164b4aba85efcbd7ddbe2.tar.zst tangerine-wallet-browser-d9d09f953b9500b783a164b4aba85efcbd7ddbe2.zip |
Render the accounts in keyring order
Diffstat (limited to 'ui')
-rw-r--r-- | ui/app/components/account-menu/index.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ui/app/components/account-menu/index.js b/ui/app/components/account-menu/index.js index 7638995ea..f34631ca8 100644 --- a/ui/app/components/account-menu/index.js +++ b/ui/app/components/account-menu/index.js @@ -135,11 +135,12 @@ AccountMenu.prototype.renderAccounts = function () { showAccountDetail, } = this.props - return Object.keys(identities).map((key, index) => { - const identity = identities[key] + const accountOrder = keyrings.reduce((list, keyring) => list.concat(keyring.accounts), []) + return accountOrder.map((address) => { + const identity = identities[address] const isSelected = identity.address === selectedAddress - const balanceValue = accounts[key] ? accounts[key].balance : '' + const balanceValue = accounts[address] ? accounts[address].balance : '' const formattedBalance = balanceValue ? formatBalance(balanceValue, 6) : '...' const simpleAddress = identity.address.substring(2).toLowerCase() |