aboutsummaryrefslogtreecommitdiffstats
path: root/old-ui/app/components/account-dropdowns.js
diff options
context:
space:
mode:
authorDan J Miller <danjm.com@gmail.com>2018-06-07 01:51:45 +0800
committerGitHub <noreply@github.com>2018-06-07 01:51:45 +0800
commit191c3df108562d3f72d6206dfdcd591ad5c80e73 (patch)
tree9e4a5bc46f56359db1d589501af2505378232177 /old-ui/app/components/account-dropdowns.js
parentc2e3194dbf4e2a3fd2bdffb3300ec0cd822dc78e (diff)
parent6ee96854904d149c00b629f5025fda1bf5c60070 (diff)
downloadtangerine-wallet-browser-191c3df108562d3f72d6206dfdcd591ad5c80e73.tar
tangerine-wallet-browser-191c3df108562d3f72d6206dfdcd591ad5c80e73.tar.gz
tangerine-wallet-browser-191c3df108562d3f72d6206dfdcd591ad5c80e73.tar.bz2
tangerine-wallet-browser-191c3df108562d3f72d6206dfdcd591ad5c80e73.tar.lz
tangerine-wallet-browser-191c3df108562d3f72d6206dfdcd591ad5c80e73.tar.xz
tangerine-wallet-browser-191c3df108562d3f72d6206dfdcd591ad5c80e73.tar.zst
tangerine-wallet-browser-191c3df108562d3f72d6206dfdcd591ad5c80e73.zip
Merge pull request #4507 from whymarrh/fix-account-order
Render accounts in keyring order
Diffstat (limited to 'old-ui/app/components/account-dropdowns.js')
-rw-r--r--old-ui/app/components/account-dropdowns.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/old-ui/app/components/account-dropdowns.js b/old-ui/app/components/account-dropdowns.js
index 53468a1a1..262de6601 100644
--- a/old-ui/app/components/account-dropdowns.js
+++ b/old-ui/app/components/account-dropdowns.js
@@ -23,9 +23,10 @@ class AccountDropdowns extends Component {
renderAccounts () {
const { identities, selected, keyrings } = this.props
+ const accountOrder = keyrings.reduce((list, keyring) => list.concat(keyring.accounts), [])
- return Object.keys(identities).map((key, index) => {
- const identity = identities[key]
+ return accountOrder.map((address, index) => {
+ const identity = identities[address]
const isSelected = identity.address === selected
const simpleAddress = identity.address.substring(2).toLowerCase()