Commit e0eb701b authored by cartcrom's avatar cartcrom Committed by GitHub

feat: log connection activation/errors (#6333)

* feat: log connection activation/errors in console.debug

* fix: remove now-redundant comment
parent 36cb0668
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment