Skip to content

Commit

Permalink
fix: added loader on wallet click
Browse files Browse the repository at this point in the history
  • Loading branch information
isordo committed Oct 20, 2023
1 parent bcb4f41 commit 663f03c
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions packages/beacon-ui/src/ui/alert/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ const openAlert = async (config: AlertConfig): Promise<string> => {
setIsLoading(false)
const p2pPayload = config.pairingPayload?.p2pSyncCode()
const wcPayload = config.pairingPayload?.walletConnectSyncCode()
const isOnline = navigator.onLine;
const isOnline = navigator.onLine

setAnalytics(config.analytics)

Expand Down Expand Up @@ -395,7 +395,7 @@ const openAlert = async (config: AlertConfig): Promise<string> => {
}

const handleNewTab = async (config: AlertConfig, wallet?: MergedWallet) => {
if(!wallet) {
if (!wallet) {
return
}

Expand Down Expand Up @@ -629,8 +629,10 @@ const openAlert = async (config: AlertConfig): Promise<string> => {
{
label: 'Connect now',
type: 'primary',
onClick: () =>
handleNewTab(config, currentWallet())
onClick: () => {
handleNewTab(config, currentWallet())
setIsLoading(true)
}
}
]}
/>
Expand All @@ -645,12 +647,10 @@ const openAlert = async (config: AlertConfig): Promise<string> => {
}
description={
hasExtension()
? `Please connect below to use your ${
currentWallet()?.name
} Wallet browser extension.`
: `To connect your ${
currentWallet()?.name
} Wallet, install the browser extension.`
? `Please connect below to use your ${currentWallet()
?.name} Wallet browser extension.`
: `To connect your ${currentWallet()
?.name} Wallet, install the browser extension.`
}
buttons={
hasExtension()
Expand Down

0 comments on commit 663f03c

Please sign in to comment.