Skip to content

Commit

Permalink
Update, #5008
Browse files Browse the repository at this point in the history
  • Loading branch information
hyifeng committed Nov 4, 2024
1 parent 4eb6e97 commit 340f79b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions packages/next-common/hooks/usePostCommentsFilteredData.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,20 +55,20 @@ export function usePostCommentsFilteredData() {
).toNumber();

// merge balance
try {
if (api) {
if (address) {
const normalizedAddress = normalizeAddress(address);
if (api) {
if (address) {
const normalizedAddress = normalizeAddress(address);
try {
item.balance = await getAddressVotingBalance(
api,
normalizedAddress,
);
} else {
item.balance = 0;
} catch (e) {
console.error(e);
}
} else {
item.balance = 0;
}
} catch (e) {
console.error(e);
}

return item;
Expand Down

0 comments on commit 340f79b

Please sign in to comment.