Skip to content

Commit

Permalink
Revert "fix: header logo + add error response"
Browse files Browse the repository at this point in the history
This reverts commit 5132dd5.
  • Loading branch information
iamacook committed Oct 5, 2023
1 parent 5132dd5 commit 3dd0f46
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/components/safe-apps/SafeAppIconCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const APP_LOGO_FALLBACK_IMAGE = `/images/apps/app-placeholder.svg`

const getIframeContent = (url: string, width: number, height: number, fallback: string): string => {
return `
<body style="margin: 0; overflow: hidden; display: flex;">
<body style="margin: 0; overflow: hidden;">
<img src="${encodeURI(url)}" alt="Safe App logo" width="${width}" height="${height}" />
<script>
document.querySelector('img').onerror = (e) => {
Expand Down
16 changes: 1 addition & 15 deletions src/services/walletconnect/WalletConnectContext.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { getSdkError } from '@walletconnect/utils'
import { type ReactNode, createContext, useEffect, useState } from 'react'

import useSafeInfo from '@/hooks/useSafeInfo'
Expand Down Expand Up @@ -63,20 +62,7 @@ export const WalletConnectProvider = ({ children }: { children: ReactNode }) =>
const session = walletConnect.getActiveSessions().find((s) => s.topic === topic)
const requestChainId = stripEip155Prefix(event.params.chainId)

if (!session || requestChainId !== chainId) {
try {
// Send error to WalletConnect
await walletConnect.sendSessionResponse(topic, {
id: event.id,
jsonrpc: '2.0',
error: getSdkError('UNSUPPORTED_CHAINS'),
})
} catch (e) {
setError(asError(e))
}

return
}
if (!session || requestChainId !== chainId) return

try {
// Get response from the Safe Wallet Provider
Expand Down

0 comments on commit 3dd0f46

Please sign in to comment.