File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
src/connectors/argent/argentMobile/modal Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import {
1212} from "@walletconnect/utils"
1313import { EventEmitter } from "events"
1414
15- import { ProviderInterface } from "starknet"
15+ import type { ProviderInterface } from "starknet"
1616import type { EthereumRpcConfig } from "./starknet/adapter"
1717
1818export interface NamespaceAdapterOptions {
@@ -63,7 +63,7 @@ export abstract class NamespaceAdapter {
6363 requiredNamespaces,
6464 } : SessionTypes . Struct ) => {
6565 const chain = this . formatChainId ( this . chainId )
66- if ( requiredNamespaces ) {
66+ if ( requiredNamespaces && Object . keys ( requiredNamespaces ) . length > 0 ) {
6767 return ! ! requiredNamespaces [ this . namespace ] ?. chains ?. includes ( chain )
6868 }
6969 return ! ! namespaces ?. [ this . namespace ] ?. accounts . some ( ( account ) =>
@@ -97,8 +97,7 @@ export abstract class NamespaceAdapter {
9797
9898 protected setChainId ( chain : string ) {
9999 if ( this . isCompatibleChainId ( chain ) ) {
100- const chainId = this . parseChainId ( chain )
101- this . chainId = chainId
100+ this . chainId = this . parseChainId ( chain )
102101 this . eventEmitter . emit ( "chainChanged" , this . chainId )
103102 }
104103 }
You can’t perform that action at this time.
0 commit comments