Skip to content
This repository has been archived by the owner on Jan 15, 2025. It is now read-only.

Commit

Permalink
add reputation fetch in full account
Browse files Browse the repository at this point in the history
  • Loading branch information
feruzm committed Feb 26, 2024
1 parent 96fa7a7 commit 48cafa5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/common/api/hive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -292,11 +292,13 @@ export const getAccount = (username: string): Promise<FullAccount> =>
export const getAccountFull = (username: string): Promise<FullAccount> =>
getAccount(username).then(async (account) => {
let follow_stats: AccountFollowStats | undefined;
let reps: Reputations[] | [{}];
try {
follow_stats = await getFollowCount(username);
reps = await getAccountReputations(username, 1);
} catch (e) {}

return { ...account, follow_stats };
return { ...account, ...reps[0], follow_stats };
});

export const getFollowCount = (username: string): Promise<AccountFollowStats> =>
Expand Down

0 comments on commit 48cafa5

Please sign in to comment.