From cb89d0bbcfb93e632041c45128f9f43583cef8db Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Wed, 6 Mar 2019 14:37:31 +0100 Subject: [PATCH] sort coins by order --- .../components/CoinMenu/index.js | 60 ++++++++++--------- 1 file changed, 31 insertions(+), 29 deletions(-) diff --git a/src/views/Wallet/components/LeftNavigation/components/CoinMenu/index.js b/src/views/Wallet/components/LeftNavigation/components/CoinMenu/index.js index 4a7d60e8..d3cd62e5 100644 --- a/src/views/Wallet/components/LeftNavigation/components/CoinMenu/index.js +++ b/src/views/Wallet/components/LeftNavigation/components/CoinMenu/index.js @@ -37,36 +37,38 @@ class CoinMenu extends PureComponent { } getOtherCoins() { - return coins.map(coin => { - const row = ( - - ); - - if (coin.external) - return ( - this.props.gotoExternalWallet(coin.id, coin.url)} - > - {row} - + return coins + .sort((a, b) => a.order - b.order) + .map(coin => { + const row = ( + ); - return ( - - {row} - - ); - }); + + if (coin.external) + return ( + this.props.gotoExternalWallet(coin.id, coin.url)} + > + {row} + + ); + return ( + + {row} + + ); + }); } render() {