Merge branch 'sortbyw' of https://github.com/BlueWallet/BlueWallet into sortbyw

This commit is contained in:
Marcos Rodriguez Velez 2024-11-15 22:28:59 -04:00
commit cf72d7e7bd
3 changed files with 4 additions and 3 deletions

View File

@ -49,6 +49,6 @@ const style = StyleSheet.create({
height: 30,
borderRadius: 15,
justifyContent: 'center',
alignContent: 'center',
alignItems: 'center',
},
});

View File

@ -370,7 +370,8 @@ const ManageWallets: React.FC = () => {
const sortedWalletsByMostRecent = state.tempOrder
.filter((item): item is WalletItem => item.type === ItemType.WalletSection)
.sort((a, b) => {
return b.data.getTransactions()[0]?.time - a.data.getTransactions()[0]?.time;
const getMostRecentTime = (wallet: TWallet) => wallet.getTransactions()[0]?.time ?? 0;
return getMostRecentTime(b.data) - getMostRecentTime(a.data);
});
dispatch({ type: SET_TEMP_ORDER, payload: sortedWalletsByMostRecent });
break;

View File

@ -317,7 +317,7 @@ export const CommonToolTipActions = {
Reset: {
id: keys.Reset,
text: loc.receive.reset,
Icon: icons.Reset,
icon: icons.Reset,
},
ClearHistory: {
id: keys.ClearHistory,