Skip to content

Commit

Permalink
refactor: revert change on appkit client
Browse files Browse the repository at this point in the history
  • Loading branch information
zoruka committed Nov 6, 2024
1 parent ba93925 commit 48a278a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/appkit/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,13 @@ export class AppKit {
return ChainController.getAccountProp('caipAddress', chainNamespace)
}

public getAddress = (chainNamespace?: ChainNamespace) =>
ChainController.getAccountProp('address', chainNamespace)
public getAddress = (chainNamespace?: ChainNamespace) => {
if (ChainController.state.activeChain === chainNamespace || !chainNamespace) {
return AccountController.state.address
}

return ChainController.getAccountProp('address', chainNamespace)
}

public getProvider = () => AccountController.state.provider

Expand Down

0 comments on commit 48a278a

Please sign in to comment.