Sorted contacts on activtiy screen

This commit is contained in:
benthecarman
2023-08-28 15:38:11 -05:00
committed by Paul Miller
parent 9b36437a87
commit 390f1d6c2d

View File

@@ -29,16 +29,9 @@ function ContactRow() {
const [state, _actions] = useMegaStore();
const [contacts, { refetch }] = createResource(async () => {
try {
const contacts = state.mutiny_wallet?.get_contacts();
// FIXME: this is just types shenanigans I believe
const c: Contact[] = [];
if (contacts) {
for (const contact in contacts) {
c.push(contacts[contact]);
}
}
return c || [];
const contacts: Contact[] =
state.mutiny_wallet?.get_contacts_sorted();
return contacts || [];
} catch (e) {
console.error(e);
return [];