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:
parent
a313f4a8ed
commit
cb89d0bbcf
@ -37,36 +37,38 @@ class CoinMenu extends PureComponent<Props> {
|
||||
}
|
||||
|
||||
getOtherCoins() {
|
||||
return coins.map(coin => {
|
||||
const row = (
|
||||
<RowCoin
|
||||
network={{
|
||||
name: coin.coinName,
|
||||
shortcut: coin.id,
|
||||
}}
|
||||
iconRight={{
|
||||
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 coins
|
||||
.sort((a, b) => a.order - b.order)
|
||||
.map(coin => {
|
||||
const row = (
|
||||
<RowCoin
|
||||
network={{
|
||||
name: coin.coinName,
|
||||
shortcut: coin.id,
|
||||
}}
|
||||
iconRight={{
|
||||
type: ICONS.SKIP,
|
||||
color: colors.TEXT_SECONDARY,
|
||||
size: 27,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
return (
|
||||
<Link key={coin.id} href={coin.url} target="_top">
|
||||
{row}
|
||||
</Link>
|
||||
);
|
||||
});
|
||||
|
||||
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">
|
||||
{row}
|
||||
</Link>
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
render() {
|
||||
|
Loading…
Reference in New Issue
Block a user