Skip to content

Commit

Permalink
fix: account page stuck on loading (#1315)
Browse files Browse the repository at this point in the history
## Description

Closes: #XXXX
[BDU-1148](https://forbole.atlassian.net/browse/BDU-1148)

<!-- Add a description of the changes that this PR introduces and the
files that
are the most critical to review. -->

---

### Author Checklist

_All items are required. Please add a note to the item if the item is
not applicable and
please add links to any relevant follow up issues._

I have...

- [x] ran linting via `yarn lint`
- [ ] wrote tests where necessary
- [x] included the correct [type
prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json)
in the PR title
- [x] targeted the correct branch
- [x] provided a link to the relevant issue or specification
- [x] reviewed "Files changed" and left comments if necessary
- [x] confirmed all CI checks have passed
- [x] added a changeset via [`yarn && yarn
changeset`](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md)


[BDU-1148]:
https://forbole.atlassian.net/browse/BDU-1148?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
  • Loading branch information
MonikaCat authored Dec 7, 2023
1 parent 31003c3 commit cb67b41
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .changeset/stale-rabbits-smash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'ui': patch
---

fix account page stuck on loading
14 changes: 7 additions & 7 deletions packages/ui/src/screens/account_details/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,13 @@ export const useAccountDetails = () => {
skip: !extra.profile || !address,
});
useEffect(
() => setState((prevState) => ({ ...prevState, desmosProfile: dataDesmosProfile?.[0] })),
[dataDesmosProfile]
() =>
setState((prevState) => ({
...prevState,
desmosProfile: dataDesmosProfile?.[0],
loading: loadingDesmosProfile,
})),
[dataDesmosProfile, loadingDesmosProfile]
);

const commission = useCommission(address);
Expand Down Expand Up @@ -278,10 +283,5 @@ export const useAccountDetails = () => {
}));
}, [handleSetState, address, withdrawalAddress.withdrawalAddress?.address]);

if (loadingDesmosProfile) state.loading = true;

return { state };
};
// function useBoundingBalance(_address?: string) {
// throw new Error('Function not implemented.');
// }

1 comment on commit cb67b41

@vercel
Copy link

@vercel vercel bot commented on cb67b41 Dec 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

cosmos – ./

cosmos-git-main-bigdipper.vercel.app
bigdipper.vercel.app
cosmos-bigdipper.vercel.app

Please sign in to comment.