Skip to content

Commit

Permalink
Prevent crash when network error occur while fetching account names
Browse files Browse the repository at this point in the history
  • Loading branch information
buberdds committed Oct 22, 2024
1 parent cb60570 commit 7eec7dd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions .changelog/1578.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Prevent crash when network error occur while fetching account names
1 change: 1 addition & 0 deletions src/app/hooks/useAccountMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export const useAccountMetadata = (scope: SearchScope, address: string): Account
const isPontusX = scope.layer === Layer.pontusxtest || scope.layer === Layer.pontusxdev
const pontusXData = usePontusXAccountMetadata(address, { enabled: isPontusX })
const oasisData = useOasisAccountMetadata(scope.network, scope.layer, getOasisAddress(address), {
useErrorBoundary: false,
enabled: !isPontusX,
})
return isPontusX ? pontusXData : oasisData
Expand Down

0 comments on commit 7eec7dd

Please sign in to comment.