From c312e421e54321229dcdec09e49b5c1a6458e8b9 Mon Sep 17 00:00:00 2001 From: Gancho Radkov Date: Wed, 20 Mar 2024 14:57:41 +0200 Subject: [PATCH] chore: updates canary --- examples/wallet/package.json | 2 +- examples/wallet/yarn.lock | 8 ++++---- src/controllers/engine.ts | 4 ++++ 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/examples/wallet/package.json b/examples/wallet/package.json index d548245..ca54f28 100644 --- a/examples/wallet/package.json +++ b/examples/wallet/package.json @@ -14,7 +14,7 @@ "@json-rpc-tools/utils": "1.7.6", "@nextui-org/react": "1.0.0-beta.12", "@walletconnect/core": "2.11.2", - "@walletconnect/se-sdk": "1.7.0-canary-59e3831", + "@walletconnect/se-sdk": "1.7.0-canary-82cf156-1", "@walletconnect/utils": "2.11.2", "ethers": "5.7.2", "framer-motion": "9.0.2", diff --git a/examples/wallet/yarn.lock b/examples/wallet/yarn.lock index 1dd18be..f708480 100644 --- a/examples/wallet/yarn.lock +++ b/examples/wallet/yarn.lock @@ -2066,10 +2066,10 @@ dependencies: tslib "1.14.1" -"@walletconnect/se-sdk@1.7.0-canary-59e3831": - version "1.7.0-canary-59e3831" - resolved "https://registry.yarnpkg.com/@walletconnect/se-sdk/-/se-sdk-1.7.0-canary-59e3831.tgz#805ec7ef15d3660214ccaadc93bcf7c8c0e65f6f" - integrity sha512-xE942ayz93hG5/a6eRsVsfSTdeoqUXrHLHIhBkBNdWLU7AEmwe+8cVV7mRhKxWJRz5AmQXqFCfNwqQR9/m0Mdg== +"@walletconnect/se-sdk@1.7.0-canary-82cf156-1": + version "1.7.0-canary-82cf156-1" + resolved "https://registry.yarnpkg.com/@walletconnect/se-sdk/-/se-sdk-1.7.0-canary-82cf156-1.tgz#e8b52b29d1f32a55e9d21bf13ff6441cc9b771ea" + integrity sha512-3DMq5hUdIh68u9KeUEenDwkTDm4Kif2B2qscNlqqo0bp/6bM0tSlwM6XwtOgty3VOysUHhhSE4G+lJafs1TagA== dependencies: "@walletconnect/web3wallet" "1.10.2" diff --git a/src/controllers/engine.ts b/src/controllers/engine.ts index 3394ac0..210c526 100644 --- a/src/controllers/engine.ts +++ b/src/controllers/engine.ts @@ -101,6 +101,10 @@ export class Engine extends ISingleEthereumEngine { public updateSession: ISingleEthereumEngine["updateSession"] = async (params) => { const { topic, chainId, accounts } = params; + if (chainId < 1) { + // eslint-disable-next-line no-console + return console.error("se-sdk, updateSession Invalid chainId", chainId); + } const session = this.web3wallet.engine.signClient.session.get(topic); const formattedChain = prefixChainWithNamespace(chainId); const formattedAccounts = formatAccounts(accounts, chainId);