feat: log connection activation/errors (#6333)
* feat: log connection activation/errors in console.debug * fix: remove now-redundant comment
This commit is contained in:
parent
36cb0668a3
commit
e0eb701bc0
@ -156,15 +156,16 @@ export default function WalletModal({ openSettings }: { openSettings: () => void
|
||||
setPendingError(undefined)
|
||||
|
||||
await connection.connector.activate()
|
||||
console.debug(`connection activated: ${connection.getName()}`)
|
||||
dispatch(updateSelectedWallet({ wallet: connection.type }))
|
||||
if (drawerOpenRef.current) toggleWalletDrawer()
|
||||
} catch (error) {
|
||||
console.debug(`web3-react connection error: ${error}`)
|
||||
// TODO(WEB-3162): re-add special treatment for already-pending injected errors
|
||||
if (didUserReject(connection, error)) {
|
||||
setPendingConnection(undefined)
|
||||
} // Prevents showing error caused by MetaMask being prompted twice
|
||||
else if (error?.code !== ErrorCode.MM_ALREADY_PENDING) {
|
||||
console.debug(`web3-react connection error: ${error}`)
|
||||
setPendingError(error.message)
|
||||
} else {
|
||||
setPendingError(error)
|
||||
|
||||
sendAnalyticsEvent(InterfaceEventName.WALLET_CONNECT_TXN_COMPLETED, {
|
||||
result: WalletConnectionResult.FAILED,
|
||||
|
Loading…
Reference in New Issue
Block a user