1
0
mirror of https://github.com/trezor/trezor-wallet synced 2025-01-22 05:51:18 +00:00

sort coins by order

This commit is contained in:
slowbackspace 2019-03-06 14:37:31 +01:00
parent a313f4a8ed
commit cb89d0bbcf

View File

@ -37,36 +37,38 @@ class CoinMenu extends PureComponent<Props> {
} }
getOtherCoins() { getOtherCoins() {
return coins.map(coin => { return coins
const row = ( .sort((a, b) => a.order - b.order)
<RowCoin .map(coin => {
network={{ const row = (
name: coin.coinName, <RowCoin
shortcut: coin.id, network={{
}} name: coin.coinName,
iconRight={{ shortcut: coin.id,
type: ICONS.SKIP, }}
color: colors.TEXT_SECONDARY, iconRight={{
size: 27, type: ICONS.SKIP,
}} color: colors.TEXT_SECONDARY,
/> size: 27,
); }}
/>
if (coin.external)
return (
<ExternalWallet
key={coin.id}
onClick={() => this.props.gotoExternalWallet(coin.id, coin.url)}
>
{row}
</ExternalWallet>
); );
return (
<Link key={coin.id} href={coin.url} target="_top"> if (coin.external)
{row} return (
</Link> <ExternalWallet
); key={coin.id}
}); onClick={() => this.props.gotoExternalWallet(coin.id, coin.url)}
>
{row}
</ExternalWallet>
);
return (
<Link key={coin.id} href={coin.url} target="_top">
{row}
</Link>
);
});
} }
render() { render() {