Skip to content

Commit

Permalink
Fix: separate WalletConnect storage
Browse files Browse the repository at this point in the history
  • Loading branch information
katspaugh committed Nov 20, 2023
1 parent 0b7d378 commit 9fb976c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
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==

0 comments on commit 9fb976c

Please sign in to comment.