Skip to content

Commit

Permalink
Fix: hide Social Login wallet button from onboard
Browse files Browse the repository at this point in the history
  • Loading branch information
katspaugh committed Nov 3, 2023
1 parent c81b9fb commit 200da2b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/hooks/wallets/useOnboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,15 @@ export const useInitOnboard = () => {
autoSelect: { label: E2E_WALLET_NAME, disableModals: true },
})
}

// Hide the social login button
{
const onboardRoot = document.querySelector('onboard-v2')?.shadowRoot
if (!onboardRoot) return
const walletButtons = onboardRoot?.querySelectorAll('.wallet-button-container')
const socialButton = Array.from(walletButtons).find((el) => /Social Login/.test(el.textContent || ''))
socialButton?.remove()
}
})
}, [chain, onboard])

Expand Down

0 comments on commit 200da2b

Please sign in to comment.