Skip to content

Commit

Permalink
Merge pull request #903 from forbole/aaron/desmos_profile
Browse files Browse the repository at this point in the history
fix: desmos profile not showing on proposal details page
  • Loading branch information
yayay927 committed Jul 17, 2022
2 parents d532055 + ce9f959 commit 6602059
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Unreleased

## Fixes
- Add missing dependency of `useEffect` in `useProfilesRecoil` to avoid desmos profile from not being loaded ([\#904](https://github.com/forbole/big-dipper-2.0-cosmos/issues/904))

## Changes
- Update validator and account details to not be found if bech32 is invalid
- Removed the use of NEXT_PUBLIC_URL
Expand Down
6 changes: 3 additions & 3 deletions src/recoil/profiles/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ export const useProfilesRecoil = (addresses: string[]): AvatarName[] => {
const fetchProfiles = useRecoilCallback(({ set }) => async () => {
const fetchedProfiles = await Promise.all(rawProfiles.map(async (x, i) => {
const delegatorAddress = delegatorAddresses[i];
if (delegatorAddresses[i] && x === null) {
const fetchedProfile = await getProfile(delegatorAddresses[i]);
if (delegatorAddress && x === null) {
const fetchedProfile = await getProfile(delegatorAddress);
if (fetchedProfile === null) {
set(writeProfile(delegatorAddress), null);
} else {
Expand All @@ -86,7 +86,7 @@ export const useProfilesRecoil = (addresses: string[]): AvatarName[] => {
if (chainConfig.extra.profile) {
fetchProfiles();
}
}, []);
}, [delegatorAddresses]);

return profiles;
};

0 comments on commit 6602059

Please sign in to comment.