Skip to content

Commit

Permalink
hide user reject
Browse files Browse the repository at this point in the history
  • Loading branch information
KishiTheMechanic committed Oct 7, 2024
1 parent 72d4664 commit fda7687
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/components/providers/SolanaWalletProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ export default function SolanaWalletProvider({ children }: Props) {

const onError = useCallback(
(error: WalletError) => {
if (!error.message.includes('user rejected the request.')) {
if (
!error.message.includes('user rejected the request.') &&
!error.message.includes('User rejected the request.')
) {
toast({
title: error.name,
description: error.message,
Expand All @@ -42,7 +45,10 @@ export default function SolanaWalletProvider({ children }: Props) {
async (adapter: Adapter) => {
adapter.autoConnect().catch(async (e) => {
if (e instanceof Error) {
if (!e.message.includes('user rejected the request.')) {
if (
!e.message.includes('user rejected the request.') &&
!e.message.includes('User rejected the request.')
) {
toast({
title: e.name,
description: e.message,
Expand Down

0 comments on commit fda7687

Please sign in to comment.