Skip to content

Commit

Permalink
fix: always deeplinking
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaccoSordo committed Jan 8, 2024
1 parent 9e599f9 commit fc581e3
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions packages/beacon-ui/src/ui/alert/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,14 @@ const openAlert = async (config: AlertConfig): Promise<string> => {
return <></>
}

const setInstallState = (wallet?: MergedWallet) => {
if (!wallet || (wallet.types.length <= 1 && !wallet.types.includes('ios'))) {
return
}

setCurrentInfo('install')
}

const handleClickShowMoreContent = () => {
analytics()?.track('click', 'ui', 'show more wallets')
setShowMoreContent(!showMoreContent())
Expand Down Expand Up @@ -518,7 +526,7 @@ const openAlert = async (config: AlertConfig): Promise<string> => {
handleDeepLinking(wallet, uri)
} else {
setCodeQR(uri)
wallet && wallet.types.length > 1 && setCurrentInfo('install')
setInstallState(wallet)
}
} else {
handleCloseAlert()
Expand Down Expand Up @@ -571,7 +579,7 @@ const openAlert = async (config: AlertConfig): Promise<string> => {
setIsLoading(false)
} else {
setIsLoading(false)
wallet && wallet.types.length > 1 && setCurrentInfo('install')
setInstallState(wallet)
await setDefaultPayload()
}
}
Expand Down

0 comments on commit fc581e3

Please sign in to comment.