Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: separate stored WalletConnect sessions #2793

Merged
merged 1 commit into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/services/walletconnect/WalletConnectWallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type { SessionTypes } from '@walletconnect/types'
import { type JsonRpcResponse } from '@walletconnect/jsonrpc-utils'
import uniq from 'lodash/uniq'

import { IS_PRODUCTION, WC_PROJECT_ID } from '@/config/constants'
import { IS_PRODUCTION, LS_NAMESPACE, WC_PROJECT_ID } from '@/config/constants'
import { EIP155, SAFE_COMPATIBLE_METHODS, SAFE_WALLET_METADATA } from './constants'
import { invariant } from '@/utils/helpers'
import { getEip155ChainId, stripEip155Prefix } from './utils'
Expand Down Expand Up @@ -36,6 +36,7 @@ class WalletConnectWallet {
const core = new Core({
projectId: WC_PROJECT_ID,
logger: IS_PRODUCTION ? undefined : 'debug',
customStoragePrefix: LS_NAMESPACE,
})

const web3wallet = await Web3Wallet.init({
Expand Down
4 changes: 2 additions & 2 deletions src/services/walletconnect/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ export const SAFE_COMPATIBLE_METHODS = [

export const SAFE_WALLET_METADATA = {
name: 'Safe{Wallet}',
description: 'The most trusted platform to manage digital assets on Ethereum',
url: 'https://app.safe.global',
icons: ['https://app.safe.global/favicons/mstile-150x150.png', 'https://app.safe.global/favicons/logo_120x120.png'],
description: 'Smart contract wallet for Ethereum',
icons: ['https://app.safe.global/images/logo-round.svg'],
}

export const EIP155 = 'eip155' as const
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -16723,4 +16723,4 @@ yocto-queue@^0.1.0:
zksync-web3@^0.14.3:
version "0.14.3"
resolved "https://registry.yarnpkg.com/zksync-web3/-/zksync-web3-0.14.3.tgz#64ac2a16d597464c3fc4ae07447a8007631c57c9"
integrity sha512-hT72th4AnqyLW1d5Jlv8N2B/qhEnl2NePK2A3org7tAa24niem/UAaHMkEvmWI3SF9waYUPtqAtjpf+yvQ9zvQ==
integrity sha512-hT72th4AnqyLW1d5Jlv8N2B/qhEnl2NePK2A3org7tAa24niem/UAaHMkEvmWI3SF9waYUPtqAtjpf+yvQ9zvQ==
Loading