Skip to content

Commit

Permalink
Update the state when discover accounts fails
Browse files Browse the repository at this point in the history
  • Loading branch information
Lbqds committed Jun 12, 2024
1 parent 0b70d34 commit d82e6ce
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export const AccountScreenEmpty: FC<AccountScreenEmptyProps> = ({
const result = await discoverAccounts(currentNetwork.id)
if (result === "error") {
console.log("Error discovering accounts")
setDiscoveringAccounts(false)
} else {
const discoveredAccounts = mapWalletAccountsToAccounts(result.accounts)
setAllAccounts(allAccountsOnNetwork.concat(discoveredAccounts))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const DeveloperSettings: FC = () => {
const result = await discoverAccounts(currentNetwork.id)
if (result === "error") {
console.log("Error discovering accounts")
setLoading(false)
} else {
const discoveredAccounts = mapWalletAccountsToAccounts(result.accounts)
let accountIndex = allWalletAccountsOnNetwork.length
Expand Down

0 comments on commit d82e6ce

Please sign in to comment.