Skip to content

Commit

Permalink
fix: removed showNetworkerrorAlert
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaccoSordo committed Jun 24, 2024
1 parent 5c0f9de commit fa66935
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions packages/beacon-ui/src/ui/alert/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -431,18 +431,6 @@ const openAlert = async (config: AlertConfig): Promise<string> => {
if (config.closeButtonCallback) config.closeButtonCallback()
}

const showNetworkErrorAlert = () => {
handleCloseAlert()
setTimeout(
() =>
openAlert({
title: 'Error',
body: 'Network error occurred. Please check your internet connection.'
}),
500
)
}

const updateSelectedWalletWithURL = (url: string) => {
let wallet = JSON.parse(localStorage.getItem(StorageKey.LAST_SELECTED_WALLET) ?? '{}')

Expand All @@ -463,7 +451,15 @@ const openAlert = async (config: AlertConfig): Promise<string> => {

// check whether the uri contains a valid symmetric key or not
if (!parseUri(uri).symKey) {
showNetworkErrorAlert()
handleCloseAlert()
setTimeout(
() =>
openAlert({
title: 'Error',
body: 'Network error occurred. Please check your internet connection.'
}),
500
)
return ''
}

Expand Down

0 comments on commit fa66935

Please sign in to comment.