Skip to content

Commit

Permalink
return DAO core address in app if chain ID undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahSaso committed Jun 25, 2024
1 parent 0525d1b commit c38bedd
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/stateful/components/dao/tabs/AppsTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,15 @@ export const AppsTab = () => {
types: [AccountType.Ica],
})
if (!address) {
// If chain ID is empty (user or client error I believe), just return
// core DAO address since the error won't be helpful.
if (!chainId) {
console.error(
'DAO DAO app `chainId` should not be empty in `addressForChainId`, but it is. Returning core DAO address.'
)
return coreAddress
}

throw new Error(
t('error.daoMissingAccountsOnChains', {
daoName: name,
Expand Down

0 comments on commit c38bedd

Please sign in to comment.